Author Topic: PWM Controlled Stir Plate  (Read 4940 times)


  • Newbie
  • *
  • Posts: 6
PWM Controlled Stir Plate
« on: April 23, 2013, 09:59:33 pm »
Hi all,

So, I am a homebrewer and have a stir plate that I built using a PC fan, some magnets and a rheostat. Unfortunately the control is pretty poor with the rheostat and since I have a spare digispark laying about, I thought I'd try and use it as a PWM controller.

So, currently I am using a 5V, 1000 mA output power supply. I might try use a 6V or even a 9V supply at some point but maybe I'll just get it working with what I have.

Is there any way that I can easily hook this up direcly through the digispark and have a PWM pin control this kind of supply? I tried hooking up the fan to the digispark while it was plugged into USB but it didn't work, just made a funny noise ;)

I am fairly new to electronics, any help would be greatly appreciated!

Would another option be to use a transistor and have the PWM signal switch the transistor to open and close the bigger supply? This would be more complicated, would be nice to not have to worry about supplying the digispark and the fan separately.

Here's a quick vid of my stir plate as is...


  • Newbie
  • *
  • Posts: 13
Re: PWM Controlled Stir Plate
« Reply #1 on: April 23, 2013, 11:14:27 pm »

You should probably use a transistor for stuff like that.
They are a perfect match for driving fans, lights and other devices that need a little more oomph than the ~10-20 mA a microcontroller can deliver (due to the max source or sink current of the controller pins).

The DigiSpark MOSFET shield should work or if you have some spare transistors and diodes around that can handle the current/power of the fan at max-speed you can do a simple custom shield of your own..

Just don't forget the protection diode(s) if you do it on your own:
When you stop supplying power to the fan is will continue spinning due to inertia of the hub/blades.
At that point the fan will actually turn into a generator and the voltage/currents it produces could damage your DigiSpark.
Even if there is a transistor in the middle that doesn't seem to be enough protection from the "outside" end of the circuit.

I'm also a n00b in this territory so I don't fully grasp why most (all?) transistors fail to "shield" us from that unwanted output on the base/gate pin, it's just the way it is.. :-)


  • Newbie
  • *
  • Posts: 6
Re: PWM Controlled Stir Plate
« Reply #2 on: April 24, 2013, 08:17:20 am »

Thanks for the tips. Unfortunately, I don't have the MOSFET shield, only the relay shield but the switching will probably be too fast for the relay. I'll look what I have in terms of transistors and see what I can coble together. Thanks for the warning about the diode, I'll be sure to put one in!

Will keep in touch as to how it goes ...


  • Full Member
  • ***
  • Posts: 196
Re: PWM Controlled Stir Plate
« Reply #3 on: April 24, 2013, 10:32:44 am »
Just a quick note on 'back emf' diodes
When an inductive load (relay, coil, transformer, motor, etc) has the voltage removed, the flux circuit generated by the windings, attempts to induce a voltage in the coil that initiated it (thats how a transformer works).
This collapsing flux field generates a reverse voltage across the coil, which can be twice (or more) the original voltage.
The reverse biased diode effective dumps that energy spike back into the coil which cancels it out.
You can also place it across the transistor/fet and the supply with its capacitors is effectively a short circuit to the spike of energy, so it will have the same effect.
It's not as good, but will work if required.
So for any loads that are inductive, add a diode to prevent damage and funny things happening.
While you are there, ensure you have added a 0.1uF capacitor across the supply as close to the inductive load as possible to help remove anything that does get onto the supply line.