Low Cost Radar Speed Sign

67,138

279

55

Introduction: Low Cost Radar Speed Sign

Have you ever wanted to build your own low-cost radar speed sign? I live on a street where cars drive too fast, and I worry about the safety of my kids. I thought it would be much safer if I could install a radar speed sign of my own that displays the speed so I can get drivers to slow down. I looked online into buying a radar speed sign, but I found that most signs cost over $1,000, which is pretty expensive. I also don’t want to go through the long process of the city installing a sign, since I heard it can cost them upwards of $5,000-10,000. Instead I decided to build a low-cost solution myself, and save some money while having some fun.

I discovered OmniPreSense which offers a low-cost short-range radar sensor module ideal for my application. The PCB module form factor is very small at only 2.1 x 2.3 x 0.5 inches, and weighs only 11g. The electronics are self-contained and fully-integrated, so there are no power tubes, bulky electronics, or the need for a lot of power. The range for a large object such as a car is 50ft to 100ft (15m to 30m). The module takes all the speed measurements, handles all the signal processing, and then simply outputs the raw speed data over its USB port. I use a low-cost Raspberry Pi (or Arduino, or anything else that has a USB port) to receive the data. With a little bit of python coding and some large low-cost LEDs mounted to a board, I can display the speed. My display board can be attached on a pole at the side of the road. By adding a sign that reads “Speed Checked by RADAR” above the display, I now have my very own radar speed sign that grabs drivers’ attention and slows them down! All this for less than $500!

Step 1: Materials and Tools

Step 2: Floor Planning of the Electronics PCB Board

I started with the main control hardware which is the Raspberry Pi. The assumption here is that you already have a Raspberry Pi with the OS on it and have some Python coding experience. The Raspberry Pi controls the OPS241-A radar sensor and takes in the reported speed information. This is then converted to be displayed on the large LED 7-segment display.

a. I want to place all electrical components other than the radar sensor and LED displays onto a single enclosed electronics PCB board mounted to the backside of the display board. This keeps the board out of sight and safe from the elements. In this manner, only two cables need to run from the back of the board to the front. One cable is the USB cable that powers the OPS241-A module and receives the measured speed data. The second cable is drives the 7-Segment display.

b. The PCB board needs to allow plenty of room for the Raspberry Pi, which takes up most of the area. I also need to make sure that I will be able to easily access several of its ports once mounted. The ports I need to access are the USB port (OPS241-A module speed data), Ethernet port (PC interface for developing/debugging Python code), HDMI port (display Raspberry Pi window and debug/development), and the micro USB port (5V power for Raspberry Pi).

c. To provide access for these ports, holes are cut in the enclosure which match the port locations on the Raspberry Pi.

d. Next I need to find room for the bread board that contains the discrete electronics components to drive the display LEDs. This is the second largest item. There needs to be enough space around it that I can jumper wires to it from the Raspberry Pi and output signals to a header for driving the LEDs. Ideally, if I had more time, I would solder the components and wires directly to the PCB board instead of using a breadboard, but for my purposes it’s good enough.

e. I plan to have the display driver header next to the breadboard at the edge of the PCB, so that I can keep my wire lengths short, and also so that I can cut a hole in the cover and plug in a cable to the connector.

f. Lastly, I allow room on the PCB for a power block. The system requires 5V for the level shifters and display driver, and 12V for the LEDs. I connect a standard 5V/12V power connector to the power block, then route the power signals from the block to the breadboard and the LED header. I cut a hole in the cover so that I can connect a 12V/5V power cord to the power connector.

g. This is what the final electronics PCB floor plan looks like (with cover off):

Step 3: Mounting the Raspberry Pi

I mounted my Raspberry Pi to a perforated and plated PCB board using 4 spacers, screws, and nuts. I like to use a plated PCB board so that I can solder components and wires if need needed.

Step 4: LED Signal Level Shifters

The Raspberry Pi GPIOs can source a maximum of 3.3V each. However, the LED display requires 5V control signals. Therefore, I needed to design a simple, low-cost circuit to level-shift the Pi control signals from 3.3V to 5V. The circuit I used consists of 3 discrete FET transistors, 3 discrete resistors, and 3 integrated inverters. The input signals come from the Raspberry Pi GPIOs, and the output signals are routed to a header that connects to a cable from the LEDs. The three signals which are converted are GPIO23 to SparkFun LDD CLK, GPIO4 to SparkFun LDD LAT, and SPIO5 to SparkFun LDD SER.

Step 5: Large LED Seven-Segment Display

For displaying the speed I used two large LEDs that I found on SparkFun. They are 6.5" tall which should be readable from a good distance. To make them more readable, I used blue tape to cover the white background although black may provide more contrast.

Step 6: LED Driver Board

Each LED requires a serial shift register and latch for holding the control signals from the Raspberry Pi and driving the LED segments. SparkFun has a very good write-up for doing this here. The Raspberry Pi sends the serial data to the LED seven-segment displays and controls the latch timing. The driver boards are mounted on the back of the LED and are not visible from the front.

