Introduction: Low Cost Radar Speed Sign

Picture of 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

Picture of Materials and Tools

Step 2: Floor Planning of the Electronics PCB Board

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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.

Comments

ShayneJ (author)2017-11-12

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...

rhackenb (author)2017-11-07

If there is a legal concern about labeling it "Speed Checked by Radar", you can simply have the numbers appear. No claim of what it is doing but people will get the picture. My guess is that it be sabotaged very quickly. Another alternative would be to have no display at all, just a photo, the speed, and a photo sent to you via wifi. You could present this evidence to the police if you need enforcement.

This whole thing is problematic from a social aspect but neat technology.

AlexanderP124 (author)rhackenb2017-11-07

The laws are different in different countries, but I think "speed checked by radar" pretty innocent phrase. 100% true, without any claims of possibility of getting a ticket for this.

Contrary, taking a photo may have a legal consequences - not only it's useless for police as the speed check equipment is not certified, but also it raises privacy concerns. Many people don't like their photos taken without permission.

bgreen3 (author)AlexanderP1242017-11-07

From my understanding it is perfectly legal to take pictures of people if they are in public places. Driving on a public road is a public place. I'm not a lawyer, but I was a photojournalist for many years and you are fully allowed to take pictures of people in public.

ShayneJ (author)bgreen32017-11-12

Right you are. In a public space where no expectation of privacy exists. In a restaurant, a mall, any store, the sidewalk, street, concert, ball game, etc...

DoctorLar (author)2017-11-11

great project, I've been trying to come up with a similar project. I have one addition though, to add an air horn that sounds when the driver is going 10 over the limit. I'd only switch that portion on when the kids are out playing. Blah to to legalities, which is what the police have heard from me when drivers complained about my home made speed bump. That's right. If the police won't slow cars down, I will.

JimM38 (author)2017-11-10

Neat project. How would I capture video of cars running through stop signs?

eferrari00 (author)2017-11-07

can I ask you about your Radar unit. What is the smallest size that it can register? And at what distance? We have an issue with birds ... and I am interested in building a device that could determine the number, distance, and location of the birds that enter an area of my yard. Thanks in advance. Ed

duncancurry (author)eferrari002017-11-07

Thanks Ed. I saw with the revised squelch setting that the sensor also had pretty good range for people. We were walking in front of it and it picked us up 30-45 ft (10-15m) away. People are a lot bigger than birds, and the size and material of the detected object determines the detection range. Cars being big metal objects are easier at farther distances. My guess is that a bird may cut the range in half from that of a person. A test I might be able to try is to stand still at different ranges and wave my hand. That may approximate a bird.

eferrari00 (author)duncancurry2017-11-10

Thanks Duncan, That does sound like it would approximate what I am talking about. Let me know how it goes. Regards, Ed

jimvandamme (author)eferrari002017-11-09

The radar card doesn't have a very directional antenna (70 degree beamwidth). If you can narrow that beamwidth down you can get much better detection range. Hard to tell just looking at the photo but I'd try a short pipe in front of the radiating patches (those square thingies). Doesn't have to be long or sturdy, maybe a tin can would do.

lukee1986 (author)2017-11-09

please add costs or all up cost roughly so i know if its worth it or not u said the other was nearly $1000 hows urs compared on capabilitys and cost price time and effort you put in

duncancurry (author)lukee19862017-11-09

The rough summary of the BOM is $331 (below). That's not absolutely everything but the majority of it and all the >$1 items. So the grand total is around $340-350. When looking around initially I saw used units on eBay for $1,200, new units starting around $3,000, and heard of a city locally spending $8,000 per unit. These all had larger LED or dislays and probably could detect at a farther range but definitely out of my price range

OPS241-A $169.00

Raspberry Pi 3 $35.00

LED 7-segment $29.90 (total, 2 pcs)

Radar Sign $29.00

Enclosure $21.99

Large Digit Drive $13.90 (total, 2 pcs)

AC/DC adapter $9.99

USB Power Supply $7.50

Bread Board $6.49

Terminal Block $4.19

NFET $2.97 (total, 3 pcs)

74HCT04 $0.99

Captain_Nemo (author)2017-11-08

1. How long until this gets stolen?

2. How many people take this as a challenge to try to overload the machine?

duncancurry (author)Captain_Nemo2017-11-09

We have a good street where everyone knows everyone. When we initially were testing we had the sign out for over 3 weeks and no one took it or complained even when it was held by a single nail.

Not sure what's meant by "overload". The top speed readable is up to 139mph which would be hard to do on our street.

ggallen103 (author)2017-11-07

How are you getting AC power at the pole?

duncancurry (author)ggallen1032017-11-08

Fortunately I have an outdoor outlet nearby that I use for plugging in my Christmas lights for my bushes and trees. It is controlled by a switch at my house.

frarugi87 (author)2017-11-03

There are some inefficiencies:

1) why did you put the inverters too? You just need to invert the signal outputted by the rPI. Or, if you prefer not to invert it, use a 74LS04 hex inverter (TTL levels) and use two inverters in series (you have 6, so you can convert all the 3 channels). A 5V powered TTL port accepts voltages as low as 2V for the high value, so even 3.3V logic is ok for them.

2) why didn't you use the 5V from the HDD cable to power the rPI? you can easily avoid another cable coming out of the box....

duncancurry (author)frarugi872017-11-03

1) The TIC6C596 shift register used on the Sparkfun large digit driver requires a Vih of 0.85 x Vcc (0.85 x 5.0V) = 4.25V. But the Raspberry Pi can only output 3.3V on its GPIOs. So I need to level shift the control signals up from 3.3V to 4.4V. The circuit I use is pretty standard, with minimal component cost/count for doing it. Inverting the Rpi GPIO signals doesn't help, because that just pushes the problem to the other edge. It's true that I could have just used the 3 additional inverters already available on the 74HCT04 used in the design, since the 74HCT04 meets the Vih spec (which is why I chose it in the first place). This would have provided a full 0->5V swing on the outputs. The reason I still chose to use the FETs and resistors for the output stage, however, is that it gives me more flexibility in the levels I can drive (I can drive levels anywhere from 1.2V to 12V) depending on the display I want to use (as mentioned, I think I will try again using a brighter LED display, which may require a different level). Using the FETs and resistors also gives better power isolation for my Rpi. I don't want to somehow accidentally inject 5V or 12V from the display power supply back into the Rpi and do the 'Smoke Test' ;) If I wanted to be even more careful, I would actually use a FET and resistor for the first stage of the level shift as well, since the Rpi GPIO would then only drive the gate of a FET. That would give it maximum protection even against ESD and Latchup, but that would require even more components.

2) Yes, you can use the 5V from the HDD to power the Pi, and I thought of doing it. The reason I didn't was because, again, I wanted to isolate the power supplies driving both the display and the Rpi. With 5V and 12V supplies floating around on the display, I wanted to make sure they couldn't feed back into my Pi. I also figured that if an angry driver or kid throws something at the display to break it, at least my Pi won't go up in smoke. Also, I was not sure how well-regulated the 5V supply from the HDD brick was (it's pretty cheap), and so I preferred sticking with the supply that came with the Rpi. But yes, if resources are limited and you have a pretty good HDD supply, you could wire it directly into the Rpi.

Hope this helps! Good luck!

frarugi87 (author)duncancurry2017-11-07

Maybe I did not explain myself enough for q1 ;) I read that the Vih was too high, so at least one stage was required. That's why I suggested you to invert the rPI output (and keep the transistor); the nMOS turns on with the 3.3V pulse from the rPI, and so you get a 5V output on the other side.

Note, however, that if you want to power the inverters at 5V you'll need the LS family, not the HCT.

As for the dual power supply, I think that if you want to properly isolate everything you'd better keep separate grounds too (and use opto-isolators on the data lines). This will also solve your level-adapting issue ;)

duncancurry (author)frarugi872017-11-08

I understand now, yes, I can just invert the GPIO signals and run the control signals just to the FETs, much better. Thanks!

thanapong (author)2017-11-08

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

Thanks,

Alstructable (author)2017-11-07

Wonderful idea, and a service to your neighborhood!

JulianP4 (author)2017-11-07

I was in a triathlon race with my son once, and there was a permanent radar speed sign on one of the streets on the cycle leg that displayed a red unhappy 'smiley' for vehicles exceeding the speed limit. We were both overjoyed we managed to get it to display the unhappy face on our bikes.. :-)

mojeeza (author)2017-11-07

Good project that i would work on for the same reasons. Thanks.

tk42967 (author)2017-11-07

Some spray paint will fix all the issues.

InarcoC (author)2017-11-07

Nice project. Not one you could use in Spain (only certified machines can be used, and you can't put your own signs in Spain), but nice, after all.

and7barton (author)2017-11-07

A good project, except that here in the UK, the police would soon be knocking at your door and demanding you remove it. Only official speed detectors are permitted here.

Really? Are you sure. I know that the police have been known to lend out hand-held speed check instruments, and I do see signs (not active ones) with "Community Speedwatch" written on them.

I've read articles to the effect in the newspapers. Often people have stuck a camera up, or a dummy camera. It invariably results in the police requesting that it's removed. The usual excuse is that it could be "a distraction to drivers".

golisch (author)2017-11-07

A red plastic filter sheet in front of the leds would improve contrast.

sollmann (author)2017-11-07

We have signs posting "No Parking, Standing, Stopping" during school times and also "NO U TURNS" during the same school hours. It amazes me how many people that have kids in school that cannot read the signs everywhere. I thought it would be good to have a sign similar to this for the speeders in the school zone, but as another reader noted, the need for snapping reasonably high quality photos would be a great addition.

I envisioned a GPS timestamp superimposed on the photo with speed. To "dodge" the legality of signs was to place such a system (or two) on camera tripods, one each side of the street during school start / stop times would help "train" drivers. Our kids are our greatest treasures.

But I'd LOVE to build a more permanent solution with a solar panel to make it self contained! I do agree, that isn't viable on city poles / property!

This is a great instructable, one that I may spend some time doing myself!

Great job!!!!

cube-convict (author)2017-11-06

How about adding a photo module to the Pi and snapping a photo of speeding cars? I have a relatively small street, but with lots of teenagers and soccer moms (dropping kids off at art class and speeding to Starbucks). I know enough of the people that I could send them photos with their speeds... :)

Billrose (author)2017-11-04

Wish I could do this in my road. Great idea

gm280 (author)2017-11-02

I totally understand your ideas and wants and reason why you build this. But I bet you are not the most liked person in your neighborhood now. And that could get worst once you WiFi pictures of the speeders as well. Just saying.

MrEliptik (author)2017-11-02

Very interesting ! It might be useful as I wanted to do something similar in my street.

Swansong (author)2017-11-02

That's a neat idea, most people will slow down just seeing it so it should help some :)

About This Instructable

19,223views

191favorites

License:

More by duncancurry:Low Cost Radar Speed Sign
Add instructable to: