ACS712 Current Sensor with Arduino - Measure AC and DC up to 30 amps

Поділитися
Вставка
  • Опубліковано 30 лис 2024

КОМЕНТАРІ • 42

  • @GnuReligion
    @GnuReligion 5 років тому +4

    I have also played with one of these hall current sensors, and been similarly disappointed with the precision when measuring low currents. There is always making a shunt with a thick piece of Nichrome Wire, then using an opamp to boost the voltage.

    • @GadgetReboot
      @GadgetReboot  5 років тому

      When I get a chance I am going to take another look at it And see if there’s a way to improve it with a better ADC precision. I seem to have run out of Bench Work space again so that might get in the way. I’m already working on an electronic DC load experiment that I don’t want to have to tear back down to make room.

  • @stahme10
    @stahme10 5 років тому +2

    Thank you for your research. I just bought some of these boards and this is going to really me out.

  • @SidneyCritic
    @SidneyCritic 5 років тому +1

    I don't know if it can do the equation, but maybe a 1 in 1 out averaging table might be better. That's how I did my digital manometer on my flowbench, which jitters a lot on the physical side.

  • @bgable7707
    @bgable7707 3 роки тому

    I'm lost with your use of pins 2 and 3. How are you connecting these to switch the modes. Or are you connecting a jumper wire to change the levels? I missed in the video where you explained how you were doing this.

    • @GadgetReboot
      @GadgetReboot  3 роки тому

      looking in the Arduino sketch pin 2 changes between reading DC or AC and pin 3 is used to calibrate the sensor depending if the inputs are set high or low so I’m just using a jumper wire between VCC and ground when I want to change a mode. each time the sketch goes through the main loop it will read the inputs and decide if it’s calibrating or reading AC or reading DC current.

  • @testingbeta7169
    @testingbeta7169 5 років тому +2

    the readings are jumping, because you are using it with only USB, whose voltage are know to jump around 4.8>5 volts and cause noise, there fore your voltage formula is always wrong,
    SOLUTION: power it with extrnal supply, that way regulator will output nice and smooth DC, meassure it and than put that in formula, its often not accurate 5 but 4.9ish max time.

  • @SnowyOwlPrepper
    @SnowyOwlPrepper 4 роки тому +1

    An air/fuel ratio sensor on an automobile has a current output. Zero current is ideal air to fuel mixture. A positive current is rich and lean mixture is negative current. Would this sensor family measure plus/minus currents of 50 milliamps considering the frequency of swings is very slow.

    • @GadgetReboot
      @GadgetReboot  4 роки тому

      my experience with this family has been that for lower currents, I don’t find it very precise. I have much better results with the INA219. ua-cam.com/video/FXQoZbvM3Kw/v-deo.html

  • @exhstdengineer5409
    @exhstdengineer5409 2 роки тому

    Sir i keep having the error 'ACS712_30A' was not declared in this scope, I manually installed a zip library of acs712 and used #include . what could be the problem? thanks in advance

    • @angry_moose94
      @angry_moose94 2 роки тому

      you are not using the correct library. Download it from the link he provided.

    • @markjosephmacaraeg4314
      @markjosephmacaraeg4314 2 роки тому

      @@angry_moose94 I have the same problem as him. Can you try this on your own and see if there is anything wrong with the library? Your help is highly appreciated. I cannot solve this problem as well.

  • @marylim3886
    @marylim3886 5 років тому +1

    can the current sensor handle a large amount of current? what will happen to the current sensor if there will be an overcurrent (example: short circuit)? And how will it affect the MCU?

    • @GadgetReboot
      @GadgetReboot  5 років тому

      This sensor is available in three different options with a maximum current measurement of 5, 20, or 30 A.
      The load current path is electrically isolated from the rest of the chip similar to an optocoupler so the MCU should be safe within reason.
      The datasheet says it can tolerate 100 A of overcurrent for up to 100 ms duration. I don’t see any information about what happens for lower over current conditions but I would make sure there’s external overcurrent protection or fusing to protect against that.

  • @nikilragav
    @nikilragav 3 роки тому

    Thanks for this! Do you have pictures of the transformer setup? Did you have to strip the wires?

    • @GadgetReboot
      @GadgetReboot  3 роки тому +1

      I don't have pictures and can't remember now that it's almost been 2 years but I think the transformer belonged to something I still needed so I would have either plugged it into a jack and clipped onto the leads or wrapped wire around the barrel and stuffed wire in the end and taped it to hold. I remember everything was falling off the edge of the table and I couldn't get everything in the shot.

    • @nikilragav
      @nikilragav 3 роки тому

      @@GadgetReboot thanks!

  • @treemonster19
    @treemonster19 5 років тому +1

    very clear explaination

  • @Inuyasha3325
    @Inuyasha3325 4 роки тому

    Hello, your code works great! But what if I want to use multiple ACS712 current sensor? How can I integrate those into the code?

  • @AhmadYani-bz3xc
    @AhmadYani-bz3xc 5 років тому +1

    can you tell me the installation circuit on Arduino and what type of capacitor is used

    • @GadgetReboot
      @GadgetReboot  5 років тому

      The circuit used is the same from the link in the description for the library as well as what is showing on screen in the video. The capacitor is a 470 nF polyester (also known as trademark name Mylar) type.

  • @PaulineMiddelink
    @PaulineMiddelink 5 років тому +1

    Are you sure the resolution of the ADC is sufficient? It looks like your noise could be attributed to the lower 2 bits being inprecise. (Did not do the math though)

    • @GadgetReboot
      @GadgetReboot  5 років тому +1

      It’s possible more resolution would make it even better, I believe it’s 0.185 mV/mA on the sensor so if every step of this ADC is about 4.88 mV then that could be improved upon, but I wanted to see what I could achieve with a cheap Arduino. Adding the filter capacitor seemed to help. I can’t remember if I ordered a 12 bit ADC to play with. Maybe I will revisit.

  • @iceberg789
    @iceberg789 5 років тому +1

    these hall effect sensors are so super noisy. try placing them inside an iron can for magnetic shielding, and see what happens.

    • @iceberg789
      @iceberg789 Рік тому

      @@BlondieHappyGuy great job. 👍 keep it up.

  • @kartikhegde9368
    @kartikhegde9368 5 років тому +1

    can you suggest any good current sensor for precise measurement

    • @GadgetReboot
      @GadgetReboot  5 років тому +1

      I can't think of one off hand but generally what I find is I would need a different sensor to handle different ranges, so if one can measure up to 5 amps within just a few volts of output signal, I won't expect it to be able to get precision results on lower currents. I am thinking about looking into a product like uCurrent Gold, or the Current Ranger, which will also give a voltage output signal, but can do various input current ranges accurately.

  • @electronic7979
    @electronic7979 5 років тому +2

    Useful video 👍

  • @legerstee1
    @legerstee1 4 роки тому

    Thanks allot made you help to accelerate my project a bit thanks! :-)

  • @mikeberger1688
    @mikeberger1688 2 роки тому

    Bought one of these and the output goes lower than the 2.5v idle when current is detected? (Mine does). Thought it would have added to the output -- guess not. Confirm anyone?

    • @GadgetReboot
      @GadgetReboot  2 роки тому

      I believe it goes higher or lower than the centerpoint based on if the current direction is positive or negative so you could try reversing the wires on the sensor

    • @mikeberger1688
      @mikeberger1688 2 роки тому

      @@GadgetReboot Yeah ! Discovered that after posting. The right hand rule, right? -- thanks they should include documentation with these.

  • @intotheunknown21
    @intotheunknown21 4 роки тому

    Why do I get negative readings on my Arduino Nano? I'm getting values like -0.053

    • @GadgetReboot
      @GadgetReboot  4 роки тому +1

      What happens if you reverse the wires to the sensor? It measures current flow in both directions and has a polarity.

    • @intotheunknown21
      @intotheunknown21 4 роки тому

      @@GadgetReboot I am getting alternating positive and negative values. I'm measuring AC by the way. It's the same when I reverse the polarity. I'm using the USB port as power for my Nano.

    • @GadgetReboot
      @GadgetReboot  4 роки тому

      It’s strange to get negative readings on ac, trying to think of any little things, was a calibration performed while there is no current flowing? The library could get negative numbers by trying to subtract the wrong offset maybe.
      And is it a sinusoidal AC with the correct frequency specified for the AC measurement?
      Is the current reading looking accurate otherwise, just the polarity being weird? And is the actual current that low, around 50 mA, and which version of the sensor are you using? I remember it wasn’t really performing great for me at low current, sometimes my error was even 50 mA, and if using a sensor greater than 5 A, it may be even more jumpy because it has less room to represent the measured current in the output so any noise would more greatly distort the reading.

    • @nadiaanandamiranti8205
      @nadiaanandamiranti8205 3 роки тому

      Same, i also get negative readings on my Arduino Uno. The values kinda -0,47 ish

  • @kennethdavetomas6953
    @kennethdavetomas6953 3 роки тому

    Hey sir how to calibrate the sensor?

    • @GadgetReboot
      @GadgetReboot  3 роки тому

      The general method I have seen for this sensor is to take baseline readings with no current through the sensor and if there is an offset, consider that offset as zero in software and then use the data sheet equations to calculate current while factoring in the offset zero reading.

    • @waldemardmitruk7698
      @waldemardmitruk7698 Рік тому

      @@GadgetReboot bro how to save the calibrated settings when i restart the program? when i restart it the values are again uncalibrated, please help me if you can

  • @lucianungurean
    @lucianungurean 4 роки тому +1

    Thank you very Much It works good :) ..... The best code :)

  • @markjosephmacaraeg4314
    @markjosephmacaraeg4314 2 роки тому

    Hello. Can you help me with this error of 'ACS712_05B' not being declared in the scope"? I keep seeing this error even if I already imported the .zip library files. Hoping for your response. Thank you