Page 1 of 2
Using current sensor ACS 712 with esp8266 nodeMCU board
Posted:
Thu Jan 31, 2019 10:10 am
by pretheepkp
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?
Re: Using current sensor ACS 712 with esp8266 nodeMCU board
Posted:
Mon Feb 04, 2019 5:10 am
by schufti
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.
Re: Using current sensor ACS 712 with esp8266 nodeMCU board
Posted:
Mon Feb 04, 2019 7:57 am
by pretheepkp
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?
Re: Using current sensor ACS 712 with esp8266 nodeMCU board
Posted:
Thu Feb 07, 2019 12:43 pm
by schufti
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 ...