0.ht - site about electronics and stuff

[ main / microwave ]

Turning a chinese radar detector into
a poor man's microwave spectrum analyzer

Hanyinda $10 radar detector

You may have seen these cheap chinese radar detectors for sale on AliExpress for around $10. They are crap and I suggest you put your money on something else, if you really want a radar detector for your car. The problem is, that they aren't very sensitive and they pick out the band they announce randomly. I am not even sure if it can detect anything above 24 GHz... Oh, and it leaks a LOT.

The good thing is, that you will get interesting microwave parts for very cheap.

Let's open one:

Hanyinda $10 radar 
detector

Let's see what we have inside... On the left you can see the microwave receiving module, with a PCB and a cast aluminum horn. On the middle we have the main PCB of the detector which has a 3.3V switch mode power supply, some kind of an unknown microcontroller, small EEPROM and a LED display driver. The USB port on the side is fake and it is not connected to anywhere. The buttons and the speaker are under the main PCB and are not visible.

The receiver board takes in 12VDC, and the yellow wire (marked "DAT" on the main board) gives out serial data, which turned out to be quite uninteresting for any real use.

Now we take the horn apart:

Hanyinda $10 radar
detector horn removed from the PCB Hanyinda $10 radar
detector horn opened

The receiving horn seems to have some serious microwave components inside, but my skills are not up to identifying them, really. The receiver board has some simple op-amps, a microcontroller with all the identification sanded off and two 8-volt regulators. The radar detector is advertised to detect laser also, but it is missing the photodiodes and the laser detecting components on board. For $10 this is quite a lot of nice electronics!

Hanyinda $10 radar
detector receiver PCB from the back side

With a little scoping around, I found the "SWEEP IN" pin to show a sawtooth wave sweeping from 0.6V to 6.8V in around 100 ms periods. The TP_N test point that I have labeled "LEVEL OUT" has the detector output that is around 3.3V for no signal and around 0V for maximum signal. I found out that the "SWEEP IN" has to be sweeped constantly for the "LEVEL OUT" to work properly. I cut the internal signal going to the "SWEEP IN" pin, but it is possible to use the oscillator on the board itself. The "RF OUT" pin is most likely the output from the receiver part of the horn, but this must have quite a high frequency because a regular scope doesn't really show anything on it. I left it intact and I am using the level detecting circuit on the board itself and taking the output from the TP_N test point.

In my application, the sweeping PWM is coming out of the Arduino at around 20kHz and it is turned to DC with a RC filter consisting of a 100nF capacitor + 10kOhm resistor. This DC level is multiplied by two with a LM358 OP-amp powered by the transmitter side +8V. The "LEVEL OUT" signal is buffered by the other part of the LM358 and fed to an Arduino AD input pin.

The Arduino code sweeps the area back and forth and reads the AD input pin for each horizontal pixel. The peak of the signal is held for a while.

I crammed this receiver, an Arduino Nano and a 128x32 Mini OLED display into a case:

Microwave spectrum analyzer from
the inside

On the right you can see the receiving module of the radar detector with a few modifications. I added a 100pF and a 100nF capacitor into the receiver side +8V pin because this seemed to reduce noise quite a lot. The Arduino Nano is on the left with the display, trimmer and a small BC547 amplifier driving a 50ohm mini speaker stolen from an old modem.

The upper side has a DC jack for +12VDC input power. The USB port can be used to reprogram the Arduino or it could be used as an serial out for the received spectrum (but I haven't programmed this feature yet).

Here are some pictures of it in action:

Microwave spectrum analyzer 
from the front Microwave spectrum analyzer
from the bottom

The 128x32 OLED display shows the spectrum. Alarm limit (the dotted line on the screen) is set with the trimmer in the front. If the signal intensity is higher than the limit, it will emit a sound. Also the approximate frequency of the last alarm is saved, and a timer will show how many hours/minutes/seconds ago it happened.

Microwave spectrum analyzer
from held in hand Microwave spectrum 
analyzer's display

This is the device in action, pointed at a HB100 microwave module that is used to turn on our kitchen light when there is movement. I only have a 10.525 GHz and 24.050 GHz signal sources and I calibrated the display according to those - now it seems to be a little off.

Microwave spectrum
analyzer on a tripod

I glued a chinese tripod adapter into the bottom of the device with epoxy. Now it can be attached to a tripod, which is kind of important because it needs to be pointed quite accurately sometimes.

Source and pinout

The Arduino Nano source code is here: microwave-source.ino

DISCLAIMER: This source code is provided "as is". It might be several years old and I might have forgotten everything. Most likely there are no comments in the code and it might not even compile. Don't get disappointed if I don't reply to your e-mails about it.

The following pinout is probably used for this Arduino code:

Sweeping PWM Out - D9
RF Level In - A3
Alarm limit trimmer (3.3V) - A0
Display reset - D12
Display I2C SDA - A4
Display I2C SCL - A5
Sound out - D2

The display has to be 128x32 OLED with a SSD1308. If you get a cheap module somewhere, make sure that it has a reset pin. A reset pin is important in a display and if you try to use it without one, you might find out that your device starts with a blank display sometimes.