In this post I will cover the construction of a temperature based flow regulator that some friends and I have built in order to make sure that the wort temperature is cooled from boiling point to 25°C in our micro brewery. This is important to make sure that the yeast is not killed when added. Since i have some experience in wireless communication we figured it would be cool to make the regulator remotely controlled from an android application.
The setup is kind of similar to my previous project and is built around two Atmega88 with wireless communication through two nRF24L01 adapters (see my tutorial covering the nRF24L01 and AVR).
- Power supply, 5V 2A USB-power supply (Powerful phone charger that both supplies the Atmega88 and drives the motorized ball valve)
- Atmega88, the "computer", a microcontroller that takes and gives commands.
- nRF24L01, 2,4 GHz module that sets up a wireless link with the other nRF-module attached to the computer.
- LM35, Temperature sensor 10mV/°C scale factor and +-0,5°C accuracy.
- Motorized ball valve, 12V (DC-motor works perfectly on 5V, just a bit slower)
- H-bridge, to drive the ball valve DC-motor in ether direction (H-bridge described well here). The components used are two IRF540N (N-channel) and two IRF9540N (P-channel) mosfets.
- Prototype PCB, to solder everything on.
- Heat-exchanger 44kW
- Garden hose connections female, male.
Armed with a soldering iron, the process went fairly quick and the result is shown below.
The top corner is where the motorized ball valve is connected, and powered via the H-bridge (the fore black mosfets). The temperature probe is attached in the left corner, and the RF-module is the green to the left. The black thing next to the RF-module is a linear regulator that converts the 5 V to 3,3 V since it cannot work with 5 V. When the motor on the valve starts, it produces a huge voltage drop in the system, and therefore it is necessarily to put a large capacitor on the power supply.
For anyone that wants to construct a H-bridge, i found a great way of soldering them together as you can see at the very top of this picture. Put the two P-channel ones at the back row, and the two n-channel ones in the front row so they line up. Then on each p-channel mosfet you bend the two right connectors (seen from underneath) and solder them to the n-channel ones which you can cut off. For each pair of p+n-channel mosfet you then connect the right rail to respective i/o port on the micro controller, and the middle one to respective DC-motor connection. The left connectors of the P-channel mosfets connects to 5V, and the left connectors on the N-channel ones connects to ground.
The temperature measurements is done in the hose connector where the wort leaves the heat-exchanger. It looks a bit messy, but at least it does not leak and the quick connector still works! ;)
The heat exchanger is used as a counter current flow type, and is regulated by controlling the flow of the cold tap-water outlet, so that the temperature of the wort outlet matches its predefined value.
The android application is communication via TCP (wifi or 3G) and is controlled by the same visual basic program i built in the last post to control the ultimate IR-RF remote control:
Screenshots of the android application:
The user can tap on the picture representing the heat exchanger above and set a new temperature for the regulator to aim for. The current temperature is automatically updated every 2 s where it now says "- °C". The two other temperature fields are not up and running at the moment, but in the future they are suppose to regulate the temperature of the boiler and the mash-tun.
If anyone have questions about the build or want me to explain my projects further, please just write a comment!