# Gaining RF Knowledge:

### An Analog Engineer Dives Into RF Circuits

Chris Gammell

Analog Life, LLC

Presented at the Hackaday Superconference 2019

## Goals for this talk

• Explain how I entered the world of working with RF
• Explain it without burying you in math
• Give you some resources to make your own way

# You may have more experience I do!

I wanted this talk to help shortcut some of the struggles I had (and have) when I was getting started with the field of RF.

# Who am I?

## Chris Gammell

• 15 years of electronics design.
• Have worked in a couple industries
• Semiconductor
• Test and measurement
• Industrial controls
• Component sourcing
• Co-host of The Amp Hour electronics podcast (https://theamphour.com)
• Teaching people electronic design online for the past 5 years as part of Contextual Electronics

# Not exactly blazing speed

Higher speed stuff like digital was always there as well, but usually nothing very high speed either (<100 MHz)

# My first RF Design

## Why?

• The modem and the antenna were pre-matched
• I minimized my interaction with it (kept the RF trace short)
• Because I didn't need to take it to production

# Can we do this all the time?

## Troubleshooting

What happens when things go wrong on the bench?

## FCC / CE compliance testing

What happens when things go wrong at the \$10K/day test lab?

## Being a good RF citizen

Your signals might interfere with someone else's signals and that's not nice.

# RF concepts that are tricky

Especially for beginners

# We're dealing with things in the frequency domain.

### When someone talks about "the spectrum" of a signal

They are asking about the frequency content contained within a signal that exists in the real world.

http://tiny.cc/RigolFFTplot

# Components act differently based on frequency

• Block frequencies from "passing through" at low frequencies.
• Allow frequencies to "pass through" at high frequencies
• Where this transition happens depends on the capacitance of the component.

## Capacitors

• Allow frequencies to "pass through" at low frequencies.
•  Block frequencies from "passing through" at high frequencies
• Where this transition happens depends on the inductance of the component.

# Thinking Logarithmically

## Logarithmic scales

You're going to see units like "dB", or "dBm" which an easy way to refer to things that change in value by orders of magnitude

## It's all about the power

Most RF circuits deal in power, not in just voltage or current

## Analyzing RF subsystems is often about minimizing the degredation of the signal through the system

This is referred to as the "link budget"

## What does the RF path look like?

Image courtesy of osmocom.org

# Impedance matching ensures we don't introduce signal degradation

## A counter example:

### What happens when there is a source (like an ESP32) and an antenna (like a PCB antenna) that are not perfectly matched?

• You won't transmit as far as you thought

• Your system will be less efficient

• Energy is "bounced back" and is usually lost to heat or radiated emissions (bad)

• It may not work at all

• You might damage your output driver section

## Isn't the antenna designed to work at 50 ohms?

• The world is imperfect!
• Environmental conditions can affect it, including things like the enclosure or thing surrounding the antenna

• Antenna manufacturing variations means you might have different specs than stated

## Pi network

http://tiny.cc/mo0mbz

"Match a 1000-Ω source to a 100-Ω load at frequency (f) of 50 MHz. You desire a bandwidth (BW) of 6 MHz."

## Pi network

http://tiny.cc/mo0mbz

# Spectrum Analyzer

## Spectrum Analyzer

http://tiny.cc/RigolSA

## Spectrum Analyzer

• Allows you to see a snapshot of the spectral content
• Taken over time, you can view the "waterfall" plot
• See all spectral content of the signal, including spurious noise and other potential sources of error

# VNA

\$

\$

\$\$\$

\$\$

\$\$\$\$

## Smith chart

This is actually a measurement tool, which plots various measurements

## Smith Chart

Image courtesy digikey.com

## S-parameters

• S11 - Return loss
• S21 - Insertion loss
• S12 - Power transfer from P1 -> P2
• S22 - Reflected power P2 -> P1

## Return loss (S11)

Also known as "reflection coefficient"

## VSWR

• This stands for the "Voltage standing wave ratio"
• Measures how well the antenna is impedance matched to the source that is radiating RF energy.
• It is measuring the matched characteristics, not that it necessarily transmits the signal being pumped in.
• VSWR defined by the equation below, including gamma (Γ), which isd the S11 parameter shown earlier

Image courtesy antenna-theory.net

omlinc.com

# Hands-on testing

## Helped to get a feel for VNA Measurements

• Where was the resonant frequency and which frequencies will it transmit well? (SWR and Insertion Loss)
• How well matched was the antenna at my target frequency? (Smith Chart)

## Getting a feel for good and bad antenna designs

• Good: Off the shelf antennas

• Connectors
• Cables
• Calibration

## What "DC" assumptions fall apart at higher frequencies?

• A wire is just a wire

• PCBs construction isn't as important as the components placed on that PCB

• A capacitor is there for charge storage

• Current can be isolated by ground cuts

• Current follows the path of least resistance

# "A wire is just a wire"

## Actually every wire is an inductor

http://tiny.cc/Inductor_QR

## Simple example:

### Past 10 MHz, breadboard signal quality falls off

Image courtesy makerspaces.com

## More complex PCB example:

### In the GHz range, the small inductance of a PCB trace can have outsized effects on your signal

• Track width: 0.1 mm (3.94 mil)
• Track length: 50 mm (1.97 in)
• Height above GND: 0.2 mm (7.87 mil)

• Track inductance:  63.2 nH
• Impedance @ 2.4GHz: 953 ohm

http://tiny.cc/AAC_impedance

## Ground plane should always be the layer below where your signal is running

https://tiny.cc/Stackup_JLC

# "A capacitor is there for charge storage"

Image courtesy of Wikipedia

Image courtesy of iFuture Technology

http://tiny.cc/KemetCapPDF

http://tiny.cc/KemetCapPDF

# "Current can be isolated by ground cuts"

## Noise reduction techniques in low level analog involves cutting the ground plane to stop noise from "leaking" over

https://www.analog.com/en/analog-dialogue/articles/staying-well-grounded.html

# "Current follows the path of least resistance"

## At DC, this is the path of least resistance.

http://tiny.cc/ECE_SE_highspeed

## The magnetic fields between two signals flowing in opposite directions cancel out

### This means the inductance will be lowest directly below the signal path and the signal will preferentially flow black on the ground plane

http://tiny.cc/EIU_edu_wires

# What about Bluetooth, Cellular, Wifi, LoRa, _______, etc, etc?

## All of these communication methods are different versions of the same fundamentals

(and most are really brand names)

• Bluetooth - 2.4 GHz
• WiFi - 2.4 GHz and 5 GHz
• LoRa, SigFox
• 433 MHz (Global)
• 915 MHz (US)
• 868 MHz (Europe)
• GSM Cellular
• 900, 1800 MHz (Europe, Asia)
• 850, 1900 MHz (US)
• 3G, LTE, 5G
• Various frequencies (see:  http://tiny.cc/cellular_freq)

# Resources

## Books

• "A Practical Guide To RF And Mixed Signal Printed Circuit Board Layout" -  Brendon Parise and Scott Nance[1]

• "RF Circuit Design" - Christopher Bowick [2]
• "Planar Microwave Engineering" - Thomas Lee [3]

[1]: https://amzn.to/2ZdnUzm

[2]: https://amzn.to/2HmQwey

[3]: https://amzn.to/2HnSWcY

• GSG HackRF

# Thank you!

E-mail: chris@analoglife.co

Many thanks to Jeff Keyzer (@mightyohm) and Derek Kozel (@derekkozel) for reviewing this presentation

By Chris Gammell