Go Down

Topic: 12vdc input to 5vdc for Arduino (Read 117 times) previous topic - next topic

Paulywog7302

Gents How can I get a 12vdc signal from a laser eye down to 5vdc for Arduino Uno?

adwsystems

Optocoupler

Transistor

Resistor divider

Relay


DVDdoug

#2
Sep 25, 2018, 07:26 pm Last Edit: Sep 25, 2018, 07:31 pm by DVDdoug
A voltage divider (2 resistors) is probably the easiest solution.   The resistor values are not critical but if they sum-up to around 10K Ohms, that's good.  (The ratio is important!)

Another easy option is an over-voltage protection circuit.   This is better (safer for the Arduino) if the 12V is not regulated, but it only works with  zero or 12V digital signals.   It won't work with zero to 12V analog signals.    (I'd recommend changing the current-limiting resistor to about 1K).


...The opto-isolator (or relay) is very safe because the 12V is electrically isolated from the Arduino, and the transistor method also provides over-voltage protection (assuming it's wired correctly, etc.).

wvmarle

If that 12V signal is push/pull a simple diode pointing away from the Arduino is all you need. Enable the internal pull-up for a reliable high, whenever the signal goes low it pulls the pin low through the diode.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up