Arduino Development Thread

Australia & New Zealand Homebrewing Forum

Help Support Australia & New Zealand Homebrewing Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Cheers Doogs, Checked the site a couple of days ago for a customer and the chart was full of zero's.
2 for 1!
$2.50 each!
Madness!
 
Hey Guys,

good to see this thread is still crawling along, i've made some more progress on HABS :D

some pics here

hopefully get some time to brew this weekend and i'll have some more updates

Rob.
 
Sweet Rob !

Good to see that it has progressed somewhat.

I've aactually had a little time recently to work on my implementation as well. Still struggling with the LCD and reading via I2C. Pain in the butt too.

Quick question Rob, did you use a Serial enabled LCD or just wire up a heap of pins from the arduino and drive them all ?

gary.
 
I wired mine up in parallel in 4 bit mode.
 
Quick question Rob, did you use a Serial enabled LCD or just wire up a heap of pins from the arduino and drive them all ?

Hey Gary,

I didn't see any sense in wasting pins so went serial, the way i see it as the project grows i will need almost all the pins.

here's what i'm using so far, i'll make my full code available but it needs tidying up and more notes added first!

Code:
int Pin0 = 0;				// Digital Pin 0, IC Pin 2 (RX for serial)

int Pin1 = 1;				// Digital Pin 1, IC Pin 3 (TX for serial)	// LCD Screen



int Pin2 = 2;				// Digital Pin 2, IC Pin 4		NESPAD STROBE/LATCH 

int Pin3 = 3;				// Digital Pin 3, IC Pin 5		NESPAD CLOCK 

int Pin4 = 4;				// Digital Pin 4, IC Pin 6		NESPAD DATA



int PinTemp = 5;			   // Digital Pin 5, IC Pin 11	 TEMP SENSORS

int PinFloat = 6;			  // Digital Pin 6, IC Pin 12	   FLOAT SWITCH IN HLT/KETTLE

int PinSpeaker = 7;			// Digital Pin 7, IC Pin 13	SPEAKER

int Pin8 = 8;				  // Digital Pin 8, IC Pin 14	   **SPARE** 



int PinElementHlt = 9;		 // Digital Pin 9, IC Pin 15	  SSR FOR HLT/KETTLE ELEMENT

int PinPumpHlt = 10;		  // Digital Pin 10, IC Pin 16	  SSR FOR PUMP 1 (HLT TO MASHTUN) 

int PinPumpMT = 11;		   // Digital Pin 11, IC Pin 17	  SSR FOR PUMP 2 (MASH TUN TO HLT/KETTLE)

int PinMotorMT = 12;		  // Digital Pin 12, IC Pin 18	  SSR FOR MASH STIRRER MOTOR

int PinLed = 13;			  // Digital Pin 13, IC Pin 19	  HAS THE STANDARD LED ON IT, USED FOR MONITORING UPLOAD OF SKETCH



int Pin14 = 14;			  // Analog Pin 14 (being used as digital) , IC Pin 23	 **SPARE** 

int Pin15 = 15;			  // Analog Pin 15 (being used as digital) , IC Pin 24	 **SPARE** 

int Pin16 = 16;			  // Analog Pin 16 (being used as digital) , IC Pin 25	 **SPARE** 

int Pin17 = 17;			  // Analog Pin 17 (being used as digital) , IC Pin 26	 **SPARE** 

int Pin18 = 18;			  // Analog Pin 18 (being used as digital) , IC Pin 27	 **SPARE** 

int Pin19 = 19;			  // Analog Pin 19 (being used as digital) , IC Pin 28	 **SPARE**
 
Hey Gary,

I didn't see any sense in wasting pins so went serial, the way i see it as the project grows i will need almost all the pins.

Yea, thats the wa I was thinking. I've got my LCD working with I2C displaying data correctly. I'm just having problems reading from it using I2C. The Serial interface for the LCD I have supports keypads so I was going to use that but can't get reads working. Think I might just use an analog pin and resistors to voltage divide the keypad.

