?

Log in

Adventures in Engineering - Making a PID controller out of an op-amp.
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2008-09-08 01:25
  Subject:   Making a PID controller out of an op-amp.
Public
  Mood:notes to self...
  Tags:  notes to self, reddit



So you've probably seen this story about the table that keeps a ball in the center by using a touch-screen to sense where the ball is and tilt the table accordingly.

In the Reddit comments for the story, someone linked to the PID Controller page at Wikipedia, and wow has that thing gone uphill since the last time I looked at it.

The most interesting thing I learned by reading the (new version of) the page came from an off-site link to a PDF file about the control system for a little self-controlling helicopter project. It turns out (page 22) you can build a PID controller from an op-amp, two resistors, and two capacitors. You do have to do some math on the resistances and capacitances to calculate Kp, Ki and Kd. But even so, what a cool little trick!



OpAmps - is there anything they can't do?
Post A Comment | 6 Comments | Share | Link



  User: (Anonymous)
  Date: 2008-11-21 23:34 (UTC)
  Subject:   PID gains table
I'd like to point out that the table given with the figure is wrong. The Ki and Kd are reversed. I confirmed this by reading further in the report about the helicopter project, and by doing the math. Otherwise it's a great idea. Intuitively, if one makes C1 and R2 zero, you have a classic integrator. Also, as C2 gets smaller, the integral gain should get larger.
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2009-04-28 22:12 (UTC)
  Subject:   Re: PID gains table
Good correction, thanks much!
Reply | Parent | Thread | Link



  User: (Anonymous)
  Date: 2009-07-26 22:39 (UTC)
  Subject:   Re: PID gains table
Yes exactly Ki and Kd are reversed, I wonder whether the referees of this project noticed this minor distraction ...
Reply | Parent | Thread | Link



  User: letissanti
  Date: 2010-12-30 15:46 (UTC)
  Subject:   Controll PID with one Op-Amp
Try to use the procedure in matlab called "SISO" and then compute the controller: for instance,

equations for PID controller with Single Operational Amplifier :
http://www.postreh.com/vmichal/papers/PID-Radio.pdf

ann
Reply | Thread | Link



  User: (Anonymous)
  Date: 2012-02-25 23:43 (UTC)
  Subject:   (no subject)
Whats the value for the resistor and cap ?
Reply | Thread | Link



Ben Cantrick: Captain Obvious
  User: mackys
  Date: 2012-02-27 10:27 (UTC)
  Subject:   (no subject)
Keyword:Captain Obvious
Gee, I dunno. Maybe those formulas in the second image in the post, under the "Wanna see how" link, might help. However note that (as an earlier commenter said:) "the table given in the figure [is] wrong. The [formulas for] Ki and Kd are reversed."

Of course, I realize you're not serious. You're just a spammer probing my LJ entires for commentability, in preparation for a spamming run. Rest assured that every comment made in this entire LJ must be hand-approved by me before it shows up. Post comment spam all day long, it will never see the light of day.
Reply | Parent | Thread | Link



browse
May 2015