another small cheap 24GHz doppler radar, but more feature-full - Page 1
Forum section: electronics / projects

author: JBeale
author_rank: Frequent Contributor
timestamp: November 05, 2022, 04:59:53 am
content: A while back I played around with the cheap CDM324 24-GHz doppler radar, sold for door openers and the like. It comes on a PCB that is 25 mm square. It had only one active device, the oscillator and just one low-level analog output: the mixer signal.I see within the past few years there are a bunch of similar-sized 24GHz modules, I think all using the same tiny square 16-lead microwave chip, that do more and sometimes even cost less. I got this one: HLK-LD1155H-24G which apparently has an I+Q demodulated output so it could in theory detect direction of motion, although it doesn't. On the back it has (I assume) a dual opamp and a microcontroller that does "human presence detection" and spits out serial data showing either nothing, "presence" or "motion" and a signal strength. It sees me walking out to about 6 meters away, at least if I'm directly in-line with the patch antennas looking out of the plane of the PCB, and moving directly toward or away from it.I can see what look like I and Q output signals on two pins of the controller chip, but they are not brought out to any board connector pins and it's a fiddly job to solder to the chip. Does anyone know of a similar module that makes these outputs more easily accessible?

author: buta
author_rank: Contributor
timestamp: November 06, 2022, 02:24:41 am
content: Is the radar IC Infineon BGT24LTR11?

author: JBeale
author_rank: Frequent Contributor
timestamp: November 06, 2022, 04:39:20 am
content: That's a good question, and I don't know the answer. It has the right number of pins (16) and the same shape. I see many small 24GHz sensor modules for sale now on ebay and aliexpress which use a similar-looking chip, maybe the same one. They usually spec 24 GHz around +6 dBm, run on 5V at about 80 mA. Some advertise FMCW modulation, and not just motion detection but also range measurement out to 5 meters or so. The "DFRobot SEN0395", "HLK-LD303 24G" and Seeed MR24D11C10 sensors use a similar looking chip. The page on the Seeed device does specify "Infineon mmWave FMCW industrial radar" so maybe that's it.https://www.seeedstudio.com/24GHz-mmWave-Radar-Sensor-Human-Static-Presence-Module-p-5267.html

author: buta
author_rank: Contributor
timestamp: November 06, 2022, 07:38:36 am
content: This one uses BGT24LTR11 but it is expensive, US$65.90.https://www.seeedstudio.com/Grove-Doppler-Radar-BGT24LTR11-p-4572.htmlIt has IF IQ pins.https://wiki.seeedstudio.com/Grove-Doppler-Radar/

author: JBeale
author_rank: Frequent Contributor
timestamp: November 06, 2022, 08:38:46 pm
content: Thanks, that one looks good although it costs more. I see that page says "This product came into life with the joint efforts between Seeed Studio, Infineon Technologies, and Honmax Technology." It certainly has a lot more technical info available than the cheaper items.I also found a ~$20 part labelled "AM182" with I+Q outputs and claiming +12 dBm output, but it may be just a variant of the older-style CDM324, with a simpler and perhaps lower-performing RF section than what the Infineon part gives you.

author: JBeale
author_rank: Frequent Contributor
timestamp: November 07, 2022, 02:15:05 am
content: Well it is pretty sensitive to small motions if you're close. Here are the I/Q outputs I tapped into on the LD1155H board I showed in my first post, with it about 35 cm away from my face. I'm trying to hold still but you can still see motion signals from involuntary movement, I guess that's what is used for "presence detection". Every time I blink, it's definitely visible on the signal. It goes offscale at the end where I move my hand to stop the scope trace.

