# Hlt Controller



## matho (20/1/10)

i have almost finished my temp controller for my hlt
it uses a pic microcontroller, a ds1820 ic temp sensor and it drive a 16 amp triac

here's a few pics














sorry about the crappy pics

future plans is to add PID i have got the program just have to sort out a menu system
add a HLT volume gauge using load cells and a opamp going into one of the ADC inputs i have the circuit put together just have to add the load cells and calibrate and write the program. In the distance future add a second triac to control a heat exchanger for a herms system.
ill add some schematics when i have finished them.

cheer's matho


----------



## Pumpy (20/1/10)

This looks cool Matho is it expensive do I have to be a comp nerd to install

pumpy


----------



## woodmac66 (20/1/10)

Pumpy said:


> This looks cool Matho is it expensive do I have to be a comp nerd to install
> 
> pumpy


I am with you Pumpy I feel like a dummy just looking at the pictures !!!
Bloody awesome!


----------



## Gout (20/1/10)

nice nice nice - work

an electronic eng i guess?

i made a custom controller but got lazy and went for a off the shelf PID. I wish i came up with something like you have made

beer control porn


----------



## matho (20/1/10)

pumpy it cost about $60 all up 

$15 for the ic
$25 for the lcd
$10 for the triac and optocoupler
$10 for the buttons and proto board 

the box was in the bin at work but to buy would cost a bit the rest of the stuff was sourced from things lying around the house.
i used pic basic pro to write a program for it, i did a bit of basic programming when i was at school but i picked it back up faily easily
working out how to get the pic progammed without spending $100 on a programmer took a while but have got it sorted now and the circuit is very simple and the software is free. ill post more when i have finished some small things

cheer's matho


----------



## matho (20/1/10)

Gout said:


> an electronic eng i guess?




no just a sparky


----------



## Pumpy (20/1/10)

matho said:


> pumpy it cost about $60 all up
> 
> $15 for the ic
> $25 for the lcd
> ...




I will get one and come and see you is hazelbrook Docs country ?


----------



## Pumpy (20/1/10)

woodmac said:


> I am with you Pumpy I feel like a dummy just looking at the pictures !!!
> Bloody awesome!



You make me feel not alone woodmac


----------



## gap (20/1/10)

Hello Matho,

How are you? You have me interested even though I know crap all about this stuff.

The hop plants you gave me are battling on. 

Regards

Graeme


----------



## matho (20/1/10)

pumpy, im in the mid mountains full of hippies, stoners and metal heads :lol: ,mate when im finished if you like it i can program the PIC in about 1 min and the circuit is not very complicated.

gap I'm going well ,glad to hear about the hops mine got shreaded by a recent hail storm but they are bouncing back.
when im finished with my plans i can help you make one it just might take a while because i have been hitting it faily hard lately and i think swmbo is getting the shits so i might lay off the electronics for a few weeks maybe ill brew instead :lol: 

cheer's matho


----------



## andytork (20/1/10)

I built a similar one over Christmas. I went for the lowest cost option. Set myself a challenge of building the whole thing for under $20 each building 5+ (which included budget for a professional PCB etc)

I went the AVR (mega8) cpu, used relays instead of triac, a zener for the PSU etc

My costs were

AVR Mirco $2
Relays $2 ($1 each, one for heat, one for cool)
PCB $7
LCD $2 (used an 8x2 character)
DS18B20 $2.60 (Can get cheaper in qty, i only bought a couple)
Buttons $1
Case $2 (total design is smaller than a fridgemate)
Extras $3 (covers zener, resistors and capacitors)

Total came in just over $20, but I could have easily reduced cost by volume.

The program took me about a day to write , don't have any picture of final item as I never commisioned the PCB's so my proof of concept was on breadboard etc.

