Multi voltage input with custom level detection
Posted: Thu Jun 27, 2019 6:27 pm
Hello,
I'm try to made a system with some custom requirements for the inputs but my solutions needs too many components, are expensive or don't adjust to all my requirements.
Let me explain what are the custom requirements for the inputs:
I need minimun 12 digital inputs but every input needs to be detected as LOW if the voltage are lower than 10V and detected as HIGH when the voltage is higher than this value.
I need that every input support 40v maximum and can work on very noise environment.
The output must be 3,3v to be connected on a ESP32 input.
After many days of searching I found the HVS882, a 8 digital input serializer from TI. Yes, the voltage levels have some differences but I'm flexible in this point. This component have 5v outputs and I need 3,3v for my ESP32, so I need a level shifter from 5v to 3,3v. The inputs don't support schmitt trigger and maybe in a very noise environment can be insufficient. The same for the debounce time, 3ms for a noise environment I don't know if will work well. I cannot buy this component in my country and if I buy it from Internet it will be very expensive to me.
I tried this solution but I think it's very clumsy: The 10v Zenner in serial is used to detect the LOW and the HIGH level. When the input is more than 10,7v, the Q1 saturates and the RC circuit (R2 + C1) do a simple debounce with a schmitt trigger inverter. It's simple, it's cheap, but I don't know if is the best solution for the problem. Opinions?
Analog inputs I think that is not a option.
Do you have any idea that can help me?
Any help will be welcome. Thanks.
I'm try to made a system with some custom requirements for the inputs but my solutions needs too many components, are expensive or don't adjust to all my requirements.
Let me explain what are the custom requirements for the inputs:
I need minimun 12 digital inputs but every input needs to be detected as LOW if the voltage are lower than 10V and detected as HIGH when the voltage is higher than this value.
I need that every input support 40v maximum and can work on very noise environment.
The output must be 3,3v to be connected on a ESP32 input.
After many days of searching I found the HVS882, a 8 digital input serializer from TI. Yes, the voltage levels have some differences but I'm flexible in this point. This component have 5v outputs and I need 3,3v for my ESP32, so I need a level shifter from 5v to 3,3v. The inputs don't support schmitt trigger and maybe in a very noise environment can be insufficient. The same for the debounce time, 3ms for a noise environment I don't know if will work well. I cannot buy this component in my country and if I buy it from Internet it will be very expensive to me.
I tried this solution but I think it's very clumsy: The 10v Zenner in serial is used to detect the LOW and the HIGH level. When the input is more than 10,7v, the Q1 saturates and the RC circuit (R2 + C1) do a simple debounce with a schmitt trigger inverter. It's simple, it's cheap, but I don't know if is the best solution for the problem. Opinions?
Analog inputs I think that is not a option.
Do you have any idea that can help me?
Any help will be welcome. Thanks.