Hope the brew goes well this weekend. Have you done a test batch with just water to make sure everything works correctly yet ?

gary
 
Hope the brew goes well this weekend. Have you done a test batch with just water to make sure everything works correctly yet ?

Hey Mate,

Yeah i've done about 5 test batches with water now, took me that long to get the system calibrated correctly.
eventually i'll build in some code for self calibration so if i change vessles or someone else uses the code it should
take less time to setup.

I'll keep u guys posted.

Rob.
 
Hey Guys,

Hope u all had a good weekend, needless to say mine was awesome. I've updated my website above with some pictures of the brewday using HABS.

Here are a couple more of errors i need to fix!


err1screen.jpg

hmm....

err2screen.jpg

1 out of 4 correct, that's not even half!

Rob.
 
Hey Guys,

going to get a bit more work done on HABS!

Hardware wise i need to get a bigger mash tun and a mash stirrer driven by a motor sorted.

Software wise i need to get some code knocked up for some more bits and pieces

1.) Mash stirrer, should be easy enough

2.) Control power output to the Heating Element in the Boil Kettle/HLT

3.) Maintain mash temperatures (and down the track for temp step control)

2 & 3 are also going to be used as standalone units for a ausdb's All-in-one Electric Brewery or minihabs as he's calling it :lol:

Here a quick idea that i've come up with

boilkettle.jpg

Boil Kettle, to control the output power of the Heating Element so it doesn't boil to hard

mashidea.jpg

Mash Temp

basically once it gets to 90% of the Desired Mash Temp then it starts gradually reducing the output power to the Heating Element so it doesn't
overshoot the Desired Mash Temp, kind of like a poor-mans-pid, this could also be used for the sparge water step in the HLT

What do you think?

Rob.

EDIT: I've also added the source code to my website, yeah it needs a clean up and is a constant work in progress but is available if anyone wants a squizzy
 
Looks okay to me Rob, but I don't know much about this side of things. I guess a test would be the only way you'll truly know, but I can't see anything obviously wrong.
From the info we got from newguy, we don't seem to have to worry about the lag of the elements, so I'd say your figures above look good.
 
Hey Gary,

I didn't see any sense in wasting pins so went serial, the way i see it as the project grows i will need almost all the pins.

here's what i'm using so far, i'll make my full code available but it needs tidying up and more notes added first!

Code:
int Pin0 = 0;				// Digital Pin 0, IC Pin 2 (RX for serial)

int Pin1 = 1;				// Digital Pin 1, IC Pin 3 (TX for serial)	// LCD Screen



int Pin2 = 2;				// Digital Pin 2, IC Pin 4		NESPAD STROBE/LATCH 



......



int Pin18 = 18;			  // Analog Pin 18 (being used as digital) , IC Pin 27	 **SPARE** 

int Pin19 = 19;			  // Analog Pin 19 (being used as digital) , IC Pin 28	 **SPARE**


Is why i use the PIC18F452, it has 40 of them ;) What's an Arduino anyway? Are they better than PIC's?
 
Is why i use the PIC18F452, it has 40 of them ;) What's an Arduino anyway? Are they better than PIC's?
Technically, arduino is a development environment and bootloader for the Atmel AVR. The most common AVR used in arduino is the atmega168, but the atmega8 and the atmega328(apparently) will also work.
 
Hey Guys,

going to get a bit more work done on HABS!

Hardware wise i need to get a bigger mash tun and a mash stirrer driven by a motor sorted.

Software wise i need to get some code knocked up for some more bits and pieces

1.) Mash stirrer, should be easy enough

2.) Control power output to the Heating Element in the Boil Kettle/HLT

3.) Maintain mash temperatures (and down the track for temp step control)

2 & 3 are also going to be used as standalone units for a ausdb's All-in-one Electric Brewery or minihabs as he's calling it :lol:

Here a quick idea that i've come up with

View attachment 25926

Boil Kettle, to control the output power of the Heating Element so it doesn't boil to hard

