• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Australia and New Zealand Homebrewers Facebook Group!

    Australia and New Zealand Homebrewers Facebook Group

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.
Nice one Rob! I'll have a look at your code. I have been thinking about getting an ethernet shield for my HERMS controller. I have been using IR remote control, but it isn't very reliable and I have to slow the main loop down with a delay(); to get it to read... even using interrupts, which is odd.
 
Nice to see this thread is still going. It's been quite a while since I have posted on it.. Probably back in 2008..

Anyway I spent the last few days coding up a Browser Based Controller for the Arduino (saves having to purchase & wire up buttons, LCD Screen etc & has remote access!)
with the Aim of using several of them for different purposes throughout my house. So I made the code as generic as possible. I plan on using one to control a HLT (Hot Liquor Tank) on a Brewery, One for Fermentation Control and one to simply switch on my Coffee Machine remotely but I can think of a multitude of uses if I can knock up my own boards/enclosures cheap enough.

I grabbed the cheapest parts I could find on eBay so I'm using an Arduino Nano Clone ($15) , Enc28J60 Ethernet ($5), Dallas Ds18b20 Temperature Sensor ($1) & an
LED (to replicate a Solid State Relay - SSR ($5), still waiting on mine to arrive form the slow boat from china)

Parts - Ethernet Board on the left, Arduino on the Right. I'm going to solder all the parts onto one PCB.

View attachment 55873

Browser Output (Auto Mode)

View attachment 55874

Browser Output (Manual Mode)

View attachment 55875

Source Code ==> http://www.halfluck.com/source/webserver/T...erWebServer.ino

Cheers Rob.
Thanks for sharing Rob, good to hear from you again. :icon_cheers:
 
Hey Guys,

I just wished all these parts were soo cheap a couple of years ago would have saved soo much time!

Knocked up a quick shield during lunch & sent it of to get fabbed. It will allow me to keep everything together and a small footprint (51cmx51cm)
It has screw down Terminals for 4 x SSR's and as many Temperature sensors as I want, a pin header for Ethernet as well which supports both
ENC28J60 & Wiznet Chips & 2 pin headers for each pin on the Arduino.

shield.png

Cheers Rob.
 
Hey Guys,

I just wished all these parts were soo cheap a couple of years ago would have saved soo much time!

Knocked up a quick shield during lunch & sent it of to get fabbed. It will allow me to keep everything together and a small footprint (51cmx51cm)
It has screw down Terminals for 4 x SSR's and as many Temperature sensors as I want, a pin header for Ethernet as well which supports both
ENC28J60 & Wiznet Chips & 2 pin headers for each pin on the Arduino.

View attachment 55910

Cheers Rob.
Tell me you've integrated this with brewmate :party:
 
Received my Bonjuino today. Thanks Ben. Going to the Bunya mountains for the weekend so I will be working on this and the brauduino sheild on the weekend.

Cheers
 
Hey Guys,

I just wished all these parts were soo cheap a couple of years ago would have saved soo much time!

Knocked up a quick shield during lunch & sent it of to get fabbed. It will allow me to keep everything together and a small footprint (51cmx51cm)
It has screw down Terminals for 4 x SSR's and as many Temperature sensors as I want, a pin header for Ethernet as well which supports both
ENC28J60 & Wiznet Chips & 2 pin headers for each pin on the Arduino.

View attachment 55910

Cheers Rob.
Nice one Rob. Custom PCBs make things so much easier and neater. I had one made in the standard arduino form factor. It makes the LCD, DS1820 etc so much easier to connect. I used the 2.54mm screw terminal connectors from modtronix. Screw terminals rock.

Hard to see it with the bonjuino in the way, but you get the idea:
herms_rv2_2.jpg
 
Received my Bonjuino today. Thanks Ben. Going to the Bunya mountains for the weekend so I will be working on this and the brauduino sheild on the weekend.

Cheers
Good to hear it arrived quickly, Brad. Can't wait to see all these Braumisers in operation!
 
All,

I have just created an arduino library for motorised ball valves (if anyone is inetrested). Its made to work with two relays per valve so polarity can be reversed & for the 5 wire devices where we get signals when fully open / fully closed.

Comprises of a couple of C++ classes to allow them to be named & referenced by name


You implement like this:-
Code:
  // Global

  BallValves cValves;



  // In setup

  cValves.AddValve ("Valve1", FirstpinNumberGoesHere);  //This assumes +2 per pin, so 22,24,26,28, i used a SIL pin header to connect to relay module / valve inputs

  // or

  cValves.AddValve ("Valve2", 22,23,24,25,26);		  // This allows individual pins to be specified, so can map how you like



  cValves.OpenValve("Valve1"); // Open / close can be done anywhere of course after valve is added





   // in loop

  cValves.Run();

