I am wanting to use my arduino to run some LED's on my motorcycle with my turn signals, I am wondering if I can get away with powering a 7805 and using the 5 volt signal as an interrupt on pin 2 and 4. When the turn signals flash they will power the 7805, would the signal be too dirty to use? The reason I am considering going this route is mainly due to the fact that I have a HUGE amount of 7805's available to me.
ok, so what would you recommend using? Keep in mind it's entirely likely my flasher voltage could vary a couple volts depending on engine RPM, the bike is 12 volts.
not very much, 75ma, 100ma tops you'll have to forgive my ignorance I am relatively new to this world. I am trying to learn and make things work at the same time without releasing too much magic smoke.
Well a simple transistor will be fine.
Use a 10k base resistor and put a 0.1uF capacitor from base to ground. Have the LED in the collector and the emitter to ground.
This will be driving common anode RGB LED's I have them currently grounding through a ULN2803 I want to use my turn signals as an interrupt on my arduino as it is already dealing with a couple other tasks. When the turn signal comes on I would like the arduino to be interrupted and turn on the red and green of the RGB (making yellow for my signal) so I need to be able to interface my turn signal with the arduino and more specific I need to interrupt on pin 2 and 4 I believe.
Normall the two simple interrupts are on pins 2 & 3.
If you have a nominal 0 -12V signal comming in then I would use a 1K resistor to connect it to the interrupt pin, with a 5.1V zenner across the input pin to protect it, and a 0.1uF capacitor across the zenner.
and that is where the complication starts and the reason I was considering using the 7805, it would give me a constant voltage where as the flashers could differ considerably depending on engine RPM, upwards of 14 volts.
ok, I am sure I am going to sound like an idiot asking this but I am gonna ask anyway. When you say connect the zenner across the input are you talking between the resistor and the input? Sorry just a bit confusing to my newb mind. Connecting the cap across the zenner I can visualize but having difficulties with the other. Thank you for your input by the way.
The zenner goes from the input - the cathode, to ground - the anode.
The resistor goes from the input to the signal, that is your voltage that you want to generate the interrupt from.
Make sure it is a 5.1V zenner although you could use a lesser one providing it is above 3V3.