I'm building a small electronic project that will measure the power consumption of a device and send this back to Arduino or ESP2866.
I've figured out how to measure the current that goes trough a power cable using the ACS712. This works fine.
The only problem I have is sending the input voltage be it either 110 Volt or 230 Volt. The easiest for me to work with would be an output signal of 3.3 Volt. E.g. 0 volt when the input voltage is 110 Volt and 3.3 Volt when the input voltage is 230 Volt.
Then if my input pin is 0 volt (digital 0) AND I measure a current I can assume that the input voltage is 110 volt. If the input pin has 3.3 volt (digital 1) and I measure a current I can assume that the input signal is 230 volt.
Right now I am setting stuff up on a breadboard but when all is done it should have an as small as possible footprint. Around 2.0 x 2.0 centimeters.
Anybody has some good tips on how to do the voltage sensing?