Hi all! I’m a firmware developer with little knowledge in analog electronics… I deal with firmware for IOT projects all the time.

I had to make a breakout board with an off the shelf RF module with self contained PCB antenna. Now I’m intrigued in the hardware side. I’m inclined to design them from scratch myself. (Obviously ignoring the EMI and FCC certifications for the time being).

What concepts should I be familiar with to achieve this? Starting on I figured to brush up on circuit theory and signals. Where do I go from here? What materials would you recommend? Hopefully I don’t need to get into hardcore RF theory to design these PCBs (I know kicad already has these premade antenna blocks).

Thank you.

  • remotelove@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    6 days ago

    Start looking for YouTube videos with Eric Bogatin. He is a professor at CSU Boulder and has re-written the book on proper PCB design. (He does have a book, but he debunked a ton of old theories on high frequency board design and signal integrity.) If there is anything you must do, is follow his work on ground and power plane design or anyone that references his work. If someone uses a ground plane to just “fill in gaps” or have it act as a generic fix-all “shield”, ignore them. (Many RF/HF myths came from the way boards were fabricated, not because of a specific circuit function.)

    Once your signals get past a certain speed, you need to learn how electricity actually flows while understanding that both AC and DC theory applies. If you didn’t know that energy flows in the field around a wire, you probably need to step back a little before you step forward. (Reference Veritasium on YouTube: The Big Misconception About Electricity )

    You don’t really need to get into heavy RF theory, but it helps. If there is anything you must learn about, it’s impedance matching and why it matters. To summarize quickly, if there is an impedance mismatch between your transmitter and your antenna, you could easily blow out your transmitter due to excessive power draw and signal reflection. (That is somewhat rare for low power devices, but not uncommon once you start to transmit above 5-10 watts.) If a device needs an antenna, use it, even if were are talking about something as common as WiFi.

    For your first designs, respect trace lengths and recommended components. Most of all, respect the keep out areas around an antenna diagram and ensure your ground plane is properly designed and away from the antenna. There are many shitty designs that do work, but you want to strive for precision for your first few iterations.

    Also, decoupling becomes more than just a thing to do that might improve stability of your MCU or other components. It’s entirely possible to get the rest of your PCB resonating which will cause all kinds of noise. This is partially negated with proper decoupling.

    High frequency design just takes a little more care. Just remember the basic saying: Everything is a resistor, capacitor and inductor.

    Now, if you just work with modules (and ESP32 with an integrated antenna comes to mind), almost all of the hard work is done. Make sure you have proper clearances, slap the thing on a board and you are good to go.

    For the absolute basics, impedance matching with proper antenna length is what you need to learn first. (Receivers are much more forgiving than transmitters, btw.)

    I am fully aware that some key details are missing here and just summarized as best as I could. If something I said turns out to be misleading, that isn’t the intent and I apologize in advance. The intent was just to kick start more curiosity.

    Edit: RF design and high frequency board design share some design considerations. Not all signals on an RF project are going to be high frequency and not all high frequency designs use RF, but, all high frequency designs can quickly become RF designs.

    Also edited a time or two for clarification, grammar and spelling.

      • remotelove@lemmy.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 days ago

        Lol! I suppose the million dollar question is if you are generating interference. You are allowed to have a shitty design that works as long as you aren’t causing grandmas pacemaker any problems.

        • ikidd@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 days ago

          My stuff is all in the middle of nowhere for making my watering bowls talk to the pumps or open cattle gates over Lora, and I’ve moved back to prebuilt E32 modules because they’re way less expensive than all that shit used to be.

          We don’t spend money on Grandma, she’ll outlive us all.

          • remotelove@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            6 days ago

            It might be worth it for you to get a ham radio license. If the low power modules work for what you need, that is just fine. For the distances you are talking about with cattle fields, being able to legally transmit at over 1000 watts could have perks. (I jest, but having a little more power, in the 1 to 2 watt range, might be practical.)

            At a minimum, a portable ham radio might be a good safety tool depending on the size of the ranch. It would be hella more reliable than CB as well.

            • ikidd@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              6 days ago

              Yah, I’ve had my license since I was young, I come from a long line of nerds. So I use 1W units on the 433 band. And we use VHF around the farm since we can be 15 km from cell range.

              • remotelove@lemmy.ca
                link
                fedilink
                English
                arrow-up
                2
                ·
                6 days ago

                Same here. Nerd blood runs deep in families.

                (When the power brick blew out for my Atari, my dad simply cut open a random spare and re-wound the transformer to match the correct voltage. It was the neatest thing I had ever seen at that age.)

                • ikidd@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  edit-2
                  6 days ago

                  We never bought a TV because Dad would pick them up at the dump and fix them, doing some sort of magic with the CRTs.

                  And my grandpa hand-built one of the first radios in the area, and people would come over to listen to radio programs. When phones came to our area, he was running lines on the barbwire fences over to neighbors to use it until the phone coop could get out to hook them up a couple years later.

                  They were nerds before it was cool. We stand on the shoulders of giants.

          • ntn888@lemmy.mlOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            6 days ago

            wow didnt’ know that Ebyte modules were that popular! I’ve come across them in site like lcsc and Ali… Making use of them is what my current skill level allows. some of the varieties are relatively expensive though…

            • ikidd@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              6 days ago

              I’ve been blow away how inexpensive they’ve become. I’m getting 1W 433 modules for like $15 now, I think I got them off amazon last time. They’re not on a public band or power rating, at least for NA, but I have a ham license so in my area I’m OK, and besides, nobody else is going to notice.

              At one time I was using the Heltec Lora V2 modules but they’re way more expensive for low power and I became convinced they had no ESD hardening because if I looked at them sideways they’d crater.

              I made a couple of my own shit designs with integrated antennas and they worked, but it’s not my forte. I made them because getting 433 was hard at the time, and I was convinced I needed the lower freq to get better LOS through trees.

              • ntn888@lemmy.mlOP
                link
                fedilink
                English
                arrow-up
                1
                ·
                6 days ago

                I’m getting 1W 433 modules for like $15 now

                haha I guess cheap is relative :) I was considering parts at 4 to 5$ range. But i’m talking about low power ble/zigbee etc…

                • ikidd@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  ·
                  6 days ago

                  Well, with some of my telemetry I’m trying to punch 10 klicks so there’s no kill like overkill. The little SX1278s are inexpensive and they’re legal power, and there’s plenty of examples out there for them.

                  I kinda like the UART design on the e32s though, but it was a struggle getting the library that uses them to work, and there’s little tricks like having to initialize the serial independent of his constructors, you read the code and it supposedly opens the serial, but it doesn’t work if you don’t do it beforehand, at least with the modules I was using.

    • ntn888@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 days ago

      Wow, thank you for the very detailed post! I see that impedance matching is an important base subject. Is it covered in standard circuit theory textbooks. I’m looking to use this book. I tried to skim the contents but couldn’t find it… Maybe I need to separately learn it? Thanks.