Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiple Voltage inputs for Digital Input pins

Status
Not open for further replies.

Lara2022

New Member
Hello All,

I have a requirement of designing a 4 channel Digital Input section wherein the digital inputs shall be capable of accepting digital signals ranging from 5 to 24V DC, but the catch here is before applying digital signal, the max voltage level for digital input pins shall be selectable through switch. For Example. if I have sensor whose output is 12V, then I set the digital input max voltage level to be 12V using switch, if a signal more than this value is applied some indication has to be there. I done simple 24V digital input schematic with optocoupler isolation but im not able to get any reference for the above requirement. Please help me out
 
I suggest that you have a comparator. One input of the comparator needs to be connected to the digital input and the other input connected to a switchable voltage. If the comparator operates, the digital input is too high or the setting is too low.

That needs a comparator that can handle up to 24 V, which might be difficult. You could divide the input voltage by 10 with a potential divider, and then compare to smaller voltages, for instance 0,5, 1.2 and 2.4 V to correspond to 5, 12 or 24 V inputs.

A circuit like that will not give any indication of the voltage setting being wrong if the digital input happens to be off. An input at 0 V could be a 0V / 5 V digital input that is off, or it could be a 0V / 24 V digital input that is off.
 
Then consider using an A/D to measure the channel and see if its conforming to
the max input. So question is why does it occur that you have a known sensor
tied to a known input, with a known range, exceed its own specs ?


Regards, Dana.
 
but the catch here is before applying digital signal, the max voltage level for digital input pins shall be selectable through switch.

That sounds like a recipe for disaster unless you protect the circuit from overvoltage... "Oops, forgot the damn switch again"
 
^^^^^ This is exactly how I would do it.
Of course, plain-vanilla optocouplers are not the fastest devices in town. One can find, for a price, faster logic optocouplers.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top