Open Source PID Controller

I used a PID (proportional–integral–derivative) controller to regulate the temperature of my espresso maker. I wrote about it in my book, Made by Hand: My Adventures in the World of Do-It-Yourself. (You can read an except from the chapter on Gizmodo.)

PIDs are often used in Sous Vide cookers, too. (Here's how to make one). If you are looking for a reasonably priced PID controller, here's a new source: Brett Beauregard's open source PID controller, for $85.

Brett's pal, 3ric Johanson (author of Beam Weapon for Bad Bugs in Make Vol 23), says:

My friend Brett Beauregard has been working on this sweet open source PID controller.. and he’s finally published information online about it here.

A PID (proportional–integral–derivative) controller is a device which use hardware feedback with an algorithm; this allows the operator to maintain a target value (temp). Cruise control in car is the classic example: Set it at 60mph, and it will increase the accelerator until you hit 60. There are all sorts of things which can go wrong with closed-loop control systems – - overshoot, ringing, bias, etc. As this device is all open source, as it will make debugging these devices much easier.

It’s currently on “presale” for $85. I think this is a sweet deal. If you want to make your own Sous-vide cooker, this is the ticket. Go buy one, as I want to make sure this type of hardware is available to the masses. I’m excited to get mine.


  1. for say a sous vide. what would be the advantage of using the much cheaper arduino (as I have?). It’s simple enough and just requires a relay for a heating element and a reliable thermistor (easy to calibrate with a kitchen temp probe). I also used a underwater fan to circulate the water. 

  2. This PID is based around an arduino, but the programming is such that it (theoretically, as I haven’t used this one) works a lot better than a typical home-made setup.

    The specific problem with temp feedback is that if you just go with the model of “stay on until you hit the target temp”, you’ll end up overshooting the temperature- the heating element isn’t right next to the thermometer probe usually, so there’s lag time. The lag time varies by setup (plumbing, heater wattage, pump strength, stuff you’re heating). Then your thing cuts off, and you usually don’t kick back on until you’ve already undershot your target temp. This leads to some oscillation around your target temp. Depending on how critical your setup is (and how much overshoot it has), this can be a big deal.

    So it’s nice to have a system that calibrates and keeps you at just the right temperature. Most PIDs have an “auto-calibrate” setup where you just press a button as you’re in the warmup cycle and it figures out all the parameters it needs.

    FWIW, I use a PID in a combo Sous-Vide and RIMS homebrew setup (both beer and cooking require holding a liquid at precise temperatures for extended times, so all that varies is whether I’m cooking food in water or holding hot wort on grain). I bought it on eBay for about fifteen or twenty bucks. This model comes with a solid-state relay, which cheapies don’t have (and that’ll run you another 20-30 bucks right there) and has a lot more features. 

    Worth looking at, especially if you can get at the arduino programming end, I’d love to have a few temperature controllers (for my fermentors and refrigerators) that expose current temp data to my home server, either to just show on the web or to text me when something deviates from parameters. Temp controllers that do that typically run a few hundred bucks. Thus far, my electronic skills aren’t quite good enough to handle providing a stable current source for a typical temperature probe (RTD).

    1. Correction.  The osPID does not come with an SSR.  It has the ability to bypass its internal relay and send a digital signal to an external device of your choosing.

      On price, we couldn’t compete with the cheapies since we’re only making small batches right now.  We tried to make up for this by having more advanced features.  here’s a video I did detailing the differences:

  3. PID aka feedback control systems..ah one of the more challenging classes in my undergrad EE days.  So simple in theory, so wildly a PITA.

    Any decent microcontroller that can hold a couple of variables can be made to work as a PID controller, how much precision you want/need is going to determine how much effort and time you spend programming everything.

    It looks like if you are going the effort to do PID programming for a cooker, you’d add in a thyristor to give you variable power control instead of a relay for on/off option.  (Or if you are doing a purely resistive setup, rectify/smooth incoming AC and use a mosfet to give you PWM.)

    1. For a heater, a solid state relay (with optional zero-crossing detection for lower EMI) will do the same job as a mosfet would. The control pulses just have to be slow enough to not be too distorted with the SSR passing through an integer number of half-waves.

  4. I fail to see how this is ‘bringing PID to the masses’ when PID controllers are available on Amazon for $40 bucks. Is open source really worth an extra $40 bucks?

    1. I’d agree that the tag line is a little odd. 

      My $35 PID bought off amazon has a bad ‘down’ button and it’s too late to return it.  The interface is obtuse as well.  So if this is $85 for something higher quality with better features and it’s upgradeable, it’s got a place in the market regardless of open source.

  5. The fantastic Bob Pease published a good explanation of PID controllers’ inner workings in 1995. His example is all analog, using 5 op- amps and some passive components and can be built for $10 or less. A JFET-input op-amp such as the TL074  should work well to keep input currents down in the picoamp range.

  6. Hi Everyone, let me address the cost issue:

    As a kit maker there’s no way I could make this $30.  Maybe once we’re making 10k, but not right now.  Because of this I tried to make the osPID as feature-rich as possible.  Not mentioned in this post is the Java trending application which you can plug in at any time for Tuning, observation, whatever.

    Hopefully once we get some in-the-wild implementation videos it will become clearer what this is controller is all about.  There’s no reason, for example, that you couldn’t hack this thing to tweet.  With a commercial PID controller that would be very difficult to do, even with a high-end model .

    In the mean time here’s a video I did comparing the osPID to commercial PID controllers:

    and there’s a bit more information on my personal blog:

  7. The PID controller is indeed sexy, but what would really get me hot and bothered is an article on how to make a fuzzy logic controller.

  8. Mark, your Rancilio Silvia PID setup looks just like mine.  I thought it was a crazy project, but ~5 years later it still works great and I use it every morning.

Comments are closed.