How to connect ACS712 30A with Nodemcu?

Continuing the discussion from Doubts current sensor ACS712 30A + Nodemcu ESP8266:

Can any body guide me wiring scheme for connecting ACS712 30A with Nodemcu? I. E how to connect ACS712 with nodemcu?

It connects via a single analog in pin… the hard part is the coding… Google is your friend for that as it is NOT a Blynk specific task.

I made this running on an Arduino, but for the most part the code is the same, just tweak it for your sensor range (mine was 20A) and the lower analog voltage (3.2v instead of 5v)

I think the problem with the NodeMCU is that the ACS712 requires a 5v supply, and the analogue output from the device needs to be dropped using a voltage divider so that it doesn’t exceed 3.3v.

Knocking-up a two resistor voltage divider inst complicated, but it adds to the external component count.

My main concern with these boards is that if you’re using them to measure UK/European mains voltage then you’re sticking 230v in one end and there is a very narrow gap (about 1.5mm on the board I have) between the mains and the logic level circuits.
The ACS712 chip itself has a 2.1kv minimum isolation voltage between the pins, but these pins are still only 3mm apart.
The board I have has no air gap routed out between the high and low voltage sides and I’ve seen some that have mounting holes that are either side of the chip, which seems like a very dodgy design to me.

I have a requirement to monitor the current flow to an A/C unit and I was initially going to use an ACS712. When the board arrived and I started looking at ways to mount the sensor board along with a Wemos D1 Mini and enclose it in a way that would minimize the ingress of dust and moisture to reduce the risk of arcing across from the mains to low voltage side of the board I began to have second thoughts.

In the end I decided to go for a split core current transformer, so it’s a non-invasive connection to the mains supply. I came across this product on eBay:


which seemed like a very neat design.
The guy who sells these publishes the schematics and some firmware on his website:
https://www.mottramlabs.com/products.html
The design is simple ebough, but if you live in the UK then it makes sense to buy the ready made board.
I’m going to be using it with a SCT013 15A/1V Current Transformer (rather than the 100A/50mA one it’s designed to be used with), so I’ve changed one of the resistors and I’m using my own firmware.

Obviously if you’re not using mains voltages, or are on 110V rather than 230V it may not be as much of an issue.

Pete.

1 Like

use 2 diode 1N4148

NOT in sensor circuity!! The voltage drop is highly dependant on ambient temperature, which is the reason the diodes (or more generally silicon joint) are quite commonly used as a temperature sensors in electronics world. Only quality, 1% or better resistors.

You can check the WCS series hall effect sensor (AC-DC) and ready modules. I bought some, and I really like them. Easy and safe, with a “bonus” - additional regulated 0-1 digital output.

4 Likes