3 ms·
For my control systems class several years ago I created a PID controller with just OpAmps. Each portion had a switch to enable/disable to see the results of P+
by seiferteric 10y ago
For my control systems class several years ago I created a PID controller with just OpAmps. Each portion had a switch to enable/disable to see the results of P+I, P+D, P+I+D etc. The output from each portion could be amplified (controlled by a trimpot) and then was summed (also by an OpAmp) and then went to a pair of transistors to drive a DC motor on a Plexiglas board with a pointer and 0-180 degrees marked out. The input was a potentiometer with a knob to set the desired angle. Pretty fun project. Others in the class decided to do it digitally with a micro controller but seeing it all done with analog components was really cool!
- plandis 10y agoI did something similar with op amps to implement a PID controller. I had a circuit design class in college where each week you would have some new thing to design. One of the assignments was to develop a laser that would find and then track a solar panel. The class had a contest to see which design would track the center of the panel the best. Fun stuff!
- jcoffland 10y agoYou made a servo.
- seiferteric 10y agoYes that's true, just wanted to explain the mechanism behind it. Just a note, I don't think most hobby type servos implement full PID control, though many industrial ones do I am sure.
- snovv_crash 10y agoHobby servos often have controllers far more complex and accurate than PID. Something taking into account the gearbox and motor inertia, input voltage, etc. And not just tuned with high pass, low pass and gain filters.
- seiferteric 10y agoIs that true? I know there are more optimal control schemes than PID IF you know the parameters of the load, but with a servo you could connect anything to it, so its not just the gearbox and motor, so how would it handle it? I would love to see some implementation code or diagram of a hobby servo control. Also my understanding is that PID is optimal IF you don't know about the load, but maybe that is wrong, its been a while. My impression was that hobby servos used basically just PI control and were heavily damped so you don't really get overshoot, but again I don't really know.
- snovv_crash 10y agoThe cheap, older 'analogue' servos were just PI, but the new 'digital' servos have much more advanced control. They actively reverse power to the motor when getting close to the target to extract regen power from the motor inertia while still getting a faster response. Yes, you can get this from PID, but you can't keep it at full reverse right up to the moment it hits the target without getting nasty oscillations as the voltage changes.