Arduino digital input – Read voltage slightly higher then 5V – a power efficient solution

arduinoinputlow-powervoltagevoltage-regulator

I need my Arduino to detect the state changes in a device – (ON or OFF).

In order do do this, I have to check the voltage between two points on the PCB of the device. When the device is OFF, the voltage between such points would be 0V; when the device is ON, the voltage between such points would be 7V. When the device is turned on, it stays on for at least 3-4 minutes.

The problem is the that Arduino can only take inputs up to 5V. I have thought about different options for taking down the voltage to 4-4.5V:

a.) use the old good voltage divider, with low resistor values for the purpose of drawing as little current as possible from the original device circuit. The easiest solution, but not the most efficient.

schematic

simulate this circuit – Schematic created using CircuitLab

b.) use a classic RC charge/discharge configuration. It's probably the most easy solution; however being the difference between the 7V input and 4-4.5V output very low, I think it may not work that expected.

c.) use a resistor in series with a capacitor – RC. By doing this I would
i.) detect a voltage higher than 0 both when the capacitor is charging and when it is discharging;
ii.) avoid drawing current from the device all the time when the device is ON, but only when it is being turned ON and OFF. In this case I would be keeping trace of the state of the device on the Arduino.

schematic

simulate this circuit

I think c. is the best option as it is both simple and energy efficient. Being the frequency of the circuit very low, the capacitor resistence is very high. This coupled with a 47kohm resistor draws very litte current. The RC time constant is 4.7 seconds. To me it sounds a good solution, but as it comes from the top of my head and have not seen it anywhere else, I suspect that might be missing something.

Would it be reliable? And would the addition of that affect the functioning of the original circuit of the device?

Please help me thanks.

Best Answer

The 7V signal will go right to the Arduino through the capacitor and will create overvoltage on the micro. When the signal goes down to 0, after the cap has charged, it will drive the input below 0V, another no-no.

A better way might be to use a MOSFET with the gate connected to the input.

schematic

simulate this circuit – Schematic created using CircuitLab

The circuit will typically draw well under 1uA from the 0-7V circuit. R2 is just there to allow the gate protection zeners in Q1 to kill any spikes that much exceed +/-10v.