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.
I have played around a bit tonight and I'm pleased with how the function is working it has speed up the loop immensely here is the code of the thermostat i have been playing around with, I know it's not the neatest bit of code but it works, now next thing to do is add a PID

//asimplethermostat
#include<LiquidCrystal.h>
#include<OneWire.h>

OneWire ds(11);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
//pushbuttons
constint Button_up = A3;
constint Button_dn = A2;
constint Button_prev = A1;
constint Button_nxt = A0;
constint Heat = 9;
boolean Start = false;
byte Busy = 0;
boolean Conv_start = false;
float set_temp = 20;
float Temp_c;
int temp;
byte data[12];
byte i;

void setup(void)
{
// Start up the library
lcd.begin(16,2);
pinMode (Button_up,INPUT);
pinMode (Button_dn,INPUT);
pinMode (Button_prev,INPUT);
pinMode (Button_nxt,INPUT);
pinMode (Heat,OUTPUT);
}
void loop(void)
{
Temperature();
lcd.setCursor(0,0);
lcd.print("set temp =");
lcd.setCursor(10,0);
lcd.print(set_temp);
lcd.setCursor(0, 1);
lcd.print("Temp =");
lcd.setCursor(7,1);
lcd.print(Temp_c);
if (!(digitalRead(Button_up))&& !(Start))
{
while (digitalRead(Button_up)==0){
}
set_temp=set_temp+0.25;
}
if (!(digitalRead(Button_dn))&& !(Start))
{
while (digitalRead(Button_dn)==0){
}
set_temp=set_temp-0.25;
}
if (digitalRead(Button_prev)==0)
{
while (digitalRead(Button_prev)==0){
}
Start=true;
}
if (digitalRead(Button_nxt)==0)
{
while (digitalRead(Button_nxt)==0){
}
Start=false;
digitalWrite(Heat,LOW);
}
if (Start)
{
if (set_temp > Temp_c){
digitalWrite (Heat,HIGH);
}
if (set_temp < Temp_c){
digitalWrite (Heat,LOW);
}
}

}
void Temperature(void)
{
ds.reset();
ds.skip();
// start conversion and return
if (!(Conv_start)){
ds.write(0x44,0);
Conv_start=true;
return;
}
// check for conversion if it isn't complete return if it is then convert to decimal
if (Conv_start){
Busy=ds.read_bit();
if (Busy == 0){
return;
}
ds.reset();
ds.skip();
ds.write(0xBE);
for ( i = 0; i < 9; i++) { // we need 9 bytes
data=ds.read();
}
unsigned int raw = (data[1] << 8) + data[0];
Temp_c=raw*0.0625;
Conv_start=false;
return;
}
return;
}

Oh and it has also reduced the code size from 7500 bytes to 5200 :)
cheers matho
 
I have played around a bit tonight and I'm pleased with how the function is working it has speed up the loop immensely here is the code of the thermostat i have been playing around with, I know it's not the neatest bit of code but it works, now next thing to do is add a PID


Oh and it has also reduced the code size from 7500 bytes to 5200 :)
cheers matho
Keep up the good work Matho. I did a similar thing with those sensors using picaxe processors a few years back - started the conversion, did other things, then read the temp, repeat ...

It worked well.

Have a great Christmas and New Year. Cheers, Arnie
 
Keep up the good work Matho. I did a similar thing with those sensors using picaxe processors a few years back - started the conversion, did other things, then read the temp, repeat ...

It worked well.

Have a great Christmas and New Year. Cheers, Arnie
cheers Arnie I hope you had a great chistmas and a happy new year too, its a fun learning curve :)

cheers steve
 
Its been a productive break, I have sorted out the PID library and writing to and reading the eeprom, now all that is left to do is the menu system, which I'm sure is going to take a long time to sort out but once that is done it shouldn't be long and ill have the program sorted.

cheers matho
 