author: JBeale
author_rank: Frequent Contributor
timestamp: November 07, 2022, 03:39:50 am
content: Here's my heartbeat measured from a distance of 1 meter, after the addition of a small 3D-printed exponential horn antenna. At this point I'm sitting very still in a chair and trying not to breathe, because a deep breath causes off-scale movements at this gain.(I had just run up the stairs and back, it's not normally quite that high.)

author: buta
author_rank: Contributor
timestamp: November 07, 2022, 08:39:59 am
content: HLK-LD1155H-24G may use a BGT24LTR11 clone.If FFT the IF / baseband signal, you can estimate the velocity (CW radar) or velocity and distance (FMCW radar) from the frequency domain.It is possible to capture the IF / baseband signal with a sound card and post process on a PC.

author: JBeale
author_rank: Frequent Contributor
timestamp: November 10, 2022, 04:40:12 pm
content: I came across another one that looks promising, and does provide pins with IFI and IFQ signals. It also claims +15 dBm EIRP which is higher than the others I've seen, and a detection range of 15 m for people and 30 m for cars. The one I have now is more like 5 meters at most, for people. "The YH-24G01 module is a 24GHz microwave radar module used to detect moving vehicles/people."https://www.aliexpress.us/item/2255801030958625.htmlI see this is also listed on a page with some notes on several different 24GHz modules:https://revspace.nl/FMCWRadar

author: JBeale
author_rank: Frequent Contributor
timestamp: November 27, 2022, 06:33:20 am
content: I can confirm the YH-24G01 sensor does basically work. I would compare it to the CDM324 as far the circuit design and the output signal levels, except the antenna pattern is definitely more narrow, and of course it has the two separate I & Q outputs. I measured a current draw of 31 mA at 5 V. It does not use the newer ICs like the Infineon part that some other devices do (those also draw more current). The photo shows me waving my hand first towards it and then away, and as the doppler frequency goes to zero you see the phase shift from +90 to -90. The yellow scope trace is what the pinout labels the IFI output, purple is IFQ.

author: JBeale
author_rank: Frequent Contributor
timestamp: December 26, 2022, 06:18:36 pm
content: Here is a spectrogram output from the YH-24G01 I/Q doppler module, where I can see the difference between walking away from the sensor, and walking toward it. With the log (dB) intensity, the not-quite-90-degree phase shift of the I/Q outputs confuses the picture with the reversed image, but subtracting off a fraction of the reversed +f/-f spectrum allows to tune that out and get a more clear indication of motion towards and motion away (lower plot). It does see me pretty well walking out to 11 m at least, without using any extra horn or other antenna structure so that's a better range than some of these cheap modules, no doubt in part because the antenna pattern is more narrow than most. I'm using a +20 dB audio preamp with AD828 opamp, right into a "line in" audio input of a laptop.

author: JBeale
author_rank: Frequent Contributor
timestamp: December 26, 2022, 06:20:47 pm
content: photo of doppler module and audio-freq preamp

author: CaptDon
author_rank: Super Contributor
timestamp: December 27, 2022, 01:01:04 am
content: I would think walking away would show a downward frequency shift and walking toward an upward? This is strange? If there is an I.F. frequency involved I could see it but your module doesn't have an I.F., only the doppler beat frequency. Can you explain why this seems mirrored?

author: S57UUU
author_rank: Regular Contributor
timestamp: December 27, 2022, 09:27:26 am
content: Swapped I and Q reverse the spectrum. On average, you have a 50% chance of getting it right :-)

author: JBeale
author_rank: Frequent Contributor
timestamp: December 27, 2022, 10:02:48 pm
content: I would trust the accepted laws of physics including doppler shift, sooner than I would trust whether I ended up swapping the left and right channels when soldering my audio cable. :-)You are of course right; I was too excited about getting a result that clearly shows a difference, to think about the sign error.

author: JBeale
author_rank: Frequent Contributor
timestamp: December 29, 2022, 12:07:43 am
content: Chinese auction sites are not known for understating the performance of goods for sale. The description of this one read "The detection range is 15 meters for human and 30 meters for vehicle". I added on a small aluminum foil horn with 100 x 45 mm opening, and was both surprised and pleased to see I was able to detect myself jogging 39 m away and back. Also visible is a car that passed by going the other way, as I was coming back.

author: buta
author_rank: Contributor
timestamp: December 30, 2022, 06:08:25 am
content: Happy NY,Interested to know how do you generate the FFT plots, the sampling frequency and FFT size.I guess:top: FFT of complex baseband signal (I - jQ), its vertical range is -2000 to 2000bottom: FFT of (I - Q), its vertical range is 0 to 400The horn may increase the antenna gain and reduce the field of view.Have you removed the shield case and check the internal circuit?

author: JBeale
author_rank: Frequent Contributor
timestamp: December 31, 2022, 07:00:39 am
content: Yes, it's just two ways of looking at the I/Q spectrum, and the bottom plot uses the I-Q difference.The code I'm using to make these plots plot is "IQ-plot1.py" athttps://github.com/jbeale1/dopplerYes, I think the passive gain of any antenna always comes at the expense of the width of its pattern. My crude measurement suggests the patch antenna array on this board, bare with no horn, has a full angle of 20 degrees vertically, when oriented as shown (the AliExpress item page had the gain plot H and V labels reversed.) My horn makes that only slightly more narrow, but reduces the sidelobes.I extended the horn a few more cm on top and bottom, and tried it out by the side of the road. It looks like I am seeing cars out to a range between 60 and 120 m, depending on the size and shape of the vehicle.I only have one of these boards and I didn't want to damage it. I do have some excellent photos another person took, I'll ask if I can make them public. It's only got a few parts, but it has that strange curvilinear layout that microstrip circuits use to create filters and resonators on the PCB.

