How to measure ac current using arduino

How to measure 220 Vac current using arduino and current range 0-5 amps

How would you like to measure the AC current? To what accuracy or uncertainty? My first suggestion would be to just use an ACS 712 for which there are dozens of tutorials online. This is only one example. The ACS 712 comes in several current ratings (ranges). Here is another example.

Next there are AC Current Transducers which come with a wide price range. Average responding RMS indicating to true RMS responding. Just a matter of budget and what you want / need. A Google of AC Current Transducers will bring up a dozen hits like this for example.

Finally there is the use of a CT (Current Transformer) . A simple Google of Current Transformer Arduino will yield more information on using a CT.

You choose your sensor based on things like environment the sensor will work in along with specifications you set. I only mentioned a few ways to measure AC current. What I have mentioned can be used with or without an Arduino. 0.0 to 5.0 AAC can even be easily measured using a panel meter.

Ron

Unless you are experienced in mains power use the CT (Current Transformer) you may live longer.

That would be a very good point but even using a CT make real sure you read up on how a CT actually works including burden resistance. An open circuit CT can have a very high output voltage when not using a burden resistance. The results can be shocking. :slight_smile:

Ron

1 Like

Yes acs712 good choice but acs is hall effect sensor so if any emf induces nearby the result is disturbed. can i use shunt resistor ?

See this tutorial: CT Sensors - Interfacing with an Arduino โ€” OpenEnergyMonitor 0.0.1 documentation

Yes, I have used shunts to measure AC current. Very low frequency AC but AC. Just remember that 5 amps is not much current. Also keep in mind any voltage drop across the shunt is voltage not making it to the load. Another consideration is that the AC signal off the shunt will be going above and below a 0.0 volt reference so that signal needs to be offset so it does not go below zero.

I also suggest you read the link jremington was kind enough to provide.

Ron

I want to measure current with the voltage of 220ac so is it safe to use a low value shunt resistor and another resistor to make the voltage devider in 0-5v Arduino range and then read the current is it safe? I have used acs712 and then current is suddenly increase arduino stuck

And a current transformer is much better than a Hall-effect sensor like the ACS712 in terms of noise. Hall effect sensing comes into its own with high current DC or if space/weight is at a premium.

No, not at all. It is extremely dangerous.

Use a current transformer.

1 Like

Actually when current reached 10Ma i have to trip the circuit using relay so is the ct able to measure low current like 10Ma

Yes, choose the right CT.

It sounds like you are trying to implement a ground fault detection circuit. The commercial ground fault detectors use a balanced CT to detect the fault.

In other words, to detect the fault, the CT is used to measure the difference between the line and neutral currents, and can easily detect a 10 mA difference.

Can you explain that bit. Ma means Meg Amperes. Also, AC current is always changing because the voltage is always changing. Are you looking for a maximum current of 10ma?

I designed a low cost (DIY) energy meter using a Nano to measure the energy of my newly installed heat pump. It uses a current transformer (CT) to measure current. While designed for a maximum of 20A AC, it does pretty well measuring current below 5A.

I securely attached the burden resistor to the CT to avoid open circuit high voltage.

There is a lot of concern about connecting to the mains. Rightly so! Using the ACS 712 one would have to have the current of the device being measured, and voltage potential, on the PC board of the circuit. I consider that a scary prospect if we're talking about a device that is connected to the mains. Let's say the PC board got corroded (a likely scenario) and caused a short. Ugly, and the device stops working. And probably a few other things.

The current transformer has non-linearities but trivial compared to the previous safety concern.

Ironically, the CT is the second most expensive thing in my project. The first being the case. :wink:

OSD

Now we get to see 10 mA? So you have a 220 VAC circuit and you want to read 10 mA? I wish you good luck as it is becoming obvious you have no clue what you want or need and I see no explanation of exactly what you are trying to do.

Ron

No, Ma means mega atto, which is nonsense.

The symbol for the amp is 'A', so milliamps is mA, megaamps MA... Informally we can usually figure out when someone's swapped m and M, but if you are buying resistors you need to get it right!

A shunt not just dangerous, it stands a good chance of exploding your processor and if you are unlucky, starting a fire. Why? Because if your shunt ends up on the hot side of the AC, the processor pins will be connected to 220V. That is bad.

Use a current transformer.

have a look at SCT013 current clamp
I have a 20amp and 100amp versions but I seem to remember there is a 5amp version

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.