Its been a productive break, I have sorted out the PID library and writing to and reading the eeprom, now all that is left to do is the menu system, which I'm sure is going to take a long time to sort out but once that is done it shouldn't be long and ill have the program sorted.

cheers matho
You're putting me to shame matho!! The only thing I've accomplished is the emptying of bottles...
 
G'day guys,

I am coming at this from the other end. I have an electronics and software background and was given a BrewCraft starter kit by my wife for Christmas.

The first thing I thought was "awesome I can automate this using ELECTRONICS!" (yes, I spoke in capitals), because I didn't know the first thing about home brew.

I am doing a lot of reading and have read this entire thread to see where everybody is at, it seems you have it under control but nobody is looking to network their system?

Given that I have only a basic kit, I don't have any kettles or anything, I will purchase a used bar-sized fridge and put my fermenter in there. I will bypass the thermostat in the fridge and control it for cooling and a globe for warming with an arduino set up. My idea seemed similar to the uberfridge (http://www.elcojacobs.com/uberfridge/)

I plan on using:

* Freetronics EtherTen for control

* 8-channel relay module (for future expansion)
http://www.ebay.com.au/itm/170667758574?ss...9#ht_5418wt_905

* 16x2 line LCD
http://www.toysdownunder.com/lcd-5v-yellow-16x2.html

* LCD serial adapter
http://www.toysdownunder.com/serial-lcd-adapter.html

* Temp probes (one in the tank, one to monitor the air in the fridge, one for ambient)
1x http://www.ebay.com.au/itm/DS18B20-Digital...0#ht_2623wt_957

2x http://www.ebay.com.au/itm/3m-Digital-Ther...c#ht_4053wt_958

* 5v Power supply (I already have)
* Power outlets (for each device being controlled)

I will write the code for the EtherTen so that it sends the data to my web-server via a php script (dynamic URL request in which it passes parameters) once every couple of minutes. My web server will run a SQL database and hold all of the data to present it in a nice viewable fashion.
If I want to see the current temperatures/values I will just open up my web-browser and look (from anywhere in the world!) or just look at the LCD.


Given that I am obviously a beginner and am pretty much using a single step brew, is this type of set up OK?
 
G'day guys,

I am coming at this from the other end. I have an electronics and software background and was given a BrewCraft starter kit by my wife for Christmas.

The first thing I thought was "awesome I can automate this using ELECTRONICS!" (yes, I spoke in capitals), because I didn't know the first thing about home brew.

I am doing a lot of reading and have read this entire thread to see where everybody is at, it seems you have it under control but nobody is looking to network their system?

Given that I have only a basic kit, I don't have any kettles or anything, I will purchase a used bar-sized fridge and put my fermenter in there. I will bypass the thermostat in the fridge and control it for cooling and a globe for warming with an arduino set up. My idea seemed similar to the uberfridge (http://www.elcojacobs.com/uberfridge/)

I plan on using:

* Freetronics EtherTen for control

* 8-channel relay module (for future expansion)
http://www.ebay.com.au/itm/170667758574?ss...9#ht_5418wt_905

* 16x2 line LCD
http://www.toysdownunder.com/lcd-5v-yellow-16x2.html

* LCD serial adapter
http://www.toysdownunder.com/serial-lcd-adapter.html

* Temp probes (one in the tank, one to monitor the air in the fridge, one for ambient)
1x http://www.ebay.com.au/itm/DS18B20-Digital...0#ht_2623wt_957

2x http://www.ebay.com.au/itm/3m-Digital-Ther...c#ht_4053wt_958

* 5v Power supply (I already have)
* Power outlets (for each device being controlled)

I will write the code for the EtherTen so that it sends the data to my web-server via a php script (dynamic URL request in which it passes parameters) once every couple of minutes. My web server will run a SQL database and hold all of the data to present it in a nice viewable fashion.
If I want to see the current temperatures/values I will just open up my web-browser and look (from anywhere in the world!) or just look at the LCD.


