Hello All! First post here
I would like to take a 24VDC signal and feed it into a microprocessor (VCC of 3.3v)
I've considered a relay or an Opto-isolator. I'm new to microprocessors and I'm unfamiliar with what steps should be taken to protect the inputs.
I'm leaning more towards the 24VDC relay because i'm more familiar with them. I've read this thread: http://forum.allaboutcircuits.com/showthread.php?t=93596&highlight=relay+switching and it seems to be a good solution but there is no schematic posted. It seems simple enough:
Common - Input Pin of uProcessor
Norm Closed contact: GND
Norm Open contact: VCC via 10-100K Pullup.
I'm pretty confident that solution will work, but relays have moving parts and they can fail. The input signal will be switching frequently and I'm concerned about the mechanical lifetime of my relays. Which is why I'm also considering an Optocoupler - longer lifetime.
I have never used optocouplers before, and I can't really wrap my head around the implementation of one. I understand how they work: input signal lights an LED. Output is driven via a photo-sensitive switch of some sort.
This would seem ideal to me because there's no moving parts, and the input is totally isolated from the output.
Again, because I don't have experience with them I have a few questions. My main question would be how do you turn the thing on with 24V if it's a LED? Would I just need a large resistor to lower the current through the LED or do they have 24V versions of them?
I realize this is a slew of questions, but my mind is swimming with them and I tried to ask only the important ones. If anyone has any input into the pros and cons of either of these ideas i would greatly appreciate it!
I would like to take a 24VDC signal and feed it into a microprocessor (VCC of 3.3v)
I've considered a relay or an Opto-isolator. I'm new to microprocessors and I'm unfamiliar with what steps should be taken to protect the inputs.
I'm leaning more towards the 24VDC relay because i'm more familiar with them. I've read this thread: http://forum.allaboutcircuits.com/showthread.php?t=93596&highlight=relay+switching and it seems to be a good solution but there is no schematic posted. It seems simple enough:
Common - Input Pin of uProcessor
Norm Closed contact: GND
Norm Open contact: VCC via 10-100K Pullup.
I'm pretty confident that solution will work, but relays have moving parts and they can fail. The input signal will be switching frequently and I'm concerned about the mechanical lifetime of my relays. Which is why I'm also considering an Optocoupler - longer lifetime.
I have never used optocouplers before, and I can't really wrap my head around the implementation of one. I understand how they work: input signal lights an LED. Output is driven via a photo-sensitive switch of some sort.
This would seem ideal to me because there's no moving parts, and the input is totally isolated from the output.
Again, because I don't have experience with them I have a few questions. My main question would be how do you turn the thing on with 24V if it's a LED? Would I just need a large resistor to lower the current through the LED or do they have 24V versions of them?
I realize this is a slew of questions, but my mind is swimming with them and I tried to ask only the important ones. If anyone has any input into the pros and cons of either of these ideas i would greatly appreciate it!
Last edited: