Speed sensor

I want to measure the speed of cars passing by the street where I live. My idea was to have two laser beams that reflects on a small reflex in the middle of the road and then points to two light dependant resistors. I tested my idea on a breadboard to see if it works, and it did. But now I'm thinking that if i scale it up the smallest vibration will make the lasers miss and thereby fool the Arduino that a car has passed.
Any better ideas for a speed sensor? My idea would cost me well under 10$ so price is also a part in this.

If you have access to the other side of the street then you could use lasers, it is highly unikely that the ground is going to move enought to make the lasers miss... Unless you have a lot of earthquakes :smiley:

Mowcius

Maybee you're right. I'll try it. The thing is then that with that idea I need power on booth sides of the street and if two cars pass at the same time in both directions the reading will be off. But at the same time I can read the speed in both lanes, thats good. And maybee that two cars pass at the same time is unlikely. I'll give it a go.

/Ulf

Yes, trying it would be the best option... If you are using laser beams, make sure that they are low enough so as not to put off any drivers (unless they are infa-red, would be a good option). Also pointing laser beams across the street may not be very legal... Just keep it hush hush!

Mowcius

I would try a narrow beam US sensor pair, this model would probably be best... your accuracy will still be off though...

http://www.maxbotix.com/MB1240__XL-MaxSonar-EZ4.html

You should look around their various products (listed on left side), each has its own range in terms of distance and width of measuring "cone"... You would want one that measures far enough to reach the side of a car, but with a width small enough to be accurate when determining if a car has come in front of it and when the car has moved past the sensor...

I would try a narrow beam US sensor pair, this model would probably be best... your accuracy will still be off though...

http://www.maxbotix.com/MB1240__XL-MaxSonar-EZ4.html

I also just thought about using those. As you say though, due to the cone sensing, they are not very accurate for beam sensing.
Presumably you could account for a bit of that though, if it was from one to the next then presumably the cone sensing is the same so unless the car moves significantly closer or further away it would be pretty accurate...

Any better ideas for a speed sensor? My idea would cost me well under 10$ so price is also a part in this.

Would cost considerably more than $10 though, $100 ish for the new maxbotix sensors?

Mowcius

And your idea would probably just not work, sorry to say. Too many environmental factors which would mess with your setup, as you mentioned... Your best bet is either an IR or US sensor setup... I prefer US, but others may disagree.

Yes, my idea is better for small scale. I am using lasers and LDRs on a current project of mine...
US is good but often not an option due to the costs involved, the OP obviously is concerned with that. Is there another solution that we can think of then? :wink:

Mowcius

Well, he could always rob a bank...

Well, what could be more stable is if you set up a laser on one side of the road - one of those small lasers would do, just has to be powerful enough...

on the other side you place a solar panel (one of those small ones, a few inches wide/long) inside of a case with an opening (so that the only light that can reach the panel is if the laser is aimed at it)... make sure both setups are stable and wont move when a car moves by (vibration is ok, as the solar panel should be large enough to catch the laser if it shifts a few millimeters)... and that's basically it... make two setups like that, then you basically have yourself a timegate system

Yeah but there is still the issue of:

Lasers shining across road where people are driving = illegal?

Mowcius

Not if it's low enough on the ground to be below the windshield level, just low enough to hit the body (as in, just above the bottom of the car's body), then there is no way that would interfere with the driver... plus, the laser's ray would be invisible to anyone driving by unless it directly hits them in the eye (which it won't), so no one would probably notice the fact that their speed is being checked unless they take the time to mess around with the four suspicious boxes placed beside the road (you should disguise them as mailboxes ;D)

Nice to see your dialogue on my case.
I've looked at the sensors from Maxbotix earlier and ruled them out on count of the price. Nice to see that we think the same way. This is just supposed to be a cheap simple project in my spare time.
Lasers legal or not don't bother me that much so I'll go with that option, but then the issue still is the small light resistor. The solar panel should be a much better idea then. The time gate system is what I'm aiming for, just didn't knew the name for it.
Any hints for a suitable solar panel and how that would work?

Not if it's low enough on the ground to be below the windshield level, just low enough to hit the body (as in, just above the bottom of the car's body), then there is no way that would interfere with the driver... plus, the laser's ray would be invisible to anyone driving by unless it directly hits them in the eye (which it won't), so no one would probably notice the fact that their speed is being checked unless they take the time to mess around with the four suspicious boxes placed beside the road (you should disguise them as mailboxes )

It still may not be legal, use infa-red ones if you can, then you wouldn't see anything (they are more expensive though).
Low enough to the ground = blind dogs?

Mowcius

Any hints for a suitable solar panel and how that would work?

I wouldn't have thought that a solar panel would work, I don't know how you'd interface with it, a small dot on it wouldn't produce much current...

You can get larger LDRs:
http://www.rapidonline.com/Electronic-Components/Optoelectronics/Photodetectors/Light-dependent-resistor-NORPS12/34793/kw/LDR
About 10mm sensing dia. I am using them for my project...

Mowcius

You can indeed use a solar panel... don't forget to enclose it though!

and to be safe, as I mentioned, use one of about a few inches wide

Nice, I will have to try that some time...

Mowcius

looks great, cant miss that even if i tie the laser to a lamp post. Now I'll just need to find solar panels. (Right after these messages... Implies that I'm taking a break now to go to sleep.)
Thanks a lot for all the help! If, (I'd like to say when), this idea becomes real I'll be sure to post it here.

/Ulf

You didn't say what type of reflex (reflector) you have across the lane from you. If it is the usual safety reflector, then it should be forgiving of vibration. Most safety reflectors use the "corner cube" principle. This sends light almost directly back to the source, regardless of the incoming direction of the light. I just tried this with my pocket laser and the reflector on my bicycle. The light does not come back in a pencil beam, it is spread out a few cm, but does come back very close to the laser pointer. Maybe a better quality reflector would have a tighter return beam?

I think you could make this work with the laser aimed at the reflector across the lane, and something like a 5 cm by 5 cm solar cell directly behind the laser pointer, maybe with both inside a 10 cm dark plastic tube to block stray light. The solar cell should mostly ignore (integrate) flickering in the return beam.

Here is another idea, what if the time it takes a car to pass a single sensor is long compared to the time of the flickering? You could program to ignore the quick on and off events and only record data when the blocking was over a certain minimum time interval. This would reduce your timing accuracy (jitter) and would set an upper limit on the speed you could measure.

I've just ordered the solar panels, they're 2,5cm square. So in a week or two they should arrive and by then i hope to have some code to test them with. Stay tuned...

/Ulf

Cool, I look forward to hearing about it...

Mowcius