Step 7: Mounting the OPS241-A Radar Module

The OPS241-A radar sensor is scrwed into a 3D printed mount a friend made for me. Alternatively I could have screwed it into the board directly. The radar sensor is mounted on the front side of the board next to the LEDs. The sensor module is mounted with the antennas (gold patches at top of board) mounted horizontally although the specification sheet says the antenna pattern is pretty symmetrical in both the horizontal and vertical directions so turning it 90° would probably be fine. When mounted to a telephone pole, the radar sensor is facing outward down the street. A couple different heights were tried and found placing it around 6’ (2 m) high to be the best. Any higher and I’d suggest possibly angling the board downward a little.

Step 8: Power and Signal Connections

There are two power sources for the sign. One is a converted HDD power supply which provides both 12V and 5V. The 7-segment display requires 12V for the LEDs and 5V signal levels. The converter board takes the 3.3V signals from the Raspberry Pi and level shifts them to 5V for the display as discussed above. The other power supply is a standard cell phone or tablet 5V USB adapter with USB micro connector for the Raspberry Pi.

Step 9: Final Mounting

To hold the radar sensor, LEDs, and controller board, everything was mounted on a 12” x 24” x 1" piece of wood. The LEDs were mounted on the front side along with the radar sensor and the controller board in it's enclosure on the backside. The wood was painted black to help make the LEDs more readable. Power and control signals for the LED were routed through a hole in the wood behind the LEDs. The radar sensor was mounted on the front side next to the LEDs. The USB power and control cable for the radar sensor was wrapped over the top to the wood board. A couple holes in the top of the board with tie-wraps provided a means to mount the board on a telephone pole next to the “Speed Checked by Radar” sign.

The controller board was bolted to the back side of the board along with the power adapter.

Step 10: Python Code

Python running on the Raspberry Pi was used to pull the system together. The code is located on GitHub. The main parts of the code are configuration settings, data read over a USB-serial port from the radar sensor, converting speed data to display, and display timing control.

The default configuration on the OPS241-A radar sensor are fine but I found a few adjustments were needed for the startup configuration. These included changing from m/s reporting to mph, changing the sample rate to 20ksps, and adjusting the squelch setting. The sample rate directly dictates the top speed that can be reported (139mph) and speeds up the report rate.

A key learning is the squelch value setting. Initially I found the radar sensor didn’t pick up the cars at a very far range, maybe only 15-30 feet (5-10m). I thought I may have had the radar sensor set too high as it was positioned around 7 feet above the street. Bringing it down lower to 4 feet didn’t seem to help. Then I saw the squelch setting in the API document and changed it to the most sensitive (QI or 10). With this the detection range increased significantly to 30-100 feet (10-30m).

Taking in the data over a serial port and translating for sending to the LEDs was fairly straight forward. At the 20ksps, speed data is reported around 4-6 times per second. That’s a little fast and not good to have the display changing so fast. Display control code was added to look for the fastest reported speed every second and then display that number. This puts a one second delay in reporting the number but that’s ok or can easily be adjusted.

Step 11: Results and Improvements

I did my own testing driving a car past it at set speeds and the readings matched my speed relatively well. OmniPreSense said they had the module tested and it can pass the same testing a standard police radar gun goes through with accuracy of 0.5 mph.

Summing it up, this was a great project and nice way to build in some safety for my street. There are a few improvements which can make this even more useful which I’ll look at doing in a follow-on update. The first is finding larger and brighter LEDs. The datasheet says these are 200-300 mcd (millicandela). Definitely something higher than this is needed as the sun easily washed out viewing them in daylight. Alternatively, adding shielding around the LEDs edges can keep the sunlight out.

Making the entire solution weather proof is going to be needed if it's going to be posted permanently. Fortunately this is radar and the signals will easily go through a plastic enclosure, just need to find one the right size which is also water proof.

Finally adding a camera module to the Raspberry Pi to take a picture of anyone who exceeds the speed limit on our street would be really great. I could take this further by making use of the on-board WiFi and sending an alert and picture of the speeding car. Adding a time stamp, date, and detected speed to the image would really finish things off. Maybe there’s even a simple app to build which can present the information nicely.

