The ACS712 module has quite a high level of noise - around 130mA. But that's with the 10nF noise filter capacitor fitted as standard. Increase that capacitor to 470nF and the noise level drops significantly. A further small improvement can be obtained with some simple digital filtering.

By Julian

Youtuber, shed dweller, solar charge controller aficionado

14 thoughts on “Using the acs712 hall effect current sensor module part 3”
  1. Avataaar/Circle Created with python_avatars Malcolm Wright says:

    Hi Julian, as I have posted elsewhere you can use these modules WITHOUT a microprocessor. If you use two identical modules, with the inputs wired in parallel BUT connect in the opposite directions, you can put an analogue panel meter (attenuated by a potential divider) between the two module outputs. As a current is passed through the module inputs half of it goes through each input but in opposite directions, thus one module output rises while the other falls, effectively creating a balanced bridge. This not only makes the circuit less sensitive to supply fluctuations but also thermal drift, as both outputs will have the same drift directions thus the error differential between them will tend to cancel. You can also use a digital pannel meter, providing you isolate the power to the meter or current modules, as most digital meters have the negative input and displays power negative as one connection, therefore the meter input will ground one modules output. This arrangement can give you an accurate high current measurement double that of a single module, and still allows you to ALSO measure the modules outputs differentialy via a microprocessor using two analogue inputs and software that takes one reading from the other (should be an even number !) and calculating the current WITHOUT first determining any midpoint values, as the voltage between both outputs should be a null except when current is flowing, and NOT an odd number as inA minus inB cannot be a odd number, also good for noise elimination.

  2. Avataaar/Circle Created with python_avatars Gibran Salomao says:

    Really thanks for the noise explanation !!!

  3. Avataaar/Circle Created with python_avatars Craig Ivas says:

    How you doing just wondering by using this sensor through a nano can I trigger an led when the current is switched on thankyou.

  4. Avataaar/Circle Created with python_avatars Ilm Kreis says:

    cheers for this video…
    i got a question?
    i want to measure amps from solar into my 24v batts.
    can i power/run the arduino with a buck converter from the same batts where i measure too…
    or does it blow up, and i need an extra power supply…
    thanx so far, would be nice to hear from you
    cheers, from the green heart of germany

  5. Avataaar/Circle Created with python_avatars Hassan Essakhi says:

    this ACS712 is not stable it changes according to the load,Crazy compound,it is necessary each time to look for the offset and modify the code

  6. Avataaar/Circle Created with python_avatars Chris W says:

    Your program is averaging the new value with the old AVERAGE, not the last real value – not the best way to go. It probably takes ten or more measurements to settle down at the start (since you're averaging 'amps' with zero on the first run), and one large error spike would throw off many subsequent measurements. Much better would be to have each loop read twice, with a 'delay(50)' between them (and another delay(50) at the end), and average those. Good rule of thumb for averaging: Never store the result anywhere it will be used for another calculation. Better yet, make it run 100 x per second and average every 10 values.

  7. Avataaar/Circle Created with python_avatars my one says:

    I will 470 nanoF capacitora. You use ceramic or polyster capacitors. I will buy. I waiting ur reaponse please

  8. Avataaar/Circle Created with python_avatars my one says:

    Last amps is equal amps and we divide it to 2!but alst amps is always ewual to amps. So i do t get what we win on this. Sorry

  9. Avataaar/Circle Created with python_avatars x x says:

    have you seen other boards with the 470nF capacitor fitted to reduce noise?

    also looking for a way to monitor voltage – could do this with a voltage divider, but would like to find a pre-made board for less assembly work. (Chinese economics works that way).

    Was looking at shunt resistors – this looks a nicer solution.

  10. Avataaar/Circle Created with python_avatars Ho Chengyun says:

    Hi Julian.

    I am using the ACS712 +-5A sensor with sensitivity of 0.185 V/A, pretty much similar to what you have in this video. However, the current readings seem to jump at intervals of 0.03A. For example, the serial monitor would show 0.03, 0.06, 0.09, 0.12 amps… In your video, it seems to me that you are able to detect changes in intervals of 0.01 amps which I am trying to achieve. I tested the sensor with Arduino Uno and realise that each digital count gives rise to 0.03 amps and it seems impossible to achieve readings of 0.01 amps intervals.

    Would just like to ask if you happen to know the possible reasons and solutions for the above mentioned matters?

  11. Avataaar/Circle Created with python_avatars youpattube1 says:

    Julian –

    Thanks for this little series on the ACS712. For a couple of months now I have been trying to figure out how to monitor current in a circuit, so that if it exceeds 200 mA, a light will go on, as an alarm to me. The problem is that i am using a fuse lamp as the alarm, and it drops about 10v to light up properly, which adds an un-acceptable additional load to my supply. I want to use a fuse lamp cause i like the nice analog mellow light.

    I tried using an FET current mirror, and it seemed to work fine as long as things remained static, but when the main circuit current changes (going from 25mA for quiescent arduino, to 300 mA when the motor turns on), the current mirror seems to get un-stable, and soon the mirrored circuit current is much larger than the main. It just won't stabilize if the main is varying.

    so i had given up on trying to make it work. But your ACS712 videos have given me new hope. I have ordered a couple. I also increased my power supply from 12v to 19v (but this is still not enough to allow 10v drop in the FL, in series). The motor needs more than 12v to operate properly. I know that the total current will still be the motor and the FL load, but I am thinking that if i put the ACS712 in parallel (and monitor the current using an arduino to turn on the lamp), because it is not electrically connected, it shouldn't add a parallel resistance, and won't effect the voltage & current to the motor. At least that is what I am hoping.

    The motor is to my automated chicken coop door, so i need to be notified if there is a problem so they aren't locked in or out (should the motor overload).
    any thoughts about my reasoning ?

  12. Avataaar/Circle Created with python_avatars Himanshu Grover says:

    with the help of additional capacitor noise got reduced and my value is now stable.

  13. Avataaar/Circle Created with python_avatars Dennis Kean says:

    All three parts, just brilliant. Thank you…

  14. Avataaar/Circle Created with python_avatars lonnie776 says:

    I think your code could be improved for digital noise filtering. You said you could poll the sensor at 1ms intervals but only require 100ms reporting intervals. You are currently averaging the current value with the last, which as you said, has a very minimal impact as well as a delay effect. Instead why don't you poll the sensor every 1ms (or the max poll interval determined by the cap) and average the result over 100 polls, then report the average of that batch of polling. This way you can have very large tolerances in accuracy but still get quite accurate values. Plus you maintain your 10 polls per second and you no longer have the memory/delay or smoothing effect.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.