I am trying to use an ESP8266 to read the output of a pressure sensor. The pressure sensor is powered through an 8V power supply, and outputs a signal 4-20mA. To read this on the ADC pin, I am reading that the pin can only handle 0-1V. Does this mean that I have to get that 4-20mA signal converted to 0-1V? or can the pin handle 3.3V OR is there an entire different way to look at this issue?
If the pin handle 1v , then you need a resistor that will convert the 20mA to 1volt. 470R is probably the nearest .
Have the one side of the resistor connected to the 8266 0v line.
You need to check whether your board is the 1v or 3.3v version - apparently you can get both
I see what you mean. After further research it seems as though the board I have is the 0-3.3V. So that would mean I need to get 20mA to 3.3V. In doing this, that accounts for the whole range of 4-20mA being converted to 0-3.3V, right?
hammy:
If the pin handle 1v , then you need a resistor that will convert the 20mA to 1volt. 470R is probably the nearest .
Have the one side of the resistor connected to the 8266 0v line.
I knew one of your calculations was wrong as you would need a higher resistance value for the higher voltage.
With common Arduinos (Uno etc.) you can still apply 5volt VCC to the analogue pin, even if you have set Aref to 1.1volt.
I expect you can do the same (3.3volt/VCC) to an ESP pin.
Leo..
Yes, but the suggestion that the microcontroller will not tolerate an input that is still within its supply voltage range is rather absurd. It may not read in a meaningful way, but it should not cause damage.