measure HIGH AC current with an Arduino

Thread Starter

anishkgt

Joined Mar 21, 2017
549
hi All,

I am trying to measure the AC current put into a nickel strip during spot welding. It is possible with this formula, I = U * diameter [mm2] / (0.0175 * length [m]) but am looking to implement it into ATmega328.


I measured the peak voltage with a DMM and got 0.29v at 20ms so with the above formula i get
I = 0.29 * 25 / (0.0175 * 0.13)
= 3,186A for 20ms

Would it possible to measure this with an arduino. Sorry am not sure what components would be needed to measure that.

Appreciate any suggestions and advise.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Thanks I did check those out but are they low in spec when measure currents at 3000A ? and more over they go in series with the load. I am looking for something that would be possible to tap on the cable at two points and measure the voltage like i had mentioned in the formula.
 

dendad

Joined Feb 20, 2016
4,637
If you can get of of those Allegro sensors and place it near the cable it will probably work. If it overloads, just move it away a bit as it will react to the magnetic field. You don't have to use the terminals.

The other way is to use an OpAmp or a dedicated current sensor like these....
http://www.st.com/en/amplifiers-and-comparators/current-sensing.html?querycriteria=productId=SC1264
http://www.st.com/content/ccc/resou...df/jcr:content/translations/en.CD00201091.pdf
I have used this sort of device.
With the current you are using, a couple of turns current transformer could work too.
Have you looked at that option?
http://www.homautomation.org/2013/09/17/current-monitoring-with-non-invasive-sensor-and-arduino/
A current transformer has the advantage of no electrical connection (As does Hall sensors).
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
I understand that using opamps would be better as there are no loss or voltage drop but i lack the knowledge to understand or design an opamp for this.

Would there be any off the shelf models that i could use or a design i could learn and then use it in my design.
 

Picbuster

Joined Dec 2, 2013
1,058
hi All,

I am trying to measure the AC current put into a nickel strip during spot welding. It is possible with this formula, I = U * diameter [mm2] / (0.0175 * length [m]) but am looking to implement it into ATmega328.


I measured the peak voltage with a DMM and got 0.29v at 20ms so with the above formula i get
I = 0.29 * 25 / (0.0175 * 0.13)
= 3,186A for 20ms

Would it possible to measure this with an arduino. Sorry am not sure what components would be needed to measure that.

Appreciate any suggestions and advise.
Hi,
A normal way to measure high current in an AC circuit is a simple wire wrapped around one of the High current Cable.
A simple way of making a transformer.

Picbuster
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
How many turns ? and the output voltage would be a sine wave and needs to be rectified before feeding it to an arduino. Rectification would have a voltage drop.
 

dendad

Joined Feb 20, 2016
4,637
Would there be any off the shelf models that i could use or a design i could learn and then use it in my design.
Yes, that is what is in the links I put up earlier. ST have some custom current sensors but I agree with Picbuster and think you should try a few turns around the cable. The number is for you to experiment with.
And when you put the diode in the feedback loop as in the post from bertus, it is a "no loss" rectifier and that will be the way to go. It is easy to try and see how well it works for you.
 

strantor

Joined Oct 3, 2010
6,875
Been there, done that. Many of your questions may be answered in my thread : https://forum.allaboutcircuits.com/...current-shared-in-parallel-conductors.110083/

I also determined that measuring the voltage drop across a section of the welding lead was the most sensible approach and that a zero voltage drop rectifier was the way to go. However I wanted to have an opamp stage prior to the rectifier to scale it to 5v full scale to the micro.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
If you use a precision rectifier, you will not have the voltage drop:
http://www.linear.com/solutions/1608

seems to be a good idea as i am trying to get the reading as close as possible.

Yes, that is what is in the links I put up earlier. ST have some custom current sensors but I agree with Picbuster and think you should try a few turns around the cable. The number is for you to experiment with.
And when you put the diode in the feedback loop as in the post from bertus, it is a "no loss" rectifier and that will be the way to go. It is easy to try and see how well it works for you.
Then that is also another option, forgive me for my knowledge in electronic terms. Is the feedback look the terminals after the wire wound on the cable and the diode would in series if am correct, to rectifiy it. Sounds cheap enough but.

In both the above solutions shouldn't there be a capacitor to smooth the rectified signal before feeding it to the MCU ?

