Electronic – arduino – 5V to 3V3 – Sensor for Arduino 3V3

arduinosensor

I am trying to make a circuit using a 3V3 Arduino and other modules working on 3V3, but I have a problem with an analog water sensor I need to use. The output is a voltage range is from 0.5V to 4.5V.

I think I cannot use 4.5V signal on an analog pin of an Arduino working at 3V3.

So I have a basic idea like solution.
– Use a 5V step-up voltage regulator from 3V7 li-on battery for the water sensor
– Then using a voltage resistor divider to convert from 5V (sensor output) to 3V3.
– Then connect to the Arduino and inside make line code with a simple equation where I can recover the 5Volt value.

For example
enter image description here

Will I will lose resolution doing this? Is it a bad idea?

EXTRA QUESTION

To ensure that I will not lose resolution, what do I need to check? Maybe the minimum step voltage in the ouput of sensor? For example 5mv minimum of variation, then 5mv*voltage_divider = 3.3mv … Then 10 bit of resolution of ADC in Arduino is enough? I got a 3.22mv resolution (3.3/1023)

Best Answer

That's the standard way to do it but you might consider lowering your resistors so that the net effective impedance seen by the Arduino's ADC input is only a few kohm. Maybe use 5k1 and 10 kohm. You'll find in the data sheet that the ATMEGA328 chip likes to have a source impedance not greater than 10 kohm.

You might also consider adding a capacitor across the (now) 10 kohm resistor to offer some anti alias filtering. If you can manage 100 nF that would be a good default choice but it depends on the bandwidth of the signals you wish to convert.