Author Topic: Arduino Idea  (Read 5584 times)

0 Members and 1 Guest are viewing this topic.

Offline gnampTopic starter

  • Newbie
  • Posts: 3
Arduino Idea
« on: February 21, 2012, 01:23:40 am »
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 ask :)

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

Offline george graves

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: Arduino Idea
« Reply #1 on: February 21, 2012, 01:51:18 am »
This thread has a lot of information.  http://www.mp3car.com/hardware-development/121995-custom-usb-parking-sensor-interface-formally-pdc-usb.html

Are you new to arduinos?  It's not really the kind of project one would normally do for a first project - just my 2 cents.

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Arduino Idea
« Reply #2 on: February 21, 2012, 01:53:31 am »
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=item19cddc4f68

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

see http://www.arduino.cc/en/Tutorial/UltrasoundSensor for 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.
 

Offline electrode

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
Re: Arduino Idea
« Reply #3 on: February 21, 2012, 01:55:37 am »
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/all

The handbrake idea suggested by amspire is possibly genius if that suits your driving habits.
 

Offline DrGeoff

  • Frequent Contributor
  • **
  • Posts: 794
  • Country: au
    • AXT Systems
Re: Arduino Idea
« Reply #4 on: February 21, 2012, 02:23:33 am »
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).

Was it really supposed to do that?
 

Offline electrode

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
Re: Arduino Idea
« Reply #5 on: February 21, 2012, 03:24:00 am »
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.
 

Offline gnampTopic starter

  • Newbie
  • Posts: 3
Re: Arduino Idea
« Reply #6 on: February 21, 2012, 04:26:00 am »
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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4698
  • Country: au
  • Question Everything... Except This Statement
Re: Arduino Idea
« Reply #7 on: February 21, 2012, 06:55:05 am »
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,
 

Offline sonicj

  • Frequent Contributor
  • **
  • Posts: 756
  • Country: us
  • updata successed!
Re: Arduino Idea
« Reply #8 on: February 21, 2012, 09:19:27 am »
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
 

Offline george graves

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: Arduino Idea
« Reply #9 on: February 21, 2012, 10:49:18 am »
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,

Where can I lean more about interfacing to both types of sensors with out affecting their function? 

Offline electrode

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
Re: Arduino Idea
« Reply #10 on: February 21, 2012, 10:59:51 am »
You may be able to use the ODB-II port if your car has one. It's usually in the driver's or passenger's footwell/glovebox cavity area.

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf