Home arrow Tutorials arrow Hardware arrow Fun with 24 GHz Radar Speed Sensors
Fun with 24 GHz Radar Speed Sensors | Print |
Written by Akiba   
Tuesday, 18 May 2010

I finally got a proper video camera and was looking for something interesting to use it on and it just so happened that I've been itching to make some tutorials. Luckily, the camera came with Adobe Premiere Elements so I took some time off to learn some very basic video editing. I've found that I'm a horrible speaker on-camera and become completely tongue tied, even though it seems that I talk completely fine when I'm by myself.

Anyways, I figure that nothing beats hacking a high frequency radar module for a video tutorial. It's actually pretty cool and you can use it as either a speed detector or a motion detector.  You can see a couple of my dirty design practices in here that are okay for doing a quick throwaway prototype, but I wouldn't recommend to include in a final design. I completely skip the decoupling caps and use the microcontroller input voltage thresholds directly rather than using a proper interface...things that would make my university profs turn over in their graves (they're actually all still alive...I think). But before I start, its probably best to introduce the sensor and explain a bit about how a microwave speed sensor works. 

The 24 GHz radar sensor is a short range radar that's used in automotive applications for collision detection, obstacle detection, blind-spot monitoring, and also to assist in automatic cruise control. It has an approximate range of 20 meters but this can vary depending on the how you implement the detection circuitry. The module actually operates based on Doppler theory where the frequency of a wave will change based on the speed of the object producing it. Most people will recognize it as the frequency changes of an ambulance siren when an ambulance approaches and then goes off into the distance. 

For radar, a signal is bounced off an object and the reflected wave's frequency is compared with the transmitted wave's frequency. In RF terms, the two signals are mixed and you get the sum and difference components. Usually signals in the microwave range are used (24 GHz in this case) and so its quite simple to filter out the sum component (very high frequency) which just leaves the difference component (very low frequency). The final output signal frequency is just the frequency difference between the transmitted and reflected signals. This is usually in the range of 0 to 50 kHz for every day objects. Here is a Wikipedia link that gives a good treatment of the theory behind it. That link also shows the derivation of the formula you use to extract the speed from the frequency. In a nutshell, the formula is:

speed = 0.0225 * output_frequency

and the units will be in km/hr. 

This particular module actually has two outputs. You can pull another trick where you separate the reflected signal into two pieces, the in-phase (I component) and quadrature (Q component). Roughly speaking, its like saying you can separate any horizontal motion into its x and y components. You can measure the speed using either of these two signals, but the in-phase signal will either lead or lag the quadrature one based on if the object is moving towards or away from you. It sounds complicated, but it's actually not too bad in software. Anyhoo, this tutorial will just deal with the speed measurement. Just thought I'd give you a heads up on that. 

As well as showing how radar can be used by the everyday hardware hacker, I'm a little bit happy that I can show how useful solderless breadboard prototyping is. Many engineers look down on using solderless breadboards and you rarely (or at least I rarely) see it in the industry. However I've found that my breadboard is something that I'm constantly using to try out different circuits or components. I especially like the fact that you can do quick what-if scenarios with different components and connections without having to pull out a soldering iron. 

The components that I'm using can all be found in the FreakLabs store  (except those cool potentiometers which I'll be carrying soon). The source code is also included and is at the bottom of this page.

Here is a list of the components that are used in this tutorial:

    24 GHz Microwave Doppler Radar Speed Sensor
   Chibi 2.4 GHz Board
    Breadboard Peripheral
  LM358 General Purpose Dual Op Amp
   Solderless Breadboard Jumper Wires

 

 

To make things simpler, here's an equivalent schematic to the circuit that's being used in the video.

I should also mention that in the last part of the video where I actually show the speed of my hand moving across the sensor, the dimensions are incorrect. I had actually just written that code in between shooting the video and later realized that my units were in meters/second rather than km/hr (damn MKS). I've made already made the adjustments in the code below.

Here is the the main file which has all the code for reading and processing the sensor data.

Main C File Link

And here is the complete package that you can build and use on the Chibi board:

Radar Sensor Tutorial - Package

Hits: 57469
Trackback(0)
Comments (17)Add Comment
...
written by Kevin Townsend, May 18, 2010
Great tutorial. Good job on the video. It' always a lot of work (editing), but I think people find it useful.
report abuse
vote down
vote up
Votes: +1
Awesome Tutorial!
written by A Student, May 21, 2010
Dude, thanks so much for putting in the time to do this great tutorial. The Chibi board looks like a really neat platform to play with. I'm gonna get me a radar speed sensor!

Mr A. Student
report abuse
vote down
vote up
Votes: +1
...
written by Akiba, May 24, 2010
Ha ha...no problem. Yeah, the radar speed sensor is fun to play with. Got a lot of suggestions to turn it into a theremin smilies/smiley.gif
report abuse
vote down
vote up
Votes: +2
...
written by danny, August 02, 2010
wonderful job!
report abuse
vote down
vote up
Votes: +0
Longer distance
written by Charles, October 04, 2010
Hi,
thanks for the article.
Its basically what i'm looking for, some device to measure a person's running speed. I was wondering if you have a radar sensor that can detect upto 30m? IS it just a matter of using a different attenna?
cheers
report abuse
vote down
vote up
Votes: +0
Velocity range
written by Michaelos, September 19, 2011
Hi,

