Magnetic Stirrer Revisited!



Please check out my previous post on this topic for more information about the general motivation. One thing I never managed to finish with that design was the case, and I also found the requirement for a 12V power supply to be annoying, and the speed adjustment was too limited at the low (useful) end.


Instead I created a version with a minimalist 3D printed ‘case’, and used an adjustable boost converter to both allow the speed to be taken lower and for the whole thing to be powered from a USB supply. Behold, the USB(ish) Magnetic Stirrer!

Parts List



As with my previous stirrer, glue the magnets on to the center of the fan as shown in the picture – use the stir bar to ensure the polarity is correct, the stir bar should stick easily to the magnets once they’re in place.

Simply push the ‘case’ into the mounting  holes of the fan over the magnets.


The wiring is super simple, but feel free to let me know if you think this justifies a circuit diagram:

  • USB+ to Vin+
  • USB- to Vin-
  • Fan+ to Vout+
  • Fan- to Vout-
  • FanPWM to Vout-

Note: before connecting the fan, use a voltmeter to set the output voltage somewhere around 6V.

Once everything’s connected, adjust the output voltage to the lowest speed where the fan will reliably start from cold. This is probably the speed to use (too fast and the stir bar will fly off).

Usage Instructions

Just pop the stir bar in a vessel filled with liquid, place on top of the stirrer and turn on. Adjusting the output voltage will adjust the speed – keep the voltage below 12V or you’ll risk damaging your fan. You won’t get great results at voltages above 8V anyway as the bar will fly off.

Humidity & Temperature Logger


Ever wondered how your indoor urban farm is doing in this cold snap but you now live too far away to conveniently stop by every day? No? Just me? Then perhaps you just want to keep an eye on your basement, your drying laundry or anywhere you’ve had a recurring leak.


An internet connected temperature and humidity meter that logs to an open platform (in this case thingspeak) letting you monitor, set alerts (via and even (if you’ve got your heater or dehumidifier connected to a smart plug) take remedial action.

We use an ESP-01 wifi module as it’s simple yet powerful enough to get the job done. we add a connector, voltage regulator and smoothing capacitor to allow it to be powered from usb and a DHT-22 with pull-up resistor to take the measurements.

Parts List


Note in the below diagrams it’s showing three pin voltage regulator, but in reality this project uses a 4 pin voltage regulator module, I just haven’t had time to create a fritzing part for that module yet. These modules also work too.




There is a GitHub repository with the code for this board. Note that the code supports other sensors, in fact ds18b20 temperature sensors can be swapped out for the DHT22 and will just work with no rewiring necessary.


FullSizeRender (5)

Usage Instructions

First step is to create a new thingspeak channel for your device, if you don’t already have an account, they’re free so sign up and create a new channel. Once your channel is created, you’ll need to make a note of it’s write API key, this is available in your channel’s API Keys section.

Now you can power on your board, the first time it’s powered on it will need to be configured. The allow configuration, your board will launch it’s own access point (starting ESP), connect to this access point:


On some systems the next screen will launch automatically, if it doesn’t you might need to go to any web page (e.g. and it should redirct you. The next screen is the main menu of the board, from here select Configure Wifi:


This will take you to a configuration page where you can enter you wifi SSID and Password along with your thingspeak channel’s write API key (see above) and the sensor model, in this case DHT22:


When you’re done, press save. This should cause the ESP board to close it’s access point (your wifi connection will drop) and connect using the wifi credentials you gave it. If everything works it should start logging to your thingspeak channel. If it doesn’t work, try looking for the ESP access point again and reconfiguring. Pressing the reconfigure button will cause the ESP to forget it’s network setting and relaunch the access point so you can reconfigure it. This is especially useful if you’ve made a typo with the API key (been there, done that).

Lessons Learnt

This project taught me a lot about supplying an ESP8266 with stable power. The smoothing capacitor were a late addition (indeed the 0.1uF cap has yet to be implemented on any of my test boards) but without that stabilisation everything was shaky.


This project couldn’t be possible without the many libraries it depends on, but it particular the WiFiManager project by tzapu is amazing and I am very grateful for his work.

Magnetic Stirrer

Note: There is an updated (simplified) version of this project here.


This problem was presented by a colleague of mine – he does a lot of home brewing and needs to keep his yeast starters agitated. “A stir plate helps you culture higher cell counts of healthy yeast for quicker fermentations, lower risk of infections and better tasting beer.”, apparently.


Magnetic stir plates are a thing, they can be bought from around £40 and many also include a heating element. That said, building your own sounds like more fun. The internet includes many tutorials on building a DIY stir plate using a PC fan and some neodymium magnets, we’re simply going to take it up a notch by using PWM to control the fan speed and (hopefully) report back the actual speed of the fan, as a proxy for the stirring speed.

Parts List

In addition, we’ll need the following:

  • Hookup wire
  • Super glue
  • Hot glue and glue gun
  • Solder and soldering iron
  • Drill and drill bits for pot (6mm) & jack (8mm)
  • Tools for cutting out hole for display (dremel?)

Total cost = £27.49 but in reality, you can scavenge many parts (e.g. fans, psu) and many parts are available cheaper in bulk (magnets, knobs etc) which will bring down the parts costs considerably.


Note, the 4 Digit display has not yet been included in the below diagrams.





The latest version of the Arduino code can be found in the associated github repository, along with Fritzing files.

Build Photos

Breadboard Prototype

Finished Prototype

So far this prototype is unfinished, the project box and the magnetic stir bar are both waiting to be delivered so no pictures of the final article yet. I’ll update this article with more details when it’s finished.

Lessons Learnt

So far I’ve learnt how to use Fritzing (a great app for documenting circuits) and how to modify existing fritzing parts to add new connectors using Inkscape.

I’ve also learnt that 2.5mm x 5.5mm barrel plugs sometimes fit in 2.1mm x 5.5mm barrel sockets, but not reliably and can cause intermittent power issues. I’ll be standardising on 2.1mm x 5mm in future as this seems to be more popular (e.g. used on the arduino) .


Many thanks to Jay Brad  for his Fritzing Project describing how to read and control a four wire fan, and his included arduino sketch which I initially based my code on.