Here is the schematic (attached file , probably won't show in message)







Don't have any intention of building it properly as I have just ordered an arm controller board that I intend to use for my next project. So if you want to have a nosey at the code / schematics / PCB design drop me a PM and I can send over

Andy


----------



## Gout (20/1/10)

well done lads - i am going to try talk my uni into letting me make a brewery for my final yr project - they most likly wont let me but if they do i would like to make something similar


----------



## gap (21/1/10)

matho said:


> gap I'm going well ,glad to hear about the hops mine got shreaded by a recent hail storm but they are bouncing back.
> when im finished with my plans i can help you make one it just might take a while because i have been hitting it faily hard lately and i think swmbo is getting the shits so i might lay off the electronics for a few weeks maybe ill brew instead :lol:
> 
> cheer's matho


Hello Matho,

Thanks for the offer . I am in no hurry , would appreciate your help at your convenience.

Regards

Graeme


----------



## alowen474 (21/1/10)

I can see the sheds and the silos and the yards, are you putting the animals in next?


----------



## clintmo (21/1/10)

How do you use low voltage dc to control high voltage ac?


----------



## andytork (21/1/10)

clintmo said:


> How do you use low voltage dc to control high voltage ac?




A triac or relay can be used to switch AC from DC , the OP used a triac, I used 2 relays (one for heat, one for cool)

my relays were 5vdc coil with 10amp 240vac switch contacts, you could also go solid state relay, but would have cost an extra $7 each for 20amp versions

Andy


----------



## andytork (21/1/10)

Just a quick note on my circuit:

It contains 240 volt electricity to operate. The psu uses a transformerless zener circuit which means if not done correctly or becomes faulty has the potential to make the whole circuit (and anything attached to it) 240 volts. 

DO NOT OPERATE WITHOUT AN ENCLOSURE, ALWAYS TREAT AS LIVE

Andy


----------



## matho (21/1/10)

here are the schematics

the mainboard




the pushbuttons




and the output board





how the output board works is when the output pin goes low current starts to run thru the opto and the led which cause them to light up i put the led in to indicate if the output is on or off, the opto then drives the larger 16 amp triac this is exactly the same circuit that is in a SSR except the opto shows zero crossing circuit but the one i have does not have it.

cheer's matho 

edit: a word of warning even when a triac is turned off there can be a leakage voltage so treat it as alive and put a switch on the incoming supply so you can isolate it.


----------



## technocat (22/1/10)

clintmo said:


> How do you use low voltage dc to control high voltage ac?



With one of these, or a triac circuit as in a motor speed controller or a light dimmer.

View attachment 35028




<_<


----------



## matho (29/1/10)

here is a corrected schematic of the main board




also here is the hex file and pic basic pro program

View attachment Hlt_controller.txt
View attachment Hlt_controllerprgm.txt


here is also the circuit that i use to program the pic

View attachment picpgm_lvisp_v1.01.pdf


i didn't use the surface mount chip but a 7405N instead and the software can be found here it works very well and is cheap

cheer's matho


----------



## matho (2/2/10)

just an update ran the controller yesterday all worked well might need a little tweaking to get everything right

cheer's matho


----------



## matho (15/6/10)

ok it has been along time but i finally got around to stage two of the project. Volume measurement of the hlt
i got 4 load cells off a cheap electronic scale, they have two variable resistors in them one goes up with load and the other goes down. I wired them up into a wheatstone bridge arrangement, then put the output of the bridge into a high input impedance dc instrumentation amplifier. I have setup the amplifier so that full scale = 5v = 102.3kg, that should give me a 100 gram resolution when used with the 10 bit ADC on the PIC. I calibrated the amplifier today, with 25l it was low by 100ml so i think it is good enough.

ill get more schematics and pic up later.

cheer's matho


----------



## matho (16/6/10)

ok here are some schematics





R1 adjusts the gain of the amp and R2 adjusts the supply voltage. R2 is needed because the amp can only supply an output voltage that is about 1.5v below the supply voltage so when i went to calibrate it, i first set the gain to full on the amp then adjusted the supply voltage to give an output voltage of 5v that would be full scale of the analog to digital converter. Then i adjusted the gain of the amp to give me a voltage rise of about 48.8 mV per litre of water.

R3,4,5,6 are there to represent the load cell, the 4 load cells are arranged into a wheatstone bridge so that two opposing sides go up with load and the other 2 opposing sides go down.





updated mainboard










some really bad pics

the whole sensor cost me about $30

so now i have to change the program to include the sensor.

cheers matho


----------



## leiothrix (16/6/10)

Silly question - what are you using to draw your schematics?

Rob.


----------



## matho (16/6/10)

leiothrix said:


> Silly question - what are you using to draw your schematics?
> 
> Rob.




i use a program called cadsoft eagle its free with limitation of 50 components just google it


cheers matho


----------



## RdeVjun (16/6/10)

Very interesting matho, exquisite use of cheap components and I'm certainly in awe of the ingenuity! :super: 

FWIW, for work I just spent >$24K on 4 * CR1000s, 8 * AM16/32B MUXes (both CampbellSci) and PT load cells, can only resolve ~300g in a similar sort of thing. Slight difference is, I have 28 platforms with 84 cells, in groups of 3 for up to 1500kg! The data stream is pretty wide for that project but it is already delivering results... 
BTW, looking to test some of these TI ADS1234 MUXes over the winter, 24bit and <$100, but it would be hard to justify (and integrate) in your setup, the 100g resolution you have already should be quite sufficient I would think. :icon_cheers:


----------



## matho (17/6/10)

thats a nice little chip there RdeVjun, i was thinking of using microchips programable adc but as you said 10 bit resolution should be fine. I am worried about noise as the gain is above 200, might get it on my father in law's CRO to see the noise could need some fitering  

cheer's matho


----------



## MHB (17/6/10)

Totally OT

Mate is it Matho or Metho cos thats a Methanol in your avatar

Bad Alcohol

MHB


----------



## matho (17/6/10)

MHB said:


> Totally OT
> 
> Mate is it Matho or Metho cos that's a Methanol in your avatar
> 
> ...



 i was wondering when someone would notice, just a joke on the chat that chappo continues with, i had 'meth' up as my avatar for a while but thought metho better.

cheer's 
steve


----------



## matho (21/6/10)

so today i got around to programming the pic and trying it out 

here are some few pictures

the setup




with 10 l in the tun




with 15 l in the tun




i have a few things to fix up like how it zero's its self, i have already changed the program just have to reprogram the chip and try it out. It seems fairly accurate and linear so im happy with the result.  
when i have tried out the changes ill post the code.

cheer's matho


----------



## matho (22/6/10)

I have fixed a few bugs and are now very happy with how it works. 
attached are the hex file and the pic basic program

View attachment Hlt_controller_2_Hex.txt


View attachment Hlt_controller_2_program.txt


and here is the final mainboard schematic




well thats it for the time being in the distant future ill be adding pid control but im in no hurry to do that.

thanks for reading and i hope this has inspired a few to do similar projects 

cheer's matho


----------



## QldKev (22/6/10)

matho said:


> i was wondering when someone would notice, just a joke on the chat that chappo continues with, i had 'meth' up as my avatar for a while but thought metho better.
> 
> cheer's
> steve




and I thought it was your pom pom dog... 


QldKev


----------



## leiothrix (22/6/10)

matho said:


> thanks for reading and i hope this has inspired a few to do similar projects



Thanks for sharing :icon_cheers: 

Rob.


----------



## matho (22/6/10)

QldKev said:


> and I thought it was your pom pom dog...
> 
> 
> QldKev



yeah it kinda looks like that doesn't :lol: 



leiothrix said:


> Thanks for sharing :icon_cheers:
> 
> Rob.



no worries rob i had fun doing the project and liked sharing it with others.

cheer's steve :icon_cheers:


----------



## gap (22/6/10)

Great work Steve,

I will have to come down and see it in action soon.

regards

Graeme


----------



## matho (22/6/10)

gap said:


> Great work Steve,
> 
> I will have to come down and see it in action soon.
> 
> ...



that would be great graeme I'll let you know when I'll be brewing next no doubt it will be the first time I'll use the volume measurement in anger

cheer's. Steve


----------



## MHB (23/6/10)

Ethanol is sometimes called the read headed dog, and water the Mickey Mouse Molecule, ah-well the things pissed chemists come up with
View attachment 38942
View attachment 38943

MHB


----------



## Zizzle (8/11/11)

matho said:


> ok here are some schematics
> 
> View attachment 38811
> 
> ...



Only just catching up on this thread after matho posted in the arduino thread.

Very neat solution.

Just wanted to point out that you can get pretty cheap instrumentation amplifiers on ebay these days, like the AD620 or INA129 that simplify the circuitry. They can swing pretty close to the supply rails and can achieve gains of 1000 needed for load cells like this very easily. Just one external resistor needed to select the gain.






Stolen from this article:

http://www.ehow.com/how_5980113_make-load-...se-arduino.html


----------



## matho (9/11/11)

Zizzle said:


> Only just catching up on this thread after matho posted in the arduino thread.
> 
> Very neat solution.
> 
> ...



ahh alot easier, i didn't even search for another solution i just went with a single supply instrumentation amplifier, Im really happy with how it is working it has made brewing more repeatable knowing my exact volumes in my HLT 

cheers steve


----------

