Difference between revisions of "PWM Coltrolled Stir Plate Design"

From German brewing and more
Jump to: navigation, search
Line 16: Line 16:
  
 
=PWM design=
 
=PWM design=
 +
 +
[[File:555 internals.gif|frame|right|Figure 1 - the internals of the NE555N timer chip connected to a capacitor that can be charged and discharged through a variable resistor]]
  
 
The fan speed control logic described here is based on a [http://www.homebrewtalk.com/f51/simple-pwm-stirplate-controller-219121/ Home Brew Talk post] by rocketman768 with a few modifications. It employs a [http://www.mouser.com/ds/2/389/CD00000479-103226.pdf NE555N] timer chip. The internals of the NE555N are basically a RS flip flop with differential comparators its R (reset) and S (set) inputs as shown in figure 1. When the voltage at the THRES input exceeds the internally generated V<sub>thres</sub> the R input of the flip flop asserts high and the output is reset to 0. Conversely if the voltage at the TRIG input is lower than the internally created V<sub>trig</sub> the flip flop's S input asserts high and the output Q is asserted high. In this design TRIG and THRES are both connected to the same terminal of a capacitor and as a reslt R and S can never be asserted at the same time.  
 
The fan speed control logic described here is based on a [http://www.homebrewtalk.com/f51/simple-pwm-stirplate-controller-219121/ Home Brew Talk post] by rocketman768 with a few modifications. It employs a [http://www.mouser.com/ds/2/389/CD00000479-103226.pdf NE555N] timer chip. The internals of the NE555N are basically a RS flip flop with differential comparators its R (reset) and S (set) inputs as shown in figure 1. When the voltage at the THRES input exceeds the internally generated V<sub>thres</sub> the R input of the flip flop asserts high and the output is reset to 0. Conversely if the voltage at the TRIG input is lower than the internally created V<sub>trig</sub> the flip flop's S input asserts high and the output Q is asserted high. In this design TRIG and THRES are both connected to the same terminal of a capacitor and as a reslt R and S can never be asserted at the same time.  

Revision as of 03:05, 7 May 2013

Introduction

A stir plate uses a pair of spinning magnets to move a magnetic stir bar contained inside a flask or other vessel. The spinning of the stir bar keeps the liquid, in our case a yeast starter, agitated which promotes gas exchange and keeps the yeast in suspension. The main advantage of such a set-up is the ease with which it can be sanitized. All surfaces that come in contact with the starter, flask and stir bar, can be sanitized through boiling.

Experiments and observations by home brewers, including my own, have shown that constantly agitated starters increase yeast growth by 2 to 4 times over non agitated starters. This is the main reason why home brewers are interested in building or acquiring stir plates. Given the fairly high price ($50 for a simple design and $100+ for most commercial models) many home brewers op for building their own.

Commercial labs often favor the use of orbital shaker tables which also keep yeast cultures agitated but have the capacity to hold many flasks at once. Building a shaker table is more complicated than a stir plate which is why they are not commonly used by home brewers.

Design options

Most home built stir plates use a DC fan to which strong magnets are attached. The main design difference lies in how the speed of that fan is controlled. Simple designs put a variable resistor between the DC power supply and the fan. Slightly more complex designs use a linear voltage controller to regulate the voltage applied to the fan. The problem with designs that control fan speed through voltage is that most fans have a narrow voltage band between no rotation and full speed. This makes speed control difficult unless there is sufficient resistance from the liquid that is stirred.

This speed control problem is overcome by pulse width modulation (PMW), which does not change the voltage applied to the fan but the amount of time the fan is turned on and off. The frequency of the pulsed fan power is generally between 10-100 Hz. A PWM based design is described by this article.

An even more sophisticated stir plate control uses a micro controller and speed sensor to implement a feedback loop that allows for accurate fan speed control based on a speed (RPM) set by the user. The Digital Stirplate offered by Digital Homebrew employs such a design.

PWM design

Figure 1 - the internals of the NE555N timer chip connected to a capacitor that can be charged and discharged through a variable resistor

The fan speed control logic described here is based on a Home Brew Talk post by rocketman768 with a few modifications. It employs a NE555N timer chip. The internals of the NE555N are basically a RS flip flop with differential comparators its R (reset) and S (set) inputs as shown in figure 1. When the voltage at the THRES input exceeds the internally generated Vthres the R input of the flip flop asserts high and the output is reset to 0. Conversely if the voltage at the TRIG input is lower than the internally created Vtrig the flip flop's S input asserts high and the output Q is asserted high. In this design TRIG and THRES are both connected to the same terminal of a capacitor and as a reslt R and S can never be asserted at the same time.

Pulses of differing witdth will be created by triggering the R and S inputs at changing time intervals through charging and discharging of the capcitor. The speed which which a capacitor charges depends on the product of its capacitance and the resistor though which it is charged, also called RC constant. In this design the capacitance remains constant but the resistance can be changed.

In this design the capacitor is connected to the output Q though variable resistors and diodes. Figure ?? illustrates how the capacitor is charged and discharged as a result of being connected to Q. When Q is asserted high, the cpacitor is charged through the R1 part of the potentiometer until the voltage on the capacitor reaches Vthres at which point the R input of the flop is triggered and Q asserts low. Now the capacitor discharges through the R2 part of the potentiometer until the capacitor voltage falls below Vtrig, S is triggered and Q asserts high repeating the process of charging the capacitor.

The result is that the time of Q being asserted high deepends on the product of R1 and the capacitance C while the width of Q being asserted low depends on R2 and the capacitance C. Since R1 and R2 are part of a potentiometer they are adjustable but their sum has to remain constant. What follows is that changing R1 changes the percentage that Q is asserted high but not the frequency of pulses on Q.

To control the fan, Q is used to drive a MOSFET which turns the fan on and off. The longer Q is asserted high the longer the fan is turned on and thus the faster the fan will spin. The interia of the fan coulped with a sufficiently high pulse freqiency resuts in an even rotation speed despite the pulsed nature of fan's power supply.

Wiring diagram and parts list

Figure ?? shows the complete schematic for the control logic and the fan. 555 is the timer chip. D1 and D2 control whcih part of the potentiometer P1 controls charging and discharging of C1, respectively. D3 is a diode that potects the MOSFET from voltage spikes that happen when the current through the inductive load, the fan, is suddenly interrupted. Capacitors C2 and C3 stabilize the input power supply.

Figure ?? shows the suggested layout on a breadboard. A standard breaboard is large enough for 2 control circuits whcih is why the option for a 2nd control circuit is shown. Pins 2 and 6 of the 555 are connected with a piece of wire under the breadboard (red dashed line) while all other connections are made with wire jumpers on top of the board (blue lines). The layout also shows the connections within the bread board for reference (thin gray lines). (+) and (-) are the 12 V power supply connections, M+ and M- are the fan terminals and M,L,R refer to the middle, left and right terminals of the potentiometer. If the fan speeds up when the potentiometer is turned to the right, simply reverse the L and R connections.

part list

The following is a part list including mouser.com item numbers.

Housing

Home brewers have been very creative when it comes to mounting the fan in a housing. As long as the top cover, which will be between the fan and the flask, any box will do. While some have even used Tupperware (R) containters they do not necissarily provide enough rigidy to support a 2 L or lager Erlenmeyer flask. I suggest using a sturdy pastic project box or custom build enclosure. The double stir plate shown here uses a simple housing fashioned from thick plywood and acryllic glass. Being able to see the spinning fan can be an advantage in some cases.

Testing & troubleshooting

The more complicated the control the more chances there are for defects. While an oscilloscope would be very useful in debugging this cicuit, a simple voltmeter will do as well.

Once completed apply the 12 V supply voltage. If nothing starts smoking see if turning the potentiometer changes the fan speed. If nothing happens check the supply voltage on the 555 (pin 8) and the reset pin (pin 4). They should both be at 12 V. The check that GND (pin 1) is at 0 volt. Now pin 3. If that's at 0 V the fan should be off and when it is at 12 V the fan should be running at full speed. Now check that both pins 6 and 2 have the same voltage as pin 3. If they don't check their connections through the potentiometer.