author: tonyget
author_rank: Contributor
timestamp: December 31, 2022, 07:41:40 am
content: Not sure about HLK-LD1155H，but the HLK-LD2410 module from the same company uses S3KM111L from ICLEGEND MICRO，not BGT24LTR11 from Infineonhttps://www.iclegend.com/en/product/list/S3KM111L/

author: MikeK
author_rank: Super Contributor
timestamp: December 31, 2022, 02:39:16 pm
content: Do these modules work well for speed measurement of passing traffic?

author: JBeale
author_rank: Frequent Contributor
timestamp: December 31, 2022, 04:18:57 pm
content: Yes. I haven't tested the accuracy or stability over time. You have to do some coding to calculate the speed, of course.The principles described in this Infineon note apply here also:https://www.infineon.com/dgdl/Infineon-Radar%20FAQ-PI-v02_00-EN.pdf?fileId=5546d46266f85d6301671c76d2a00614Assuming your sensor is directly in-line with the path of travel, the equation is: v = (c / 2 * Ftx) * Fdv = speed of car, m/sc = speed of light, m/sFtx = radar Tx frequency, HzFd = received doppler frequency, HzFor this module, Ftx = 24.15 GHz (nominal, no idea how accurate) so it simplifies to v = 0.00621 * Fd (m/s)For a typical car on my road I get Fd = 1500 Hz => 9.3 m/s = 21 mphThere are also larger and more expensive ($100+) modules designed for the purpose that give you a speed readout directly.However the spectrogram plot gives you not just one number, but a plot of the car's speed over time with high resolution. For example, here is the spectrogram from a car passing by my house on my road this morning. The car signal (lighter yellow part of the plot) becomes faintly visible around t=25 seconds at a frequency around 1300 Hz, so that's 8 m/s or 18 mph. The signal fades out where the road drops down behind a hill, it comes back into sight around t=35 seconds near 700 Hz so that's about half the speed. The car slows down to a near-stop at 42 seconds, looks like 200 Hz, 1.2 m/s which is less than 3 mph, then speeds up somewhat until it passes my sensor around t=52 seconds. At that point of course the relative speed drops to zero just from the cosine-angle term. You see a bunch of different frequencies as a car passes by, I think from the rotating wheels and hubcaps as the radar illuminates them more from the side. There was a light drizzle of rain at this time, which appears as the short noise spikes looking like grass near zero frequency. The bright horizontal line at f=0 is an artifact because my input signal has a non-zero DC offset, I should remove that with a highpass filter.This was at 6:35 am before sunup, most cars go around 20-25 mph here but maybe it was a newspaper delivery, or a heavy truck being extra cautious over a speed hump in the road.

author: alex_udanis
author_rank: Newbie
timestamp: December 31, 2022, 08:33:28 pm
content: Here are some photos of the inside of the radar module.

author: Marco
author_rank: Super Contributor
timestamp: December 31, 2022, 09:19:56 pm
content: So entirely discrete then RF wise?

author: JBeale
author_rank: Frequent Contributor
timestamp: December 31, 2022, 10:45:26 pm
content: It certainly looks that way to me; basically the same idea as the CDM324 which has been around for years, but with more antenna patches for a tighter pattern, and the I/Q outputs separate. So it doesn't have the fancy features that the newer chips have, but in practice I have found it has a significantly longer range in the same situation (seeing a moving person or a car) than at least a few of the cheap newer modules. Like the CDM324, the output signals are very low, so in most situations it benefits from an external preamp.

author: Marco
author_rank: Super Contributor
timestamp: December 31, 2022, 11:45:33 pm
content: Also tunable frequency, how precise is the center frequency though? PCB features with a soldered pHEMT and PIN diode for tuning (presumably) aren't exactly high precision compared to an ASIC's internals. Not when 1 wavelength is a couple mm.Maybe they calibrate the module at the factory?

author: buta
author_rank: Contributor
timestamp: January 01, 2023, 02:02:40 am
content: Thank you alex_udanis the photos.It is an interesting implementation with discrete components and distributed elements (layout and pcb substrate).The frequency and Tx power stability is one of the challenges to ensure the radar meets the ISM band regulatory requirements.The reflected signal is directly converted to the base band by (maybe) diode mixers so the receiving path offers a conversion loss, but it may be ok for a short range radar with big targets (human and car).

