# My Temp Control Setup



## Zizzle (8/6/06)

I suspect there are some techies/engineers here that would get something out of this post. Pat actually asked me to do this in laymans terms, but that is harder, and may come later.

I got the temp control unit from brissybrew which is great, but at about the time I set it up, ambient temps were swinging below 12 over night and over 25 during the day. I didn't really have an idea of how warm/cool it was getting downstairs. I figured I would really needed to cool and heat, but the simple little controller will only do one at a time.

I've got a Systems Engineering degree so I figured I could probably sort something out. So after scouting arount, I worked out I could get a digital multimeter with RS-232 output for about $50. Not bad, but that would be only one sensor. Low speed data aq gear can be had for $25 to hook up to a PC. But I would need to buy and wire thermocouples.

Then I found the DS1820. It can be wired up to a PC pretty easily. 1-wire bus with parasitic power it very cool. Linux drivers. I was set. 

http://www.linuxfocus.org/English/November...rticle315.shtml

Now price in aus: $20 each. WTF? Go to the dallas semi website and they are listed at US$3. That is quite a markup for something the size of a transistor. But wait, they send out FREE samples. Great.

So the plan is, put some sensors in the fridge, wire up some relays to switch the fridge and a globe inside, write some software to controll it from a PC. Easy.

Then I discover the old laptop I have been saving for just such an occasion has a dead hard disk.

Plan B: run enough cable up stairs to a PC there. Also to make cabling easier by using CAT5, and so RJ45 sockets at each end.

Wire the circuit to drive the DS1820 into the serial port plug.






Next snag, I need to drive 2 relays, but there is only one output left on the DB-9 RS-232 port. Need to get some more outputs from the parallel port. Oh well not as neat but will do the job:





I find an 8-way relay board in my junk boxes. Should do the job. The relays are rated 5A. I will wire 2 pairs up in parallel just to be sure.

Relay coils need a fair bit of juice. Not really, but more than I want to draw from the poor old PC parallel printer port. The box will have mains in it, so simple to add a small transformer. Jaycar $7. Jam some leds on the front for power, heat, cool. Couple of 3.5mm audio jack for connecting the DS1820s to the bus. All in a jiffy box.














Bit of heat shrink tubing around the DS1820s:






Total spend: about $20. Plus a few hours stuffing around soldering and drilling holes in the case. 

Results:





So it turns out that after all that, that the temps inside are actually quite stable, and around the right value.

Oh well it was fun anyway.


----------



## PistolPatch (9/6/06)

I'd just like to say that I reckon Zizzle is going to come up with some great stuff for us AHB'ers. The above, (I think!), is a really simple and cheap way of controlling your fermentation temps via computer.

I met him last weekend on a brew day and he told me about the above which I could only half take in as I was busy co-ordinating hop additions and drinking beer. Was still really impressed. The long and short of it is that this guy can basically do anything with probes and software. I actually demanded that Zizzle make a post on what he had achieved as it was pretty amazing.

Zizzle just sent me a PM saying,



> I just did a post about my temp control setup. Filled with geek speak, I hope you can follow it.



My answer is basically, "Zizzle, I cannot follow it at all! I have no idea what DS1820 is but certainly know what, WTF means!"

As Zizzle said though, "Pat actually asked me to do this in laymans terms, but that is harder, and may come later."

Zizzle, you're a champion giving such a detailed post. As for the technical side, I cannot comment. I know there are a heap of IT guys on AHB who will understand the above readily. Probably some electrical engineers out there as well.

God knows what will happen to AHB when you meet BrissyBrew!

Well done mate with the pics and all. I hope everyone here on AHB looks after you so as we reap the benefits of your thinking asap.

Cheers
Pat

EDIT: My long-windedness here is a result of way too much Scwarzbier - sorry about that!


----------



## Screwtop (9/6/06)

Neat Zizzle, so how did you drive the relays, are you using your small relays as primary relays to switch ac to the switch relays.


----------



## BrissyBrew (9/6/06)

Amazing! I was looking at some USB controllers awhile back but the cost was up and was not sure if most people had a spare PC to plug them into. I love the temp log though. I note most of the temp spikes were early on probably when the yeast were generating heat.


----------



## paulc (9/6/06)

Awesome zizzle.

As an electrical engineer turned software developer who has very recently discovered brewing, I have had a similar idea. I've got my samples of the DS1820, and will be building the serial interface soon. I plan to port the software to Windows, as that's what my home PC is running. I'll post the details when i eventually get it running. B)


