Arduino Controlled Homebrew Stir Plate

Arduino Controlled Homebrew Stir Plate

This post was featured on the Make Magazine blog!

 

One of the four key ingredients in beer is yeast. They do all the hard work and we get to reap the reward! To get the most out of the yeast, a homebrewer can (and should) create a yeast starter to ensure both the viability and population of the pitched yeast. A stir plate can be a valuable tool when creating a yeast starter for your homebrewed beers. It improves you starter in three ways:

  1. Helps remove CO2 from the wort – excess CO2 can inhibit yeast propagation
  2. Aerates the wort – yeast require oxygen for proper growth
  3. Keeps the yeast in contact with the nutrients necessary for better propagation – stirring the slurry of yeast cells and wort keep the yeast from falling to the bottom of your starter container

While there are many different tutorials on the web about making a DIY stir plate, my take is a slight departure in both function and aesthetics (hopefully for the better in both cases).

 

The Circuit:

The brains behind this stir plate is an Arduino microcontroller. Because the Arduino is reprogrammable,  it can be tuned to the exact speed range you are looking for. If your fan speed is too high, the drag on the stir bar will be too great and it will break free from the drive magnets. Too low and you wont be stirring the starter enough. The Arduino also has PWM outputs which make it possible to use a fancy looking LED case fan. Below is a mock up of the circuit:

  1. LED Case Fan
  2. DC Power Jack & 12V Power Supply
  3. Voltage Regulator -  5V
  4. 10K Ohm Resistor
  5. Potentiometer w/ Power Switch & Knob
  6. ATmega328 with Arduino Bootloader
  7. NPN Transistor
  8. 16MHz Ceramic Resonator

The entire unit is powered by a 12V power supply (2) that is plugged into a standard wall outlet. The 12V input is stepped down to 5 volts by the voltage regulator (3) in order to power the Arduino (6) and give a reference voltage for the control knob (5). As the resistance of the control knob changes, the Arduino proportionally adjusts the duty cycle of the PWM signal sent to the NPN transistor (7). Here, the transistor (7) is being used as a high frequency switch. It opens and closes the LED fan’s (1) ground wire to control the fan’s speed. The 10K ohm resistor (4) and the 16MHz ceramic resonator (8) are both required for the Arduino to function properly.

 

 The Code:

/*
Nov 2011
LIAMzilla.com
Code for 'Arduino Controlled Stir Plate'

This example code is in the public domain.

*/

// initialize fanPin to a pin with PWM capabilites
const int fanPin = 9;
// initialize an analog input for the knob signal
const int knobPin = 0;

// change max and min to adjust the
// upper and lower fan speeds
int max = 102;
int min = 25;
int knobValue, pwmValue;

void setup()
{
  // initialize the serial port
  Serial.begin(9600);
}

void loop()
{
  // get the value of the knob
  knobValue = analogRead(knobPin);
  // remap the values from 10 bit input to 8 bit output
  pwmValue = map(knobValue, 0, 1023, max, min);
  // use the input value to adjust the fan speed
  analogWrite(fanPin, pwmValue);
  // print the input value to the serial port for debugging
  Serial.println(pwmValue);
}

 

Stir Plate Pictures:

 

 

Promote