author: buta
author_rank: Contributor
timestamp: January 01, 2023, 02:15:32 am
content: Quote from: JBeale on December 31, 2022, 04:18:57 pmwhere v is the radial speedhttps://www.radartutorial.eu/11.coherent/Radial%20Speed.en.html

author: JBeale
author_rank: Frequent Contributor
timestamp: January 01, 2023, 03:07:13 am
content: It does not use much silicon but it exceeds its claimed specs for range, and for applications like my driveway motion sensor I would say it has the best price-performance ratio of the low-cost modules I have tried.In my use, I have not connected the frequency adjust pin. A few comments I have read online say it has no effect, but I don't know what tests they did. I have no test equipment for the 24 GHz band, so I have no idea what the frequency stability is; all I can say is that the basic doppler function works. How much testing was done, and in fact if it has any agency approvals at all, is unknown to me. All I can say for sure is the one module I have uses 155 mW (31 mA at 5 V) so it is not putting out more RF energy than that, and the frequency is not wildly off, given the doppler equation assuming 24.15 GHz gives me roughly the expected answer.

author: Marco
author_rank: Super Contributor
timestamp: January 01, 2023, 04:34:36 am
content: Quote from: JBeale on January 01, 2023, 03:07:13 amYou could just try to reflect off a nice strong constant reflector at a couple meters and put 5V DC with 4Vpp sawtooth on the Vt input, varying the distance should vary the frequency of the I/Q outputs according to FMCW math you can find online.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 02, 2023, 11:21:06 pm
content: I tried to calibrate my detector for speed by riding a bicycle at a constant rate. That turns out to be difficult to do. I was listening to a metronome app on my phone to help time my left foot at a steady 90 beats per minute, but I'm pedaling with both feet so I was pushing the bike forward 180 times per minute, or 3 times per second. You can see that rate in a small velocity wiggle on the signal that happens 15 times in 5 seconds, so it checks out. However there was also a slower wander of the average speed, probably related to the road not being absolutely flat so it's hard to ride at an absolutely steady pace. To get a cleaner signal I attached a small corner-cube radar retroreflector to the bike handlebars, so the signal is dominated by that reflection, and not the various motions of my body and legs. A GPS tracklog says the bike averages 7.9 to 8 mph in 2nd gear with this pace, and various readings of the data gives me a calibration factor from 68.9 to 69.5 Hz/mph, but with the variable speed this may not be any better than 10% accuracy. From the doppler formula at nominal Ft output, this module should be 72.05 Hz/mph.I also tried the experiment with a car, but try as I might that doesn't go at a perfectly constant rate either, when the road is not level.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: January 03, 2023, 03:41:08 am
content: Wonder what the maximum detectable normal speed is. Hypothetically this would be limited by ADC sample rate, but these sensors probably aren't designed to work at more than "human" speeds and might have other tradeoffs built in.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 03, 2023, 04:48:45 am
content: If you're referring to the YH-24G01 model I've been working with most recently, I don't know the module's schematic but you can see from the photos it doesn't have a lot of discrete parts. I'd guess it may have 1-2 poles of simple R/C lowpass filtering for "normal" speed ranges. Apart from that, I'd expect such circuits to potentially be able to detect high speeds, even hypersonic. The underlying doppler shift principle applies to any physically possible speed*. But by itself you just get IF outputs, so designing an appropriate signal chain for any given frequency is up to you.If you meant the ones I posted about at first, as the original thread title mentions, the cheap ones I have seen are intended to detect typical human motion and I presume they filter out higher speeds, which would be considered noise in that application. I believe Infineon offers other parts designed to measure up to 100 km/hr.* However, a reflected doppler signal goes to f=0 and disappears completely if an object is receding faster than half of light speed.

author: buta
author_rank: Contributor
timestamp: January 06, 2023, 07:43:56 am
content: I watched a YT video using flying fox pulley to test the radar but I can't find its URL now.Alternative the Doppler shift can be checked by tuning forks.Fd = 160 * v at 24GHzFd = 160 Hz when v = 1 m/s (3.6 km/h)The YH-24G01 does not provide the IF bandwidth, it states the Rx conversion LOSS = 6 dB typ at IF = 500 Hz (approx 3 m/s)

author: S57UUU
author_rank: Regular Contributor
timestamp: January 06, 2023, 02:42:54 pm
content: Radar Doppler is simply twice the number of wavelengths passed per second.Example: 13mm wavelength, 1m/s -> 1000/13*2 = 154HzWavelength = 300/f Marko Cebokli

