Hello Arduino comunity!
I am working on a circuit that uses an Arduino Mini to read values from certain points of a boost/buck converter circuit to determine things like input state, output state, overheat and so on. The circuit is working all right, and the only part left to do is to connect the digital pins of the Arduino to the different points in the boost/buck regulator.
The problem is however that I need to read from a range of voltages between 1 and 31 volts with the Arduino, which isn't possible, because not only will it damage the controller if the voltage exceeds 5V, but values below 3V will be regarded as false.
I thought of putting some potential dividers, which would obviously not do the trick, and I also thought of using a WS78L05 voltage regulator per input pin (because each pin might have a different voltage from the rest) but that isn't dealing with voltages <=5V and 31V exceeds its rating as well.
Lastly I thought of using transistors, which seemed like a good idea, but I would require 2 transistors per input wired as follows:
But it is impractical to do for 4 inputs and there is limited space available on the PCB too :(
Is there any IC that encapsulates the circuit above, or is there any other way to achieve what I want to do?
Thanks very much :)