How to test input voltage to my ESP32

Hello everyone, I am working with a very sensitive ORP sensor.
According to the manufacture it is critical that the voltage power supply is stable 5v. So I connected the ESP32 not to my laptop but to an external USB power supply.

Is there a way to display on the serrial monitor the voltage the ESP32 is receiving? I just want to see if there is any variation or if I have a very good stable power suply.

Thank you.

This has been done a lot of times, measuring voltage using a microcontroller. Try Google on ESP + voltage measurement.

You should be using some sort of logic level shifter..
ESP32 is 3.3v not 5v..

They do make usb testers which might be a better choice for checking the power srouce..

good luck.. ~q

1 Like

thank you.

1 Like

Thank you but this is not what I am after. Qubits-us suggestion is good. I agree. It is probably better to do that with an external tester before I connect a power supply to my esp32.

Okey. The assumtion here was continous voltage checking.
Using DMM for a voltage check and if needed, an oscilloscope checking the ripple.

1 Like

An ORP sensor may output an analog voltage. In that case, istead of a logic level shifter, use a voltage divider to reduce the input voltage by a known fraction, for input to the ADC.

But first, study the ORP data sheet to see what the output actually is, and use your multimeter to check. Post a link to the sensor.

Note: the ADC on the ESP32 is so nonlinear as to be worthless for quantitative measurements.

Thank you. Understand. The original code from DF robot has a line to do just that. But thank you. Everything seems to be much more stable after I use a different power supply than my laptop. Love arduino. Learning everyday!
Uploading: IMG_3817.jpeg…

To do what?

The DFRobot ORP meter is a 5V analog sensor. Use a 10K:10K voltage divider to protect the ESP32 input from damage, but don't expect good data from the ESP32.

The Arduino Uno and similar would be a MUCH better choice.

to convert analog signal to orp value. this line. But the sensor is not connected directly to the ESP32. It goes thru a small circuit board first. attached here is the link.

ORP Sensor

I use ESP32 because I want to upload results to IoT. I also have Nano IoT 33. I want to trigger an alarm is the chlorine level gets below 3 ppm. Since there is no chlorine meter per say, I use ORP measure. I have 3 glasses of water on my desk with 0 ppm of chlorine, 2 and 4. Testing is going well.

But you said I would get MUCH better results with Arduin UNO. I have one. Question. Would I get MUCH better results as well with the Nano 33 IoT ? Because as you know the Nano IoT 33 has wifi built in.

What do you think? Thank you.

A 5V analog sensor won't work with a 3.3V processor, unless you add a voltage divider. The sensor outputs voltages between 0 and 5V.

The ESP32 is one of the worst choices for measuring voltages.

ok thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.