FMCW Radar With 3D Printed Antennas

by DAD_Projects in Circuits > Sensors

74 Views, 1 Favorites, 0 Comments

FMCW Radar With 3D Printed Antennas

radar_edit.jpg

This project builds on MIT OpenCourseWare's coffee can radar project. It explores multiple aspects of electrical engineering including antenna design/simulation, microwave circuitry, PCB design, control hardware, digital signal processing, and embedded systems.

Several enhancements to the MIT project were made and will be further detailed:

-3D printed, high-gain pyramidal horn antennas optimized and simulated with Altair Feko and modeled with Fusion 360

-Radar controller hardware and filter simulated and optimized with LTSpice

-A printed circuit board designed with KiCad

-STM32G4 (ARM Coretex-M4 Core) for sampling, digital signal processing (DSP), and transmitting data

-Firmware utilizing ARM's CMSIS DSP library to perform real-time Fast Fourier Transforms (FFTs) and Doppler frequency extraction

-Python script to display data read from USB

Supplies

Hardware

Mini-Circuits RF modules (VCO, attenuator, power divider, LNA, and mixer)

STM32G4 microcontroller

Circuit components (operational amplifiers, LDO regulators, capacitors, resistors)

3D Printer

Vector Network Analyzer

Oscilloscope

Multimeter

Software

Fusion 360

Altair Feko

KiCad

LTSpice

STM32CubeIDE

Python

FMCW Radar Theory

theory_1.png

A pulsed radar will send a radio wave out and measure the distance of a target by the round trip time delay. It transmits and then listens. An FMCW radar takes a different approach in that it transmits and listens simultaneously. It does this by constantly changing its transmit frequency at a known rate and measuring the received frequency.

The basic operation is the input voltage to a Voltage Controlled Oscillator (VCO) is swept at a constant rate. This in turn makes the RF output of the oscillator sweep through a frequency ramp. After amplification, half of the signal is transmitted. The other half is fed to the first input of an RF mixer. Meanwhile, the receive antenna's signal is amplified by a Low Noise Amplifier (LNA) and then fed to the second input of the RF mixer. The mixer's output is the frequency difference of the two signals. This frequency difference is proportional to the time delay of a target's reflection, and the distance can be calculated by knowing the frequency ramp rate of the VCO and the speed of light. Since we measure time-domain voltages, an FFT is used to extract the frequency components of the received signals.