View attachment 25927

Mash Temp

basically once it gets to 90% of the Desired Mash Temp then it starts gradually reducing the output power to the Heating Element so it doesn't
overshoot the Desired Mash Temp, kind of like a poor-mans-pid, this could also be used for the sparge water step in the HLT

What do you think?

Rob.

EDIT: I've also added the source code to my website, yeah it needs a clean up and is a constant work in progress but is available if anyone wants a squizzy

Very similar to how I handled mine, but rather than a % of power, I used a % of 4 second time frame to modulate the power, so if I turned it on for 3 seconds out of 4 seconds, that was 75% over that duration, then resampled temperature and recalcualted. Works pretty well, but took quite a bit of time to get % over the 4 second period correct! Several brews with lots of pouring over sampled data each time. Very much like a poor mans PID, but hey, it worked!

Go For It!

That all said, I bought a PID controller the other week :lol:
 
10 read mash temp
20 mem *dont forget to pour beer*
30 if temp = 65 then goto 50
40 if temp > 65 then goto 10
50 if temp = 65 then wait 60mins
60 pour another beer
70 when time=60mins open valve
80 if kettle is not under mash tap then sound alarm
90 pour another beer
100 check lazy brewer has responded to alarm
110 keep mash valve open
120 goto 100
130 check response to alarm, then goto 140
140 kick lazy brewers ***
150 check ferm temp
160 if ferm temp < 18* then pitch yeast
170 if ferm temp > 18* then pitch yeast
180 check ferm temp
190 pour beer
200 relaxe and log onto AHb
210 pour another beer
 
10 read mash temp
20 mem *dont forget to pour beer*
30 if temp = 65 then goto 50
40 if temp > 65 then goto 10
50 if temp = 65 then wait 60mins
60 pour another beer
70 when time=60mins open valve
80 if kettle is not under mash tap then sound alarm
90 pour another beer
100 check lazy brewer has responded to alarm
110 keep mash valve open
120 goto 100
130 check response to alarm, then goto 140
140 kick lazy brewers ***
150 check ferm temp
160 if ferm temp < 18* then pitch yeast
170 if ferm temp > 18* then pitch yeast
180 check ferm temp
190 pour beer
200 relaxe and log onto AHb
210 pour another beer

Hmmm, don't think I'll use that one. You'd never get it finished ! From 120 you go back to 100, then 110, then 120 again. Infinite loop !

Sorry, the fiend that is my day job got loose !


gary
 
Mash Temp

basically once it gets to 90% of the Desired Mash Temp then it starts gradually reducing the output power to the Heating Element so it doesn't
overshoot the Desired Mash Temp, kind of like a poor-mans-pid, this could also be used for the sparge water step in the HLT

You need to be careful here because, depending upon how you implement it, you may never actually reach your mash temp. If you keep reducing the power to the elements more and as you get closer and closer to mash temp you won't quite ever get there.

I'd be going the PID option, or a slightly less 'poor-mans' PID option. There are quite a few PID implementations around on the web written for the Arduino. Depending upon how much memory you have left you might be able to squeeze one in.


I've actually had a chance ot get a little more work done on my implementation lately as well. Not going completely automated though. I'm mainly after something to maintain strike water and mash temps as well as remind me when to add the hop additions during the boil. Mine's going to double as a fermentation controller as well, just because !

gary
 
Yes...I knew 100 would be an issue :lol: ....might have to put a gosub in there... B)
 
Maybe it should just be the following:

while (true)
{
Pour beer
Drink beer
if (keg = empty)
{
cry
if (Reading AHB)
Send SWMBO for more beer
else
Brew beer
}
}


Looks good to me !

gary
 
Nothing is easier than a dog's firmware:

[codebox]while (TRUE) {

if (!screw_it && !eat_it) {
piss_on_it();
}
}[/codebox]

:lol:
 
10 rem * check keg*
20 if keg = empty then got 30
30 send swmbo to bottle shop
40 ring lawyer
 
Back
Top