Mustang sequential tail lights

I am new to electronics and I am attempting to create a sequential tail light timer for my 2003 mustang. Ok so basically my setup is as follows: I have the output of my arduino pin to a 1k resistor, into the base of a 2n2222 transistor. The emmiter of the transistor is then hooked up to a common ground between my arduino and the 12v car battery. The collector is then hooked to one side of the coil within the relay. The other side of the coil has the +12v source attached with a diode across the coil. Attached to the contacts of each relay is the ground to each bulb. The +12v are always attached to the other side of the bulb. Does this set up seem ok or is that too many relays for the arduino to handle? I am new and would really like someone experienced to help me out with this. Also, I tried using mosfets and could not get them to work properly which is why i resorted to the relays. Another thing is i am taking the input from the brakes and blinkers through a 7805 5vdc regulator from radioshack to use as a digital input to the arduino.

Does this set up seem ok or is that too many relays for the arduino to handle?

That will be fine. The Arduino only "sees" the resistor/transistor. You can connect one of these set-ups to each Arduino output . I assume you have (or will have) a total of 6 resistors/transistors/relays circuits?

Have you tried it? If you can turn-on one of the lamps with a 5V "signal", you've got it!

Another thing is i am taking the input from the brakes and blinkers through a 7805 5vdc regulator from radioshack to use as a digital input to the arduino.

Wrong! A voltage regulator is for power supplies, not for "signals" that switch on & off. You just need a [u]voltage divider[/u] (two resistors).

The ratio of the "bottom" resistor to the total resistance gives you the voltage ratio, and you need 5/12V. Shoot for a total resistance somewhere around 1k - 10k, make some calculations, and find common resistor values that are close to your calculation. It doesn't have to be perfect, and your 12V input varies a bit anyway. (3.9k & 5.6K seem about right, depending on what resistors you may have available, but please double-check my numbers.)

I'd suggest you break-up the project in to sections that you can test separately...

  • You can test the transistor/relay/lamps with a 5V power supply (perhaps the 7805).
  • You can write and test the output-software with a resistor/LED in place of the transistors/relays.
  • When the output-sequencing part of the software works, you can connect some switches to sumulate the blinker/brake input.
  • You can add the real blinker/brake inputs (with voltage dividers) and test with the LEDs.
  • When everything is working, you can hook-up the transistors/relays/lamps.

It wouldn't hurt (and it wouldn't cost much) to leave LEDs permanently attached. (I recently built a music-controlled lighting system, and the "test" LEDs are permanently mounted in the controller box. It made the programming/debugging easier, and it made it easier when I wanted to add a feature/function to the software later. If I ever get a failure, it will make troubleshooting easier.)

Hook-up the lamps with connectors (or leave the original connectors) somewhow, so that you can easily re-connect the original system and bypass your sequencer in an "emergency" (if your homemade set-up ever fails when you're on the road).

At the Slight risk of being a pest a 7805 used as a level shifter to signal the Arduino that some outside condition has happened is NOT bad, rather very clever. Basically a one part, instead or your two part voltage divider, still requires the same number of bypass capacitors and provides a PROTECTED signal as the 7805 doesn't care if it's input goes to +40 Volts. Your divider does, it under that condition, will put 13 volts (40/3 = 13 r 1) on the input. The input unless deliberately set low will draw NO current and will require a 10K pull down. Analyze the circuit first and try to understand the designers intent First. IMNSHO...


Ok so I'm not sure where I should go with this. Would it be better to use the two resistors in serious to get the input for my digital pin, or would the regulator I already have work best. Like I said I am very new to electronics and don't want to burn up my $35 uno :stuck_out_tongue_closed_eyes:. So with that being said since you guys have more experience which would be the better way to send the input? I will be using the same way to detect the 12v brake signal, blinker signals, and flasher signal to 4 different pins using this method to detect high or low.

Patrick I apologize, I didn't look for a reply from you and left you in the dark. Yes by all means use the 7805... it is perhaps the one thing it might be good for... besides warming up coffee... A Linear Voltage Regulator can be thought of as a voltage controlled resistor and your application is perhaps one of the more unique uses for that device I have ever seen. Absolutely it is over-voltage proof, reverse circuit protected and reasonably immune to noise on the input unless the noise causes the input to go below about 9 volts (in your case). Good Idea, do it and share your results.