author: JBeale
author_rank: Frequent Contributor
timestamp: January 09, 2023, 06:14:54 am
content: Nice idea with the pulley! Amazingly, I have a similar thing all ready to go, it is still set up under the eaves of the house, left over from an animated ghost display I made for Halloween. I hadn't even thought about that, but now you point it out, it is an obvious thing. I'm not sure how fast I can make it go, but probably a useful speed- I know the motor is reasonably steady, and I can measure the true speed independently in various ways. Thanks!

author: buta
author_rank: Contributor
timestamp: January 11, 2023, 04:00:02 am
content: If you just want to check the speed (or Doppler shift), tuning forks may be alternative. The pulley system properly can be used to check the radar SNR and the target speed. Looking forward to watching your implementation.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 18, 2023, 08:06:20 pm
content: Here is one thing a small doppler module can do: show the actual effect on vehicle speed of a traffic-calming speed hump on a 25 mph residential road. The leading edge of the hump is located at about 140 feet (radial distance) from the radar. This plot showing the trajectory of several different vehicles, records the measured vehicle speed as a function of radial distance (which was calculated by stepwise integration of the speed vs time data, starting from signal acquisition, which with this antenna pattern roughly corresponds to where the vehicle passes abreast of the sensor).Looking at this data I would say that slower vehicles, which tend to be larger ones, slow down more dramatically approaching the hump, which I also notice by eye. Medium-speed vehicles have a variety of slightly different behaviors, and a few seem to simply ignore it. The road goes over the crest of a small hill around 225 ft where most cars pass out of view, so the one trajectory shown here extending beyond 300 ft. must have been a larger van or truck to still have been visible to the radar at that distance.The lower displayed speed from 0-50 feet is just an artifact of a cosine-angle term, because the radar is positioned off to the side of the road and records apparent (radial) speed, and not true along-direction-of travel speed, but those become similar beyond about 50 feet as the radial vector and vehicle motion vectors approach alignment. I am showing cubic-spline-fits to the real data to reduce noise, but the curve fits are pretty good (except for initial scatter, where from looking more sideways you see more wheel and hubcap reflections).EDIT: Ah, the hazards of fitting real world complexity into simplified curves. Looking at the raw data, it looks like the >300 ft trajectory was not a single track, but in fact a combination of two separate vehicles passing by, without enough space between for the algorithm to separate them out.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 18, 2023, 09:58:06 pm
content: A bit more data now with both raw data points and best-fit, 5-knot cubic spline curve overlaid, so you can see that past 50 feet out, the velocity curve fit is usually pretty good.

author: buta
author_rank: Contributor
timestamp: January 20, 2023, 10:29:48 am
content: It is interesting to know drivers' behavior. Will you put up a sign to show drivers their speed?I think the amplitude of the Doppler shift can estimate the size of the vehicles, one of the facts affecting the amplitude is the object's radar cross section.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 20, 2023, 04:06:04 pm
content: One thing I didn't expect was that the system can (very roughly) estimate the length of the vehicle, from combining the speed when it is more distant from the sensor, with the duration of the near-0-radial-velocity part of the signal (approaching freq=0), which shows how long it takes for various parts of the vehicle to pass immediately by the side of the radar. This is with the assumption it isn't changing speed much overall. It's not more consistent than about 25% but you can generally tell a smaller car from a larger truck on that basis, and something like a garbage truck or school bus is pretty clear.

author: JBeale
author_rank: Frequent Contributor
timestamp: January 20, 2023, 09:57:24 pm
content: Here's a comparison of two different doppler signals from oncoming traffic. Time increases to the right, speed is zero at the bottom edge, increasing upward. The signal falling towards zero indicates when the traffic passes right by. One from a normal-size car, and another from one of the larger trucks I've seen on this residential road. The signal from an oncoming car shows up about 200 feet away, while this particular truck was detectable at very nearly twice that distance. You can see from the width of the vertical part at the right edge of each signal, that the truck takes longer to completely pass by. Looking at the truck signal, it slowed down and sped up a few times as it approached and much of the velocity curve appears to show changing speed with nearly straight line segments, maybe hinting that this truck has a manual transmission (?)This image doesn't have a speed scale, but in this case the car shown reached a maximum apparent speed of 23 mph and the truck reached 19 mph. The apparent measured speed is radial to the doppler sensor. As both vehicles were increasing in speed as they passed by, it's probably safe to assume they reached some higher speed later.Also visible toward the bottom on the left-hand side under the car is rain, I think the larger lines are individual rain drops that happen to fall right in front of the antenna, which generate discrete blips in the signal.