The AddValve creates a valve object, chucks it the valves container and sets up the pins / states etc

The run method checks if any of the valves added need to do anything, gets called each loop and maintains states of valves etc, so no waiting around in loop for things to happen, you can just query the valve state to see what its upto

Still testing it somewhat (and cleaning it up) , happy to share it with anyone interested

Andy
 
All,

I have just created an arduino library for motorised ball valves (if anyone is inetrested). Its made to work with two relays per valve so polarity can be reversed & for the 5 wire devices where we get signals when fully open / fully closed.

Comprises of a couple of C++ classes to allow them to be named & referenced by name


You implement like this:-
Code:
  // Global

  BallValves cValves;



  // In setup

  cValves.AddValve ("Valve1", FirstpinNumberGoesHere);  //This assumes +2 per pin, so 22,24,26,28, i used a SIL pin header to connect to relay module / valve inputs

  // or

  cValves.AddValve ("Valve2", 22,23,24,25,26);		  // This allows individual pins to be specified, so can map how you like



  cValves.OpenValve("Valve1"); // Open / close can be done anywhere of course after valve is added





   // in loop

  cValves.Run();

The AddValve creates a valve object, chucks it the valves container and sets up the pins / states etc

The run method checks if any of the valves added need to do anything, gets called each loop and maintains states of valves etc, so no waiting around in loop for things to happen, you can just query the valve state to see what its upto

Still testing it somewhat (and cleaning it up) , happy to share it with anyone interested

Andy

Thanks for sharing Andy, I can't figure out what you meant by "This assumes +2 per pin".

How many of these valves do you have in your system? Also, can they be partially opened (for flow control)?

Cheers.
 
Thanks for sharing Andy, I can't figure out what you meant by "This assumes +2 per pin".

How many of these valves do you have in your system? Also, can they be partially opened (for flow control)?

Cheers.

The way the mega is arranged, it has two rows of pins (A DIL connector) . I have 5 valves, will be 6 or 7 by the time I am done.

22 23
24 25
26 27
28 29
30 31

So I have SIL plugs for my valves, so for example valve #1 will occupy pins 22,24,26,28 (motor, motor, sensor, sensor)

Partial opens are possible by sending an open and stop. I am working on maintaining timings for valves to allow semi-precise positioning
 
Partial opens are possible by sending an open and stop. I am working on maintaining timings for valves to allow semi-precise positioning


I believe the guys over at brewtroller have/are working on partial openings set as a percentage value, I haven't perused the site for a while so I'm not sure of their progressbut might be woth checking out.
 
By recording and averaging the time from open to close etc I can record the timings of a specific valve (as they will all differ) as each of these valves and states lives in its own instance, its easy. Over a period of time (i.e. my startup / pre-brew clean routine) I can probably have a good stab at 25%, 50% and 75%. Of course when in the "manual / percentage" state, on-screen buttons can be used to step the motors if i need slightly more, having quite accurate level sensors (pressure / bubble) I can soon calculate flows etc and back off / advance any given valve


p.s. no progress today, too many hours at work!

I believe the guys over at brewtroller have/are working on partial openings set as a percentage value, I haven't perused the site for a while so I'm not sure of their progressbut might be woth checking out.
 
All,

I have just created an arduino library for motorised ball valves (if anyone is inetrested). Its made to work with two relays per valve so polarity can be reversed & for the 5 wire devices where we get signals when fully open / fully closed.

Comprises of a couple of C++ classes to allow them to be named & referenced by name


You implement like this:-
Code:
  // Global

  BallValves cValves;



  // In setup

  cValves.AddValve ("Valve1", FirstpinNumberGoesHere);  //This assumes +2 per pin, so 22,24,26,28, i used a SIL pin header to connect to relay module / valve inputs

  // or

  cValves.AddValve ("Valve2", 22,23,24,25,26);		  // This allows individual pins to be specified, so can map how you like



  cValves.OpenValve("Valve1"); // Open / close can be done anywhere of course after valve is added





   // in loop

  cValves.Run();

The AddValve creates a valve object, chucks it the valves container and sets up the pins / states etc

The run method checks if any of the valves added need to do anything, gets called each loop and maintains states of valves etc, so no waiting around in loop for things to happen, you can just query the valve state to see what its upto

Still testing it somewhat (and cleaning it up) , happy to share it with anyone interested

Andy