----------



## Chad (9/6/06)

Jizzle: Is that thing plugged directly into your LAN/computer?

While I'm still collecting my brew gear, a computer controlled/monitored brew house is something that I have thought about quite a bit. But, unfortunately don't posses the electrical or programming skills to undertake such a project. I can program in VB but only up to an intermediate level but definitely not port control.

Things that I dream about are:
Monitor room and fridge's internal ambient temp
Monitor individual fermenters temp, preferably up to 4 carboys
Monitor the flow from each keg, this would then allow for determining keg levels, and you could even have a warning when the kegs reach a certain level
Enter some key details on each fermenter and keg
Obviously obtain graphs and reports on the data collected
The hardware could be modular depending on what features you wish to build/buy
This would look great on a large virtual dashboard kind of graphical user interface. Big dials and read outs.

Like I said, I don't know crap and this is merely a dream for me, but would make a fantastic open source project. I would only be able to help with the GUI and graphics though


----------



## devo (9/6/06)

great post. 

I have a good friend who is way more electronics savy than myself. He's planning on building me a control box for my AG brew set up.


----------



## Gulf Brewery (9/6/06)

paulc said:


> I've got my samples of the DS1820, and will be building the serial interface soon. I plan to port the software to Windows, as that's what my home PC is running. I'll post the details when i eventually get it running. B)



Just to make it easier for everyone
1. You can buy the serial interfaces already made up for the DS1820's (and other 1 wire devices). They are expensive to get shipped unless you want a few of them (bulk buy!)
2. The digitemp software is available that will read the DS1820's for you. 
3. You can graph the temperatures using dtgraph  or rrd

You can get the DS1820's cheaper in Aus, do a search and you will find a few suppliers, should be around the $6 to $7 each mark. 

I have dtgraph setup to send an SMS when the temperatures get out of range in the brewery. 

Cheers
Pedro


----------



## Screwtop (10/6/06)

Bump. All this "White Man's Magic" in the brewery. Methinks homebrew has gone hitech.


----------



## Doc (10/6/06)

Very nice Zizzle.
I've been using the DS1621 temp chips for the last 4 years and they haven't missed a beat.
On the graph software I found PHPlot to be really good as I could write the web interface to provide the queries of what to graph, then return the graph to your browser in real time.
More detail in this topic if if you are interested.

Beers,
Doc


----------



## Crazy (10/6/06)

We found some nifty little usb electronic kits a while ago. Four dig out, 8 dig in and most important 2 0-5v analoug in. 

Four of these can be used in one machine and are adressable. The kit from memory is about $70 and bought in Australia and the little lm35's which act as neat little temp sensors range fron about 50c to $8 depending on their range and accuracy. 

The kit comes with the demo software in both VB and C++.

This was going to control our fermenting fridges and cold room but I recently got my hands on an Allen Bradley SLC503 with all the required cards to take over the world.

The main concern I had with using a pc was stability as I would hate to go away for the weekend and come back to find the computer had crashed and my pils fermenting at 30 deg.  

Regards Derrick


----------



## Zizzle (10/6/06)

Pat: Yeah, we'll have to give you a crash course in electronics, then build you a similar but smaller setup based on an old car fridge.