If you enjoyed reading this article, help let the world know about it by sharing it on your favourite social networking site

  • Erin

    will this work for my bacon vodka that i will be getting sooooon….

  • Shree

    You found some hobby in the Burg!

  • CodonAUG

    Did you need to attach magnets to the fan or does the fan itself have a strong enough field to move the stirbar?

    • http://LIAMzilla.com Liam

      @CordonAUG, as Scott mentioned, glued 2 rare earth magnets (part# 5862K96 from McMaster.com). The stronger the magnets you use, the faster you’ll be able to stir.

  • ScottInNH

    @CordonAUG – He’s got magnets glued to the fan… look for the small round metal objects (high strength magnets at 1 and 7 o’clock ).

    I made a stir plate with fewer parts:

    Using a 5V regulated power supply from an old phone, 90mm case fan, and magnets pulled from inside a hard drive. I recycled everything so my cost was $0. No power switch, just unplug it. Note: Some fans won’t spin up with 5V but mine did.

  • Alexander

    If you would remove the fins from the fan, you could get a much higher RPM–as well as less current draw from the fan.

    • http://LIAMzilla.com Liam

      @Alexander, thanks for the comment. I found that the stir speed was limited, not by the power of the fan, but by the strength of the drive magnets. At higher RPM’s the stir bar would see too much drag and break free from the drive magnets.

  • DaVolfman

    So you’re taking an array of electromagnets and hall effect sensors used to automatically spin a magnet at best speed and attaching another magnet to spin yet another magnet manually at best speed. Maybe you should step back a fewsteps and just build the stirrer as the rotor for your own brushless motor. Maybe by tracking down one of the TMD casefans to use as your base.

    • http://LIAMzilla.com Liam

      @DaVolfman: When you put it like that, this design does seem pretty asinine. However, the magnetic stirrer has three distinct advantages:

      1) The PTFE encapsulated stir bar is small and easy clean/sanitize (very important for homebrewers)
      2) The stir bar can be hermetically sealed within the erlenmeyer flask. This way I can use a 3-piece airlock which lets CO2 out and prevents air from getting in.
      3) The fan I used was free!

      Interesting idea though. I had never heard of the TMD (Tip Magnetically Driven?) style fan before.

  • Jackson

    To keep the environment sterile in the starter, what is the stir bar made of?

  • Ray

    @Liam: Cool project, I have a similar one that I use for brewing. I want to let you know though that you should not use an airlock with a starter, especially on a stir plate. The main reason for constantly stirring the starter is to provide plenty of oxygen for the yeast since, as you mention above, yeast need oxygen for healthy reproduction. Just cover it loosely with a sanitized piece of aluminum foil so that the gases can pass easily each way, but dust with bacteria can’t settle in it. Cheers :)

  • http://www.summet.com/blog/ Jay

    Nice stir plate! One question on simplifying the electronics. Couldn’t you just use the POT to adjust the pulse width of a 555 timer for even easier PWM control? No need for the 5 volt regulator or any programming at that point, although you would probably need to add a few more passives (resistors/capacitors) for the 555.

    • http://LIAMzilla.com Liam

      @Jay: You’re absolutely right about the 555 timer! The reason I like the ATMega is because I can tune the output of the PWM in software very easily, rather than changing the passives with the 555. It turns out that my stir plate operates best between 9% (min) and 40% (max) duty cycle.

  • Ray

    @Liam: That is surprising, they should know better. Makes it pretty confusing.

  • ScottInNH

    @Liam

    1) The new-message notification for this topic is broken, in that the email’s “Reply” link goes to http://www.liamzilla.com/arduino-controlled-homebrew-stir-plate?… nov http://www.liamzilla.com/homebrewing/arduino-controlled-homebrew-stir-plate

    2) Can’t the potentiometer directly (or in combination with an inline resistor) limit the voltage to the fan, and therefore fan speed?

    The question’s NOT a stealth way of suggesting you don’t need an Arduino, by the way. :-)

    Mine’s directly powered and limited with lower voltage, but now I am thinking of adding a ‘duino for mine, so I can record temps, program the speed to be lower during certain hours (nighttime), and a shutoff timer.

    • http://LIAMzilla.com Liam

      @Scott

      1) Thanks for the heads up. I need to work on the comments because frankly, they suck.

      2)As others have suggested, there are simpler and cheaper ways to control a fan. For many fans, controlling the voltage with a POT will work fine. The fan I had would not operate at less than 12v so my only option (other than buying a different fan) was to use PWM. The arduino is perfect for this because of the built in analogWrite() function. Another advantage of the arduino is that you can easily tune the speed of the stir in the software. At a low duty cycle (<9%) the fan would stall and high duty cycle (>40%) the stir bar would break free from the drive magnets. Setting the max and min speeds also improves the resolution of your controller POT.

      I really like the idea of adding temp, nighttime mode, and a shutoff timer! If you decide to pursue those ideas, let me know how it turns out.

      Cheers!

  • ScottInNH

    Sure thing, if/when I get the stir plate rev 2 done I’ll remember to post it here (this discussion is tagged ‘electronics todo’ in my Gmail, heh).

    I’ve been using dry yeast mostly for the last couple of years, basically due to time constraints, so my stir plates are in storage. But I am itching to soon make a Belgian golden ale + tripel pair (parti-gyle), and for that liquid yeast is preferred.

    I’m not sure how you fix the comment notification in WordPress. I see you changed the URL after the discussion started (by tagging it). You might need to do something in the menus, or you might be able to (in WP or Apache config) force a redirect from the original URL: http://www.liamzilla.com/arduino-controlled-homebrew-stir-plate

    I like that you made a minimal breadboard Arduino. You should also look at the Arduino ATtiny project: http://hlt.media.mit.edu/?p=1229 I expect this sketch will run on an ATtiny45, which has hardware PWM.

  • Squeptiqual

    Video link or it didn’t happen.