Arduino Idea - Page 1
Forum section: electronics / projects

author: gnamp
author_rank: Newbie
timestamp: February 21, 2012, 01:23:40 am
content: Hi, I'd like some help with a project idea I have and I have been pointed here and told this is a good place to askBasically- I'm a taxi driver and I wanted to 'reverse-engineer' a reverse-proximity-sensor so that you get a sound signal when your car is stationary and the vehical in front moves off- rather than the typical 'when you yourself are getting close to something'.This is so I can continue reading or nod off without worrying about closely watching the car in front for it to move forward (or the cars behind me on the rank getting annoyed because I wasn't!).I understand it's possible using prox. sensors and writing code for a micro-controller- but that's about as much help as anyone I've asked has been...Obviously it would be great if there was a way to engage/disengage it from inside the car; choose sensitivity settings; type of alert- that sort of thing, but I was hoping you might be able to help me with the main functionality of the thing.Thanks in advance,Dom.

author: george graves
author_rank: Super Contributor
timestamp: February 21, 2012, 01:51:18 am
content: This thread has a lot of information.http://www.mp3car.com/hardware-development/121995-custom-usb-parking-sensor-interface-formally-pdc-usb.htmlAre you new to arduinos? It's not really the kind of project one would normally do for a first project - just my 2 cents.

author: amspire
author_rank: Super Contributor
timestamp: February 21, 2012, 01:53:31 am
content: The easiest way would probably be to start off with a waterproof sensor like this:http://www.ebay.com/itm/Water-proof-Ultrasonic-Motion-Detector-Sensor-Module-Security-/110827949928?pt=LH_DefaultDomain_0&hash=item19cddc4f68You could actually take the sensor off the board and attach it to the sensor by leads.These sensors make it very easy to code the arduino, as the output is a very simple binary pulse. The code just has to trigger a sonic pulse and measure how long it takes to return.seehttp://www.arduino.cc/en/Tutorial/UltrasoundSensorfor some working code.If you use the handbrake in the queue, then using the handbrake switch is the easiest way to enable the arduino when you are stationary.It definitely is possible to take an existing reverse proximity detector and find a way to connect the arduino, but it is hard to generalize how to do it without the hardware at hand.Richard.

author: electrode
author_rank: Regular Contributor
timestamp: February 21, 2012, 01:55:37 am
content: The difficulty with this is getting it to know that your car is stationary, assuming you don't want to have to hack into your speedometer signals. Ultrasonic sensors to give you proximity to the car infront will be easy.Here's something I found for ideas on detecting if your car is moving:http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1247750647/allThe handbrake idea suggested by amspire is possibly genius if that suits your driving habits.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 21, 2012, 02:23:33 am
content: The 'stationary' car bit is a red herring.You engage it when you want to use it, which is when the car is stationary in a taxi rank. When engaged, measure the current distance to the object in front (say using an ultrasonic pulse) and keep sampling every half-second or so until it moves more than 10% or so from the current reading. Using an averaging algorithm will help eliminate spurious readings (if any).

author: electrode
author_rank: Regular Contributor
timestamp: February 21, 2012, 03:24:00 am
content: That's a good point.You could just have a pushbutton that toggles on/off as the power to your arduino + an LED so you know it's on. Then on boot, it measures the distance and only cares about relative distances from that point onwards.Another thing you could do is use a momentary push-button to turn it on, then it stays "ready". After it detects movement, it sounds its beeper for (eg.) 5 seconds before turning itself off. One way to do this is for the arduino to use a MOSFET in parallel with your power button, so that you have to turn it on, but it can turn itself off. We can help you with little details like that when the time comes.

author: gnamp
author_rank: Newbie
timestamp: February 21, 2012, 04:26:00 am
content: It's underway now, thanks to everyone who has replied so far. I've got the sketch started and I'll post it when its done completely /when I get stuck...I've gone with the '*chirp* when pulse read duration is greater than X,' approach. So basically, if the pulse takes longer than say 8000 microseconds (for a 4.5 feet range or thereabouts), the car in front must have moved away.I could have it take a reading every 5 seconds or so. I was thinking also, ideally, I'd set it up to automatically reset eg. when I rejoin the rank (so only activate main operation loop if there is something 4.5 feet infront of my car or less for more than say 30 seconds). This is to get round having to switch it on and off between runs.It's also useful for being stuck in a queue at traffic lights for any significant amount of time (well it certainly beats looking in my glove-box for something, which is how I normally get the lights to change.A friendly electronic 'chirp' is nicer than an angry lorry driver to remind you to concentrate on driving.

author: Rerouter
author_rank: Super Contributor
timestamp: February 21, 2012, 06:55:05 am
content: if you do want to tack on to your speed signal, do it through a high impedence input such as an op amp, and use a 12K liftup to accessory on the speed signal, as this will work for all hall effect senders, if yours uses an inductive, then you would have a slightly harder time, but they are rare in modern cars,it wouldnt matter about actually measuring the pulses, just reacting when there are none, e.g. make an interupt to a delay off of it, or something similar,

author: sonicj
author_rank: Frequent Contributor
timestamp: February 21, 2012, 09:19:27 am
content: tap off the brake light switch. if you're foot is on the brake for X seconds continuously then you are probably stopped, calibrate current distance, wait for increase, ding.-sj

author: george graves
author_rank: Super Contributor
timestamp: February 21, 2012, 10:49:18 am
content: Quote from: Rerouter on February 21, 2012, 06:55:05 amWhere can I lean more about interfacing to both types of sensors with out affecting their function?

author: electrode
author_rank: Regular Contributor
timestamp: February 21, 2012, 10:59:51 am
content: You may be able to use theODB-II portif your car has one. It's usually in the driver's or passenger's footwell/glovebox cavity area.ObDuinois an existing arduino project to use this port, though all you'd care about is vehicle speed. It's certainly a lot safer if your project just plugs in, rather than splicing wires in your pedals...