I need to build a 3.3v arduino clone based circuit powered by a motorcycle (12v). It also needs to detect turn and stop signals. Due to the fluctuation in voltages, I figured some kind of opto-isolation would be a good idea.
Want to make sure the components are correct values and if anyone thinks it won't work. And if I'm sourcing or sinking too much current. One thing I'm not sure about is the 1K resistor at top. If I have three opto isolators, I need enough current to drive 1 or all 3. I assume I'd connect the other two in parallel (i.e. each with own 1K resistor)
Haven't bought the opto isolator yet, so can't bench test anything
The pinout looks wrong. There are 16 pins. You use pin 1 and 2 for a diode correctly. http://www.cel.com/pdf/datasheets/ps2501.pdf
pins 3 and 4 are wrong .
Try again, using the correct pins numbers.
The 7805 requires decoupling capacitors on input and output. Also the 7805 is not rated for automotive use - you may need better
protection against the spikes and noise on the 12V power - a filter to cleanup the 12V line might be a wise precaution.
The problem with vehicle power systems is that sometimes there can be big noise spikes (starter
motors, ignition break-through), so you either have to be lucky (have a well-behaved vehicle
that doesn't generate anything too bad), or add a power filtering circuit. Some combination or
RF chokes and electrolytics, possible a zener clamp too...
Possibly the simplest arrangement would be fuse, RFC and TVS clamp (TVS diodes are basically
high power zener clamps), then the regulator circuit.
Another approach is to find a good DC-DC converter module with a wide input voltage range (something like
8V - 48V ?) and use that - such switch-mode regulators will handle brown-outs and most over-voltage spikes
without difficulty, and furthermore be more efficient than a linear regulator.
They are usually fully isolated between input and output too, which might be a good thing.
mark_anderson_us:
I've updated my design and added the second input (will be 3 total)
I'm not sure if I need to replicate the diodes (DL and DR) and Caps (CL and CR) on each input
Also not sure if I've got R1 and R2 wiring correct
Would someone mind verifying?
TIA
Mark
It looks like you have A4 & A5 set HIGH with pull-up resistors. Then, when opto-coupler is triggered/activated, it will turn on and pull the signal LOW. Is that correct?
IF you wanted the opposite (Arduino inputs pulled LOW, and triggered to HIGH from turn signals) something like this would work -
Either way should be fine. Just depending on what you want/expect & code for. (Sorry, I can't remember if I should already know that from previous posts.... )