I am trying to design a circuit with ESP32-wroom-32E and it accepts 3.3VDC as digital Input. I need to design a circuit which accepts voltage range of from 5VDC to 32VDC. How can I design it. Do you have any idea?
If you mean the ESP32 has to know if an input is between 5volt and 32volt,
then use a voltage divider to drop ~35volt to 3.3volt,
and connect that to an analogue pin.
Get the A/D value, and use an if() statement to test the limits.
Leo..
Are you trying to measure a digital signal or an analog one? When you say "accept voltage range of 5-32" do you mean that you will know ahead of time what the input will be and have to adjust for it or that it might receive any signal from 5-32 at any time?
If you decide to use a voltage divider and an analog pin, just remember that the ESP32s ADC is problematic at anything over 3.0v. It is basically unable to distinguish 3.0V from 3.3V. As long as you just need a digital signal, that should be fine. But if you're looking for an analog reading, you are going to want to bring 35V down to no more than 3.0V.
How can I determine series resistor for an optocoupler. I meant, one user can use 5VDC as input another one can use 24VDC as input. If I determine a resistor for 24VDC, it will harmful to 5VDC and if I determine resistor for 5VDC, it will not enough of 24VDC.
I am trying to measure digital signal, like 5VDC,12VDC,24VDC etc.