Read a 4-20ma pressure sensor with ESP8266

Hi guys,

i need a help with reading the pressure from this sensor :

this is a 2 wire transmitter Pressure sensor 4-20ma
im planning use ESP8266 board to read this sensor value with ADC port
how can i do that?
I am very beginner,so Please answer step by step

thank you all

I only can guess that an "excitation" voltage of 8-28V is required as Vcc. Then add a resistor in series to the Arduino Gnd, which converts the current into a voltage for measurement by the ADC.

My crystal ball sees a NodeMCU.
Which means a 150ohm resistor is needed to convert 4-20mA into ~3.3volt for the 220k:100k divider of the NodeMCU.
Leo..

You should also protect the analog input - if a wire comes off the transducer you could end up with 12-28v on it , which will kill it dead .

the ESP8266 comes in many flavors.

the WEMOS D1-mini
the WEMOS D1 UNO like board
the NodeMCU....
the ESP8266-1
a simple EXP8266 on a small board with castelated pads

the ESP8266 has one analog input and each board has a different way of allowing you to use it.
the RAW input can only be 1.0 volts full scale.

the wiring is power to one side of the resistor.
the other side of the resistor to the brown wire. [ check data sheet for color]
the white wire to the power supply ground.
all the power goes through the resistor.
you connect the A1 of your board to the power supply + voltage
you connect the ground of your board to the BROWN [ + side of sensor] wire of the sensor.
this will be that the sensor drops some small voltage and you read that resistor.
READ THE DATA SHEET TO CONFIRM THE COLORS !

the sensor ground or WHITE wire goes from the sensor to the power supply only. Do not connect to any part of your project.

make sure your sensor only has 2 wires.

SOFTWARE
the IDE has examples. one is to read analog inputs.

a simple web search using your board and 'analog' should show you how to access the pin and read the data.

The D1-mini and the NodeMCU both have a set of voltage divders as Wawa pointed out.
what board you have is the key to what the full scale voltage you can use.

if you are using a NodeMCU or WEMOS D1, then Wawa's Crystal ball has pulled from the either the correct information.
if not, then let us know what board you are using.

hammy:
You should also protect the analog input - if a wire comes off the transducer you could end up with 12-28v on it , which will kill it dead .

WARNING !!!
read what hammy wrote.
I highly suggest you make a sketch of your device and the wires and colors and the power supply with the resistor and post that before you connect anything.
DO NOT tie the ESP8266 board to both ground and power.
this is one case where the power supply is not part of the board connections.
Please, post your hand sketch of what you think you want to do. And if that power supply is EVER to be used for ANY other sensors, or devices or board, etc please state that.

thank you guys
My board is Node Mcu

i search and i found a convertor 4-20 mA to volt

Description:

Brand: CJMCU
Supply voltage: 7 - 30 V DC
Input current: 0/4mA - 20mA
Output voltage: 0 -24V MAX(Adjustable)
Temperature drift: 100ppm/C

is it usefull ?How is wiring ?

No, you only need a 150ohm resistor.
Leo..

Dave has shown the circuit to use. A power supply is always required, and then it makes no sense to replace the resistor by some much more complicated circuit.

excuse me for my low knowledge
i a bit confused in wiring ...
would you please draw a simple schematic of circute?
and what kind of resistor must be use ?

Just use a common 1/4watt metalfilm resistor.
Connect the resistor between analogue input and ground of the NodeMCU.
No other parts are needed for a NodeMCU.

The output of the sensor connects to the same analogue input.
Leo..

Don't forget the sensor power supply!