Been there, done that. Many of your questions may be answered in my thread : https://forum.allaboutcircuits.com/...current-shared-in-parallel-conductors.110083/
Good job dude by definitely an over kill :) my project would for spot welding 18650 cells. My First project went well. Version 2 would be a servo to lower and raise the weld head and several other features, which is complete then sitting back and looking at the project made me think adding a meter to get the amp put into and the resistance of the cable would be a good feature as well.

SPWv2.jpg
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
I also determined that measuring the voltage drop across a section of the welding lead was the most sensible approach and that a zero voltage drop rectifier was the way to go. However I wanted to have an opamp stage prior to the rectifier to scale it to 5v full scale to the micro.
That is exactly what am trying to achieve here and i thought i would do this with the opamp suggested way as that would be a great oppertunity to learn about them as well.

So from the example schematic mentioned in the link in post # 8, the 200k wouldn't be necessary in my design as my voltage is about 3VAC at the secondary, correct ? or should i be ok with that ? i was thinking of ordering the suggested precision opamp but before i do what else would i need to accomplish this.
 

strantor

Joined Oct 3, 2010
6,875
That is exactly what am trying to achieve here and i thought i would do this with the opamp suggested way as that would be a great oppertunity to learn about them as well.

So from the example schematic mentioned in the link in post # 8, the 200k wouldn't be necessary in my design as my voltage is about 3VAC at the secondary, correct ? or should i be ok with that ? i was thinking of ordering the suggested precision opamp but before i do what else would i need to accomplish this.
No you need the 200k. That's a bias resistor to make the opamp perform properly. That resistor combined with the other 200k resistor form a ratio that sets the output. Actually if you chose a ratio more suited to your application, you could make the one opamp circuit perform both the rectification and amplification. No need for second opamp stage.
 

strantor

Joined Oct 3, 2010
6,875
Download ltspice from that page and open that circuit as they instruct you on that page. Then play with those resistors until you get the output you want.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Interesting !

I had earlier tried learning LTspice and failed as i did not understand it very well. Now things seem to make sense.

So adding a 15uf 10v electrolytic capacitor has smoothed out the voltage at the output and it takes about 12ms to rise and stable at 3v.
Precesion Full bridge.jpg

I also determined that measuring the voltage drop across a section of the welding lead was the most sensible approach and that a zero voltage drop rectifier was the way to go. However I wanted to have an opamp stage prior to the rectifier to scale it to 5v full scale to the micro.
I had mentioned that at start of the thread and the formula too.


I wish to get the voltage amplified to 5v so that i can have fed into the Arduino and if am not wrong i could use an opamp in a negative feedback design. I could not find the LM319 in LTspice well not sure if should go with that, would that be ok ?
 

strantor

Joined Oct 3, 2010
6,875
Looking at your wave I'm not sure what you are doing. your AC wave is 3V which doesn't seem right. That's your open circuit voltage (Iassume), not your voltage drop across a section of cable. I've simulated your situation by downloading the .ASC file from the linear website posted earlier and putting a 3rd opamp at the input of the zero drop rectifier which is configured as a diiference amplifier, and I'v set it up to measure across a very low value shunt (welding lead). It seems towork as expected but the difference amp only amplifies half-wave. I'm pretty sure it's because of single supply voltage (it needsto swing its output negative, so need +/- supply). I neeed to sleep now so I'm sorry I can't finish this tonight. I'll upload it here and you can play with it, maybe finish it. [work in progress]
 

Attachments

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Well yes that would be the open circuit voltage. On second thought i would not need to amplify it any further as i would need the precise voltage at the input (totally forgot about it earlier).

attached my LTSpice model as well.LTspice_.JPG
 

Attachments

Thread Starter

anishkgt

Joined Mar 21, 2017
549
so i've been trying to replicate a transformer on LTSpice but no luck. Would appreciate if somebody could help the error.

LTSpice transformer.jpg


error as follows,

LTSpice transformer_Error.jpg
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Ok so the error was that the ac was not grounded. Not sure how to do the turns on the transformer i am using. I know the turns on the primary is close to 220 turns of 19AWG enameled wire and 3 turns of 3AWG at the secondary but do not know how to replicate it in LTSpice. I've done the below to the best of my knowledge and secondary voltage is 2.6VAC and rectified is 2.4v. So the precision opamp is not preceise since the i've not got the transformer parameters wrong.
LTSpice transformer.jpg
 

Attachments

Top