The use of the ESP8266 in the world of IoT

User avatar
By pretheepkp
#80355 Hi,
Is it possible to use current sensor ACS 712 directly with ESP8266 nodemcu board? Asking because ACS712 gives around 5V of analog output and not sure if nodeMCU can handle 5V in the Analog input pin.

Or should I use an Arduino board in between nodeMCU and the ACS712 sensor?
User avatar
By schufti
#80409 generally esp has 1V max input.
nodemcu boards have voltage divider giving ~3.2V max input.
usually ther "reserved" pin close to A0/ADC0 is the ESP A0 pin with only 100k to gnd. So a 400k 1% to this pin should give you 5V input range.
You do not have the required permissions to view the files attached to this post.
User avatar
By pretheepkp
#80419
schufti wrote:generally esp has 1V max input.
nodemcu boards have voltage divider giving ~3.2V max input.
usually ther "reserved" pin close to A0/ADC0 is the ESP A0 pin with only 100k to gnd. So a 400k 1% to this pin should give you 5V input range.


Hi,
So are you saying I should have a 400K resistor in between the ACS712 output and the NodeMCU Analog pin input to make this work?
Or are you suggesting I should use voltage divider? I have read that voltage divider wont work with the analog pin since it wont translate the output range from ACS712 properly. Is that true?
User avatar
By schufti
#80476 using the 400k in series to the "reserved" pin is applying a voltage divider by using this and the internal 100k between esp_A0 and gnd, leaving alone the 220k between esp_A0 and analog in of nodemcu.
You could also just use an 180k in series going to analog in of nodemcu (resulting in 220k+180k // 100k == same 400k // 100k divider @ esp_A0). As the acs712 has a buffered output, there should be no problem with the 80k load.
This would (in plain theory) spread the 1V range of the esp to 5V. How linear and how exakt the 5V would equal the 1023 value is another story ...