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.