From your other post.. I would remove the 100 nf cap and replace it with a 47k from base to emitter. I think I would also make the 10k from the gate of the FET about 1k to speed it up a bit. Not sure about how to control it.
You probably need to speedup your feedback loop to get rid of the low freq oscillation.
The diodes across the solenoid coil give you a slow current decay so it will limit how fast the magnetic field can be reduced. Try putting a 20v 5W zener diode in series with the diodes, but reverse polarity to the diodes.
Then your feedback system looks slow too as you are working in analogue and will have time delays to get the ADC reading etc. Try taking all delays out of your code and making the feedback loop as fast as possible and just making the PWM on and off based on one setpoint.
int setPoint = 550;
loop() {
input= AnalogRead( input pin); //ADC input
if (input > setpoint) digitWrite(outPin, HIGH);
if (input < setpoint) digitWrite(outPin, LOW);
}
But if I put the zener in series with the other diodes, then the current will eventually be limited by the other diodes.
That simple circuit is a bang-bang type of controller and that won't give you stable levitation (by definition a bang-bang loop has to oscillate for control).So I got rid of the microcontroller, and using just an op amp to control.
Is the circuit okay?
Here's a demo using Fuzzy Logic to balance an inverted pendulum
Once the object is completely blocking the beam(or above the beam), the value of the 10 bit ADC goes above 700. Usually 722.
When no obstruction in beam, the adc reads 22.
I am using a abritrary value of 550 to keep the object somewhere between above and below the beam.
I don't know the inductance of the coil but its plenty powerful to pull the object up at even 70% power.
I am considering replacing the uC with some op-amp circuit.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?