Electronics Kit Now Available!
Update 2023-09-05: I finally got around to redesigning the electronics for this kit, and got some PCBs made for an improved 7-segment display as well as a new control board based on a Pi Pico! I also rewrote the firmware in MicroPython to make it easier to play around with. The full kit is available at my webstore, pantsforbirds.com, but of course the updated design and code files are still open source and available on the github repository.
Use coupon code SPEEDSIGN50 for $50 off kits in the first batch! This is mostly an incentive for dealing with any hiccups we’ll encounter while ironing out the order process, and will be removed when the first batch is sold out.
Project Writeup
For Halloween 2020, I decided to build a replica of a radar speed sign using an Arduino and an HB100 doppler radar module. This writeup is gonna be a bit fuzzy, since as usual, I decided to document the project a tasteful 8+ months after it was complete. Have fun reading my semi-coherent image and schematic dump!
How the Radar Do
The project uses an HB100 doppler radar module and a pre-amplifier circuit in order to convert movement of objects in the HB100’s field of view into a square wave that gets fed into the Arduino Nano. Radar makes everything sound fancy, but in this case it’s no more complicated than what you would find in one of those supermarket automatic doors that triggers when some leaves blow by. The HB100 transmits a 10.525GHz carrier signal, which is reflected off of a moving target (in the case of this project, a person walking across a room at close range). The return signal from the moving target is doppler-shifted, and is thus a higher (or lower) frequency than the carrier, depending on whether the target is moving towards or away from the transmitter. By mixing the transmitted 10.525GHz signal with the reflected signal, the HB100 produces a signal that is the difference of the two frequencies. Fortunately, for objects moving at non-relativistic speeds, this difference frequency is usually very chewable for even the dumbest of microcontrollers, as it’s usually in the range of a few Hertz.
In order to get the difference frequency into a format that can be processed by a microcontroller, the signal passes through a two-stage preamp circuit which amplifies it from a lil squiggle into a rail-to-rail square wave. The pre-amp circuit isn’t that interesting, and is ripped straight from the datasheet. There are some capacitors in parallel with the feedback path in order to generate some poles that roll off the frequency response around 72Hz, stopping the pre-amp circuit from amplifying high-frequency noise that is beyond the range of interest. Also note the chunky (4.7uF) AC coupling caps between stages. These coupling caps are yuge because they need to have a low impedance at the frequencies of interest (<100Hz). If we look at the 12k resistor used for the IF load, and assume that the HB100 IF circuit has a characteristic impedance in the range of 12kOhms, we can see that a 4.7uF capacitor provides an impedance lower than the characteristic impedance all the way down to around 2.8Hz. Neat!
Once the preamp circuit was working, it was pretty simple to stick the output straight onto one of the Arduino Nano’s digital inputs. Input interrupts were used to time the pulses and estimate the frequency of the signal, which can be converted into velocity using the doppler radar equation.
Bigass 7 Segment Display
From the beginning, the real pizazz for this costume was always going to be the giant LED 7-segment display. I’d been wanting to make one for a long time, for no particular reason other than whee LEDs shiny, and more LEDs = more shiny. There have been plenty of 7-segment display implementations with all kinds of hardware, from the WS2812B chips controlling segments with individual addressing to cool multiplexing schemes. However, my favorite approach has always been the tried and true SPI shift register configuration. Using two SPI shift registers (the good ol’ 74HC595), each digit is controlled by a single shift register, with a single segment responding to a single bit output from each shift register. In the past, I’ve used the 8th bit output to control a decimal point, but that wasn’t necessary for this particular project.
In order to make things easy and reasonably professional-looking, I designed a custom modular PCB containing 8 high-power amber LEDs. These hexagonal PCBs could interlock to form a 7-segment display digit, and contained the necessary current-limiting resistors, and switching transistors for turning the digit on and off. Solder pads at the interlocking edges of each PCB were used to share +12V and GND to the entire digit from any single powered segment. Additional solder pads on the edge of each segment connect to the gate of the switching MOSFETs, allowing a low-current enable signal from the shift register to control the segment of high-power LEDs. I should have added a series resistor to this gate network to protect the MOSFETs from ESD…in my late-night haste to assemble the costume, I managed to zap through the oxide layer on several MOSFETs with ESD, killing them. That caused a good amount of debugging headache! If I were to sell these segments or something, I would probably change the drive MOSFET to an NPN BJT with a base resistor for added robustness.
Putting Things Together!
Links
Here’s a list of some of the parts that I used, in case people are looking! These are Amazon affiliate links (gotta make some of them Bezos Bucks).