Reading 0 - 5v analog signal on ESP32

Hi,

I am trying to read the temperature sensor on a motorcycle engine, it ranges from 0-5v.

I am currently sending the signal to an ESP32 and using a voltage divider. This is fine and I can read the signal, but of course it lowers the voltage of the source signal and causes the bike to display an incorrect temperature.

Is there anyway I can read this signal on the ESP32 while leaving the source signal alone so I can have the bike display the correct temperature?

Insufficient information.
Maybe you picked very low resistor values for your voltage divider.
No experience with the A/D of an ESP32, but boards with an ESP8266 commonly use values of 100k or more.
Leo..

You can use an op-amp in a unity gain configuration to buffer the signal. Connect the + in with a 33K resistor to your signal, connect the - to the output and the output via a voltage divider to your ESP. You will need a rail to rail op amp but even better if you can get a voltage greater than 5V. 12V would be fine. Remember to properly protect the power supplies from transients etc. You can do the divider with high resistance resistors on the input if you like and use the op amp.

The ESP32 works on 3.3v. Here is the circuit I am using to drop the signal to be between 0 and 3.2v.

I could also use a 3.3v zener to clip the voltage to 3.3v, as that relates to a low enough temperature that I'm not too interested in seeing (The lower the voltage, the higher the temp).

1 Like

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