Is there any chance to make tutorial to show how to measure velocity and range in the same time with this sensor? Thank you in advance.
report abuse
vote down
vote up
Votes: +2
...
written by Akiba, September 19, 2011
Range will be difficult because there are many factors involved. If it were directly head on, then it'd be a factor of the sine wave amplitude. However there are issues like reflections that would contribute or subtract from the amplitude. I would mainly use this device to determine speed.
report abuse
vote down
vote up
Votes: +0
Range
written by Leonardo, January 25, 2012
how i can increment the range of this sensor? i need aprox 40-50mts
Thanks
report abuse
vote down
vote up
Votes: +0
help...
written by SHIVRAJSINH ZALA, February 28, 2012
hi dude ,
very nice work .

i want some information about this sensor like the pin diagram and connection needed to find velocity of car . and also the list of other components use for that ,i am working on that project so please help me and also tell how the velocity can be measured from output freq.????

i am thankful if u give information it will really helpful for me.

shivrajsinh zala.

report abuse
vote down
vote up
Votes: +1
...
written by Akiba, February 29, 2012
You can find more info about the sensor here. Unfortunately, they're sold out at the moment and my supplier hasn't restocked.

http://www.freaklabsstore.com/index.php?main_page=product_info&cPath;=36&products;_id=169
report abuse
vote down
vote up
Votes: +0
Water velocity
written by Nima, September 16, 2012
Hi

Thank you for your great tutorial. I have a question about this sensor :
Is it possible to use this senor for water velocity measurement or I have to use another?

Regards
report abuse
vote down
vote up
Votes: +0
...
written by Akiba, September 19, 2012
I'm not sure if it can be used for water velocity measurement. You'll probably have to experiment with that.
report abuse
vote down
vote up
Votes: +0
Minimum speed
written by Nima, September 22, 2012
Thank for your attention.

What is the minimum speed that can be detected with this sensor? Is it possible to measure low speed such as 0.1 m/s ? I need to know about it's accuracy?

Regards
report abuse
vote down
vote up
Votes: +0
...
written by Akiba, September 30, 2012
Its difficult to comment on its accuracy since I haven't used it in such a low speed application. For 0.1m/sec, it should be fine though. 0.1 m/sec is .36 km/hr which is about a walking pace. I don't think it would have any problems with that speed. The microcontroller would need to have enough precision in its frequency counting algorithm to differentiate it, but that should also be no problem.
report abuse
vote down
vote up
Votes: +0
when will the sensor be available?
written by reginald, August 28, 2013
hi,akiba. i am interested in purchasing 24ghz radar speed sensor, can you inform me when new stocks arrived in your company and what modes of payment are you entertaining? thanks in advance.
report abuse
vote down
vote up
Votes: +2
i saw ur project like it very very much,pls give ur contect .no. i want to buy it
written by ameet, January 20, 2014
nice project
report abuse
vote down
vote up
Votes: +1
...
written by ameet srivastava, September 27, 2014
respected sir
i had requst for ur cell no on jan. 2014 but still not got .i m doing a project on same pls respond me
with regars
ameet
report abuse
vote down
vote up
Votes: +0

Write comment

busy
 

Discuss (4 posts)
walou
Fun with 24 GHz Radar Speed Sensors
Nov 05 2011 15:59:45
This thread discusses the Content article: Fun with 24 GHz Radar Speed Sensors

thank you for tuto .
But this sensor can be used in detection of speed of cars ,like in a speed camera fix ?
please responde me because i work on this project .
thank you
#3420

Akiba
Re:Fun with 24 GHz Radar Speed Sensors
Nov 06 2011 03:31:05
Yes, the sensor can be used to sense car speed as long as the car is heading towards or away from the sensor.
#3423
David
Re:Fun with 24 GHz Radar Speed Sensors
Nov 11 2011 17:37:59
hi. your tutorial is super. The price of your sensor is good. These other sensors on the market are so expensive for us students.

l Have to do a project involving Radar sensors to determine RANGE/Distance of an obstacle to a car. At each range there must be an Audio/Visual warning output with intensity related to nearness of obstacle to vehicle.

THE OBSTACLE WILL ALWAYS BE IN FRONT OF CAR

Can you explain to me in detail how l will use your sensor to determine the range.

l am now basing my project on your sensor because l can afford it.
Thanks
#3445

Akiba
Re:Fun with 24 GHz Radar Speed Sensors
Nov 12 2011 02:40:12
The if the object is heading towards you (or conversely you're heading towards the object), then the frequency of the sine wave will indicate speed. The amplitude will indicate distance. The higher the amplitude, the stronger the signal and hence the closer the object.
#3446


Discuss...
< Prev