(In case anyone wonders what the attenuator is doing, it is keeping the amplifier's input voltage below its maximum rated voltage.)

An interesting fact is that by number, FMCW radars are the most common type of radars.

3D Printed Antenna--Initial Design (FAILURE)

multipiece_cad.png
20240414_065638.jpg
20240427_095751.jpg
20240427_102537.jpg
20240509_204652.jpg
20240508_162857.jpg
20240510_200825.jpg
20240509_082914.jpg
20240509_083537.jpg
20240509_084030.jpg
20240509_200718.jpg
20240511_171031.jpg

MIT's radar project used aluminum coffee cans for antennas. Although this is a great low-cost solution, finding metal coffee cans in grocery stores these days is nearly impossible. 3D printing custom antennas became an attractive alternative, offering both improved performance and design flexibility.

I used an iterative set of design equations from the horn antennas chapter of Balanis's Anetenna Theory. The python script is attached. I chose a targeted gain of 15 dBi which would substantially improve upon the coffee can's ~7 dBi of gain. The horn dimensions were integrated with an S-band waveguide launcher (WR-340) and modeled in Fusion 360.

The widest dimension of the horn exceeded my 3D printer's bed. Therefore, I split it into multiple pieces with additional mating flanges to bond them together. The pieces were bonded together using JB-Weld and spring clamps around the flanges. I used sandable primer on the interior of the horn antenna to smooth the layer lines and the mating bondline step. However, this was a complete failure for several reasons. The joints along pieces exhibited a larger step than desired, the pieces warped when they were left for too long outdoors in the heat, and the epoxy was a weak bond for the PLA material.

3D Printed Antenna--Improved Design

single_piece_cad.png
20240520_050408.jpg

Abandoning the ideal design equations for a pyramidal horn, I designed a new horn antenna which reused the integrated waveguide launcher but would not exceed the 3D printer size capability. Parametric optimizations showed that limiting the aperture size to the printer's widest dimensions reduced performance, but most could be regained by lengthening the horn to the printer's maximum height. Only ~0.5 dBi of gain was lost according to the simulations. This is a fantastic trade especially considering the multipiece antenna would have likely had losses associated with bondline steps.

3D Printed Antenna--Improved Design Simulations

radiation.gif

I optimized the wire feed length inside the wave guide launcher to achieve the best performance at the center of the operational bandwidth, and simulations showed surface currents were well behaved.

3D Printed Antenna--Improved Design Predicted Gain

broadband_gain_and_pattern.png

Predictions showed an approximately 30 degree half power beamwidth in the E-plane, which is half that of the coffee can design. This is a substantial improvement for a radar application. Additionally, the peak gain predictions were fairly constant and high across the intended frequency bandwidth of 2.4 to 2.5 GHz.

3D Printed Antenna--Improved Design Print and Finishing

20240601_134958.jpg
20240609_155429.jpg
20240614_062617.jpg
20240614_064254.jpg
20240614_064304.jpg
20240614_065621.jpg
20240615_121913.jpg

Two horn antennas were printed using PLA+. Each print used 0.5 kg of filament over 38 hours to print.

The non-ideal layer lines from printing needed to be filled to avoid surface losses. I used Bondo (Original Filler) to fill them and a lot of sanding to smooth them as smooth as possible. To finish them, Rust-Oleum sandable primer was sprayed, and high grit sandpaper was used.

A plastic antenna would of course be a poor one. To perform electrically, Super Shield 843AR silver coated copper conductive paint was sprayed onto the surface. The choice of paint was based on Antenna Test Lab's very helpful testing of different conductive paints.

The paint was thinner than expected, so I did get some runs and solvent bubbles deep in the wave guide launcher's cavity where it is was difficult for an aerosol to flow. While the paint's surface finish was not pristine, it did test very conductive after curing and adding connectors. The resistance from the SMA connector's shield to the paint surface near the apererture read less than 1 Ohm using a multimeter.

3D Printed Antenna--Testing

S-Band_Radar_Horn_Antennas_Meas_S11.png

Without an antenna measurement range, it was not possible to directly measure the true performance of the antennas, specifically the radiation patterns. The best that could be done was to measure the S parameters of each. I used a NanoVNA with a maximum frequency of 3 GHz. The measurement capability and functionality of a NanoVNA is very limited compared to commercial VNAs, but the price fits a hobby budget at ~$100.

Measurements showed 1-2 dB degraded return loss than predictions for 2 to 3 GHz. In the radar's intended operational range (2.4 to 2.5 GHz), the return loss was 12 dB or better showing fairly good performance. Additionally, the reflection null at 2.45 GHz matched precisely with my chosen optimization frequency. To construct the feed, a thin wire was soldered to an SMA connector. The length of the wire was nominally a quarter-wavelength but was fine-tuned using optimizations in Feko. The measured null/minimum verifies the feed was designed and trimmed correctly.

Radar Controller and Processor

radar_controller_schematic.png

To control the radar's RF components several analog circuits are required.

1) A bank of voltage regulators for RF power, microcontroller power, and op-amp rail voltages

2) A triangle wave generator to sweep the voltage controlled oscillator (VCO)

3) A low-pass filter to reject high frequency noise coming from the mixer's output

Radar Controller and Processor--Voltage Regulators

voltage_regulators_combined.png

In order to provide flexibility for fine tuning, adjustable Low Dropout (LDO) regulators were used with potentiometers for the bank of voltage regulators. I also included additional test points tied to the terminals of the potentiometers in the circuit board design allowing measurement of the resulting resistance.

Radar Controller and Processor--Triangle Wave Generator

Triangle_Wave_Generator.png
Triangle_Wave_Generator_ltspice_circuit.png
Triangle_Wave_Generator_ltspice.png

The triangle wave generator is composed of two operational amplifiers. One is configured as a Schmitt trigger and the other as an integrator. The Schmitt trigger reverses polarity at a designed frequency creating a square wave for free. The integrator's output is the triangle wave. There is no input to this circuit. A good discussion of this circuit is found in The Art of Electronics by Horowitz and Hill. Simulations in LTSpice confirmed the controller generated the desired triangle wave as shown in the figures.

Radar Controller and Processor--Low Pass Filter

Tow-Thomas.png
Tow-Thomas_LTspice_circuit.png
Tow-Thomas_LTspice.png

I am a big fan of the Tow-Thomas filter topology. The filter's gain, Q, and cutoff frequency can all be independently set with three op amp sections. This flexibility was very desirable since the radar's output is a very low voltage and requires gain adjustment to balance between increasing sensitivity and avoiding saturation. The filter's Q was designed to be 0.707 (no "peaking"), and the cutoff frequency was nominally set to 15 kHz. LTSpice simulations confirmed the response as shown in the figures.

Radar Controller and Processor--PCB Design

pcb_3d.png

I designed a controller PCB using KiCad. The voltage controllers, triangle wave generator, and low pass filter were organized into their individual groups. A battery holder, connector block for power and control, and SMA connector the the RF mixer completed the design.