Be the First to Share

    Recommendations

    • Arduino Contest

      Arduino Contest
    • Explore Science Challenge

      Explore Science Challenge
    • Barbecue Speed Challenge

      Barbecue Speed Challenge

    55 Comments

    0
    titis14
    titis14

    Question 4 months ago

    hello, i made radar thanks for the code. My use will be for radio-controlled cars that can exceed 100 km / h, so I have planned 3 digits 7 segments. But the code should not be provided for this because the first cipher is in the center. Also when there is no speed detected it displays 1 as it should only display 0s. Can you tell me what to change? Thank you

    IMG_9154 [1024x768].JPEG
    0
    WhiteDiscJockey
    WhiteDiscJockey

    Answer 3 months ago

    Do you know if this can be adapted with an hdmi output to connect to a large LED sign?

    Rental sign on trailer.png
    0
    thanapong
    thanapong

    3 years ago

    the great idea, I am trying to use for arduino. Do you have any idea for arduino?

    Thanks,

    0
    jimmy.shull
    jimmy.shull

    Reply 10 months ago

    If you go to the website for the Large Digit signs (SparkFun), they have the same project using Arduino (instead of the RaspberryPi). One of the nice things about the Arduino is that you can get 12V directly into your board and run everything from the pins instead of changing voltages and adding power supplies.

    0
    nenea dani
    nenea dani

    3 years ago

    Did I recently buy OPS241 and wonder if it is generating data for Arduino since both are USB slave devices? We noticed sometimes that when passing a car it generates between 4-12 velocity values with great difference between them. How can I find real speed? I like the idea with the big display.

    0
    jimmy.shull
    jimmy.shull

    Reply 10 months ago

    You might be able to clean up your speed results by turning on "Radar Sign Mode" on the OPS 241, which limits the number of reported numbers to the highest value for a detected object. There's more information and settings that can be tweaked if you check out the API document that the author linked.

    1
    kflmiami420
    kflmiami420

    Question 1 year ago

    I want to know if it could be used with out the display . I want to record speed and take a picture , Then overlay speed date and time on photo then have it sent a public tweet of the speeder. Is overlaying data collected via usb from this sensor possible on to a image captured from the Raspberry camera

    0
    jimmy.shull
    jimmy.shull

    Answer 10 months ago

    No, you don't need to display the data or use the LED display. The radar chip manufacturer has additional instructions, like using this chip by connecting it to your phone if you just want to see the speeds. Your idea sounds great, but would definitely take a bit more coding and making sure that the device is always connected to the internet.

    0
    13bemetyousuf
    13bemetyousuf

    Question 11 months ago on Step 11

    I want to ask if the said OmniPresense Radar module detects mutiple speeds, I mean if I mount it aside a wider multi-lane road does it give speeds of vehicles in each lane?

    0
    jimmy.shull
    jimmy.shull

    Answer 10 months ago

    There's only one "output stream" of data that will show you the speeds being recorded, but you're able to adjust the setting (it's a little more advanced) to broaden or narrow the capture area.

    0
    titis14
    titis14

    Question 10 months ago

    Hello it would be possible to recover the speed to have it on an html page?
    Is there a lot to change going to km / h?
    thank you

    0
    jimmy.shull
    jimmy.shull

    Answer 10 months ago

    You'd have to program something in the your pi to send/store your recorded speeds somewhere, then you could likely access them from a webpage/HTML.

    Regarding the change from mph to km/h, it's a simple setting that can be changed in the radar device (though I think km/h is the default). The API document that the author linked was very easy to understand and provides all the commands you'll need.

    0
    jimmy.shull
    jimmy.shull

    Question 10 months ago

    First off, thank you for putting this project together-- it's such a great low-cost solution in place of the expensive units deployed by the police. I have a programming background, but not much experience with the electrical components. Without being able to read your electric diagram, are you able to perhaps provide a better picture to display the wiring on your breadboard?

    0
    eos60d
    eos60d

    Question 1 year ago on Step 10

    I want to use lcd screen

    0
    lalmaghrabi
    lalmaghrabi

    Question 1 year ago on Step 11

    can i have a circuit that will be clear for your connection and i want use LCD to present the speed limit and i want use solar panel, can you help please ?

    2
    JohnB1073
    JohnB1073

    1 year ago on Introduction

    I'm a cyclist. What I'd like is for this to be portable, and the sign part either wearable or mountable to my bike, to remind the motorists coming up behind me how fast they are going. I'd add a little control on the handlebar where I could select the current speed limit, so the sign would flash, and possible alert me by audio, when a driver is speeding.

    Obviously I know nothing about the technology. Does the radar unit have to be stationary? Is there a way you could take into account the speed of the bike to calculate the speed of the car behind? It would be just simple arithmetic, if the measurement would work while moving at all.

    2
    nelsggg0099
    nelsggg0099

    Question 2 years ago on Step 3

    Instead of a sign announcing their speed how about taking a photo of their plate with a small camera something like the DBPower SJ4000. Could your detector be adapted to do that? It would be nice to furnish the scofflaw's license plate number to police if you get enough hits on the same car.

    4
    DraakUSA
    DraakUSA

    2 years ago

    I've noticed our actual police speed signs will flash the numbers if you go over the set speed limit, and will also flash alternating red and blue strobes when you go 5 mph over. Those would make nice additions.

    0
    ShayneJ
    ShayneJ

    3 years ago

    That's cool! I actually have a 30 MPH sign in my front yard. I don't know (or rightly care at this point) what the county would think, but it would be neat to have this mounted with the radar unit peeking over the top...