
Since my last post I've have worked on developing a prototype small scale version of a wort fermentation cooler. This was mainly to prevent mistakes from becoming too costly and work out any kinks on the model before scaling up. In the small-scale model, I will simulate a fermentation vessel as a soda can - basically this will become a desktop soda cooler. If you are innovative and modify the circuit to allow for a change in the polarity (or just switch the leads) across the Peltier device, you could also have this work as a coffee warmer as well. This is one of the great things about these devices, the ability to use them for both cooling and heating.
This post will mainly focus on the control system and interface that I have developed for controlling the temperature of the vessel of interest. When controlling the temperature, the only way to go is by setting a temperature set-point and using loop feedback control. The algorithm for controlling the device to reach this temperature can be quite a bit more involved, ranging from proportional control up to proportional-integrative-differential (PID) and even on to fuzzy logic. Initially, for my system I have elected to go for proportional control since it is one of the simplest forms of control and it allows for the opportunity to just add on to it if it seems inadequate.
For the size of peltier device that I am using (CP40336, Digikey part no. 102-1671-ND), I designed a circuit that could handle its max current of 3.9 amps. This circuit that can not, however, handle currents that would be required by my large fermentation cooling system, which may be in the 20+ peak amps range. The current to the peltier device is controlled by the IRF510 MOSFET (shown in circle A below) and has a max continous drain current of 4 amps, with a pulse drain of 20 amps. Note that these types of devices will need a heat sink as they get very hot. I chose this device because it is voltage controlled, which means it uses much less current than current controlled transistors, such as BJTs and it can be much simpler to control since we can control voltage straight out of the microcontroller. In addition, this device is also logic level controlled, meaning that I can control it with voltages that are in the range of my 12 V power supply. I will be using a AC-DC power supply that can provide a few amps like this one: VM 80W12.


Since we are driving the op-amp with pulse width modulation from the microcontroller, the signal needs to be smoothed out a bit to give a near analogue signal. This is the function of the 0.68 uF capacitor - that's what capacitors are really good for, smoothing out voltages since they act much like a damper in a suspension system.

The feedback to the controller is supplied by means of an analog temperature sensor, a LM34. This device is supplied 5V and delivers a voltage signal that is proportional to the temperature. In the case of teh LM34, it delivers 10 mV for every degree Fahrenheit, i.e. 70 deg F will give you 0.7 V, -20 deg F will give you -0.2 V. This device has an accuracy of 1 deg F and that should be good enough for our application. There are a lot of temperature sensing devices out there, from thermocouples to RTDs to digital output sensors. All have advantages in certain applications such as speed, accuracy and size. I like this one because it is simple to use and has good enough resolution. The LM34 is hooked up to my analog to digital converter pin on my microntroller. The microncontroller can then take this signal and use it in it's calculations to figure out if it's too hot or cold.
The LM3805 power regulation circuit in circle C supplies the required 5V to the micro controller and it's various LEDs and sensors. Notice that I tap into the regulated 12V supply before the 5V regulator for power to the op-amp and peltier device. I wouldn't recommend any large currents running through your control circuits - this may blow out your microcontroller.
To set the temperature, I'm using a button and potentimeter. I press the button to enter the set-temperature mode. I know I'm entering and have entered this mode by the flashing LED that then stays on solid. The potentiometer is attached to another analog to digital converter pin on the microcontroller. It uses the value of the voltage across the wiper of the potentiometer to calculate what temperature you want to set the contoller at through some calculations in the software. In the software, I can set the range and steps that this voltage relates too in terms of temperature. Once the temp is set, I press the button again, and the set-temp LED flashes to let you know that you are exiting the set-temp mode.
The current temperature and the setpoint temperature are displayed on a dual LED 7 segment display. Since I don't intend on going above 100 deg F or below -10 deg F, two digits seems to be enough. I created this as a separate circuit so that I could use in various projects as shown below. I used a MC14489B (the schematic shows the incorrect part number) display controller and it can be used to control up to 5 digits (banks). This takes the burden off the microncontroller to constantly display the values - the picaxe justs send over values to the MC14489B when it wants the display to change.
I have other diagnotic LEDs on the board to tell me the whent he 5V power to the board is on (Power_OnLED) and to tell me the power level of the peltier device (TEC_OnLED) - brightness corresponding the the amount of voltage that the op-amp puts out. Two additional off board LEDs were included to show when the user enters the set-temp mode (SET_LED) and when peltier device is active (TEC_ON_LED). This TEC on LED allows the user to know that the system is cooling.
The above circuit diagrams were created using a great and free program called Eagle from CadSoft. In addition to creating the circuit schematics, I was also able to create a printed circuit board once I had finished troubleshooting the circuit on a bread board. Sparkfun has an amazing tutorial going through, in detail, on how to create these PCBs and also offering some references on where to get them made cheaply, though not quickly, as well.

I went from a bread board prototype that looked like this...

The one remaining piece of info needed to get this circuit up and running is the code. I will post the program I used to run the circuit in my next posting since it could be a bit hefty in addition to this post.
hi
ReplyDeleteboss its a nice device i m trying to make a temperature controller with peltier in nmy lab to control temp by heating and cooling my dt is 15 deg
i have got a wonderfull idea from you keep it up
hi..i'm working on portable insulin storage with control temperature using microcontroller. i need your help about my project..
ReplyDeleteHey Villacherman, is it possible I could get a copy of your schematics. I cannot read the ones posted here, not enough resolution. I intend to build something similar. Thanks.
ReplyDelete