I’ve been meaning to play around with RF circuits for awhile now, but always felt a bit intimidated. However, I recently watched an amazing talk by Michael Ossmann which inspired me to give a simple RF transceiver circuit a try. My immediate goal is to see if I can build a working RF transceiver. If that goal succeeds then I’d like to see if I could take it a bit further and make a digital voice handheld transceiver or possibly something like a video transmitter for an RC plane. For those interested, here’s a link to the talk.
Mr. Ossmann gives 5 simple rules to follow for RF design. These are the rules he recommends if you want to delve into RF pcb design without having to buy expensive test gear and read mountains of books:
- Use 4 layers.
- Use integrated components.
- Use 50 ohms everywhere.
- Follow manufacturer recommendations.
- Route RF first.
The first rule, use 4 layers, is fairly self explanatory. By having 4 layers, it’s possible to have a stack up with a dedicated ground and power plane and a separate layer for RF signals. Here’s the recommended stack up mentioned in the video:
---------------------RF signals
---------------------GND
---------------------VCC
---------------------Signals
The second rule is to use integrated components. The idea here is to use chips that have the RF magic baked in wherever possible. For my project I opted to use a Semtech SX1238 transceiver. I discovered this chip through the digikey parametric search. Some feature’s I like about this particular transceiver is obviously it’s got an RF transmitter/receiver built in, 50 ohms output, good documentation, a built in power amplifier on the transmit(up to 27dB) as well as a low noise amplifier on the receive end. This particular transmitter has a frequency range between 868MHz and 915MHz in the ISM band.
The third rule speaks about using 50 ohms everywhere, which refers to impedance matching. So ideally you’d have 50 ohm outputs and 50 ohm transmission lines etc. In the video Mr. Ossmann uses Oshpark’s 4 layer stack up and an online pcb calculator to determine the trace width needed for 50 ohms impedance. I was planning on using Oshpark anyway, so I used the same numbers he used for his calculation. Here’s the link to Oshpark’s 4 layer board specs. By plugging in the pertinent numbers from the Oshpark website to the pcb calc we find out that in order to get a 50 ohm microstrip we need a 12 mil trace.
Rule number four states that we should follow the manufacturer recommendations. Of course, this is usually a good idea. For this rule I looked at the datasheet for the SX1238 and copied over the recommended schematic and components for the transceiver. Here’s my finished schematic:
The fifth and final rule is to route RF first. The idea is to optimize the top layer of the PCB for RF. Michael Ossmann specifies that in general for this rule, you should keep traces short and direct and keep other signals away from RF. For this rule I tried to keep the RF specific traces on the top layer and route the other traces on the bottom layer. This went pretty well, although the giant ground pad underneath the SX1238 made it difficult at times to route traces close to the component. One other problem I ran into was attaching the ground traces from the transceiver to the giant ground pad. At first I had one large pad specified in the footprint for the transceiver. But the problem with this was pcbnew wouldn’t let me route the traces out to the pad. I ended up just breaking up the pad into smaller pads and squishing them all together as can be seen below. This allowed me to route the ground traces without a hitch.
Here’s the finished routed board:
And finally, the 3d money shots. I added an optional shield over the RF components. I saw the “Designed with Kicad” graphic used by @ChrisGammell and @Steve_Mayze and really liked it, so I stuck it in a boring part of the board to give it some zest.