Given that I am obviously a beginner and am pretty much using a single step brew, is this type of set up OK?
Sounds like you have the making of a pretty decent controller. I have designed an arduino shield usingthe gs1011 wifi module, but stuffed up the uart connections so was too embarrassed to post about it until I have a fixed and working version. My plan is very similar to yours, but with an android tablet as a control panel interface... eventually :p
 
You're putting me to shame matho!! The only thing I've accomplished is the emptying of bottles...
you have been on holidays mate, I just had a break, I had a quiet xmas break and I get bored if I'm not doing something. It's going to take a while to work out a menu system, I have done the easy stuff first.

Edak, sounds like you have a good plan, just remember to put a delay start for the compressor on the fridge, so that it doesn't turn on and off to quickly because they don't like that

cheers matho
 
Sounds like you have the making of a pretty decent controller. I have designed an arduino shield usingthe gs1011 wifi module, but stuffed up the uart connections so was too embarrassed to post about it until I have a fixed and working version. My plan is very similar to yours, but with an android tablet as a control panel interface... eventually :p

My Acer A500 will be my control system, but from the sofa. :)

Matho, how fast is too fast for a compressor? I would have thought that several minutes would be fine.
 
My Acer A500 will be my control system, but from the sofa. :)

Matho, how fast is too fast for a compressor? I would have thought that several minutes would be fine.
several minute would be OK most ppl set there fridge controllers to 9 minutes
 
OK i just made my purchase and chose different items. I figure that if I have to wait to get any of my components (eBay) then I would just order them all internationally. I ended up getting:
3x http://cgi.ebay.com.au/ws/eBayISAPI.dll?Vi...#ht_2597wt_1280
1x http://cgi.ebay.com.au/ws/eBayISAPI.dll?Vi...#ht_3273wt_1280
1x http://cgi.ebay.com.au/ws/eBayISAPI.dll?Vi...#ht_2508wt_1280

I already have the other gear, including the arduino so I will get to developing that part as soon as possible while I wait for the sensors/outputs.

I still don't have my fridge yet!
 
Gentlemen,

I've been lurking on the forums for awhile but a thread on Arduino development caught my eye.

On the 14th of January there's going to be an event called the Melbourne Mini Maker Faire, dedicated to the scene of creative hackers/makers and featuring a great many people showing off their own home made projects.

I'm in the process of knocking up a electronic controlled home brew set up myself but a) it's not done and B) I'm going to be too busy helping organise the event to exhibit. You see where I'm going with this?

We'd love to see someone exhibit something home brew related. Hell, it doesn't even have to be arduino controlled or whatever. The general theme of DIY creativity is wide enough to encompass home brew certainly. Exhibiting isn't a huge deal, it's a table at a great event. If that's not a goer there's the chance to just give a talk or even a 'lightning talk'.

All the stuff you need to know is here: www.makerfairemelbourne.com

When I'm a little less busy I'll come back and give this thread a proper read and contribute. Sorry for barging in but I hope this is of some interest.

BTW attending the event is free, it's strictly non profit. So head along and book up a ticket while there's some left.
 
There's another interface which I may also consider, it's less than 10 dollars delivered and it has buttons, LEDs and segment displays. There is an arduino driver also.

Have a look.

 
Last edited by a moderator:
Just found a Chinese rip off branding for parts

Chinduino

Just in case you didn't already know about the branding, they have bucket loads of add-ons
 
Here's a 10% off code I got in me email this morning for Little Bird Electronics valid today only and on 'in stock' items only: Welcometo2012

littlebirdelectronics.com
 
Sorry for the late notice, I just got an email from my local hackerspace Sparkfun's free day starts in 4.5 hours. Good for shields, etc. Win free $100 vouchers.
 
Nup. Chances were slim, with all the yanks living on there all day. Just a dozen or so tries on the train / bus for me (phone). Didn't stop me hoping though. :)
 
Back
Top