Tweeter control

Hi all I'm new to the forum, so excuse me if I've posted this up in the wrong area. Basically I'm after a bit of guidance in a project I'm having trouble with. Ok so here it goes.

I'm trying to use an Arduino to control a pair of tweeters for my car which raises out of the dashboard when it receives power and lowers when the power is turned off. I intend to use a usb 5volt signal from the cigarette lighter to turn on the project as below but I'm unsure how to get the Arduino to use the 5volt Input from the Usb to start the project. The Project operates as below.

Turn on car- - Arduino receives 5volt from cigarette lighter using a usb charger. *Arduino then switches ON (Digital Pin 13) for 3 secs then OFF after 3 secs have elapsed. (This is the amount of time required for the tweeter to reach its full Up position).

*The Arduino then goes into a Waiting State (Waiting for ignition OFF, which will turn off the 5volt signal from the usb charger).

*Once Arduino no longer receives the 5volt from the cigarette Usb charger it switches ON (Digital Pin 12) for 3 secs then OFF after 3 secs have elapsed. (This is the amount of time required for the tweeter to reach its full Down position).

*I assume the Arduino now must Reset and it starts all over again once the Arduino receives the 5volts from the cigarette usb charger.

hope all the above makes sense, any help would be greatly appreciated.

Nali2000: *Once Arduino no longer receives the 5volt from the cigarette Usb charger it switches ON (Digital Pin 12) for 3 secs then OFF after 3 secs have elapsed. (This is the amount of time required for the tweeter to reach its full Down position).

How do you expect the Arduino to do [u]anything[/u] when it has no power connected? You'll need a fused power supply directly connected from the battery (like the one connected to the radio that keeps its memory intact when the ignition is turned off) to the barrel jack. The +5V from the USB charger can then go to an input pin. Don't forget to connect the grounds.

Why use the USB? What you want is simply if the ignition is on or off. This can be done using an optoisolator.

The Arduino needs to be connected to the battery to supply the signal to the motor and drive the motor. Feed the input of the opto from the ignition, this lets you know if it is off or on. Your logic then drives the required motor.

Once the tweeters are up or down, send your Arduino into low power mode and wake up say every second or so to check the ignition input.

Weedpharma

Things like that are usually controlled by the "motorised aerial output" of the car stereo. I think it's a yellow wire with 12volt on it when the stereo is on.

Stereo on = aerial up. And, when installed, booster amp on. Leo..