[SOLVED] ACS712 Voltage & Amps -- Ghost Readings!

DO NOT DO THAT!!!

the theory is ok, but the resistor values you have chosen are way too low.

lets do the math: 5 ohms + 10 ohms = 15 ohms, at 5volts. using ohms law, you can calculate the current: 5v / 15 ohms = 0.333amper

this means you will have a current consumption of 0.333amper on your voltage divider!!!
beside that gives 0.333a x 5v = 1.66w heat generated on the resistors, it will also put an unnecessary stress on your usb port.

for voltage dividers we always use a much higher resistor values. this is one thing. and the other, that the wemos, unfortunately has a incorporated voltage divider too on the analog pin, further complicating the calculations…

this is why i always use a simple solution regarding voltage dividers: a trimpot! you can choose a value between 4.7k and 10k (or even more).

this is my theory:

• hook up the acs sensor to the wemos 5v pin and gnd, with absolutely no current flowing on the input

• hook up wemos gnd and acs sensor output to the 2 side pins of the trimpot (doesn’t matter which is which side)

• multimeter gnd goes to wemos gnd, and multimeter input to trimpot middle pin (viper). set dmm to dc voltage measurement

• now turn the trimpot screw until you will get around 3.3 / 2 = 1.65v on the viper

• hook up wiper to the wemos analog pin, and serial print the analog pin raw value to the display. now fine tune the trimpot until you get 512 on the screen. this way you converted the 5v signal to 3.3v but also calibrated the acs module output to null.

probably you will loose some resolution / precision converting from 5v to 3.3v, but it should be usable for hobby. i assume you do not work for nasa…

also, it is easy to check the accuracy of the system, if you hook up your dmm in series with acs module, and compare the values (after mapping the raw values to the actual amperes of course on the wemos)