Awesome Andy! Your brewery sounds like it is coming along nicely.

When I built my first Automated Brewery electric Ball Valves were so exxy! so I end up using a couple of peristaltic pumps
to act as ball valves, that worked well but the CIP was just too much effort so I'm looking for a simpler solution.. at a bare
minimal i'd like to add a ballvalve or solenoid to my HLT so the Dough In will be looked after and I get a bit more of a sleep in.

I end up re-writing my code using a better Ethernet Library (EtherCard)
I'm really happy with how it is running, most of my bits have arrived from china just waiting on the Custom PCB to arrive.

auto.jpg

manual.jpg

http://www.halfluck.com/source/webserver/T...erWebServer.ino

Cheers Rob.
 
Rob in one of your earlier posts you said you were using a Dallas Ds18b20 One Wire for your temp sensor; do you have a sensor handy that you can measure? I'd like to grab e a few of these sensors, but I need to find out if they'll fit in my fermenter thermowell first.

Also, where did you get them for $1? I can't find them that cheap anywhere.

Edit: Scratch that, found quite a few on ebay, some with wire attached already: http://www.ebay.com.au/itm/Waterproof-DS18...=item231f330cd2
Not quite $1, but close enough :) That should actually do exactly what I need :)
 
hey votex,

the sensors are in a TO-92 package the dimensions are HERE
you can get cheap DS18B20 off ebay

cheers steve
 
Hey Vortex,

Yep thats the one, i just grabbed a bulk lot so got the cheaper price. They work well and fit inside the thermowells I got perfectly.

Cheers Rob.
 
Thats a good price for those, I was paying about $4.80 for those until recent, still good value, the basic sensor is $1 - $1.5 + wire + stainless cap + heatshrink.
If inside a thermowell (which you probably will anyway), then sensor + wire+heatshrink will do

I made my own for the latest rig as I wanted 2m cables, most pre-made are 1m and I didnt want to extend

Rob in one of your earlier posts you said you were using a Dallas Ds18b20 One Wire for your temp sensor; do you have a sensor handy that you can measure? I'd like to grab e a few of these sensors, but I need to find out if they'll fit in my fermenter thermowell first.

Also, where did you get them for $1? I can't find them that cheap anywhere.

Edit: Scratch that, found quite a few on ebay, some with wire attached already: http://www.ebay.com.au/itm/Waterproof-DS18...=item231f330cd2
Not quite $1, but close enough :) That should actually do exactly what I need :)
 
You could also try sureelectronics, they have the sensors in thermowells with screw fitting and 3m cable for cheap. I use them in my braumiser.
 
Guys over the weekend i've been hacking about with my Freetronics Arduino before my sensors get here and building an LCD interface of sorts. Anyway, I'm hoping someone can help me out with a syntax issue i've run into (Extensive PHP background, not so much C/C++...). Google hasn't revealed any answers either.