Screwtop: I'm just using a couple of NPN transistors to switch the relays. The ciruit is so trivial I didn't even bother to do a diagram. Here is something similar off the web (sorry for the ascii art, couldn't find a gif):


```
Vcc

							  |

							  +------+

							  |	__|__

							Relay   /^\  Diode 1N4002

							 Coil  /---\

							  |	  |

							  +------+

							  |

		  Diode			| /

		  1N4148  4.7K   B |/  C

parallel  >-|>|-+--\/\/\/--|		NPN Transistor: BC547A or 2N2222A

port data	   |		  |\  E

pin			 +-|<|-+	  | V

			1N4148	|	  |

parallel  >-----------+------+

port ground				  |

						  Ground
```

Brissybrew: the temp spikes earlier on were me playing with the software. Back then it had far more hysteresis. I also wasn't logging the state of the lamp, but the spikes are actually caused by the heater going.

Chad: It's not connected to ethernet, although as you can see ethernet cabling is used. The CAT5 goes straight from the jiffy box to the DB9 serial plug on the PC. Also the DS1820 only need a twisted pair bus. That means you could easily hang your 6 or more sensors of the one twisted pair (wire).

Gulf Brewery: Yep, have seen the ibutton stuff. I actually ripped about 600 lines of code out of digitemp to write my control software. The SMS alarm is a good idea. Also need to sound an alarm if any of the cabiling gets knocked out. But yeah, everyone seems to have a pet graphing software.

Doc: I have done a PostgreSQL backed system with web frontend at work for much more complex data (and gigabytes of it). Used python to generate the pages, I'm not real big on PHP. Also ended up using ploticus to generate the graphs, which I modified to be able to query the db directly. I think the author has added a similar capability in the code now, although I don't think he used my patches.

Crazy: I wouldn't trust my brews with windoze. But I've had linux boxes take a pounding and stay up for years. On power failure then can be setup to restart the monitoring software. Either that or get a UPS.

This page also provided some inspiration: http://www.lemis.com/grog/brewing/temperature-control.html


----------



## Foz (15/6/06)

Yo Zizzle,

Just stumbled on this thread today! Nice Fkn work bro - looks sweet as when drawn up in the graph. 

I'm sure there's plenty more this 'avenue' of monitoring temps etc can develop! You'll have a pro brewery set up in no time! Not to mention the fact that it'll all be AG of course!


----------



## pbrosnan (7/2/08)

Hi all,

I just found this post and thought people might be interested in another method of remotely monitoring their fridge temp. Found a couple of kits that allow a temperature to be sent via RF back to my PC where I have a (Java) program that reads the data off the serial port. It's not a controller but still allows you to keep an eye on the temp in the fridge. I have a separate Dixell with probe in a thermowell controlling the fridge. The sensor kit allows for up to 4 probes, I have one in the fridge and one monitoring ambient room temp. Let me know if anyone wants details of the kits. I've attached a pic of the java prog, it can be minimized to the SysTray which is handy. I also have some graphing via a free graphing package for Java

cheers

Patrick


----------



## the_fuzz (7/2/08)

pbrosnan said:


> Let me know if anyone wants details of the kits.



Yes please


----------



## BrotherNutz (7/2/08)

Or, you could do away with having a PC sitting there taking up real estate and go picaxe.......

http://members.iinet.net.au/~u9013943/picaxe.htm

BN


----------



## pbrosnan (7/2/08)

BrotherNutz said:


> Or, you could do away with having a PC sitting there taking up real estate and go picaxe.......
> 
> BN


 Well the PC is the main one next to my desk so it's not in the brewery. All that's in the brewery is the temp kit and the transmitter. The PC has a receiver plugged into the serial port. You can actually view the data directly using a terminal program. I has a look at picaxe but the kits ended up being easier as there was no on-board programming to be done. Just had to write the app to read from the serial port.

I'll have to send the link to the kit supplier when I get home, I'm at work lashed to a PC at the moment.

cheers

Patrick.


----------



## Zizzle (7/2/08)

Well if you are a geek you probably have a PC running in the vicinity to controll your fridge. If not, you can pick up an old laptop for next to nothing and the power consumption is pretty low.

I think the advantage of using a PC is the display of the temp data on a graph in real time (use it as a screen saver).

Having said that, the gear in the first post of this thread is now at another brewers place and he has to run a dedicated PC for it. So we have talked about doing up a small Atmel AVR controller board with some EEPROM to log the data so that it can be loaded on a PC for graphing/archieving. I also have some cheap UHF RF board to try to get a wireless data link.


----------



## BrotherNutz (7/2/08)

pbrosnan said:


> Well the PC is the main one next to my desk so it's not in the brewery. All that's in the brewery is the temp kit and the transmitter. The PC has a receiver plugged into the serial port. You can actually view the data directly using a terminal program. I has a look at picaxe but the kits ended up being easier as there was no on-board programming to be done. Just had to write the app to read from the serial port.
> 
> I'll have to send the link to the kit supplier when I get home, I'm at work lashed to a PC at the moment.
> 
> ...




Does it control the temps? the PICAXE is controlling 5 devices on its output, and that is not using them all either. Displaying temps is great and all....


----------



## BrotherNutz (7/2/08)

Zizzle said:


> Well if you are a geek you probably have a PC running in the vicinity to controll your fridge. If not, you can pick up an old laptop for next to nothing and the power consumption is pretty low.



A laptop in a brewery environment is asking for it I think. PICAXE cost ~$100.



Zizzle said:


> I think the advantage of using a PC is the display of the temp data on a graph in real time (use it as a screen saver).



Like the LCD screen on the PICAXE does. Or a thermometer for that matter.


----------



## ArnieW (7/2/08)

BrotherNutz said:


> Or, you could do away with having a PC sitting there taking up real estate and go picaxe.......
> 
> http://members.iinet.net.au/~u9013943/picaxe.htm
> 
> BN


Nice work BN, I too am a picaxe fan.


----------



## BrotherNutz (7/2/08)

ArnieW said:


> Nice work BN, I too am a picaxe fan.



Handy little gadget aren't they. I got a new LCD screen for a new project I am working on, it has a 4 line by 30 character blue backlit! Very snazzy.

Real power is using the PIC in it's native form, but that is a whole other programming language. My egg-head buddy can program them, but I will stick with picbasic for now I think.

Pete


----------



## Zizzle (7/2/08)

BrotherNutz said:


> A laptop in a brewery environment is asking for it I think. PICAXE cost ~$100.
> 
> Like the LCD screen on the PICAXE does. Or a thermometer for that matter.



Ha ha, I don't have a brewery I just home brew at my house. Not a terrible environment for a laptop. Besides my setup uses CAT5 for the cabling and the PC was acually in a different part of the house.

You can pick up a PentiumII laptop on ebay for about $50. Has much better resolution to display graphs than a little mono LCD. I means graphs like the one in the first post of this thread. Easier to program, and can serve in other roles (recipe software).

Having said all that, I went with an AVR Atmega128 and a 240x64 LCD instead of a laptop to run the brewbot. Far more complicated than this fridge temp stuff.

I have played with the smaller PIC chips. Have written code for them in C and in PIC ASM. Not really a great CPU architecture, but gets the job done I guess. The thing that made me give up on them was they seemed to handle a very limited number of flash cycles. Maybe I had a bad batch, dunno. The AVRs have been much nicer to work with and more reliable.

I would hate to think about having to write the code for a project like the bewbot in BASIC. Eeww.
I think C is a nice middle ground. Easier to learn & use than ASM, but still generates fast, compact and easily maintained code.

Hey Arnie, didn't you use a PC or laptop to run HERMAN at one point? (just catching up on your blog now)


----------



## pbrosnan (7/2/08)

BrotherNutz said:


> Does it control the temps



From my earlier post ...

"It's not a controller but ..."

cheers

Patrick.


----------



## pbrosnan (7/2/08)

Hi all,

Here's the link to the kit supplier. The kits I used are K145 (temp logger), K173 (tx), K 174 (rx).

Have fun.


----------



## ArnieW (9/2/08)

Zizzle said:


> Hey Arnie, didn't you use a PC or laptop to run HERMAN at one point? (just catching up on your blog now)


Hi Zizzle,

yep, that's right. I got a bit sick of windoze crashing and losing all control and at that point I was using pic micros for interfacing anyway. So I'm now using the best of both worlds ...

The pic handles all control and there is a push button panel that handles target temps and turns on pump, mixer etc. This has a serial connection to the PC which can graph the data and also remotely control the whole thing. The PC can do far more complex calculations and effectively automate the process - the pic means I don't lose control if the PC fails.

And mostly these days I run it without the PC - it is just simpler.

cheers, Arnie

PS. Haven't updated that blog for months now - I've been distracted by other beverage projects (or maybe an excuse to bypass the hop shortage ;-)


----------



## Franko (11/5/08)

pbrosnan said:


> Hi all,
> 
> Here's the link to the kit supplier. The kits I used are K145 (temp logger), K173 (tx), K 174 (rx).
> 
> Have fun.





Does anyone else here use the K145 Temp logger here.
I got a couple of samples of the DS18S20 from maxim and been thinking of building one of these kits for a few weeks now

Franko


----------



## Zwickel (11/5/08)

Franco, especially for the DS1820 Ive found a nice little Proggi to record temps over the time for hours, days, weeks month. Its drawing a graph and you can record more than 8 different temps at the same time. All temp probes are wired to the one wire bus.
Its open source software, very nice.

If someone is interested in, Ill post the links to it.

Cheers


----------



## Franko (11/5/08)

Zwickel said:


> Franco, especially for the DS1820 Ive found a nice little Proggi to record temps over the time for hours, days, weeks month. Its drawing a graph and you can record more than 8 different temps at the same time. All temp probes are wired to the one wire bus.
> Its open source software, very nice.
> 
> If someone is interested in, Ill post the links to it.
> ...




Please Zwickel that would be great


----------



## Zwickel (12/5/08)

Franko said:


> Please Zwickel that would be great


okey-dokey, youll need a driver for the one wire:
http://www.maxim-ic.com/products/ibutton/s.../tmex/index.cfm

and the proggi itself, LogTemp: http://www.mrsoft.fi/ohj01en.htm

I have connected the temp probs to the serial port, but its also possible to use an USB port.

:icon_cheers:


----------



## bugwan (12/5/08)

Zwickel said:


> okey-dokey, youll need a driver for the one wire:
> http://www.maxim-ic.com/products/ibutton/s.../tmex/index.cfm
> 
> and the proggi itself, LogTemp: http://www.mrsoft.fi/ohj01en.htm
> ...



Excellent work Zwickel, I've been looking for a native Windows-based logger for ages. I just don't seem to have gotten the search terms right. Currently I'm using a pretty fragile connection between Digitemp (for temp collection), RRDTool (for data storage/graphing) and getting all that to run via a Perl script through IIS...! I challenge anyone else to do it in under 6 months 
Currently it's not actually monitoring brew temps, but that will come...

Thanks again Zwick, I'll be testing this software out tonight...looks the goods!

Dave


----------



## pbrosnan (12/5/08)

bugwan said:


> Excellent work Zwickel, I've been looking for a native Windows-based logger for ages. I just don't seem to have gotten the search terms right. Currently I'm using a pretty fragile connection between Digitemp (for temp collection), RRDTool (for data storage/graphing) and getting all that to run via a Perl script through IIS...! I challenge anyone else to do it in under 6 months
> Currently it's not actually monitoring brew temps, but that will come...
> 
> Thanks again Zwick, I'll be testing this software out tonight...looks the goods!
> ...



I used Jfreechart for the graphing part of the app I built to read the temps from the serial port. Very complete piece of software for no cost and it's OS of course.

http://www.jfree.org/jfreechart/


----------



## Gulf Brewery (12/5/08)

bugwan

I have all that stuff you mention running without a problem. I used the software from here - http://martybugs.net/electronics/tempsensor/
I did have some hassles until I got the correct version of the perl module to do the graphing. 

Cheers
Pedro


----------



## loftboy (12/5/08)

This looks interesting software for monitoring & graphing. Looks like it uses the nomal K145 temp kit that Kits R Us & Ozitronics sell.

http://www.oceancontrols.com.au/data_acqui...K145_Server.htm


----------



## Franko (12/5/08)

I found this software last night while surfing around for the K145


Looks nice and will do all I need to keep an eye on temps for the time being.

Here's a Link to the site

and a few screen shots


----------



## bugwan (12/5/08)

Gulf Brewery said:


> bugwan
> 
> I have all that stuff you mention running without a problem. I used the software from here - http://martybugs.net/electronics/tempsensor/
> I did have some hassles until I got the correct version of the perl module to do the graphing.
> ...



Yep, MartyBugs is my lifesaver. I really set up the DS18S20 as a monitor for my PC cabinet - it runs a bit hot under the TV (up to 40 deg on a hot day!). Here's the current chart. Looks the goods!

It seems there's quite a few bits of software out there, including some that Maxim supplies themselves from here...!. It's called OneWireViewer.

Thanks for all the other links, but now that I've nutted out the RRDTool and Digitemp, it gives me some pretty funky charts. It's just a matter of sorting out a serial to usb converter for the laptop now, which watches over my brewing...

Dave.


----------



## ArnieW (12/5/08)

bugwan said:


> It's just a matter of sorting out a serial to usb converter for the laptop now, which watches over my brewing...
> 
> Dave.


Hi Dave,

this is the one that I'm using - and very happy with it. You just plug it into the usb and a new serial port gets listed.

And fabulous info in these recent threads everyone - thanks, Arnie


----------



## bugwan (12/5/08)

ArnieW said:


> Hi Dave,
> 
> this is the one that I'm using - and very happy with it. You just plug it into the usb and a new serial port gets listed.
> 
> And fabulous info in these recent threads everyone - thanks, Arnie



There's no end of assistance around here...! Thanks Arnie, top work. I also found a temp monitor for Dallas 1-wire probes on the site that Zwickel linked to earlier. It runs as a native windows service, which sounds better than calling a script from a batch file every 5 minutes (which I currently to do create my RRD graphs... Further investigation required  

It's all good stuff.


----------

