Author Topic: Microcurrent sensing for electromagnets power  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Microcurrent sensing for electromagnets power
« on: November 28, 2019, 05:12:24 pm »
Hi fellows,

I'm studying at university, my proffessor wants a stable system that will lift an object with precise control. 1 kg iron object is on the ground(it cant go anywhere but up), electromagnet is right above the object.She want me to do a thing like weight system.She will test it with 1 grams, so the presicion of it 1 grams.Max weight is 2kg.

I'm controlling an big dc electromagnet, it is 17 ohms, approximately 330 henries.For the voltage control i using Gammon's circuit to control it with pwm via Arduino uno, circuit is at below.I using 2kHz Pwm to make a high resolution control.Timer1 in CTC mode, prescaler is 1, it counts up to 60000 so when it is equal to OCR1a, and it makes interrupt when overflow, in that interrupt i am making pin HIGH.Also setting OCR1B's time.OCR1B have an interrupt too, it making pin LOW.

If OCR1b setted 30000, electromagnet have half of the input voltage.My ınput voltage is 12 volts but my multimeter measures 10 volts when duty cycle is full.It's okey, no problem.

In every OCR1a interrupts i have a sensor that checking if object is on the ground if it is OCR1b increasing 1 point.So width and voltage increases in every ocr1a interrupt.i havent any code on arduino's  loop  {}.

Mechanics is not effecting the system because last year one student have maked it.I have to measure current of electromagnet for full control of magnet, just voltage control is not enough because electromagnet is heating, it makes resistance rising, current reducing, when current reduced electromagnetic force is reducing and Pwm's width getting high.But if i measure it's current i will see electromagnets force and will calculate weight based on it.And i tried with pwm's width based it is not stable, i dont know is it depending on noise?

Electromagnet's maximum current is 600mA(approsimately)
Electromagnet's minimum current is 15mA(approsimately)

One step up of width makes voltage difference is 10v/60000= 0.166^ mV
One step up of duty cycle makes current difference is 9.8 uA

As you can see if i raise width 10 points voltage will go up 1.66^ mVolts.
I have 2 questions;
1- Noise is a killer in this system.If it at 0mV electromagnet will attract the object when PWM 30000.And if noise at +10mv electromagnet will attract object when PWM 2950(approximately).Can i reduce the noise at zero?
2- If i use a shunt resistor like 1 ohms voltage difference will be loss in the noise.If i use 1k where can i apply it, If i put 1kohm series with diode can i see currents with back emf of electro magnet? if i put it series with electromagnet the current will be reduced so much that it cant handle 2kg weight.

Mosfet is FDS9626A, voltage 12 volts.
« Last Edit: November 28, 2019, 05:18:30 pm by tlhsglm »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14202
  • Country: de
Re: Microcurrent sensing for electromagnets power
« Reply #1 on: November 28, 2019, 07:40:26 pm »
I think the biggest challenge in this case is that the current is not constant, but constantly changing.  For one part this is a good thing because a superimposed AC part will reduce hysteresis effects in the core and iron part to lift. The bad part is that there is a force from both the DC current and the AC part. The AC part tends to be less effective, as eddy currents can counteract the AC field, up to the point of an opposing the force.

With an electro-magnet attracting a piece of soft iron the force is no directly proportional to the current, but more like the square of the current. As magnetization is generally a nonlinear function of the field this is also only an approximation for lower fields. To simplify regulation of the position it helps to have this effect to be weak, as the sign is that way that the closer to the magnet the stronger the force. It can't be avoided all together (at least not for the DC part - it works with the AC part).

Another complication is that the force will generally depend in the distance. So it takes a good measurement of the position too.
Chances are one will need a calibration curve and can not assume a simple relationship.

To measure the more DC current it would help to have the ADC to sample or average over a multiple of the PWM period. The ADC in the Arduino may be just fast enough to do the readings at different times and do averaging and AC calculation.

P.S:
For a shunt a voltage drop of some 100-1000 mV is good compromise between enough voltage and not too much heating of the shunt. So 1 Ohms sounds about good for a 600 mA range. The shunt should be in series with the magnet, not the diode.
« Last Edit: November 28, 2019, 07:44:23 pm by Kleinstein »
 

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Microcurrent sensing for electromagnets power
« Reply #2 on: November 28, 2019, 10:39:00 pm »
I think the biggest challenge in this case is that the current is not constant, but constantly changing.  For one part this is a good thing because a superimposed AC part will reduce hysteresis effects in the core and iron part to lift. The bad part is that there is a force from both the DC current and the AC part. The AC part tends to be less effective, as eddy currents can counteract the AC field, up to the point of an opposing the force.


P.S:
For a shunt a voltage drop of some 100-1000 mV is good compromise between enough voltage and not too much heating of the shunt. So 1 Ohms sounds about good for a 600 mA range. The shunt should be in series with the magnet, not the diode.

Thank you for answering.Really thank you i've missed the currents square when calculating electromagnets force.But i didn't understand some parts of your post.
1- "AC part". My supply is 12v DC.Is the electromagnet's back EMF voltage making voltage behave like AC?
2- Shunt resistor. If i choose a shunt resistor like 1 ohms, isn't the noise will screw the data?With that question can i filter the circuit with RC Low pass parallel with 12v and ground for making noise to be below 1mv?Or do i need an active filter?
3- About shunt resistors place, if i put it series with diode i will get biggest current of every cycles, dont i?So when metal is attracted by electromagnet i will see biggest current?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14202
  • Country: de
Re: Microcurrent sensing for electromagnets power
« Reply #3 on: November 29, 2019, 11:53:49 am »
With the magnet current controlled by PWM the current will be a combination of a DC part an a superimposed AC (should be approximately triangle waveform as L/R is large) part. Due to the large inductance the current would be mainly the DC part and only a relatively small AC part.

Measuring the voltage at a 1 Ohms shunt should be no big problem. The voltage is still large enough (up to 600 mV). A larger shunt would not make things easier, as the main difficulty is more like the superimposed AC part, not the small voltage.  One may have to use amplification and maybe some filtering of the voltage.

The force would be about proportional to the average of the squared voltage, not the leak values. Measuring just at the diode would only give part of the current.
 
The following users thanked this post: tlhsglm


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf