Continue to Site

Multiple Voltage inputs for Digital Input pins

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

You need to provide more information, EXACTLY what is the project? - why do you want it manually selectable?, and why do you want an indication if it's too high?.

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"

Use an optocoupler at the input. Then no input voltage selection is needed.

^^^^^ 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.

Replies
8
Views
2K
Replies
16
Views
3K
Replies
11
Views
4K
Replies
5
Views
430
Replies
26
Views
4K