Sensor address below is a dummy (borrowed from Rob's code!) just to get selecting the right sensor correct at this point.

Code:
const byte ambientSensorAddr[8]	 = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge1WortSensorAddr[8] = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge1AirSensorAddr[8]  = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge2WortSensorAddr[8] = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge2AirSensorAddr[8]  = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 



// setup() and loop() here.



int getSensorTemp(int fermVess, int sensorNumber) {

  

  // Define the variable for the sensor address here.

  byte sensorAddr;

  

  Serial.print("Getting sensor temp:");

  

  switch(fermVess) {

	case 0:

	  // Only one sensor for this one and that's the 

	  // Ambient sensor. We ignore the value of sensorNumber.

	  sensorAddr[] = ambientSensorAddr; 

	  break;

	case 1:

	  // Fermentation Vessel 1.

	  switch(sensorNumber) {

		case 0:

		  // Wort Sensor.

		  sensorAddr[] = fridge1WortSensorAddr; 

		break; 

		case 1:

		  // Fridge Air Temp Sensor.

		  sensorAddr[] = fridge1AirSensorAddr;

		break;

	  }

	break;

	// Fermentation Vessel 2.

	case 2:

	  switch(sensorNumber) {

		case 0:

		  // Wort Sensor.

		  sensorAddr[] = fridge2WortSensorAddr; 

		break;  

		case 1:

		  // Fridge Air Temp Sensor.

		  sensorAddr[] = fridge2AirSensorAddr;

		break;

	  }

	break;

  }



  // code to read the actual sensor is here.



}

Compile errors are as follows:
Code:
arduferm.cpp: In function 'int getSensorTemp(int, int)':

arduferm:95: error: expected primary-expression before ']' token

arduferm:102: error: expected primary-expression before ']' token

arduferm:106: error: expected primary-expression before ']' token

arduferm:115: error: expected primary-expression before ']' token

arduferm:115: error: expected primary-expression before '{' token

arduferm:115: error: expected `;' before '{' token

arduferm:119: error: expected primary-expression before ']' token

arduferm:119: error: expected primary-expression before '{' token

arduferm:119: error: expected `;' before '{' token

Full code is at http://www.vortex.id.au/arduferm/ if anyone wants to have a look.
 
Guys over the weekend i've been hacking about with my Freetronics Arduino before my sensors get here and building an LCD interface of sorts. Anyway, I'm hoping someone can help me out with a syntax issue i've run into (Extensive PHP background, not so much C/C++...). Google hasn't revealed any answers either.

Sensor address below is a dummy (borrowed from Rob's code!) just to get selecting the right sensor correct at this point.

Code:
const byte ambientSensorAddr[8]	 = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge1WortSensorAddr[8] = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge1AirSensorAddr[8]  = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge2WortSensorAddr[8] = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 

const byte fridge2AirSensorAddr[8]  = {0x28, 0x61, 0x24, 0xC5, 0x03, 0x00, 0x00, 0x51}; 



// setup() and loop() here.



int getSensorTemp(int fermVess, int sensorNumber) {

  

  // Define the variable for the sensor address here.

  byte sensorAddr;

  

  Serial.print("Getting sensor temp:");

  

  switch(fermVess) {

	case 0:

	  // Only one sensor for this one and that's the 

	  // Ambient sensor. We ignore the value of sensorNumber.

	  sensorAddr[] = ambientSensorAddr; 

	  break;

	case 1:

	  // Fermentation Vessel 1.

	  switch(sensorNumber) {

		case 0:

		  // Wort Sensor.

		  sensorAddr[] = fridge1WortSensorAddr; 

		break; 

		case 1:

		  // Fridge Air Temp Sensor.

		  sensorAddr[] = fridge1AirSensorAddr;

		break;

	  }

	break;

	// Fermentation Vessel 2.

	case 2:

	  switch(sensorNumber) {

		case 0:

		  // Wort Sensor.

		  sensorAddr[] = fridge2WortSensorAddr; 

		break;  

		case 1:

		  // Fridge Air Temp Sensor.

		  sensorAddr[] = fridge2AirSensorAddr;

		break;

	  }

	break;

  }



  // code to read the actual sensor is here.



}

Compile errors are as follows:
Code:
arduferm.cpp: In function 'int getSensorTemp(int, int)':

arduferm:95: error: expected primary-expression before ']' token

arduferm:102: error: expected primary-expression before ']' token

arduferm:106: error: expected primary-expression before ']' token

arduferm:115: error: expected primary-expression before ']' token

arduferm:115: error: expected primary-expression before '{' token

arduferm:115: error: expected `;' before '{' token

arduferm:119: error: expected primary-expression before ']' token

arduferm:119: error: expected primary-expression before '{' token

arduferm:119: error: expected `;' before '{' token

Full code is at http://www.vortex.id.au/arduferm/ if anyone wants to have a look.


You have used sensorAddr[] but you defined is as a non-array. add [8] to your definition, then put the assignment into a for loop.

eg

for (int i=0;i<8;i++) sensorAddr = ambientSensorAddr;

since you cannot copy arrays in cpp like that.

and you should be good to go.
 
You have used sensorAddr[] but you defined is as a non-array. add [8] to your definition, then put the assignment into a for loop.

eg

for (int i=0;i<8;i++) sensorAddr = ambientSensorAddr;

since you cannot copy arrays in cpp like that.

and you should be good to go.


Perfect! Thanks :)
 
I did a google search for difference between bonjuino and brewtroller, and amazingly got zero documents.
Can someone please tell me?
 
I did a google search for difference between bonjuino and brewtroller, and amazingly got zero documents.
Can someone please tell me?
The bonjuino is just an arduino clone in kit form (with a few cool things that I like, and hopefully others like enough to want one too). It is based on an ATmega328 microcontroller. The brewtroller is based on an ATmega2560, which is a faster, bigger controller with more memory and more I/O pins.
 
The bonjuino is just an arduino clone in kit form (with a few cool things that I like, and hopefully others like enough to want one too). It is based on an ATmega328 microcontroller. The brewtroller is based on an ATmega2560, which is a faster, bigger controller with more memory and more I/O pins.
Don't talk the bonj down, it's very capable. :)
 
Back
Top