4-20ma current loop and ESP32

4-20maadccurrent measurementesp32

Following a previous question I'm thinking of using the following design for a 4-20ma 24VDC preasure sensor with an ESP32 ADC pin

enter image description here

  • Will it actually work?
  • Should I add aditional protection like two diodes on OUT?
  • If the sensor is powered by 24VDC and the LM358 is powerd by 5VDC is it possible to get a voltage over 3.3V on OUT in case of sensor malfunction?

Best Answer

You can just use a 150 ohm 1% resistor to ground and leave out the rest.

The Expressif chip has about a 1V input range, but the boards typically have divider resistors so the range is actually about 3V (maybe nominally 3.3, but you can't count on that due to reference tolerance and resistor tolerance) because of an internal divider.

The ADC has appallingly-bad characteristics (linearity, stability, noise, tolerance) and is only worthwhile because of the price (which is zero). You should research this before going any further down this path.

Tying it to any decent 4~20mA transmitter is probably a gross mismatch, suggest you look at using an external ADC.

Related Topic