MJLorton Solar Power and Electronic Measurement Equipment Forum

Arduino => Arduino => Topic started by: Hants on April 29, 2013, 09:06:06 AM

Title: Floating pin grounding
Post by: Hants on April 29, 2013, 09:06:06 AM
What would be the best way to connect indicator lamp to arduino' digital pin?

When playing on the breadboard it is pretty obvious that we need to use a pull-down resistor, but how to combine GND with +12V signal?
After many minutes of thinking - I came up with idea:

(http://www.hants.pl/jpg/diginp.jpg)

Is it correct?
Title: Re: Floating pin grounding
Post by: Monkeh on April 29, 2013, 06:42:19 PM
Try a voltage divider..
Title: Re: Floating pin grounding
Post by: Hants on April 29, 2013, 09:26:43 PM
Not very safe..

I have just discovered optocouplers! :-)

(http://www.hants.pl/jpg/12Vto5V.jpg)