Detecting 12VDC on input pins (safely)
Guy Tanzer
Posts: 1
I'm brand new in here, and have been a computer programmer/technician, not an electronics person, so if I repeat a question already answered, please be patient with me.· Thanks in advance!
(I didn't see a search function for the forums - either I missed it (likely) or it could use one.)
I need to be able to detect whether or not a 12VDC curcuit is 'hot' or not using one of the Basic Stamp 2's input pins.· However, I have no wish to fry the Basic Stamp by applying said voltage directly.
Two questions:
1.· What are the safe high limits for voltage and amperage for an I/O pin set to input n a Basic Stamp?
2.· What would be simplest and/or cheapest way to drop 12VDC, such as comes out of a car cigarette lighter plug, to said limits?· I have a sneaking suspicion this involves resistors, but I would appreciate making sure from someone who knows more on the subject.
I don't need to power the Basic Stamp from the 12VDC - I just want to know whether the line is hot or not.· I even considered using a 12V LED and a photocell, since I know from the training book how to wire in a photocell, but I am sure there is a more elegant way of doing this!
Again, thanks for patience with a newbie, and for your assistance, period.
·
(I didn't see a search function for the forums - either I missed it (likely) or it could use one.)
I need to be able to detect whether or not a 12VDC curcuit is 'hot' or not using one of the Basic Stamp 2's input pins.· However, I have no wish to fry the Basic Stamp by applying said voltage directly.
Two questions:
1.· What are the safe high limits for voltage and amperage for an I/O pin set to input n a Basic Stamp?
2.· What would be simplest and/or cheapest way to drop 12VDC, such as comes out of a car cigarette lighter plug, to said limits?· I have a sneaking suspicion this involves resistors, but I would appreciate making sure from someone who knows more on the subject.
I don't need to power the Basic Stamp from the 12VDC - I just want to know whether the line is hot or not.· I even considered using a 12V LED and a photocell, since I know from the training book how to wire in a photocell, but I am sure there is a more elegant way of doing this!
Again, thanks for patience with a newbie, and for your assistance, period.
·
Comments
Also, Beau Schwabe posted a common-base transistor solution awhile back that was quite elegant. You might do a search on Google (not the forum search) to see if you can locate it.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·