A two layer design met my requirements. However, in retrospect, a four layer design may have been easier to implement and would have provided better EMI protection.

Radar Controller and Processor--PCB Assembly

20240616_133234_crop.jpg

After boards were received, I soldered the various components. A multimeter was used to fine tune the potentiometers controlling the voltage regulators. Similarly, an oscilloscope was used to adjust the triangle wave's minimum and maximum voltages as well as frequency.

The radar controller board was connected to the RF modules and antennas. The final analog voltage, which would later be sampled by an ADC, was connected to an oscilloscope for testing outdoors. The measured frequencies adjusted to varying distances of conductive objects (aluminum foil).

Radar Controller and Processor--Firmware

stm32_radar_pinout.png

While the frequencies of measured voltages could be observed on an oscilloscope, this is not very useful for determining ranges of objects. Digital signal processing is needed - accomplished using the STM32 G4 series microcontroller. The G4 series is designed for mixed-signal applications, has a 170 MHz clock frequency, and is built on ARM's Cortex-M4 architecture, which met my high data processing rate requirement.

An ADC input was used to sample the amplified and filtered analog mixer voltages at a precise sampling rate. Direct Memory Access (DMA) was used to leave the CPU available for DSP operations. Once the required buffer was filled, an interrupt was triggered and a real-valued FFT was performed on the data. The CMSIS DSP library for Cortex-M processors was used for the FFT. The project-specific source code to implement the FFT was actually only a few lines and straight-forward. The largest hurdle was setting compiler and linker settings correctly to actually use the CMSIS DSP library.

After the frequency components were calculated by the FFT, the magnitude and logarithm were performed to calculate power in decibels, again with the CMSIS library. These raw 32-bit floating point values were then sent to a connected PC via DMA-enabled UART.

Last, I included several LEDs in the design to serve as status indicators and verify error-free sampling.

Radar Controller and Processor--PCB Correction

20250103_095650.jpg
Triangle_Wave_Generator_With_Voltage_Clamp.png
voltage_clamp.png

Since a triangle wave was used to sweep the VCO, frequencies increase and decrease in the same period. It was important to differentiate them, and not including them was an oversight of my initial PCB design. Luckily, I had included a test point for the square wave portion of the triangle wave generator. This signal toggles between high and low exactly when the triangle wave's slope reverses.

I soldered a wire to the square wave output and made a voltage clamp circuit on a breadboard. The clamp limits the voltages to 3.3 V so as not to exceed the microcontroller's voltage ratings. The output of this circuit was then used by the microcontroller as a trigger for when to begin sampling the radar's received signal.

The final result was messier than I'd like, but it functioned.

Python Display

I wrote a Python script to read in the raw floating point values. It reads from the serial port until an end of packet condition is detected. It then unpacks the values and plots them in an animation. Since the microcontroller is doing all of the data processing in real time, the laptop can simply display the signals as they arrive. The Python file is attached.

System Test

20250103_100416.jpg
20250103_100857.jpg
20250103_102954.jpg

I brought the system outside to test its ranging capability. It successfully tracked me walking away from the radar and returning.

Additional Work

There are many additional improvements and experiments that could be done to enhance the project.

-The microcontroller could be added to the radar controller PCB.

-Many of the potentiometers on the PCB could be replaced with static resistors in a final design.

-A high power amplifier could be inserted into the RF chain before the transmit antenna.

-A phase shifter could be inserted into the receive chain to provide I/Q data, which would allow coherent integration of pulses. Coherent integrations would greatly improve the signal to noise ratio.

-The RF components could be replaced with components more applicable for new designs. The modules used are no longer manufactured by Mini-Circuits.

-Broader bandwidth could be used. The system is fully capable of further bandwidth, but I limited it to the ISM (industrial, scientific, and medical) frequency band to stay compliant with FCC regulations.

-Many radar processing algorithms could be applied such as a pulse canceller for clutter rejection

Conclusion

I originally intended for all parameters of the radar to correspond to a maximum range of 500 meters. This was an optimistic but naive goal. While the 3D printed antennas had a designed gain much larger than the coffee cans, the maximum output power of the RF components was just too low at 0.65 W. In the words of Tim Allen, it needs "more power!" In the end, I had to modify radar parameters instead for a 60 meter maximum range.

Other than the reduced range, I was very pleased with the results from this project. I was able to successfully 3D print antennas of my own design, integrate RF components with a custom PCB, and use ARM's DSP libraries for Cortex-M processors, which undoubtedly will be useful in future projects.

This project required many hours of focused effort. While there are infinite areas of improvement to explore, I felt it was time to move on to other challenges.