# Arduino Development Thread



## bonj

I got my arduino reading my DS18S20+ temperature sensors today. 

Let's put all the arduino based stuff in here, and give Zizzle's thread a break.

I'm looking forward to seeing what others come up with. (randyrob)

If you're after a cheap board, check out the "Really Bare Bones Board". Probably as cheap as they come, but don't forget a USB to serial cable with it


----------



## bonj

Some Arduino and Temp sensor links:

DS18B20 (parasite power only) AUS$4.15ea : Modtronix (AU) (Also check for analog sensors, such as LM35 for around AU$1)
DS18B20 AUS$6.50ea : Microzed (AU)
DS18S20 (powered or parasite) AUS$12ea : Ocean Controls (AU)

Really Bare Bones Board (and other stuff including blue LCDs): Modern Device Co. (USA)
Australian Distributor for official Arduino Diecimila boards (note: GST NOT INCLUDED IN PRICE): Little Bird Electronics (AU)
Various breakout boards: Sparkfun Electronics (USA)
Arduino Website (inluding the playground, and forum which are a wealth of information for interfacing devices): http://www.arduino.cc/
Various Arduino boards, shields and breakout boards: Adafruit Industries (USA)


----------



## randyrob

Nice Work Bonj

The World Famous Index of Arduino & Freeduino Knowledge --> http://www.freeduino.org/

FREEDUINO (Arduino&reg; Compatible) Products --> http://wulfden.org/freeduino/freeduino.shtml



i'm going to go with the RBFK (Rock Bottom Freeduino Kit) for the prototype of HABS (Halfluck Automated Brewing System!)

Rob.


----------



## bonj

randyrob said:


> Nice Work Bonj
> 
> The World Famous Index of Arduino & Freeduino Knowledge --> http://www.freeduino.org/
> 
> FREEDUINO (Arduino Compatible) Products --> http://wulfden.org/freeduino/freeduino.shtml
> 
> 
> 
> i'm going to go with the RBFK (Rock Bottom Freeduino Kit) for the prototype of HABS (Halfluck Automated Brewing System!)
> 
> Rob.


Sounds good. I noticed that the freeduino and the really bare bones board are the same thing, jointly developed.

Don't forget to get either the USB cable with FTDI TTL chip in it, or the RS232 serial programmer. Can't program the sucker without one of those.

I like the look of the freeduino/RBBB and they're quite cheap if you buy them in bulk. I can forsee buying a few of them for different projects.


----------



## randyrob

a couple of Arduino and Beer related projects

Ramp - Soak, Beer brewing, single step mash sketch

Arduino Beer Thermostat

Arduino beer brewing


----------



## fraser_john

Interesting little script for the mash logic, however....Its basically an on/off script, turning the heater off once mash temp is reached. This is the same logic I originally had in my VB software to drive my RIMS system, but found that overshoots over 4c or more were recorded based on that logic.

I have since put some steps in that start pulsing the relay that controls the heater elements, the closer to temp its reached, the further apart and the shorter the pulses are. Kind of emulating a PID, but nowhere near as accurate, right now I have it down to about a 0.5c overshoot, but if its less than 2c till desired temp, it ramps to final temp very slowly, so I need to change the software a bit more!

Just something to think about when writing yours!


----------



## bonj

By pulsing, I'm assuming you mean like a slow pulse width modulation? eg. 50% duty cycle would be something like on for 1 second, off for 1 second.

An interesting idea. I'm guessing that a 50% duty cycle would get you less than 50% power due to the lag in heating the element.


----------



## fraser_john

Bonj said:


> By pulsing, I'm assuming you mean like a slow pulse width modulation? eg. 50% duty cycle would be something like on for 1 second, off for 1 second.



Exactly, I have about four bits of logic that test how far away from set point it is, based on that it turns the relays off for a % of the time till the next sample.

Using Google at the moment to find a decent bit of PID logic, found some, but it assumes a variable power output control, ie 50% of 1000watts. I suppose this could be translated into 50% of time till next sample???

I think getting some good PID software going would be the bees knees for us software writers over buying a PID unit!


----------



## newguy

I wrote an article on my HERMS for Circuit Cellar magazine a couple of years ago. The source code is available here. The file you want is Nesdoly-191.zip. I implemented a PID algorithm from scratch. The source code is in CCS C and shouldn't be too hard to figure out. PM me with your email address if you want a copy of the article - it may help to figure out the code.

I used PWM to cycle the heating element. To make the math easier, I used a 0 (off) - 63 (full power) scheme. Those of you familiar with binary will understand why. This number translates to a heating drive that varies from no (0) AC mains cycles up to 63 mains cycles. Because the mains are 60Hz here, this is roughly once per second. I chose to limit the smallest time quanta to integer multiples of the mains to eliminate EMI. I used a solid state relay to actually drive the heating element. You don't have to worry about any lag in the heating element.


----------



## kirem

newguy said:


> I wrote an article on my HERMS for Circuit Cellar magazine a couple of years ago. The source code is available here. The file you want is Nesdoly-191.zip. I implemented a PID algorithm from scratch. The source code is in CCS C and shouldn't be too hard to figure out. PM me with your email address if you want a copy of the article - it may help to figure out the code.
> 
> I used PWM to cycle the heating element. To make the math easier, I used a 0 (off) - 63 (full power) scheme. Those of you familiar with binary will understand why. This number translates to a heating drive that varies from no (0) AC mains cycles up to 63 mains cycles. Because the mains are 60Hz here, this is roughly once per second. I chose to limit the smallest time quanta to integer multiples of the mains to eliminate EMI. I used a solid state relay to actually drive the heating element. You don't have to worry about any lag in the heating element.



Is the mains drive preset at 0-63 or could it be modified for a 0-50 to suit our power? Why is it 0-63 and not 0-60?

If you use a zero crossing SSR then doesn't that take care of the EMI caused by power switching regardless of what the logic is telling the SSR to do, it won't switch until it is at zero?


----------



## newguy

I chose 0 - 63 because that's 6 bits and is easy to handle on an 8 bit processor. It also happens to correspond to roughly one seconds' worth of AC waves and that's the primary reason I chose it. Yes, you can modify the code to correspond to 50Hz power.

I don't know what I was thinking when I mentioned EMI before. Yes, you're right - the SSR I used is a zero-crossing type, so EMI is irrelevant. I think I got confused with another project I've done. Sorry about that.


----------



## kirem

Nice article. I havent looked through the code yet. I use commercial PID units from auberins. They have a setup function on them that measures and records the temperature increase/decrease and times and then sets the P, I and D. this is done in-situ and provides real world values and gives a great starting point of the values. It also means that if I change the setup, like install hose insulation, I re-run the setup and it provides new values based on the modified heating system.

I wonder if you could incorporate a setup function in your code that measures and records the systems heating capability and the effect that whatever number of descrete pulse trains has on the system. This could be made to provide (if needed) different P, I and D values around the common mashing temperatures.

Just some thoughts.


----------



## bonj

I've just discovered something interesting. 

I have three DS18*S*20 chips on powered mode.
I have discovered that the DS18*B*20 chips return 12bit temperatures (.0625 degree precision), whereas the DS18*S*20 only returns 9bit (.5 degree precision).
*edit*: The DS18*B*20 *can* be powered. They're also still only accurate to within 0.5 degrees, they just have a higher precision measurement.

I may have to get some of these DS18*B*20's to test them out.


----------



## newguy

The setup/learn capability is possible, but I never really investigated it. This system worked for me right off the bat, so I left it as it was. I remember looking into the basics but that was it. The biggest key to this thing's success was the excel spreadsheet that I developed to predict the system response. It's part of the package available on the CC website.


----------



## fraser_john

FTP is blocked at my work site, so will have to download it later 

But, I might just add this code to my VB source and dump the parameters to a file so I can at least see how it modify my SSR output... http://www.jashaw.com/pid/code.htm

Sorry Bonj, did not mean to hijack your thread with software design issues!


----------



## kirem

fraser_john said:


> FTP is blocked at my work site, so will have to download it later
> 
> Sorry Bonj, did not mean to hijack your thread with software design issues!



Blocked here as well. NEwguy emailed it to me, if you can't raise him, PM me with your email and I will forward it to you.

Sorry for hijack Bonj.


----------



## bonj

No need to apologise fellas. Software design is as much a part of the development as the hardware is. I'm a software guy, so much of the hardware stuff is learning for me.

Anyway, an update by way of photos. 

Arduino Diecimila and 2x DS18S20's on the breadboard. (The third is in a pre-production thermowell (no photo, sorry)).






LCD readout for an as yet fictional HERMS system.


----------



## bonj

I just came across a page on PID development and algorithms: http://www.embedded.com/2000/0010/0010feat3.htm
I found it by following links on the Arduino Playground here: http://www.arduino.cc/playground/Main/Bare...sPIDForEspresso
Arduino Playground for "coffeetronics", but possibly also relevant to breweries: http://www.arduino.cc/playground/Main/CoffeeTronics


----------



## Zizzle

Great thread guys.

I'm pretty sure I have DS18S20s in my rig and get better than 0.5 degree accuracy.

The DS18S20 data sheet says:

"Resolutions greater than 9 bits can be calculated using the data from the temperature, COUNT REMAIN
and COUNT PER C registers in the scratchpad."

Brad and I also implemented the PID algorithm in C for our brewbots. The algorithm itself is pretty simple, it is tuning the parameters to your system that is harder.


----------



## ArnieW

Zizzle said:


> Great thread guys.
> 
> I'm pretty sure I have DS18S20s in my rig and get better than 0.5 degree accuracy.
> 
> The DS18S20 data sheet says:
> 
> "Resolutions greater than 9 bits can be calculated using the data from the temperature, COUNT REMAIN
> and COUNT PER C registers in the scratchpad."
> 
> Brad and I also implemented the PID algorithm in C for our brewbots. The algorithm itself is pretty simple, it is tuning the parameters to your system that is harder.


I've been using DS18B20s with picaxes for a long time now and while the specs are something like +- 1 degree over the range, they can read to several decimal points. I've calibrated them against known references and they seem to stay calibrated. I'm confident I can really tell the difference between 67.0 and 67.1 in my mash - but the calibration at the desired temp is important.

cheers, Arnie


----------



## randyrob

> I'm confident I can really tell the difference between 67.0 and 67.1 in my mash



WOW, i have a long way to go grasshopper i sure can't tell the difference!

finally have a progress pic of HABS 





got her all soldered up and gave it a smoke test all good! 

have the specialized "brewery controller" up and running also reading temps off a couple of DS18S20's

just waiting for the SSR's and LCD to arrive so i can have some more fun  

Rob.


----------



## bonj

randyrob said:


> got her all soldered up and gave it a smoke test all good!
> 
> have the specialized "brewery controller" up and running also reading temps off a couple of DS18S20's
> 
> just waiting for the SSR's and LCD to arrive so i can have some more fun
> 
> Rob.


Looks great Rob. I assume by SSR, you mean Solid State Relay, and not Soviet Socialist Republic.... :lol:
What LCD did you get? I'd love a Vacuum Fluorescent Display (VFD), but they're way expensive? My LCD is an el-cheapo with no backlight, so I may get LCD envy when you show yours 

I've got 5 Really Bare Bones Boards (RBBB) and the USB to TTL cable on the way from ModernDevice.com for a few other projects I have in my head.... and to free the Diecemila board for prototyping.


----------



## Zizzle

These could be a cool overkill for control applications:

http://beagleboard.org/hardware

Run a full linux distro on your brew bot.


----------



## bonj

Oh, they look sexy! MythTV frontend?


----------



## Zizzle

Yeah that is what I was thinking. Dunno if they have the grunt to decode MPEG at 25-30 fps.


----------



## bonj

I whipped up a quick case for my brew last week (finally got the photos off the camera). I made a thermowell from some aluminium tubing and some knead-it. I used it in the mash. Here you can see the sparge temperature after the first batch of water was added (95degC sparge water) and mixed. Only the single sensor was attached, hence only the one readout. numbers top right are the timer (accurate to the second over the 90 minute mash). The official arduino uses a 16MHz crystal for the clock, so it remains to be seen how accurate the resonators are in the really bare bones boards I've ordered. I'm confident it won't matter either way.





Here is a shot of the current state of the brewery... taken during sparge. roller door is still down, as the burner isn't lit yet. Pump is on, and as you can see, I haven't bothered to figure out how to get those bloody switches to light up... that just smacks of effort.


----------



## bonj

My 5x RBBB's arrived from ModernDevice.com yesterday. 9 days from Rhode Island to Queensland. That was faster than my Arduino Diecimila from Sydney


----------



## bonj

5x RBBB's assembled, cleaned and tested. 1 has already made its way into the HERMS controller, and is running the current firmware without a hitch. That frees up the Diecimila board for other uses.


----------



## Zizzle

This rise of the machines!

Looks good mate. Love the makeshift case.


----------



## randyrob

noice bonj very noice!

i somehow missed those last few posts

been playing with my lcd the last few days, i'm no where near the camera man u are bonj  








Rob.


----------



## bonj

Nice LCD Rob!

The character for the degree symbol is decimal 223 or 0xDF on mine, so quite possibly the same on yours. 

The trick to the photos, is plenty of light, and staying within the focus range of the lense. Also make sure your shutter speed is fast enough so you don't get motion blur.... but plenty of light should take care of that.


----------



## ausdb

Hey Rob that looks great and even better with the blue backlight now your brewery will be tres Kewl!!!!


----------



## JasonY

Just when I didn't need another thing to tinker with all this discussion has got me ordering one of these to play about with h34r:


----------



## bonj

JasonY said:


> Just when I didn't need another thing to tinker with all this discussion has got me ordering one of these to play about with h34r:



Do it!

I've been playing around with Processing the last couple of days... fun fun fun. Have got the gamepad going with the proControll (yes, two L's) library.... Homemade USB missile launcher, here I come! mwahahahahaaaa


----------



## JasonY

Well after much screwing about with the LCD board I have corrected all my soldering stuff ups and put the correct resistors in and I am away. All very basic for now but once I get some SSRs and time the brewery will be going electronic for better or worse 

Out of interest I got 10 DS18B20's of ebay from a seller in hong kong for a couple of bucks each with only $5 shipping to the US (http://stores.ebay.com/Hyperfine-Store).




h34r:


----------



## Ducatiboy stu

And all that assembly language stuff I forgot could now become usefull...


mmm...my Z80 text book is in the shed somewhere....


----------



## bonj

Top stuff, Jason! :super: I'm guessing you didn't stuff up the pullup resistor like I did 

The Z80 assembly won't do you much good on an arduino, Duke! But it runs like a dream on ubuntu


----------



## Ducatiboy stu

What.....8 bit processors with 64k memory aint enough


----------



## bonj

The atmega168 in the arduino is 8bit, 1K RAM, 16K onboard flash (around 14K usable after the bootloader), 512B EEPROM.


----------



## trevc

Bonj... that set is looking awesome, love the display readout.

Has anyone built a brewery with a full-sized LCD yet? I can just imagine how crazy that would look with temperature graphs on display, etc. You could mount it on LCD arm hanging off the side. Panels are so cheap these days too. Of course, then you'd need to drive the display somehow.... which would lead to an embedded platform of some sort. Beer OS.


----------



## Ducatiboy stu

Thats HEAPS....

You could almost run Vista on it... :lol:


----------



## bonj

trevc said:


> Bonj... that set is looking awesome, love the display readout.
> 
> Has anyone built a brewery with a full-sized LCD yet? I can just imagine how crazy that would look with temperature graphs on display, etc. You could mount it on LCD arm hanging off the side. Panels are so cheap these days too. Of course, then you'd need to drive the display somehow.... which would lead to an embedded platform of some sort. Beer OS.


Thanks, Trev 

There are some guys using laptops. It's a bit overkill though, really. Check out Zizzle's Brewbot... automated brewery on a simple microcontroller... it's a work of art.


----------



## Ducatiboy stu

trevc said:


> . Of course, then you'd need to drive the display somehow.... which would lead to an embedded platform of some sort. Beer OS.




You would need rather STOUT kernell I would imagine :lol:


----------



## randyrob

JasonY said:


> Well after much screwing about with the LCD board I have corrected all my soldering stuff ups and put the correct resistors in and I am away. All very basic for now but once I get some SSRs and time the brewery will be going electronic for better or worse
> 
> Out of interest I got 10 DS18B20's of ebay from a seller in hong kong for a couple of bucks each with only $5 shipping to the US (http://stores.ebay.com/Hyperfine-Store).
> 
> View attachment 21012
> 
> 
> h34r:



Hey Jason,

glad to hear you finally sussed out your problems with the lcd, i'm a little bit confused by your wiring on the breadboard? 
but seems you've got it reading temp ok!

i've been going absolutely hammer and tongs this week dedicating alot of time to this project and had a mate help out with
the code (best of all he works for fresh wort kit's so life is good!) 








all the steps have been tested are working great, the times and readouts etc also got it to display a report at the end of the process.

it is now at the stage where i'm ready to give it a trial run in the real world, just gotto get my mash turn sorted!

too bad i'm stuck bloody gardening today  

Rob.


----------



## Simon W

randyrob said:


> I'm a little bit confused by your wiring on the breadboard?
> but seems you've got it reading temp ok!


Looks like it's hooked up with a voltage divider for power thru the data pin, with Vdd tied to ground?


----------



## JasonY

Pretty much the pic is blury. Pretty basic, 2 x 10k resistors in parallel connected to the data line for the pull up resistor and the other lines to ground. Have to decide if I want more than one temp senor on the line or not and play bout with multiple sensors ....

Sure it won't be in production for some time.


----------



## kirem

Found this in an elektor email.

Parallax: MLX90614 infrared thermometer module 


The MLX90614 Infrared Thermometer Module from Parallax is an intelligent non-contact temperature sensor with a single pin serial interface for connection to most microcontrollers. The MLX90614 sensor is designed for non-contact temperature measurements of objects placed within the sensor's cone of detection. The sensor is comprised of an...


----------



## kirem

and an ultrasonic sensor.

http://www.parallax.com/Store/Sensors/Obje...e%2cProductName


----------



## bonj

trevc said:


> Be careful guys. It's all good fun until your brewery becomes self-aware. Lets just hope nobody wakes up in their kettle one morning, tied up with sensors inserted in to every orifice.
> 
> I, for one, will be sticking to analogue brewing. <_<



Hahaha! I'm not sure how self aware they'll be on only 1K of RAM and 16K of program space though


----------



## randyrob

Haven't you seen Bonj, you can now get 2K of RAM and 32K of flash on arduino 

ATmega328

My Sketch for HABS is currently up to 9K, so i'm not to concerned at this stage!


----------



## leiothrix

trevc said:


> Lets just hope nobody wakes up in their kettle one morning, tied up with sensors inserted in to every orifice.



The next time someone asks what size pots they should be buying they should be pointed to this thread and told to get the biggest pot they possibly can.

Not that I'd really like to be stuffed into a 120L pot, but it's got to be better than a little 10L jobby.

Rob.


----------



## bonj

randyrob said:


> Haven't you seen Bonj, you can now get 2K of RAM and 32K of flash on arduino
> 
> ATmega328
> 
> My Sketch for HABS is currently up to 9K, so i'm not to concerned at this stage!


Ooh and pin compatible with the mega168 too... nice.

I'm sure you can optimise your code a little too. Avoid all floating point maths wherever possible.


----------



## randyrob

hehe...u guys are a crack up :lol: 

yep no floating point maths here and i've been thru the code and corrected my frivolous use of intergers and changed them to bytes which has saved a bit of space and made some libraries so i don't have to repeat code over and over.

have you also noticed Arduino 12 fixes the millis problem it now overflows after 49 days instead of 9 hours!

the only code i'm strugglig with at this stage is Fibonacci hop additions and Triple Decoction mashes.


----------



## kram

Hey Bonj, looks like a local ebay supplier for the DS18B20's here. $4 each with $2 capped postage.


----------



## randyrob

a thought about automating a stir plate for yeast starters crossed my mind today so i started knocking up some code for it, this is what i have so far:



Code:


/*

 * HASP (Halfluck Automated Stir Plate)

 * An open-source Stir plate for Arduino. 

 * 

 * (cc) by Rob Hart

 *

 * http://www.halfluck.com/automation

 * http://creativecommons.org/license/cc-gpl

 * 

 * v 0.1 

 */



int PinStirplateMotor = 13;	  



byte totalsteps = 2; 



byte stirplateontime = 10;	 //how long in minutes to run stir plate for

byte stirplateofftime = 50;	//how long in minutes to wait before running the stir plate again



unsigned long previous_millis_value = 0;	  



int step = 1;			// start at step 1



unsigned long cumulativeSeconds = 0;



unsigned long startstep = 0;  // placeholder for the starting of step time

unsigned long stopstep = 0;  // placeholder for the stop of step time

unsigned long steptime = 0; // time in milliseconds required for this step

int timercalculated = 0; // has the timer for a timed step been set (initially = false)



void setup()					// run once, when the sketch starts

{

  pinMode(PinStirplateMotor, OUTPUT);	  // sets the digital pin as output



}



void loop()					 // start of actual sketch, run over and over again

{

  //while (step<=totalsteps)	   // this will stop the code from restarting from here on in!

  {  

	switch (step) 

	{

	  case 1: 

		digitalWrite(PinStirplateMotor, HIGH);	

		if (!timercalculated) {

		  startstep = millis(); // start step clock, reads milliseconds from this moment

		  steptime = (unsigned long)stirplateontime*60*1000; // calculate the end of step from the configuired time "stirplateontime"

		  stopstep = startstep + steptime; // calculate the end of step from the configuired time "stirplateontime"

		  timercalculated = 1; // don't do again whilst in this step

		}

		if (millis()>=stopstep) { // time has finished

		  digitalWrite(PinStirplateMotor, LOW);	// turn stir plate motor off

		  step++;

		  timercalculated=0; // next step's timer not yet calculated

		}

	   

		break;

			 case 2: 

		if (!timercalculated) {

		  startstep = millis(); // start step clock, reads milliseconds from this moment

		  steptime = (unsigned long)stirplateofftime*60*1000; // calculate the end of step from the configuired time "stirplateofftime"

		  stopstep = startstep + steptime; // calculate the end of step from the configuired time "stirplateofftime"

		  timercalculated = 1; // don't do again whilst in this step

		}

		if (millis()>=stopstep) { // time has finished

		  step++;

		  timercalculated=0; // next step's timer not yet calculated

		}

	   break;	   

			 

	  }

	

	  while(millis() - previous_millis_value >= 1000)

	  {

		cumulativeSeconds++;

		previous_millis_value += 1000;

	  }



	} 

}


so far it will switch the stirrer motor on for 10 minutes and off for 50 minutes and repeat... so enough to rouse the yeast back into suspension

just curious as to what schedules everyone uses for yeast starters? i could build up some uber cool code to get the job done sat

starting the motor at full speed to build up cells then slow down over time, since this is something i've never really played with just looking for ideas.

cheers Rob.


----------



## mika

Stir plates are about vortex creation to allow the exchange of oxygen into the fluid aren't they ? I've wondered about a stirplate that spins for so long in one direction then stops and spins up in the other direction with an adjustable lag in between. Industrial mixers generally have baffle plates in the mixing vessel to stop the fluid spinning in the tank at the same speed of the agitator creating poor mixing. Perhaps a stirplate doesn't have these kind of issues, but I've always thought it would be fun to experiment.

Rob- Seems like a lot of code for what I'm sure you could achieve with a couple of 555 timer chips.


----------



## Simon W

mika said:


> ...
> I've wondered about a stirplate that spins for so long in one direction then stops and spins up in the other direction with an adjustable lag in between.
> ...


Nice idea, would need a different motor than the single-phase computer fans that are so common tho.

Edit: How about a pancake motor? 
No moving part's(except for the stirbar) and should be pretty easy for the Arduino, would use 6 I/O tho.


----------



## randyrob

thanks for that guys, i dont know what i was thinking at that time just bored at work i guess.

neway not a great deal of progress on this end except i've scored a new house for habs of a mate for free!

and it's got plenty of room for future upgrades!!








how is everyone elses projects going?

Rob.


----------



## bonj

no progress on mine... too busy dealing with other things at the moment. Love the fisher price wall wart


----------



## randyrob

9V 100mA $2 from good sammies!

i've found them a great place to get the exact power / amperage ac/dc plug packs for projects like this for dirt cheap

i saw them in dick smith's for like $27 or something pfft..


----------



## justsomeguy

No progress on mine either. Family stuff has managed to get in the way of almost everything at the moment.

Just a quick one. Has anyone given some thought as to how to mount the DS1820's in the outlet of a RIMS/HERMS ?

The mash tun isn't really a problem. I'm just going to close off the end of a piece of copper tubing and stuff the 1820 down the end of it.

gary.


----------



## randyrob

justsomeguy said:


> I'm just going to close off the end of a piece of copper tubing and stuff the 1820 down the end of it.



Hey Gary,

this is what i'm doing at the moment, just make sure u use some heat sink compound in there as well
i've found the sensors are much more responsive this way.

I haven't really put any thought into the sensors for the RIMS/HERMS yet but i'm sure there will be a few guys around here
with ideas.

Rob.


----------



## bonj

I was planning on something similar to what I have in my mashtun: A piece of aluminium tubing, sensor poking out the end, and some Selleys Knead-It to fill the gaps. Works fine for the mashtun and since the majority of the TO92 package is poking out from the filler, it seems to be fairly responsive. Pedro is doing something similar with silicone too.


----------



## JasonY

I have also done stuff all, mainly because I am a lazy bastard  

I have acquired some SSR's so I am ready to go a step further but am thinking about how to water proof (or wort proof) the DS1820. After my crap test run on my new HERMs system I am thinking the place for the temp will be in the sparge manifold so its going to have to be wort-proof. Either that or I may tape it to the copper exiting the HERMs coil so its external to the process. I need to do some test runs however to see how representative a measurement that will give.

Also thinking about a temperature cascade control, so the primary control would be wort temp which would set the SP for the HERMs reservoir temp. That could be overkill but then this whole microprocessor thing is so who cares


----------



## Andyd

JasonY said:


> I have also done stuff all, mainly because I am a lazy bastard
> 
> I have acquired some SSR's so I am ready to go a step further but am thinking about how to water proof (or wort proof) the DS1820. After my crap test run on my new HERMs system I am thinking the place for the temp will be in the sparge manifold so its going to have to be wort-proof. Either that or I may tape it to the copper exiting the HERMs coil so its external to the process. I need to do some test runs however to see how representative a measurement that will give.
> 
> Also thinking about a temperature cascade control, so the primary control would be wort temp which would set the SP for the HERMs reservoir temp. That could be overkill but then this whole microprocessor thing is so who cares



If you're using copper for your manifold, it will be sufficient to press the sensor against the outside of the copper, and then insulate that area.

Andy


----------



## AndrewQLD

Reading this thread with some wonder, quite amazing what you guys are doing here. Have any of you looked at LabVIEW , not sure if it is all that relevent but it looks impressive for graphical interface development (if that's the right term) and I thought it might be useful rather than writing all that code.

Cheers
Andrew


----------



## Andyd

AndrewQLD said:


> Reading this thread with some wonder, quite amazing what you guys are doing here. Have any of you looked at LabVIEW , not sure if it is all that relevent but it looks impressive for graphical interface development (if that's the right term) and I thought it might be useful rather than writing all that code.
> 
> Cheers
> Andrew



For me, brewing is as much about having a reason for playing with stuff like this and angle grinders, as it is about the finished product 

Andy


----------



## newguy

AndrewQLD said:


> Reading this thread with some wonder, quite amazing what you guys are doing here. Have any of you looked at LabVIEW , not sure if it is all that relevent but it looks impressive for graphical interface development (if that's the right term) and I thought it might be useful rather than writing all that code.
> 
> Cheers
> Andrew



LabView would be ideal, but the last time I bought a copy, someone else was picking up the tab. In other words, it's expensive as hell. [Or _was_ the last time I checked]

That's why open-source tools like Arduino are attractive: very little overhead costs for the end user.


----------



## randyrob

Hey Guys,

this is an idea i've come up with for my recirculation step:






The first pump (from bottom of mash tun to top of hlt/kettle)

The second pump (from bottom of hlt/kettle to to of mash tun)

if i run both pumps at the same time it creates a circuit from the bottom of the mash tun to the top of the mash tun,
i run that for 15 minutes until the wort clears up and then switch off the second pump to fill the kettle.

i'll upload a vid of it in action if my explanation didnt make any sense!

what do u think?

Rob.


----------



## randyrob

pretty rough video but hopefully u get the idea

VIDEO

i had to shoot it quickly i'm already running late for ausdb's wedding h34r: 

Rob.


----------



## serialmonkey

Finally got my beerduino built over the past week or so. It's very basic (I'm only into kits+bits) but it was fun to build.

The Arduino uses a LM35 on an analog pin to read a value in degree's, then flicks a relay on and off depending on some hard-coded limits. The cool thing is that it outputs the temp to the serial port every 30 seconds to a spare laptop which stores and graphs the data.

I've got a bright ale clone going at the moment - attached is the current graph. 




The red line shows when the relay has turned the fridge on-and-off. The black lines are the limits I'm trying to maintain.

If anyone is interested in the various pieces of code I've posted them here - http://www.markwallis.id.au/wiki/index.php?title=Brewduino


----------



## bonj

Nice work, serialmonkey! I think you should consider dropping the upper limit down to at most 20 (depending on your yeast). 

I considered using the LM35s when I couldn't get my DS18S20s to work. Turns out I mixed up the pullup resistor, and once that was figured out, they worked a treat. The LM35s certainly are cheap.


----------



## serialmonkey

Thanks for the tip. I'm using a SafAle S04 at the moment which apparently is up to 24 degree's, but your right, lower would be better.

I had the same problem with the LM35's. I didn't use the resistor to begin with and the variation in tempreature from one second to another was insane. 100K resistor later between the GND and Vout on the LM35 and all is well.


----------



## bonj

Glad I'm not the only one. 

Your graph is interesting, it shows a short period where the temperature keeps dropping after the cooling is turned off. I have noticed a profound example of this with my chest freezer, although I don't graph it (yet) and use a fridgemate on it.


----------



## serialmonkey

I agree it's odd. I've had to allow for an additional 2 degree drop even after the fridge is turned off, hence I have the arduino killing the relay 2 degree's before my low threshold. I imagine I'll have to tweak this over summer


----------



## enoch

I can't see it referenced but someone has posted a new pid library for arduino at arduino site.
I'm still coming up to speed on the arduino but hope to use this library for my espresso machine.


----------



## Doogiechap

Just a heads up that Jaycar is selling a heap of different displays at good prices at the moment. They have been sourced as a one off sale and are not being stocked at retail outlets but you can find out more about them here.
Cheers
Doug


----------



## bonj

I've just re-read a lot of this thread in an "enlightened state" brought on by a couple of homebrews followed by some Meantime IPA, and I have to say I love what's happening on this thread. Some great innovation happening here and some great humour too. A perfect combination if you ask me. 

Thanks to enoch for the link. I will chase than up when I'm in a more comprehending state of mind. 

Thanks also to Doogiechap. Great to see how everyone has the community in mind when they find good deals.

_I love you guys_  :lol: okay, so I'm a happy drunk.


----------



## Simon W

Nice one Doogs!!

For anyone looking here but can't be bothered downloading the pdf catalog (10 meg), the product codes are pretty easy to work out.
The first numbers in the product code are the lcd type.
eg: 162 is 16char x2 line alphanumeric.
404 is 40char x4 line etc.
64128 is 64x128 dot matrix... etc etc

For the rest of the product code(back lighting etc), check this chart:




A 64 x 240 pixel display with backlight for $5??
F&$*ing bargain, get in while it's good.
A graphing fridgemate-style temp controller, or graphing mash thermometer anyone???


----------



## Doogiechap

Another Jaycar Display sale if you missed the last one


----------



## Simon W

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!


----------



## randyrob

Hey Guys,

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

some pics here

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

Rob.


----------



## justsomeguy

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.


----------



## bonj

I wired mine up in parallel in 4 bit mode.


----------



## randyrob

justsomeguy said:


> 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**


----------



## justsomeguy

randyrob said:


> 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


----------



## randyrob

justsomeguy said:


> 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.


----------



## randyrob

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!






hmm....




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

Rob.


----------



## randyrob

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




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




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


----------



## bonj

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.


----------



## rwmingis

randyrob said:


> 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?


----------



## bonj

Brewing Bob said:


> 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.


----------



## fraser_john

randyrob said:


> 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:


----------



## Ducatiboy stu

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 ass
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


----------



## justsomeguy

Ducatiboy stu said:


> 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 ass
> 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


----------



## justsomeguy

randyrob said:


> 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


----------



## Ducatiboy stu

Yes...I knew 100 would be an issue :lol: ....might have to put a gosub in there... B)


----------



## justsomeguy

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


----------



## newguy

Nothing is easier than a dog's firmware:

[codebox]while (TRUE) {

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

:lol:


----------



## Ducatiboy stu

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


----------



## randyrob

Hey Guys,

a mate of mine spotted this and emailed it to me.

looks like someone else has beaten me to it and released an opensource arduino based system for brewing

LINKY1

LINKY2


Rob.


----------



## Doc

randyrob said:


> Hey Guys,
> 
> a mate of mine spotted this and emailed it to me.
> 
> looks like someone else has beaten me to it and released an opensource arduino based system for brewing
> 
> LINKY1
> 
> LINKY2
> 
> 
> Rob.



Just been sent those links too.
Looks pretty slick.

Doc


----------



## Doc

A few years back Kegbot was launched at Defcon.
I was intrigued and started down the path of assembling the bits to mess with for a possible office solution.
Life got in the way and it didn't happen.
Revisiting the project today and it has evolved into v3 of the code, and is using USB and the Arduino controller.
I've found my ibuttons, and reader, the solenoid, and am trying to locate my flowmeter. Maybe this time I'll get it done and have it integrated to Twitter etc.
Anyone else keen ?

Doc


----------



## randyrob

Very Interesting Doc,

I'm in the camp where i'd prefer not to know how much i'm drinking but it could come in handy to know if you've only got a few pints of say amber left
so you have enough warning to brew another batch before it blows dry.

hmm... might have to look into that one.

Rob.

p.s. will post some updates soon on the progress of my project, i've been working on it non stop for 2 weeks now!


----------



## Doc

I don't think I'll have it on the main kegorator in the house. Simply because there are 6 kegs in that one, and it would be a bit of a pain to manage, let alone the cost of multiple flow meters, solenoids etc.
More I was thinking about it for the party setup 

Doc


----------



## chappo1970

Is everybody still working up their projects? Thanks to RandyRob I have got a healthy interest in this now. Contemplating the first project to control my fermentation processes especially for lagers. I'm hoping to catch Bonj at the next BABBS to discuss.


----------



## enoch

Bump... I have yet to go beyond an uber thermometer.

For those into PID control I note the arduino PID library is now out of beta. It has an excellent description of the code and implementation associated with it for those so inclined.
It might be controlling my espresso m/c before it makes it into the brewery! Arduino PID library


----------



## ArnieW

enoch said:


> Bump... I have yet to go beyond an uber thermometer.
> 
> For those into PID control I note the arduino PID library is now out of beta. It has an excellent description of the code and implementation associated with it for those so inclined.
> It might be controlling my espresso m/c before it makes it into the brewery! Arduino PID library


I've been using the brewtroller (www.brewtroller.com) for two years now. I reckon it's the bees knees! Beats reinventing the wheel.


----------



## bonj

ArnieW said:


> I've been using the brewtroller (www.brewtroller.com) for two years now. I reckon it's the bees knees! Beats reinventing the wheel.


'tis a tad overkill for those not after full automation though.... and the arduino code is a fun pursuit to those of us that way inclined.... not to mention the price difference.


----------



## ArnieW

Bonj said:


> 'tis a tad overkill for those not after full automation though.... and the arduino code is a fun pursuit to those of us that way inclined.... not to mention the price difference.


I guess its horses for courses. I spent a lot of time developing a picaxe brewing platform but having an open source community makes it a lot easier. There is always the cheaper brewtroller path of etching boards and buying components. I'm happy because I don't have to know PID maths or algorithms to make it all work.

RandyRob has also done some great work with his brewing rig which I'm pretty sure is arduino based.


----------



## bonj

ArnieW said:


> I guess its horses for courses.


For sure. The brewtroller is a great looking piece of kit (pretty sure it's arduino mega based).


----------



## ArnieW

Bonj said:


> For sure. The brewtroller is a great looking piece of kit (pretty sure it's arduino mega based).


It's based on the sanguino which is an arduino clone with extra memory. It was developed by the reprap mob.


----------



## antoncoetzee

Here's my cheapo 20l brew setup. Arduino controlled, basically only HLT and Kettle temp control at the moment. Monitors Mash tun temp, CFC outflow temp, and rough PID-ish control for the HLT and Kettle.
One day when I can afford to upgrade, I'll do controlled valves, pump, etc.
Hardware is an Arduino 644 (My own design, basically an Arduino but with the Atmega644), a couple of 25A SSRs, and a bunch of DS1820 temp sensors. Display is a scrounged 16x2 LCD, and a CNC cut plywood box.


----------



## matho

welcome to AHB antonc

love your work mate, putting a temperature controller on my HLT was the best thing i have done to make my brewday easier, good job :super: 

cheers matho


----------



## antoncoetzee

matho said:


> welcome to AHB antonc
> 
> love your work mate, putting a temperature controller on my HLT was the best thing i have done to make my brewday easier, good job :super:
> 
> cheers matho



Thanks matho... It has certainly made life easier. Just need to make a stirrer now to get the temp even throughout the HLT.



> Pist'n'Broke Brewery


Ha! Love it... I can relate


----------



## jonw

antonc said:


> Thanks matho... It has certainly made life easier. Just need to make a stirrer now to get the temp even throughout



Or if you're thinking about getting a pump, you could just recirculate in the HLT. I think that's what I'm going to do to try and avoid uneven temp distribution in th HLT.

Cheers,

Jon


----------



## enoch

jonw said:


> Or if you're thinking about getting a pump, you could just recirculate in the HLT. I think that's what I'm going to do to try and avoid uneven temp distribution in th HLT.
> Cheers,
> Jon


If you are OK with well oxygenated sparge water (HSA?) then in the sous vide world folks are using aquarium air pumps and bubblers to stir up the temperature controlled vessel.
I might do it for a HLT/HERMS but would be reluctant in the mash tun.


----------



## bonj

A little update. Things haven't exactly been fast, but I have started working on my HERMS controller again. I ordered some custom PCB's and they arrived yesterday:




The board has been designed to accept a Really Bare Bones Board (RBBB) from moderndevice.com on the back, and a HD44780 LCD on the front, running in 4 bit mode. I also have a wifi expansion module design ready to send to the PCB fabricator, which will plug into the ttl serial header on the middle left of the board (marked a and b ). The serial header rx and tx can be switched via jumpers at the bottom left, which should help with uart dyslexia 

The heater control pins will switch a SSR on command from the arduino PID algorithm. The minimum order was 10 boards, so I added a few extra pin holes and an optional header so I can use the board on other projects that might need a similar control.

The temperature sensor used is the Dallas Semiconductor DS18B20, which will be mounted in a probe end from Brewer's Hardware (formerly stirplates.com) in the outlet of the HERMS coil.

Programming of the HERMS steps will be done via the serial connection, either directly via a FTDI cable to a netbook, or via the wifi module when it gets completed. The serial comms will also allow for logging and monitoring via the planned web control panel. I have a 7" Android tablet which will make a great control panel.


----------



## bonj

Soldered the female headers yesterday. RBBB is attached, and headers are ready for the LCD.

More complete build log here


----------



## bonj

I have now 2 assembled boards, with LCDs. Now it's time to start work on the code and the HEX plumbing for my HERMS.

Pic 1 is testing output for the step control:





Pic 2 is testing large number output with custom characters for simple monitoring:


----------



## vykuza

Bonj great work! I'm sure many of us (including me) had the same skills to make exactly what we want like this. Are you intending to share your PCB designs and layouts?


----------



## matho

Looks great bonj :super:


----------



## Tim F

All these systems look awesome, i'm definitely keen to start learning about arduino. What have people found is the best place to start for a total noob? I know vb and php but no other languages or much about the hardware side.


----------



## bonj

Nick R said:


> Bonj great work! I'm sure many of us (including me) had the same skills to make exactly what we want like this. Are you intending to share your PCB designs and layouts?


I can share the PCB design (although I had to make one small green wire modification due to me stuffing up the LCD contrast connection). You can see the PCB artwork on the build log page here (bigfathooker.com).

I think I will make another revision in the shape of a standard arduino shield. I have also been working on a custom arduino board with the same form factor as the official board, but with a number of changes which I think would better suit embedded environments (and make them cheaper per board). 


Unassigned 2x3pin headers, with solder holes so you can wire them to whatever you like.
All through-hole components for easy soldering
5V and Ground rails, so you can wire them to anything, including the unassigned headers (eg 5V,GND,Digital Pin for direct connection to a servo, or use the ISP example code and wire it up as an ISP programmer to program the arduino bootloader onto more microcontrollers).
Programming pins (JP1) for connection to a FTDI cable or breakout board (lowers the cost of each board for embedded projects because you're not paying for the FTDI chip more than once).
Standard ISP header for direct programming (bypasses the arduino bootloader).
Configurable power options. 
Will accept a standard TO92 7805 regulator, or a more powerful TO220 package.

Ground plane provides heatsink to the TO220 package

Optional jumper to input direct 5V from another power supply or battery pack.

Power input wires have been given strain relief holes to relieve strain on the solder joints.

Power plane on bottom layer and ground plane on top layer create a decoupling capacitor which reduces noise.

Standard arduino form factor for shield compatibility.
All arduino pins have been broken out to extra solder holes.
Fully arduino IDE compatible if used with a bootloader flashed ATMEGA328/168


----------



## bonj

Tim F said:


> All these systems look awesome, i'm definitely keen to start learning about arduino. What have people found is the best place to start for a total noob? I know vb and php but no other languages or much about the hardware side.


Tim, the arduino IDE is based on C/C++, which you'll find is so close to PHP that you shouldn't have any issues. A good place to start would be to check out the official website and the tutorials there at arduino.cc. The library reference and forum there is pretty good for info too.


----------



## Zizzle

Looks good. 

I should post some stuff on what I have been hacking on.

You know you can get a 3.2" TFT with touch screen on ebay for not much more than those 16x2 LCDs these days?

Are you going to have enough code space in an Arduino to do all that you want?


----------



## bonj

Thanks for the complements guys. I'm pretty happy with my progress.



Zizzle said:


> You know you can get a 3.2" TFT with touch screen on ebay for not much more than those 16x2 LCDs these days?


I have a Nintendo DS screen and touchscreen here that my brother in law gave me, but no-one seems to know how to use them.... seems the screen is custom hardware. My interface is going to all be network controlled anyway, when I add the yet to be fabricated wifi expansion board. The LCD is really just a quick status screen. I got these LCDs from Hong Kong for around AUD$4.22 each, delivered. I have since ordered a couple more. Ebay auction here



> Are you going to have enough code space in an Arduino to do all that you want?


Yeah, I should easily. This is really only automating the HERMS stepping, so I don't need much. It won't even fill the ATMEGA168's 16K space, let alone the 328.


----------



## bonj

I was told the decimal point looked a bit big and out of place, so changed the custom character used for it, and while I was at it, I modified the code to reduce the space it took up, which enabled me to add the C to the end.


----------



## matho

Bonj said:


> I was told the decimal point looked a bit big and out of place, so changed the custom character used for it, and while I was at it, I modified the code to reduce the space it took up, which enabled me to add the C to the end.



hey bonj ,
LCD's have enough ram for 8 custom characters, can you do that with just the 8 or do you have to keep loading up different custom characters

cheers matho


----------



## bonj

matho said:


> hey bonj ,
> LCD's have enough ram for 8 custom characters, can you do that with just the 8 or do you have to keep loading up different custom characters
> 
> cheers matho


I've done that with exactly 8 characters, metho
global variables declare the actual character bits at the top:


Code:


byte LT[8] =

{

  B00111,

  B01111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111

};



byte UB[8] =

{

  B11111,

  B11111,

  B11111,

  B00000,

  B00000,

  B00000,

  B00000,

  B00000

};



byte RT[8] =

{

  B11100,

  B11110,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111

};



byte LL[8] =

{

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B01111,

  B00111

};



byte LB[8] =

{

  B00000,

  B00000,

  B00000,

  B00000,

  B00000,

  B11111,

  B11111,

  B11111

};



byte LR[8] =

{

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11110,

  B11100

};



byte MB[8] =

{

  B11111,

  B11111,

  B11111,

  B00000,

  B00000,

  B00000,

  B11111,

  B11111

};



byte block[8] =

{

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111,

  B11111

};


And in the setup code, (arduino LiquidCrystal library), upload the custom characters:



Code:


  lcd.createChar(0,LT);

  lcd.createChar(1,UB);

  lcd.createChar(2,RT);

  lcd.createChar(3,LL);

  lcd.createChar(4,LB);

  lcd.createChar(5,LR);

  lcd.createChar(6,MB);

  lcd.createChar(7,block);


Then I use a switch case statement to choose which characters to put where for each number in the string.


----------



## bonj

So for a '0': 


Code:


case '0':

		lcd.setCursor(charOrigin,0);

		lcd.write(0);  // call each segment to create

		lcd.write(1);  // top half of the number

		lcd.write(2);

		lcd.setCursor(charOrigin, 1); // set cursor to colum 0, line 1 (second row)

		lcd.write(3);  // call each segment to create

		lcd.write(4);  // bottom half of the number

		lcd.write(5);


----------



## matho

thanks Bonk


----------



## bonj

matho said:


> thanks Bonk


No worries, metho


----------



## bonj

wifi board for my HERMS controller.... made on an arduino shield form factor so it can be useful for other projects too.


----------



## Zizzle

Sweet! Your board layouts are getting more complex, what software are you using?


----------



## bonj

Zizzle said:


> Sweet! Your board layouts are getting more complex, what software are you using?


For the first board, I used Fritzing, which does an okay job for simple stuff, but is *very* slow as you add more components. For the above wifi board, I used Eagle, which smacks Fritzing right outta the ball park. I'm using the free version of Eagle, which is limited to 10cm X 10cm I think, and only 2 layers. But it's actually perfect for me since I'm really only working on arduino sized boards, and the fab house I use (seeedstudio fusion pcb service) only does 2 layer boards. They have the design rule and CAM export files for Eagle on their website so that makes things much easier. I did modify the CAM processor script to include the rest of Eagle's default silkscreen layers, as they seem to be a bit all over the place. I also modified the design rules because they say they do down to 6mil traces, but I've heard that it can be a bit unreliable, so I changed the minimum trace and space widths to 10mil to avoid any issues.

The artwork (minus some of the silkscreen to declutter the image):





The back of the board:


----------



## Zizzle

Bonj I might have to take your free software nerd credentials away... you should be using KiCad


----------



## bonj

Zizzle said:


> Bonj I might have to take your free software nerd credentials away... you should be using KiCad


:lol: I have KiCad installed. Like Eagle it's not very intuitive but unlike Eagle, and a common problem with free software, is that the documentation is a little sparse. Plus I've already invested my time in learning Eagle, and it does what I want... I also feel the need to support commercial vendors that release Linux versions of their software. There should be more of them.

We all find what works for us... Vi vs Emacs, KDE vs Gnome, etc... It's great to have that choice


----------



## technoicon

Doc said:


> I don't think I'll have it on the main kegorator in the house. Simply because there are 6 kegs in that one, and it would be a bit of a pain to manage, let alone the cost of multiple flow meters, solenoids etc.
> More I was thinking about it for the party setup
> 
> Doc




were can you get flow meters? i've had a little look online but there are no australian suppliers?

Want to do this project for our work kegorator. see's who's the biggest piss head!


----------



## bonj

Awesome Fury said:


> were can you get flow meters? i've had a little look online but there are no australian suppliers?
> 
> Want to do this project for our work kegorator. see's who's the biggest piss head!


*Aussie* supplier (I know a couple of people that have ordered from them and have been happy): http://littlebirdelectronics.com/products/water-flow-sensor
Overseas supplier (I have had my PCBs fabricated through them, but haven't ordered any of their parts): http://www.seeedstudio.com/depot/g12-water...l?cPath=144_151
*Aussie* supplier (slow shipping, but otherwise reasonably priced): http://www.futurlec.com.au/Flow_Sensor.jsp


----------



## fraser_john

Now Bonj, that little bit of script on the board there has to be divied up between the other shareholders you know


----------



## bonj

fraser_john said:


> Now Bonj, that little bit of script on the board there has to be divied up between the other shareholders you know




I was wondering when you'd notice that.


----------



## fraser_john

I didn't notice it, I hardly ever log onto AHB any more, old eagle eyes certainly noticed it though


----------



## bonj

fraser_john said:


> I didn't notice it, I hardly ever log onto AHB any more, old eagle eyes certainly noticed it though


It's subliminal advertising. Raising brand awareness...


----------



## technoicon

thanks. will give these a go


----------



## fraser_john

Bonj said:


> It's subliminal advertising. Raising brand awareness...



hheheh, I'll give you my bank account details for when you sell some of the shirts


----------



## bonj

fraser_john said:


> hheheh, I'll give you my bank account details for when you sell some of the shirts


Shhhh! Just enough info to create interest, but not enough to spoil the surprise!


----------



## Parks

Wow, I finally read up a bit on this stuff and it looks pretty damn cool. Bonj, any ideas roughly how much it would cost for components to simply monitor mash and HLT temperature with optionally controlling the HLT?

I haven't done any electronics since uni but it looks pretty straight forward and the programming looks easy enough...

Might hit you up for info at BABBs if you are going.


----------



## Zizzle

Bonj said:


> :lol: I have KiCad installed. Like Eagle it's not very intuitive but unlike Eagle, and a common problem with free software, is that the documentation is a little sparse. Plus I've already invested my time in learning Eagle, and it does what I want... I also feel the need to support commercial vendors that release Linux versions of their software. There should be more of them.
> 
> We all find what works for us... Vi vs Emacs, KDE vs Gnome, etc... It's great to have that choice



Ah but mate, this sort of stuff has network effects. If everyone uses Eagle then there is no incentive for anyone to support anything else.

Sure, eagle is free for small boards and all... but it just seems crazy to do "open hardware" based on proprietary software.

If you are going to used closed source electronics software, why bother with Linux at all... may as well just use all proprietary Mac/Windoze? After all Mac/'doze have better documentation too.

I actually think the FOSS would would be better off without proprietary vendors like Eagle. Then people would actually have to use and improve the free stuff.


----------



## bonj

Parks said:


> Wow, I finally read up a bit on this stuff and it looks pretty damn cool. Bonj, any ideas roughly how much it would cost for components to simply monitor mash and HLT temperature with optionally controlling the HLT?
> 
> I haven't done any electronics since uni but it looks pretty straight forward and the programming looks easy enough...
> 
> Might hit you up for info at BABBs if you are going.


That's a bit like asking how long's a piece of string... it depends on what kind of string you use.

For a simple setup like mine above, around $20 for the Really Bare Bones Board (RBBB from moderndevice.com), $4.50 for the LCD (from ebay) a few dollars for the resistors and other components, around $5 for the temperature sensor (DS18B20) and either another few dollars for some veroboard/stripboard or US$30 to have your own PCBs made (or about $5 to buy one of my surplus HERMS controller boards). Then you have to add on project case, temperature probe ends (brewershardware.com), connectors etc.

To control an HLT/HERMS, add on a solid state relay for around $15-$20 and a heatsink to match.


----------



## Zizzle

BTW on the original brewbot, I only cared if the wort was flowing or not.

So I went with one of these:

http://au.element14.com/gentech-internatio...-min/dp/1006772


----------



## Parks

Bonj said:


> That's a bit like asking how long's a piece of string... it depends on what kind of string you use.
> 
> For a simple setup like mine above, around $20 for the Really Bare Bones Board (RBBB from moderndevice.com), $4.50 for the LCD (from ebay) a few dollars for the resistors and other components, around $5 for the temperature sensor (DS18B20) and either another few dollars for some veroboard/stripboard or US$30 to have your own PCBs made (or about $5 to buy one of my surplus HERMS controller boards). Then you have to add on project case, temperature probe ends (brewershardware.com), connectors etc.
> 
> To control an HLT/HERMS, add on a solid state relay for around $15-$20 and a heatsink to match.



Yeah, I realise it's not a straight forward question but that's great. Knowing that I could budget <$100 approx is good to know.

Cheers


----------



## bonj

Zizzle said:


> Ah but mate, this sort of stuff has network effects. If everyone uses Eagle then there is no incentive for anyone to support anything else.
> 
> Sure, eagle is free for small boards and all... but it just seems crazy to do "open hardware" based on proprietary software.
> 
> If you are going to used closed source electronics software, why bother with Linux at all... may as well just use all proprietary Mac/Windoze? After all Mac/'doze have better documentation too.
> 
> I actually think the FOSS would would be better off without proprietary vendors like Eagle. Then people would actually have to use and improve the free stuff.



But if commercial vendors don't support Linux, it perpetuates the perception that Linux isn't ready for prime time. I know there are benefits to keeping Linux on the fringe and in the hands of the "technorati" but decent documentation isn't one of them. I'm all for FOSS, but if they can't compete on a level playing field then they need to lift their game.


----------



## matho

looks good bonj, I can't wait to see this all finished

i have both eagle and kicad installed, I'm more used too eagle but kicad has some promise but i have to play with it some more.

cheers steve


----------



## leahy268

Nice thread.

This is exactly where I'm heading with my brewery in the long run...
Knew I'd use that Bachelor of IT somewhere - sometime...
Now I just have to brush up on those Electrical knowledge..
Let's just say it's been a long long time..

On a side not though.. How do those little flow meters go with bits of wort and things??

Warwick


----------



## technoicon

having a look at the specs on one site, most only handles up to 40C so wouldnt really work with hot wort. i'm sure you can get ones that do though


----------



## leahy268

Yeah one of them said liquid temp up to 120..
That wasn't really the question.
More wondering about bits of hops and clogging..


Awesome Fury said:


> having a look at the specs on one site, most only handles up to 40C so wouldnt really work with hot wort. i'm sure you can get ones that do though


----------



## vortex

I'll have to have a read of this thread when I have some more time (at work *ahem*) but, just about to setup my first homebrew; and keen to monitor temps with one of the arduino's I have 
I work in IT so integrating technology into my brewing is something I'm pretty keen on! 
Would love to automate things later when I go all-grain


----------



## leahy268

Amazing the number of IT guys on this site..
Aparently beer and IT go together. Who'd have thought..


----------



## leiothrix

IT people always seem to be over represented on internet forums.

I've never figured out why . . .

(Systems admin here  )


----------



## bonj

leiothrix said:


> (Systems admin here  )


We'll try not to hold it against you...

Computer Science / Software Development here


----------



## matho

to break the trend just a lowly sparky here


----------



## seemax

Parks said:


> Yeah, I realise it's not a straight forward question but that's great. Knowing that I could budget <$100 approx is good to know.
> 
> Cheers



Can do it pretty cheap...

Arduino Uno or Demi ($30)
SSR ($5)
LCD ($5)
Stainless steel dS18B20 weldless probe ($12)

Install the probe... wire up the LCD... basic coding....voila, step mashes...


----------



## leahy268

matho said:


> to break the trend just a lowly sparky here




Nother Sys Admin here..


----------



## leiothrix

Bonj said:


> We'll try not to hold it against you...
> 
> Computer Science / Software Development here



If it helps I have a Bachelor of Computing Science and do some development work as well.

I really don't like the average dev or SA. 

It's a bit pathetic to see a (senior!) SA say they're going to have to modify 500 accounts manually when a few lines of powershell will do it in a few seconds (or even just dsquery/dsget/dsmod/dsadd and a batch file).

On the other hand, devs don't seem to understand anything at all about computers work, esp in a corporate environment. I mean seriously how can you be unable to install an application and make it work when you wrote the bloody app?

I suppose that which way the argument goes depends on the quality of the staff in the respective departments. I'm public sector, so mostly dregs in both unfortunatly :angry:


----------



## leahy268

leiothrix said:


> I really don't like the average dev or SA.
> 
> It's a bit pathetic to see a (senior!) SA say they're going to have to modify 500 accounts manually when a few lines of powershell will do it in a few seconds (or even just dsquery/dsget/dsmod/dsadd and a batch file).
> 
> On the other hand, devs don't seem to understand anything at all about computers work, esp in a corporate environment. I mean seriously how can you be unable to install an application and make it work when you wrote the bloody app?



Lol with ya there..


----------



## vortex

leiothrix said:


> If it helps I have a Bachelor of Computing Science and do some development work as well.
> 
> I really don't like the average dev or SA.
> 
> It's a bit pathetic to see a (senior!) SA say they're going to have to modify 500 accounts manually when a few lines of powershell will do it in a few seconds (or even just dsquery/dsget/dsmod/dsadd and a batch file).
> 
> On the other hand, devs don't seem to understand anything at all about computers work, esp in a corporate environment. I mean seriously how can you be unable to install an application and make it work when you wrote the bloody app?



That really gets me too...

Myself I'm a Senior Developer at a University, but I've worked as a SysAdmin (Linux and Solaris, Sun Solaris certified), I switched to development when I worked out I hate being woken at 3am to fix a server  I also have some Network skills - Cisco specifically, half way through a CCNA just for fun. I'm entirely self taught, yet I am more capable than the large majority of people i've worked with who have way more certifications than I do... Anyway I guess my point is good IT people are hard to find


----------



## Moray

Yet another senior sys admin/ infrastructure dev here.

To get this thread back on topic, how do you set temps
Hard code them, or can you setup some kind of input device?


----------



## Zizzle

Moray said:


> Hard code them, or can you setup some kind of input device?



I have built a few temp controllers.

The latest basically has no UI - I embedded a cheap bluetooth module. Set the target temperature via phone or PC.

The one before that, I used one of these:

http://www.sparkfun.com/products/9117

which worked out well.

Then of course there is always the simple up/down push button.


----------



## seemax

Rotary dial, 2 toggle switches for up/down or a mini keypad of some sort... Plenty of options


----------



## leahy268

Hey guys,

Still in the process of designing my brewery.
Probably be ages till I get it altogether.
However I was looking at 4 ring burners.
Reason being I was thinking of maybe putting 4 little solenoid valves in behind the individual taps on the rings..
That would then allow me to programmatically adjust my flame to give me just the right amount of heat.
Anyone know if anyones done this before?
Or if it's even possible??
Obviously back behind this I would have a proper solenoid for safety sakes..

Only thoughts at the moment.
But probably one of my next purchases is a burner and also to build a stand so thinking ahead I spose.
I have been tempted with an actuator and a simple burner but the draw back there is some of these burners don't work well on low flame.
Also those little actuators are damned expensive..

Thanks

Warwick


----------



## adryargument

Hey all,

Quick question is:
1. Can i use Arduino to record 3 temp sensors and turn on a pump?

If so, where do i start?
(Work in IT and coding, so the main issue i will have is getting my head around the electronics)


----------



## bonj

adryargument said:


> Hey all,
> 
> Quick question is:
> 1. Can i use Arduino to record 3 temp sensors and turn on a pump?


Yes.


> If so, where do i start?
> (Work in IT and coding, so the main issue i will have is getting my head around the electronics)


Start by checking out the datasheet for the DS18B20+ or the LM34 temperature sensors. The DS18B20 is really easy: Ground to ground, Vcc to your 5V arduino supply, data to a digital pin, with a 4.7KOhm pull-up resistor between the data pin and Vcc.

for the output side, you can simply use a SSR (solid state relay), or mechanical relay. There should be plenty of guides online for you to read up on that. There are other ways too: mosfets, triacs, optocouplers with power transistors... it all depends on what you're switching, whether it's AC or DC, high or low current, high or low voltage, etc.


----------



## Moray

Would one of these LCD shields with keypad be ok for display and input ?

http://www.ebay.com.au/itm/LCD-Keypad-Shie...6#ht_1979wt_689


----------



## vortex

Looks a lot like the Freetronics LCD from Jaycar, not identical but quite similar. If it works pretty close to the same, then it should work fine. I have one of the Freetronics LCD's and it's very good.


----------



## adryargument

So am i on the right track?
Do i need any additional breadboards / cables etc?

Any help is appreciated - i don't want to have to reorder a bunch of items i missed.







trying to find some potentiometer to control 12v -> 5v (computer fans)... hmm... possible?


----------



## bonj

adryargument said:


> So am i on the right track?
> Do i need any additional breadboards / cables etc?
> 
> Any help is appreciated - i don't want to have to reorder a bunch of items i missed.
> 
> 
> 
> 
> 
> 
> trying to find some potentiometer to control 12v -> 5v (computer fans)... hmm... possible?


Do you need the flex sensor in that starter kit? You can do it cheaper if you go with a plain arduino/compatible board and a breadboard kit.

are you wanting to vary the speed of the fan? You can do it with a pot as part of a voltage divider. there are a number of ways to do it. I have played with using pulse width modulation on an arduino to control a 12V fan, which allows more fine grained speed control, and the ability to slow it down to slower than mere voltage lowering.

I am just about to have a custom arduino compatible board fabricated which works out quite a bit cheaper than the official boards... Particularly if you intend on using a few of them for different projects. I could probably do the arduino board and components as a kit for $15 plus postage.... but the lead time is about 4 weeks.


----------



## adryargument

Flex sensor?
I was just after a generic pack that had all the odds and ends i would normally forget to grab - definitely interested in the kit bonj - any more details?


----------



## bonj

adryargument said:


> Flex sensor?


That kit you chose has a flex sensor in it. I presumed you didn't want that.


adryargument said:


> I was just after a generic pack that had all the odds and ends i would normally forget to grab - definitely interested in the kit bonj - any more details?


Well, the kit would include all the components necessary to build a complete working arduino clone, but the programming cable/breakout would be extra:
http://littlebirdelectronics.com/products/ftdi-cable-5v
or
http://littlebirdelectronics.com/products/...sic-breakout-5v

The beauty of that arrangement, is that you only need to pay for the cable/breakout once, whereas on the official boards, you are paying for it with every board. As I said, if you intend to use multiple boards, that's where you realise a saving.

I have the board designed and ready to fabricate, but I haven't ordered it yet. (Which also means it is not tested). I have been intending on ordering it this week. My design has a few benefits over the official board:


# unassigned 2x3pin headers, with solder holes so you can wire them to whatever you like.
# 5V and Ground rails, so you can wire them to anything, including the unassigned headers (eg 5V,GND,Digital Pin for direct connection to a servo, or use the ISP example code and wire it up as an ISP programmer to program the arduino bootloader onto more microcontrollers).
# programming pins for connection to a FTDI cable or breakout board (lowers the cost of each board, for embedded projects because you're not paying for the FTDI chip more than once).
# Standard ISP header for direct programming (bypasses the arduino bootloader).
# configurable power options. 
* will accept a standard TO92 7805 regulator, or a more powerful TO220 package.
* ground plane provides heatsink to the TO220 package
* optional jumper to input direct 5V from another power supply or battery pack.
* power input wires have been given strain relief holes to relieve strain on the solder joints.
# Standard arduino form factor for shield compatibility.
# All arduino pins have been broken out to extra solder holes.
# Fully arduino IDE compatible if used with a bootloader flashed ATMEGA328/168


----------



## Moray

What size ssr do I need to control a 15amp element, is 25 amp ok or do I need a 40 amp?


----------



## leahy268

Hi guys,

What does everyone here use to sense liquid levels/volumes??

Warwick


----------



## Whiteferret

Moray said:


> What size ssr do I need to control a 15amp element, is 25 amp ok or do I need a 40 amp?




25 will do the job :icon_cheers: 



Bonj I am also interested in your basic kit does it have any basic parts or the flashed ATMEGA 328/168
I've already got some in my parts box. Are you just trialling 1 board or are you getting a multiple order?
Sorry have read the entire thread just not all today. :super: 

PS sparky here.
Have an Arduino and have done a few of the basics must rescue it from my Incubator as it is currently turning chook eggs until I get sick of raising chicks.


----------



## bonj

whiteferret said:


> 25 will do the job :icon_cheers:
> 
> 
> 
> Bonj I am also interested in your basic kit does it have any basic parts or the flashed ATMEGA 328/168
> I've already got some in my parts box. Are you just trialling 1 board or are you getting a multiple order?
> Sorry have read the entire thread just not all today. :super:
> 
> PS sparky here.
> Have an Arduino and have done a few of the basics must rescue it from my Incubator as it is currently turning chook eggs until I get sick of raising chicks.


The kit would include all the parts necessary to make a working arduino compatible board (ATMEGA328), but *not* the programming cable. I haven't actually flashed a blank ATMEGA328/168 yet, so clearly I have to test all that before I could sell any of them.

I will be ordering 10 boards as that is the minimum.


----------



## seemax

leahy268 said:


> Hi guys,
> 
> What does everyone here use to sense liquid levels/volumes??
> 
> Warwick



Sure Electronics have some bits that are useful in the brewery...

Water level sensors (plastic, stainless)
http://www.ebay.com.au/sch/sureelectronics...1.c0.m270.l1313

DS1820 stainless temp sensor (weldless)
http://www.ebay.com.au/itm/110738871138?ss...984.m1439.l2649

They also sell cheap LCDs, SSR's, etc. Quality is about right for the price.


----------



## leahy268

seemax said:


> Sure Electronics have some bits that are useful in the brewery...
> 
> Water level sensors (plastic, stainless)
> http://www.ebay.com.au/sch/sureelectronics...1.c0.m270.l1313
> 
> DS1820 stainless temp sensor (weldless)
> http://www.ebay.com.au/itm/110738871138?ss...984.m1439.l2649
> 
> They also sell cheap LCDs, SSR's, etc. Quality is about right for the price.


Hmm seen the level sensors.
They only give when it reaches a particular level don't they?
As in they don't allow me to calculate the volume??


----------



## matho

ill probably get burned at the stake because it uses a PIC but THIS is how i do volume measurement on my HLT, it works really well and would probably be even better for someone that could produce better code

cheers matho


----------



## leahy268

matho said:


> ill probably get burned at the stake because it uses a PIC but THIS is how i do volume measurement on my HLT, it works really well and would probably be even better for someone that could produce better code
> 
> cheers matho




Nice solution Matho.
Not sure what kind of pressure sensors would be happy to sit up so close to a gas flame however.


Is anyone using the BrewTroller method with the air filled tubes and pressure sensors?


----------



## Zizzle

Both my brewbots use conductive probes reliably.

Pretty simple, just mount a bit of stainless rod on a bit of old plastic kitchen board (or similar) that poke down to the desired level inside the pot. Water and wort conduct very well. Wire the probe to the ADC input of your microcontroller and a 100K pullup resistor. Make sure the vessel is grounded.

I mount one just above the heating elements. In the control code, heat is only applied when that one is conducting so that the element is not dry fired.

I have another one a bit higher.

On the code side, just do a simple averaging function across a few samples, and have a threshold value - usually around 50% of the full adc value. Once the voltage drops below the threshold then you know the liquid has hit the probe.

I find the resistance of water is usually about 30K. So the ADC reading will usually be 1/3 of the full scale value.

Now here is the good part. Since the filling of water is via solenoid, the fill rate is pretty constant. And the two probes are a known distance (and so volume) apart. So the code measures the time to fill between the two conductive probes. From that we can extrapolate how long to hold the solenoid on to get the desired volume. Not super accurate, but works pretty well. Pretty minimal external circuitry.


----------



## bonj

Introducing the bonjuino revision 1!





As you can see, all arduino pins are broken out to extra holes so you can solder directly to them. There are header connector spots available (the two 4x3 pin holes) so you can wire jumpers from the pin breakouts and wire them up however you like. The unpopulated rows between the header spots and the programming pins are free 5V and Ground connections. If you have a 5V regulated source already, you can bypass the onboard regulator (and the surface mount caps) and wire a jumper across the pins marked "VIN = 5V?".






Kit available at an introductory price of $15 plus postage. Requires soldering, and the two capacitors pictured bottom left are surface mount. Female header pins are supplied as a single 40pin length, that needs to be cut to the lengths required (You wouldn't believe how much $$ this saves over precut ones!). Includes ATMEGA328 flashed with the duemilenove bootloader (UNO bootloader (optiboot) can be flashed on request, but is not tested). Requires either a programming cable or breakout board to program.


----------



## ArnieW

Bonj said:


> Introducing the bonjuino revision 1!
> 
> 
> 
> 
> As you can see, all arduino pins are broken out to extra holes so you can solder directly to them. There are header connector spots available (the two 4x3 pin holes) so you can wire jumpers from the pin breakouts and wire them up however you like. The unpopulated rows between the header spots and the programming pins are free 5V and Ground connections. If you have a 5V regulated source already, you can bypass the onboard regulator (and the surface mount caps) and wire a jumper across the pins marked "VIN = 5V?".
> 
> 
> 
> 
> 
> 
> Kit available at an introductory price of $15 plus postage. Requires soldering, and the two capacitors pictured bottom left are surface mount. Female header pins are supplied as a single 40pin length, that needs to be cut to the lengths required (You wouldn't believe how much $$ this saves over precut ones!). Includes ATMEGA328 flashed with the duemilenove bootloader (UNO bootloader (optiboot) can be flashed on request, but is not tested). Requires either a programming cable or breakout board to program.


Nice work Bonj, and great price for the kit. I'd be tempted except I have a spare brewtroller I'm not using and a duemilenove waiting for a project.


----------



## bonj

ArnieW said:


> Nice work Bonj, and great price for the kit. I'd be tempted except I have a spare brewtroller I'm not using and a duemilenove waiting for a project.


Thanks Arnie. I'm really happy with how it turned out. I have already identified a couple of mods I will make for the next revision (slight increase in size for the strain relief holes for the power wires, and a small increase in clearance for the crystal/caps/reset switch. Nothing that needs immediate attention, but that's the reason for the "introductory price". It will be about $20each for the next run. And if I can find an inexpensive source for the *low profile* 47F 25V through hole caps, I will replace the surface mount caps with them.


----------



## vortex

I've just got the twin channel temp controller from mashmaster, I also bought the stainless steel probe too so now I have a spare temp sensor. Does anyone know how to use it with an Arduino? Are they simply a one-wire?


----------



## bonj

vortex said:


> I've just got the twin channel temp controller from mashmaster, I also bought the stainless steel probe too so now I have a spare temp sensor. Does anyone know how to use it with an Arduino? Are they simply a one-wire?


Unlikely to be a one-wire sensor. Most likely either a thermistor, an analog temp sensor ( like an LM35, outputs a voltage relative to the temperature), or some sort of thermocouple. thermistors and analog sensors are easy to use, they just use an analog pin on the arduino. Not sure how to use a thermocouple as I've never looked into it.


----------



## Tanga

seemax said:


> Can do it pretty cheap...
> 
> Arduino Uno or Demi ($30)
> SSR ($5)
> LCD ($5)
> Stainless steel dS18B20 weldless probe ($12)
> 
> Install the probe... wire up the LCD... basic coding....voila, step mashes...



Awesome! This is what I want to do. I am in the process of building a bastardised manual version of the single vessel 'braumiester clone' that Matho and TimF have been working on, using an STC-1000 to manually control the steps. It'll probably be a few months before it's complete and tested, but the dream is to automate it if it can be done cheaply (ie no way I'm adding a brewtroller).

I only have a very basic understanding of electronics and coding, but I'm quick study, especially if it helps me make better beer.

So obviously I need the above. I would also need some kind of input device. A cheap bluetooth or wireless module and phone / computer sounds good, and/or this:
http://item.mobileweb.ebay.com.au/viewitem...Id=260775735158

I am using an urn as my outer pot / element, so need to control that (presumably the SSRs job?)
And one of those small brown pumps (12 volt @ 590mA) - can be done manually (and just run it constantly throughout the mash cycle) instead though.
I would also like to have alarms at different intervals, ie end of mash, during the boil for my hops additions, etc.

I have been doing some general reading and it looks like it's doable. What do you guys think? Any input or links to single vessel arduino info much appreciated.

ps. Would the bonjuino do the trick?


----------



## vortex

Bonj said:


> Unlikely to be a one-wire sensor. Most likely either a thermistor, an analog temp sensor ( like an LM35, outputs a voltage relative to the temperature), or some sort of thermocouple. thermistors and analog sensors are easy to use, they just use an analog pin on the arduino. Not sure how to use a thermocouple as I've never looked into it.



Thanks, that certainly gives me enought to get me started experimenting! Here's hoping it's analog 
Cheers


----------



## bonj

Tanga said:


> Awesome! This is what I want to do. I am in the process of building a bastardised manual version of the single vessel 'braumiester clone' that Matho and TimF have been working on, using an STC-1000 to manually control the steps. It'll probably be a few months before it's complete and tested, but the dream is to automate it if it can be done cheaply (ie no way I'm adding a brewtroller).
> 
> I only have a very basic understanding of electronics and coding, but I'm quick study, especially if it helps me make better beer.
> 
> So obviously I need the above. I would also need some kind of input device. A cheap bluetooth or wireless module and phone / computer sounds good, and/or this:
> http://item.mobileweb.ebay.com.au/viewitem...Id=260775735158
> 
> I am using an urn as my outer pot / element, so need to control that (presumably the SSRs job?)
> And one of those small brown pumps (12 volt @ 590mA) - can be done manually (and just run it constantly throughout the mash cycle) instead though.
> I would also like to have alarms at different intervals, ie end of mash, during the boil for my hops additions, etc.
> 
> I have been doing some general reading and it looks like it's doable. What do you guys think? Any input or links to single vessel arduino info much appreciated.
> 
> ps. Would the bonjuino do the trick?


You'd have a good shot at doing that with an arduino (bonjuino included (it's just a cheaper, kit based clone with a few layout enhancements to make it a bit more useful). You'll need some programming/electronics experience, or be a keen learner. It's not too hard to learn.

You'll just have to be careful about how many pins you need to do it with the arduino.


----------



## Tanga

Thanks Bonj, another reason why yours would be good.

Is this what you mean by a programming cord?
http://www.ebay.ie/itm/USB-TTL-Serial-Cabl...=item4ab05a34bf

If so, wtfbbq, it's just a cable, that price is ridunculous!


----------



## Zizzle

Bonj said:


> You'd have a good shot at doing that with an arduino (bonjuino included (it's just a cheaper, kit based clone with a few layout enhancements to make it a bit more useful). You'll need some programming/electronics experience, or be a keen learner. It's not too hard to learn.



Agreeing with Bonj, it's pretty easy to get running.

http://www.ladyada.net/learn/arduino/

It probably wouldn't be that hard to find a local hackerspace with some nerds to help you if you're in a big city.

I have a couple of mates in the Canberra one.

http://www.makehackvoid.com/


Once you have the basics working, I'm sure you'd find some good coding support on this forum too.


----------



## matho

vortex said:


> I've just got the twin channel temp controller from mashmaster, I also bought the stainless steel probe too so now I have a spare temp sensor. Does anyone know how to use it with an Arduino? Are they simply a one-wire?


vortex do you mean something like this, if so then it is not as simple as a one wire DS18b20, mainly because you will have set it up in a voltage divider circuit and read the voltage with the on board ADC and then use look up tables to work out the temp because they aren't that linear. Another thing is you have to watch how much current you run through them because if you run too much they will heat.

Bonj looks really good mate I might get one off you ill PM you later tonight

cheers matho


----------



## bonj

matho said:


> Bonj looks really good mate I might get one off you ill PM you later tonight
> 
> cheers matho


No problems Metho  I have one packaged up already and will package any others as they're wanted.


----------



## bonj

Tanga said:


> Thanks Bonj, another reason why yours would be good.
> 
> Is this what you mean by a programming cord?
> http://www.ebay.ie/itm/USB-TTL-Serial-Cabl...=item4ab05a34bf
> 
> If so, wtfbbq, it's just a cable, that price is ridunculous!


That's what I mean, except you'll need the 5V version, not that 3.3V one. The reason it is expensive is the FTDI FT232 chip inside it that does the USB to serial uart conversion. Using the cable means you don't need that chip on every bonjuino, thus saving you money... even more so if you happen to use more than one bonjuino. There are also breakout board alternatives that I will detail when I get back from the kids' xmas concert


----------



## Zizzle

Dear Bonjinator,

Do I have to pay you royalties for every beer brewed using the Bonjuino?

Do I need to have dodgy lip caterpillar and hat (like in your profile pic) to operate the Bonjuino correctly?


----------



## Tanga

Bonj said:


> That's what I mean, except you'll need the 5V version, not that 3.3V one. The reason it is expensive is the FTDI FT232 chip inside it that does the USB to serial uart conversion. Using the cable means you don't need that chip on every bonjuino, thus saving you money... even more so if you happen to use more than one bonjuino. There are also breakout board alternatives that I will detail when I get back from the kids' xmas concert



Hope the Christmas concert was awesome.  One more question... If my computer has a serial port can I use a cheaper option?


----------



## QldKev

Tanga said:


> Hope the Christmas concert was awesome.  One more question... If my computer has a serial port can I use a cheaper option?



A computer with a serial port. I though they had not made them for over 10 years?

QldKev


----------



## Tanga

QldKev said:


> A computer with a serial port. I though they had not made them for over 10 years?
> 
> QldKev




They haven't. >.>

Edit: Bugger, not even on my ancient old beast. Nevermind. USB it is.


----------



## Zizzle

You can get USB to serial adapters on ebay for about $3.


----------



## bonj

Zizzle said:


> Do I have to pay you royalties for every beer brewed using the Bonjuino?


If that's what you feel you need to do, I won't argue with you 


Zizzle said:


> Do I need to have dodgy lip caterpillar and hat (like in your profile pic) to operate the Bonjuino correctly?


It would help you look more like you know what you're doing, or like you've come to clean zee pool. YMMV



Tanga said:


> Hope the Christmas concert was awesome.


It was shithouse. I tell you, some of these schools couldn't organise a **** in a whorehouse.


Tanga said:


> One more question... If my computer has a serial port can I use a cheaper option?


Yes you can. There are a couple of options around the place using standard RS232 9 pin connectors, but it seems you need the USB anyway, so here are a few options:

Australia:
http://littlebirdelectronics.com/products/...sic-breakout-5v
http://littlebirdelectronics.com/products/ftdi-cable-5v
http://littlebirdelectronics.com/products/...uino-compatible

USA:
http://shop.moderndevice.com/products/usb-bub

Or any number of others incorporating the FT232 chip from FTDI


----------



## neo__04

Hey,

Looking along the lines of some automation and think i'll give an Arduino setup a go.

Can you recommend me a starting kit with brewing in mind that I can buy to kickstart my learning process?

I've done a bit of reading and there are sooo many different starter kits with different sensors etc, Which starter kit & what parts did you buy to get yourself started?

Looking at setting up a 3v system with march pumps, calculate weight/volume of water, automate water filling etc, turning pumps/elemets on/off.

Any guidance with what to start out with will be great 

Thanks heaps


----------



## Tanga

Sorry I can't help with that Neo04, but I've been reading:
http://www.arduino.cc/
Which has some great general arduino info and:
http://www.brewtroller.com/wiki/doku.php
for some more specialised knowledge (the brewtroller is arduino based from what I've read so far).
The user manual:
http://www.brewtroller.com/wiki/doku.php?i...er_manual&s[]=arduino
explains different functions you might want to program, and then gives the code, so probably the most helpful link of all, for what you want to do.

*Breakout Box*
Look what I've found. The layout looks similar, is the price difference just because they are Chinese rather than Taiwanese chips or something?
http://www.ebay.com.au/itm/USB-RS232-Modul...=item2c5b0d4db9
It looks ready to stick on? Presumably I don't solder it on, as that defeats the purpose.

You might also want to check out the Brewtroller forums:
http://forum.brewtroller.com/
There are many discussions on the topic there.


----------



## bonj

Tanga said:


> *Breakout Box*
> Look what I've found. The layout looks similar, is the price difference just because they are Chinese rather than Taiwanese chips or something?
> http://www.ebay.com.au/itm/USB-RS232-Modul...=item2c5b0d4db9
> It looks ready to stick on? Presumably I don't solder it on, as that defeats the purpose.


It's not 100% ready to use as a programming interface, as the arduino needs the RESET line tied to DTR(I think it's DTR). You could probably get it working with a creative cable. It's worth a try for the price!


----------



## Zizzle

Tanga said:


> *Breakout Box*
> Look what I've found. The layout looks similar, is the price difference just because they are Chinese rather than Taiwanese chips or something?
> http://www.ebay.com.au/itm/USB-RS232-Modul...=item2c5b0d4db9
> It looks ready to stick on? Presumably I don't solder it on, as that defeats the purpose.



Nah it's cheaper because it uses the FT232*BM* whereas most the programmers use the FT232*RL*

I'm not sure the BM/BL will work with the common AVR programmer software. And if they do it will be in bit bang mode and much slower.

I'd recommend you just pay the extra $10 and get a cable known to program the AVRs. Surely worth it to save the hassle. If time is money then it would only have to save 10 minutes of stuffing around to pay for itself.


----------



## Zizzle

I forgot to mention that you don't NEED an FTDI based programmer. There are many ways to do it.

For example you can get programmers based on other mircos:

http://www.ebay.com/itm/USB-Atmel-AVR-Prog...s-/190606278849

Or if you have a real arduino not a bonjuino you can use it to program other AVRs/bonjuinos.

Or you can get a swiss-army knife type device:

http://dangerousprototypes.com/bus-pirate-manual/

Or if you have and old desktop PC you can use the Parallel Port (or buy a $5 Printer port card off ebay) and use a cheap printer port bit bang.


----------



## bonj

Zizzle said:


> I forgot to mention that you don't NEED an FTDI based programmer. There are many ways to do it.
> 
> For example you can get programmers based on other mircos:
> 
> http://www.ebay.com/itm/USB-Atmel-AVR-Prog...s-/190606278849
> 
> Or you can get a swiss-army knife type device:
> 
> http://dangerousprototypes.com/bus-pirate-manual/
> 
> Or if you have and old desktop PC you can use the Parallel Port (or buy a $5 Printer port card off ebay) and use a cheap printer port bit bang.


+1

The first arduino version just used RS232, but few PCs have those now. I used the arduinoISP sample code to flash the bootloaders on the the bonjuino ATMEGA328s, using a couple of Really Bare Bones Boards (RBBB) from moderndevice.com. 


Zizzle said:


> Or if you have a real arduino not a bonjuino you can use it to program other AVRs/bonjuinos.


A bonjuino can indeed be used to program other bonjuinos if you so desire. No need for an official board to use that functionality. Any official or clone board can do that. Only the USB side is missing from the RBBB/bonjuino/freeduino etc, as an intentional cost saving feature. You only need to pay for the FT232 once, rather than for every board.


----------



## Tanga

Oh, well, naw, I don't really have the knowledge to mess around with it like that. I found this store:
http://stores.ebay.com.au/e4u2011/_i.html?...1581&_pgn=5

Which seems to have a good price on lots of components (and even example code). I found this:
http://www.ebay.com.au/itm/Serial-USB-conv...=item2a1622af96
Which has the FT232RL chip, so may just go with that. Thanks! Very interesting stuff, lots to learn. I am lucky you guys are answering my questions, otherwise I could end up with all sorts of incompatable junk .


----------



## neo__04

What stage are you up to Tanga with your planning?

As in, Have you ordered a kit yet? Or are planning what to buy?


----------



## Tanga

Heh, no, I'm just looking at the moment. I need to finish building my brew machine first, and make sure it works. I will do the first few brews manually using an STC-1000, and if that's not too much of a hassle I might never automate it. It's on my wish, rather than my to do list. Though it's moving up the list a bit, considering how interesting arduino is looking.

Heck, considering these are the same price as the cable, or break out board usually are, (and come with a break out board too):
http://www.ebay.com.au/itm/Arduino-Nano-Mi...=item2a15682fb5
they might even be the way to go (sorry Bonj), but I doubt I will need many headers, so the arduino nano mini might do the trick.


----------



## Zizzle

Tanga said:


> Heh, no, I'm just looking at the moment. I need to finish building my brew machine first, and make sure it works. I will do the first few brews manually using an STC-1000, and if that's not too much of a hassle I might never automate it. It's on my wish, rather than my to do list. Though it's moving up the list a bit, considering how interesting arduino is looking.
> 
> Heck, considering these are the same price as the cable, or break out board usually are, (and come with a break out board too):
> http://www.ebay.com.au/itm/Arduino-Nano-Mi...=item2a15682fb5
> they might even be the way to go (sorry Bonj), but I doubt I will need many headers, so the arduino nano mini might do the trick.



The problem with the nanos is that you are giving up the arduino form factor. Which means no off the shelf plug in shields.

Which may be no problem for a brewery controller: you'll probably want an external high voltage relay board, a DS1820 (no need for a shield) and an LCD.

The LCD may be the only thing that a shield could make easier.

Anyway, if you are going to buy a nano, I've had good experience with these:

http://www.pjrc.com/teensy/


----------



## Tanga

Yeah, it's going to be a permanent solution so I have no problem soldering on the stuff I need, thanks Zizzle. Got any links to the stuff you've done? Like a blog or something?

EDIT: 
http://zizzle-brewbot.blogspot.com


----------



## bonj

I have a shield design in the works that will fit on any standard arduino form factor board (official board, bonjuino, freeduino, eleven, etc). I features LCD connections, and end-user configurable output headers (3x banks of 5 pins, and a bank of 3 pins (like for a DS1820)), and will be supplied with PCB mount screw terminals so you can connect up your sensors and SSRs without soldering, for easy board removal (customisation, replacement, etc). It will probably be available sometime in the new year. It's basically revision 2 of my HERMS controller board, revision 1 of which is currently designed for the RBBB from moderndevice.com (which I believe will be back in stock _with them_ in about 2 weeks).


----------



## QldKev

Neo__04 said:


> Hey,
> 
> Looking along the lines of some automation and think i'll give an Arduino setup a go.
> 
> Can you recommend me a starting kit with brewing in mind that I can buy to kickstart my learning process?
> 
> I've done a bit of reading and there are sooo many different starter kits with different sensors etc, Which starter kit & what parts did you buy to get yourself started?
> 
> Looking at setting up a 3v system with march pumps, calculate weight/volume of water, automate water filling etc, turning pumps/elemets on/off.
> 
> Any guidance with what to start out with will be great
> 
> Thanks heaps




This is the gear I got

Arduino + breadboard + hookup wires
http://www.ebay.com.au/itm/250885367624?ss...984.m1497.l2649 

Relay board
http://www.ebay.com.au/itm/170667758574?ss...984.m1497.l2649

5v power 
http://www.ebay.com.au/itm/260874422564?ss...984.m1497.l2649

Thermometers
http://www.ebay.com.au/itm/130586168086?ss...984.m1497.l2649

Flow meters
http://www.futurlec.com.au/Flow_Sensor.jsp 

Haven't finished programming / wiring it all up yet due to moving houses. Hopefully in the next couple of weeks I'll get back to it.

QldKev


----------



## bonj

QldKev said:


> This is the gear I got
> 
> Arduino + breadboard + hookup wires
> http://www.ebay.com.au/itm/250885367624?ss...984.m1497.l2649
> 
> Relay board
> http://www.ebay.com.au/itm/170667758574?ss...984.m1497.l2649
> 
> 5v power
> http://www.ebay.com.au/itm/260874422564?ss...984.m1497.l2649
> 
> Thermometers
> http://www.ebay.com.au/itm/130586168086?ss...984.m1497.l2649
> 
> Flow meters
> http://www.futurlec.com.au/Flow_Sensor.jsp
> 
> Haven't finished programming / wiring it all up yet due to moving houses. Hopefully in the next couple of weeks I'll get back to it.
> 
> QldKev


Nice looking kit QldKev! I have that same flow sensor from futurlec. It is the same one that Jaycar sells for a small fortune. Nice source for the DS18B20s too.


----------



## neo__04

Hmmm, Correct me if im wrong. And I may be, new to all this Arduino gear.

Is the Brewtroller just an already completed version of what we are going to try to do with an Arduino board?

What are the benefits of making this type of thing yourself?
Are we only going to end up basically with what a brewtroller is?

Sorry to sound nieve, just trying to get my head around it all.

Thanks


----------



## QldKev

Bonj said:


> Nice looking kit QldKev! I have that same flow sensor from futurlec. It is the same one that Jaycar sells for a small fortune. Nice source for the DS18B20s too.




I think I found the flow meters from one of your links. 

I should add for the OP, with this kit if you wanted it to run it stand alone you would need to add in a LCD screen and some sort of input device. Finally some decent way to mount it all up is needed too.

I am writing mine so it will be connected to a laptop when in use. Then I will have a nice graphical interface writen in C# on the laptop that allows users to interact with it, which talks with the arduino. The arduino will only be switching the relays based on requests from the gui, and reading the thermometers/flow meters and passing the info to the gui to do the logic work. 

I was watching the details on the wifi board build, but though I would just get the system running initially via the serial inteface and worry about the extra later. 

Later I want to add some solinoids in the system so I can tranfer from the HLT, recirc and transfer to the kettle via the interface too.

QldKev


----------



## neo__04

Quick question on those flow controllers.

Do you use them to work out for example, how much water has gone into the kettle.

Can you get an output from then which says how much has gone through, or is it simply how much L/Min is currently flowing through?


----------



## bonj

Neo__04 said:


> Quick question on those flow controllers.
> 
> Do you use them to work out for example, how much water has gone into the kettle.
> 
> Can you get an output from then which says how much has gone through, or is it simply how much L/Min is currently flowing through?


You get a pulse from the flowmeter for every revolution of the internal impeller. The datasheet tells you how to convert from pulses to Litres based on whether you have it mounted horizontally or vertically. You have to count the pulses and figure out the throughput yourself (or rather let the arduino do that).


----------



## benno1973

Hi guys,

Which of these flow sensors are you using? Not many seem suited to hot water application (over 40C) and the one sensor rated to over 60C measures 1.5-25L/min, which seems a bit fast for draining a mash tun? Or are you just using it when filling the mash tun from the HLT?


----------



## Tanga

Just found this:
http://brettbeauregard.com/blog/2011/04/im...d-introduction/
Probably old hat for those making their own PIDs in the arduino, but looks useful.

ps. I can't see how those thermometers that everyone is linking would survive in hot water, are they inside thermowells?


----------



## matho

Tanga said:


> ps. I can't see how those thermometers that everyone is linking would survive in hot water, are they inside thermowells?



tanga, you have to put them in a thermowell








this is how i did it
the beauty of the DS18B20 is that it is accurate to +- 0.5 deg c between -20 to +80 which is perfect for brewing also it is all digital which makes handling the data easier


----------



## neo__04

I have a packet of 10 of the DS18B20 in the 3 wire version, I keep reading about the single wire version.

Are the 3 wire ones just as easy to use?


----------



## bonj

Neo__04 said:


> I have a packet of 10 of the DS18B20 in the 3 wire version, I keep reading about the single wire version.
> 
> Are the 3 wire ones just as easy to use?


They are all 3 wire. OneWire refers to the protocol over a single data wire. The other two are V+ and GND


----------



## neo__04

Oh, lol, silly me. 

Thanks for that.

Got myself hooken on this thread, have a 3v keg setup planned, ordered an arduino board today and some bits and pieces, a flow controller, have heaps of temp sensors, a few ssr's so should be a fun little project.


----------



## Superoo

Bonj said:


> You get a pulse from the flowmeter for every revolution of the internal impeller. The datasheet tells you how to convert from pulses to Litres based on whether you have it mounted horizontally or vertically. You have to count the pulses and figure out the throughput yourself (or rather let the arduino do that).




You can also do a scale factor in your controller software so that you can calibrate it in your controller.

Just have a target value, say 5000, which will equal 1 Litre, and it starts at zero.
A Litres variable which starts at zero.
A counter variable which starts at zero.
A Scale value which is a fixed value, eg 1250. This scale value is adjusted to change the calibration.

Every pulse adds the scale (1250) to the counter value.
When the counter value reaches its target of 5000, add 1 to the Litres, and take 5000 off the counter.
Doing it this way the system becomes more accurate as the Litres increase.
And it is very finely adjustable.

cheers


----------



## bonj

Tanga said:


> ps. I can't see how those thermometers that everyone is linking would survive in hot water, are they inside thermowells?


Tanga, you can get the thermowells alone from places like brewershardware.com
They also sell temperature probes already assembled with DS18B20's inside. I have a couple of their probe ends and a thermowell and they're quality products.


----------



## Tanga

Bonj said:


> Tanga, you can get the thermowells alone from places like brewershardware.com
> They also sell temperature probes already assembled with DS18B20's inside. I have a couple of their probe ends and a thermowell and they're quality products.



Thanks Bonj! There was a stainless steel version that looked good, except for the long plastic lead, lol, kind of pointless really. They look like a much better option.


----------



## Moray

Saw this on the brewtroller forum, berfridge
http://www.elcojacobs.com/uberfridge/


----------



## neo__04

Hey zizzle, 
Mind if I ask what solenoid you used for fresh water into the kettle, also where I can buy from.
And same with the cheap little hop dropper motors, eBay? Any details on their specs?
Thanks heaps


----------



## Superoo

For water solenoids, I would use a simple reticulation solenoid from bunnings etc.


----------



## benno1973

I'd say a dishwasher or washing machine solenoid might be better suited, s it's probably temperature rated? And they seem to be cheaper!


----------



## Zizzle

Neo__04 said:


> Hey zizzle,
> Mind if I ask what solenoid you used for fresh water into the kettle, also where I can buy from.
> And same with the cheap little hop dropper motors, eBay? Any details on their specs?
> Thanks heaps



I got a brass 1/4" solenoid off ebay for about $8.

1/4" since I want the restriction to slow down the mains pressure flow rate.

For the hop dropper, just sum chinese RC servos, a couple of $ each:

http://www.ebay.com/itm/Micro-9g-Mini-Serv...C-/220752268466

For whoever asked, you don't really need the flow meter in a hot path. Just on the fresh water inlet side.


----------



## ArnieW

Neo__04 said:


> Hmmm, Correct me if im wrong. And I may be, new to all this Arduino gear.
> 
> Is the Brewtroller just an already completed version of what we are going to try to do with an Arduino board?
> 
> What are the benefits of making this type of thing yourself?
> Are we only going to end up basically with what a brewtroller is?
> 
> Sorry to sound nieve, just trying to get my head around it all.
> 
> Thanks


The answer is basically yes, except that the bt is not an 'out of the box' solution. The bt is an attempt at being all things to all brewers which means it can get complicated figuring out which bits you need and then how to configure those bits. Both Bonj's approach and the bt require a fair bit of experimenting and building. The bt has the advantage of doing a lot of the ground work (both hardware and code). Basically you get what you pay for. The starting price of the bt is also more than Bonj's kit, so it really depends where you want to spend your $ and where you want to spend your time.


----------



## Tanga

Considering the cost of those cables and boards I will probably grab one of these 328 kits that come with a board:
http://www.ebay.com.au/itm/Arduino-Pro-Min...e-/180747779579
as well as Bonj's. I've been doing some reading and Arduino looks fun to play with. I've wanted to make a robot for ages.


----------



## bonj

Tanga said:


> Considering the cost of those cables and boards I will probably grab one of these 328 kits that come with a board:
> http://www.ebay.com.au/itm/Arduino-Pro-Min...e-/180747779579
> as well as Bonj's. I've been doing some reading and Arduino looks fun to play with. I've wanted to make a robot for ages.


I can't read the print on the chip on the USB board, so assuming it is an FT232RL, it will be able to program a bonjuino or any other arduino compatible board using the same programming pin format (RBBB, Arduino Pro 5V, FTDI programming cable), but it doesn't appear to have the pins broken out into the same ordering as the aforementioned boards, so You'll need to sort that out before you can directly program a bonjuino/Arduino Pro 5V/RBBB.


----------



## neo__04

Anyone able to tell me what they use for lcd buttons.

I've seen a video somewhere with like a potentiometer you can push in for a button.
So you can scroll through a menu and push to select.

Anyone know what this is called?

Thanks heaps


----------



## vortex

Neo__04 said:


> Anyone able to tell me what they use for lcd buttons.
> 
> I've seen a video somewhere with like a potentiometer you can push in for a button.
> So you can scroll through a menu and push to select.
> 
> Anyone know what this is called?
> 
> Thanks heaps


Jaycar sell an Australian made LCD shield, comes with all the buttons built in and ready to go. Works for me. If you want to DIY, I'm not sure sorry.


----------



## bonj

Neo__04 said:


> Anyone able to tell me what they use for lcd buttons.
> 
> I've seen a video somewhere with like a potentiometer you can push in for a button.
> So you can scroll through a menu and push to select.
> 
> Anyone know what this is called?
> 
> Thanks heaps


you might be thinking of a rotary encoder.

I just use normul pushbuttons with a 10K pull-up resistor (the inputs on an arduino "float" (ie they go back and forth between high and low) if they're not specifically pulled high or low). The 10K resistor between the input pin and positive (5V) pulls the pin high, but if you then have the pin connected to a switch, which when activated, connects it to ground, the resistance to ground is much lower and pulls the pin low (like water, electricity likes to take the path of least resistance). I haven't needed to conserve pins by using any encoding method (binary encoded inputs) ey, so I just use one pin per push button.


----------



## Zizzle

Yep I have a rotary encoder in one of my temp controllers. Works really well.

You should be able to get one from Jaycar, but sparkfun has Arduino code and tutorials linked from their page:

http://www.sparkfun.com/products/9117


----------



## matho

Hey Bonj, if you don't mind, I think I'll post the development of the Brauduino here

had some spare time today so i designed a board today it fits on a 10cm X 7.5 cm





its all 20mil traces with 20mil clearances 
the bonjuino will plug into the component side and the LCD and buttons are on the bottom side

cheers matho


----------



## bonj

matho said:


> Hey Bonj, if you don't mind, I think I'll post the development of the Brauduino here
> 
> had some spare time today so i designed a board today it fits on a 10cm X 7.5 cm
> 
> View attachment 50660
> 
> 
> its all 20mil traces with 20mil clearances
> the bonjuino will plug into the component side and the LCD and buttons are on the bottom side
> 
> cheers matho


Looking good matho! 

It would be nice to get a set of boards available for different brewing applications. As you know I have been working on a design for my HERMS controller that will plug into an arduino/bonjuino board. I have opted to use crew headers and external SSRs for my board.

This is an early draft version of the rv2 board. I have made some changes since this screenshot, but I haven't settled on some features yet.



(I noticed an airwire on one of the arduino pins at the top of the brauduino board, and another on the LCD contrast pot)


----------



## matho

Bonj said:


> (I noticed an airwire on one of the arduino pins at the top of the brauduino board, and another on the LCD contrast pot)



yeah i picked that up too its fixed, I think when i ripped up the GND a couple of via's disappeared too.

I was looking at your herms board, i could make up a board for the braumiser that uses your herms board for the LCD and DS1820, might be a better solution, ill chat with you later about that


----------



## bonj

matho said:


> yeah i picked that up too its fixed, I think when i ripped up the GND a couple of via's disappeared too.
> 
> I was looking at your herms board, i could make up a board for the braumiser that uses your herms board for the LCD and DS1820, might be a better solution, ill chat with you later about that


Yeah, it all depends on whether you want the modularity of using the extra board, or the decreased cost of a single board.


----------



## spog

bonj,i dont understand electronics but, to use this Bonjuino to control the temps in the kettle i would have to connect it to the heating element,and connect a temp sensor to the Bonjuino,then connect the lot to a computer. the computer would then be programmed to make the reguired adjustments.


i would need to buy the sensor probe,usb-ttl cable and connections to the heating element?
hope this post makes sense.....cheers.......spog..........


----------



## bonj

spog said:


> bonj,i dont understand electronics but, to use this Bonjuino to control the temps in the kettle i would have to connect it to the heating element,and connect a temp sensor to the Bonjuino,then connect the lot to a computer. the computer would then be programmed to make the reguired adjustments.
> 
> 
> i would need to buy the sensor probe,usb-ttl cable and connections to the heating element?
> hope this post makes sense.....cheers.......spog..........


To control the temps in a kettle, you would need a temperature sensor, a way of mounting the sensor in the kettle (a thermowell/probe end), a relay to switch the element on and off (solid state seams to be preferred because they can be switched on and off rapidly without wearing out the physical contacts). The computer is only required to program the Bonjuino, as the microcontroller on board is a fully capable computer on a single chip. It is possible to use it in the way you describe, by using the computer as the main controller, but not required. If you wish to use a computer as the main controller and an arduino as an interface to the controls, you are better off getting an arduino with the FT232RL chip on board. That way you can plug it straight into the computer with a standard USB cable. The Bonjuino lacks that chip as a cost saving measure. It is designed for those that are likely to use more than one arduino for several standalone projects.

I hope that answers your questions.


----------



## spog

ahh hah,now i understand,i reckon i can ddo this without any troubles ....cheers.....spog........


Bonj said:


> To control the temps in a kettle, you would need a temperature sensor, a way of mounting the sensor in the kettle (a thermowell/probe end), a relay to switch the element on and off (solid state seams to be preferred because they can be switched on and off rapidly without wearing out the physical contacts). The computer is only required to program the Bonjuino, as the microcontroller on board is a fully capable computer on a single chip. It is possible to use it in the way you describe, by using the computer as the main controller, but not required. If you wish to use a computer as the main controller and an arduino as an interface to the controls, you are better off getting an arduino with the FT232RL chip on board. That way you can plug it straight into the computer with a standard USB cable. The Bonjuino lacks that chip as a cost saving measure. It is designed for those that are likely to use more than one arduino for several standalone projects.
> 
> I hope that answers your questions.


----------



## bonj

spog said:


> ahh hah,now i understand,i reckon i can ddo this without any troubles ....cheers.....spog........


no worries.

obviously, you'll need some form of input and output, whether that be pushbuttons, rotary encoders, LCDs, 7 segment displays, etc.


----------



## matho

got my Bonjuino today thanks mate


----------



## bonj

matho said:


> got my Bonjuino today thanks mate


Awesome!

Let me know how the assembly goes. It's pretty straight forward. All the parts are clearly marked on the PCB, and the parts list tells you the capacitor codes (I always have problems with them  ). You can see a large image at the website for reference here. Oh and please disregard the spelling mistakes in the tips page


----------



## matho

Bonj said:


> Oh and please disregard the spelling mistakes in the tips page



what's this thing you call spelling :blink:


----------



## bonj

matho said:


> what's this thing you call spelling :blink:


:lol:


----------



## Tanga

Spog, if heating a kettle is all you need to do you could use an STC-1000. Not trying to put you off experimenting, if that's what you want to do, but an STC-1000 is a cheaper and simpler way to heat a kettle or HLT etc. If you want to do both then an arduino may be cheaper.


----------



## spog

tanga,thank's for the info,i am bouncing several ideas around and slowly getting my head around all this tech stuff,...cheers...spog....


Tanga said:


> Spog, if heating a kettle is all you need to do you could use an STC-1000. Not trying to put you off experimenting, if that's what you want to do, but an STC-1000 is a cheaper and simpler way to heat a kettle or HLT etc. If you want to do both then an arduino may be cheaper.


----------



## matho

matho said:


> Hey Bonj, if you don't mind, I think I'll post the development of the Brauduino here
> 
> had some spare time today so i designed a board today it fits on a 10cm X 7.5 cm
> 
> View attachment 50660
> 
> 
> its all 20mil traces with 20mil clearances
> the bonjuino will plug into the component side and the LCD and buttons are on the bottom side
> 
> cheers matho



I was going to use tactile switches but i couldn't find one that would work well 

there are these that would reach thru the front panel but they look tacky and would not be waterproof. I'm thinking of putting a header on the board and use the Original Buttons that i used they have a really good feel to them and are IP67 rated and are a good price for what they are. What are peoples thought.

cheers matho


----------



## IainMcLean

Guys,

I'm new to Arduino and will be modifiying my brewery soon but I just wanted to share something with all you other interested noobs - I found a beginners guide that's pretty damn good at explaining the whole process.

I've uploaded it to the Internet Archive. You can download it for free here: http://www.archive.org/details/ArduinoStar...l&reCache=1

I have a copy of the official O'Rielly book but it's not a bona fide copy so I can't share that - something about getting it form a man with an eye patch and a wooden leg....


----------



## bonj

matho said:


> I was going to use tactile switches but i couldn't find one that would work well
> 
> there are these that would reach thru the front panel but they look tacky and would not be waterproof. I'm thinking of putting a header on the board and use the Original Buttons that i used they have a really good feel to them and are IP67 rated and are a good price for what they are. What are peoples thought.
> 
> cheers matho


I like the look of the IP67 ones. Given that they're fairly easy to access from Jaycar themselves, perhaps you could leave the buttons up to the end-user, with a recommendation that these ones have performed well on your system?

I'll be using these on my HERMS, but they're not IP rated: http://www.futurlec.com.au/Switches/PLBLK.jsp


----------



## adryargument

Someone has hacked Siri on the iPhone to work with Adruno to control SSR's.

Can anyone else see a voice activated brewery in the works?
'Siri, start mashing in my IPA...'

http://www.smh.com.au/digital-life/mobiles...1202-1o9zj.html


----------



## Zizzle

More than 10 years ago I joined a startup company doing voice recognition for TV and Mobile phones. They were struggling when I left in 2006.

A bit before their time - smart phones weren't really smart enough to do much with the capability. So it's bittersweet to now see Siri getting all the press like it was Apples invention. In fact I came up with a patent idea back in the day for the company. ... it probably reads on Siri - not sure it is granted yet.

But yeah we used to sit around and dream up what things we could voice control via our phones and tvs.

On the other hand if you do your brewery automation right, then you shouldn't need voice control


----------



## matho

Bonj said:


> I like the look of the IP67 ones. Given that they're fairly easy to access from Jaycar themselves, perhaps you could leave the buttons up to the end-user, with a recommendation that these ones have performed well on your system?
> 
> I'll be using these on my HERMS, but they're not IP rated: http://www.futurlec.com.au/Switches/PLBLK.jsp


yeah I think I'll change it to a header for the buttons it will give people more flexiblity

cheers


----------



## bonj

matho said:


> yeah I think I'll change it to a header for the buttons it will give people more flexiblity
> 
> cheers


Yeah, I'm a huge fan of flexibility  
:icon_chickcheers:


----------



## Zizzle




----------



## gap

Zizzle said:


>




Now that is what I call spreading her legs!!!


----------



## benno1973

I got my Arduino ATmega328 experiment kit yesterday and got an LED flashing. Exciting times! I'm a software developer, so the coding part is easy, it's just the electronics that I wanted to learn. Today a flashing LED, tomorrow automated pumps and actuated valves!... perhaps...

Anyway, a quick question for those in the know. The pack came with a prototyping shield which was slightly damaged in transit. There's 6 pins labelled ICSP and three of these were bent. What does this do? Should I just straighten them out with some needlenose pliers? The ebay seller seems happy to replace it if I supply photos, I'm just wondering if it's worth the hassle...


----------



## bonj

Kaiser Soze said:


> I got my Arduino ATmega328 experiment kit yesterday and got an LED flashing. Exciting times! I'm a software developer, so the coding part is easy, it's just the electronics that I wanted to learn. Today a flashing LED, tomorrow automated pumps and actuated valves!... perhaps...
> 
> Anyway, a quick question for those in the know. The pack came with a prototyping shield which was slightly damaged in transit. There's 6 pins labelled ICSP and three of these were bent. What does this do? Should I just straighten them out with some needlenose pliers? The ebay seller seems happy to replace it if I supply photos, I'm just wondering if it's worth the hassle...


ICSP is In Circuit Serial Programmer. It is used to program the micro without using the arduino bootloader. You can safely bend them straight again, and you are unlikely to ever use them.


----------



## benno1973

Bonj said:


> ICSP is In Circuit Serial Programmer. It is used to program the micro without using the arduino bootloader. You can safely bend them straight again, and you are unlikely to ever use them.



Thanks Bonj, thought as much...


----------



## matho

put together my bonjuino tonight, went together really easily and took about 40 min to do, the tinned pads makes soldering so easy 






I have also been playing with the brauduino's PCB 




cheers


----------



## bonj

matho said:


> put together my bonjuino tonight, went together really easily and took about 40 min to do, the tinned pads makes soldering so easy
> 
> View attachment 50775


Looks good, matho.


> I have also been playing with the brauduino's PCB
> 
> View attachment 50776


Coming along nicely!


----------



## kymba

gap said:


> Now that is what I call spreading her legs!!!


says the man named gap!


----------



## spog

for anyone interested i found on ebay an arduino with FT232RL for 11.44 dollars sellers name is womarts....cheers.......spog.......


Bonj said:


> To control the temps in a kettle, you would need a temperature sensor, a way of mounting the sensor in the kettle (a thermowell/probe end), a relay to switch the element on and off (solid state seams to be preferred because they can be switched on and off rapidly without wearing out the physical contacts). The computer is only required to program the Bonjuino, as the microcontroller on board is a fully capable computer on a single chip. It is possible to use it in the way you describe, by using the computer as the main controller, but not required. If you wish to use a computer as the main controller and an arduino as an interface to the controls, you are better off getting an arduino with the FT232RL chip on board. That way you can plug it straight into the computer with a standard USB cable. The Bonjuino lacks that chip as a cost saving measure. It is designed for those that are likely to use more than one arduino for several standalone projects.
> 
> I hope that answers your questions.


----------



## bonj

spog said:


> for anyone interested i found on ebay an arduino with FT232RL for 11.44 dollars sellers name is womarts....cheers.......spog.......


Found it... It isn't an arduino, it is a breakout board for the FT232RL chip which could possibly be used to program a bonjuino/RBBB/arduino pro/lilypad with the appropriate connections, although it doesn't have all 6 pins on a single header, so you'll have to research and arrange the cable into the correct order yourself.

Direct link: HERE


----------



## thelastspud

I know its nothing to do with arduino but any of you tech guys gonna get a raspberry Pi when they come out?


----------



## bonj

Bradley said:


> I know its nothing to do with arduino but any of you tech guys gonna get a raspberry Pi when they come out?


They look pretty awesome for the price. I'm certainly considering it.


----------



## Zizzle

I'll maybe get one, but that Broadcom SoC is a black box. They are not willing to provide any documentation on it ( as a "competitive advantage" ha) so it may not be very tinkerer friendly.


----------



## neo__04

Well, Got my Arduino Uno, got a 16x2 lcd shield, a few breadboards and protoshields and have a heap of other stuff coming from china. Can't wait to get up and running.

Got plenty of flashy led's happing so far, and I can hello world the LCD no worries. Im on my way!!

Any particular library you guys use for an LCD menu?


----------



## browndog

I also have put together a Bonjuino and ordered lots of bit from ebay. Now, time to learn about electronics and programming. I took the board round to Bonj's house from him to check the circuits and when he took a look at my soldering, was somewhat lost for words and replied with a polite "that's interesting"




Looks OK from this side!

cheers

Browndog

edit: spellin


----------



## matho

browndog said:


> I also have put together a Bonjuino and ordered lots of bit from ebay. Now, time to learn about electronics and programming. I took the board round to Bonj's house from him to check the circuits and when he took a look at my soldering, was somewhat lost for words and replied with a polite "that's interesting"
> 
> View attachment 50835
> 
> Looks OK from this side!
> 
> cheers
> 
> Browndog
> 
> edit: spellin


browndog that chip looks like it is around the wrong way( or i put mine in wrong ) THIS is a Photo of bonj's.

Bonj could you please confirm

cheers

ps looks good mate


----------



## browndog

matho said:


> browndog that chip looks like it is around the wrong way( or i put mine in wrong ) THIS is a Photo of bonj's.
> 
> Bonj could you please confirm
> 
> cheers
> 
> ps looks good mate




You are dead right Matho, it is in the wrong way round and Bonj corrected it when I dropped it off to him, he also turned the LED around too.


----------



## kirem

browndog said:


> I took the board round to Bonj's house from him to check the circuits and when he took a look at my soldering, was somewhat lost for words and replied with a polite "that's interesting"



View attachment 50836


----------



## bonj

matho said:


> browndog that chip looks like it is around the wrong way( or i put mine in wrong ) THIS is a Photo of bonj's.
> 
> Bonj could you please confirm
> 
> cheers
> 
> ps looks good mate


Yep, that chip is the wrong way around and as Browndog said, has been corrected. The silkscreen shows the correct orientation (the little semicircular indentation, that sticks out further than the IC socket)


----------



## matho

I'm going to etch up a prototype probably this weekend so that i can start to play with the bonjuino 
here are the top and bottom artwork and the top and bottom component locations

View attachment Braumiser_top.pdf


View attachment Braumiser_bottom.pdf


View attachment Braumiser_place_top.pdf


View attachment Braumiser_place_bottom.pdf


they are mostly 1mm (40mills) tracks and the pads are large and so are the via's, I found anything under 1/2 mm (20mills) doesn't come out that well with home etching.

this is the first time i have tried to etch a 2 sided board so wish me luck 

cheers


----------



## browndog

matho said:


> I'm going to etch up a prototype probably this weekend so that i can start to play with the bonjuino
> here are the top and bottom artwork and the top and bottom component locations
> 
> View attachment 50908
> 
> 
> View attachment 50905
> 
> 
> View attachment 50907
> 
> 
> View attachment 50906
> 
> 
> they are mostly 1mm (40mills) tracks and the pads are large and so are the via's, I found anything under 1/2 mm (20mills) doesn't come out that well with home etching.
> 
> this is the first time i have tried to etch a 2 sided board so wish me luck
> 
> cheers




So Matho, is that going to work specifically with a bonjuino or any arduino?

cheers

Browndog (forgive my ignorance, I know not of electronics)


----------



## matho

browndog said:


> So Matho, is that going to work specifically with a bonjuino or any arduino?
> 
> cheers
> 
> Browndog (forgive my ignorance, I know not of electronics)



Any arduino mate, the braumiser shield is based on a prototype shield that i found on the net. It has 2 more pins on each side compared to the arduino for some reason, it won't effect putting an arduino board on though


----------



## bonj

matho said:


> Any arduino mate, the braumiser shield is based on a prototype shield that i found on the net. It has 2 more pins on each side compared to the arduino for some reason, it won't effect putting an arduino board on though


The arduino pro uses the surface mount version of the ATMEGA328, which has an extra 2 digital pins. I think that is the layout they use on the pro.


----------



## matho

etched the board yesterday, it went ok the top and bottom didn't quite line up but nothing too drastic, for my other boards it was using ammonium persulfate that was about 10 years old, it took about 45min to etch the boards, I had to buy some new stuff and it took 5min to etch the board 




this is the bottom of the board as you can see the LCD is going to get mounted there as well as the headers for the buttons




this is the top side of the board with the bonjuino plugged in.

now i have to work out how best to solder it up to make sure all the tracks that need to be continuous between the top and bottom are and then im waiting on parts from ebay and after that i can start to play around with some code

cheers matho


----------



## bonj

matho said:


> View attachment 50979
> 
> this is the top side of the board with the bonjuino plugged in.


Looking good matho... the layer alignment doesn't seem to be too far off.


----------



## Peter Wadey

matho said:


> .....
> now i have to work out how best to solder it up to make sure all the tracks that need to be continuous between the top and bottom are.....
> cheers matho



Hi Matho,
Poor mans PTH (Plated Through Hole) = tinned copper wire inserted & soldered to both layers. 
If you don't have any on a reel, the offcuts from trimming leaded components may be suitable.

NB: You have a via under R10, so you'll need to do this before mounting R10. 

Rgds,
Peter


----------



## matho

Peter Wadey said:


> Hi Matho,
> Poor mans PTH (Plated Through Hole) = tinned copper wire inserted & soldered to both layers.
> If you don't have any on a reel, the offcuts from trimming leaded components may be suitable.
> 
> NB: You have a via under R10, so you'll need to do this before mounting R10.
> 
> Rgds,
> Peter


thanks for that peter, I have just finished soldering it up, it took a fair while to do. The biggest problem was soldering both sides of a component like the terminal blocks, if i ever do a two sided board again i will make sure that the components solder one side only and all interconnection between the top layer and the bottom would be thru via's. Of course this wouldn't be a problem with a plated through hole board.

cheers steve


----------



## matho

I have been off work with a really bad case of the flu but it has given me time to play around with the design of the board there was over 600 errors when i did a design rule check, all which related to the silkscreen layers going over the stop masks so i spent time modifying the component packages to fix the problems. I also enlarged the tracks for the pump contacts, the relay is rated at 240v 5 amps so the tracks can handle 5 amps and I increased the clearances around those tracks, I didn't think having a ground plane only 10millis away from 240v would be a good idea so i removed the planes from that area. Making the prototype has shown a few problems that i have fixed up and I'm confident that the design is ready.




there is no point in getting anything made up until i have a program for it so thats the next step.


----------



## vortex

Not entirely Arduino related, but you guys clearly understand electronics very well, could someone please suggest what I need to control the voltage (and hence RPM) of a CPU fan? Fan is a 12v 80mm CPU fan max 0.14amp.

Long story short I have robbed an old PC for it's CPU fan to build a stir plate. 6V is way too fast for the stir plate to work, so I need a potentiometer or something similar. Jaycar were actually useless and could only suggest one potentiometer, however it would have been from stopped to flat out in 1/8th of a turn which is too sensitive.

Planning V2 of my stirplate to use an Arduino and LCD to program a specific fan RPM and the Arduino takes care of it; but until then I have starters to make next week and want V1 to work soon


----------



## matho

look into Pulse Width Modulation, the AVR chip that the arduino is based on has dedicated pins that has hardware driven PWM. 
You then will need something that takes that 5v signal from the arduino and controls the fans current, the most appropriate thing would be a MOSFET i would think.
Look at the arduino site for key words like PWM, motor drives and potentiometers and that should give you enough to get started.


cheers


----------



## vortex

matho said:


> look into Pulse Width Modulation, the AVR chip that the arduino is based on has dedicated pins that has hardware driven PWM.
> You then will need something that takes that 5v signal from the arduino and controls the fans current, the most appropriate thing would be a MOSFET i would think.
> Look at the arduino site for key words like PWM, motor drives and potentiometers and that should give you enough to get started.



Thanks, have that sorted for now 
Do you have any suggestions for a potentiometer that will work before I get around to making the Arduino do all the work?


----------



## benno1973

Lots of people use these LED dimmers off ebay. Otherwise, if you want to control the voltage, you could always buy a variable voltage power pack?


----------



## matho

vortex said:


> Thanks, have that sorted for now
> Do you have any suggestions for a potentiometer that will work before I get around to making the Arduino do all the work?



probably a 10k or 5k linear pot will do, all you want it to do is act as a voltage divider, connect the 2 fixed sides between 5+ and ground and the wiper to an analog input on the arduino. You then use the ADC on the arduino to convert that voltage to a digital number and then use that number to control the PWM so when you turn the pot up or down the PWM goes up or down making the fan go faster or slower

cheers


----------



## vortex

Kaiser Soze said:


> Otherwise, if you want to control the voltage, you could always buy a variable voltage power pack?


Probably what i"ll end up doing, but was trying to do it for $2 instead of $20  I was sure I'd seen someone use a simple pot soldered inline to control the voltage and I assumed it was a potentiometer, I guess I didn't see it right


----------



## vortex

http://www.users.on.net/~pfitzsimons/MagStirrer/MagneticStirrer.htm
Looks like he used a 500Ω linear pot, as suggested. Thanks guys.


----------



## browndog

matho said:


> I have been off work with a really bad case of the flu but it has given me time to play around with the design of the board there was over 600 errors when i did a design rule check, all which related to the silkscreen layers going over the stop masks so i spent time modifying the component packages to fix the problems. I also enlarged the tracks for the pump contacts, the relay is rated at 240v 5 amps so the tracks can handle 5 amps and I increased the clearances around those tracks, I didn't think having a ground plane only 10millis away from 240v would be a good idea so i removed the planes from that area. Making the prototype has shown a few problems that i have fixed up and I'm confident that the design is ready.
> 
> View attachment 51113
> 
> 
> there is no point in getting anything made up until i have a program for it so thats the next step.




Forgive the ignorance Matho, but would you mind explaining what your shield does that the arduino (or bonjuino) wont? What kind of benefits does it offer?

cheers

Brownodg


----------



## matho

browndog said:


> Forgive the ignorance Matho, but would you mind explaining what your shield does that the arduino (or bonjuino) wont? What kind of benefits does it offer?
> 
> cheers
> 
> Brownodg


The shield still needs the arduino plugged into it, what it does provide is points to connect the sensor, pump , buzzer and SSR and the drive circuitry for them, LCD and a connection point for the four buttons. So the arduino is the brains and the shield is an interface for it to the outside world, you could do the same thing with components and vero board, this will be just a plug and play kinda option.

cheers matho


----------



## QldKev

vortex said:


> Probably what i"ll end up doing, but was trying to do it for $2 instead of $20  I was sure I'd seen someone use a simple pot soldered inline to control the voltage and I assumed it was a potentiometer, I guess I didn't see it right



A pot should do it
http://jaycar.com.au/productView.asp?ID=RP...mp;form=KEYWORD 
Just make sure you don't exceed the 0.5w rating


What about one of these
http://www.ebay.com.au/itm/DC-12V-8A-LED-L...=item5d2ffac9e3 


or for more bling, remote control
http://www.ebay.com.au/itm/Wireless-Remote...=item415ff4f124

QldKev


----------



## vortex

QldKev said:


> What about one of these
> http://www.ebay.com.au/itm/DC-12V-8A-LED-L...=item5d2ffac9e3
> 
> 
> or for more bling, remote control
> http://www.ebay.com.au/itm/Wireless-Remote...=item415ff4f124


Thanks Kev. I'm going past a couple of PC shops today to see if I can find a fan controller - much easier in the short term just to get something working  Otherwise it's onto Ebay


----------



## browndog

matho said:


> The shield still needs the arduino plugged into it, what it does provide is points to connect the sensor, pump , buzzer and SSR and the drive circuitry for them, LCD and a connection point for the four buttons. So the arduino is the brains and the shield is an interface for it to the outside world, you could do the same thing with components and vero board, this will be just a plug and play kinda option.
> 
> cheers matho




Nice Matho, so how will I be able to get my hands on one of these shields of yours?

cheers

Browndog


----------



## matho

Just to clarify things a bit further the arduino pins can handle about 40mA at a voltage level of 5v if you want more current or voltage, then you need to use something to drive it, mainly a transistor will do the job. The shield plugs into the arduino and provides two 12v 100mA outputs for driving the buzzer and the heater control device which would most likely be a SSR, it also has a relay on the board which can handle 5 amps at 240v and that is for the pump. There is also a connection point for a DS18B20 temperature sensor with the pull-up resistor installed on the shield so all you have to do is connect the three wires to the board and it will work. Then comes the HMI which is the LCD and buttons, the LCD solders straight to the board with all the connections and contrast taken care of and the connection for the buttons will be for an 8 way ribbon cable (2 wires per button and four buttons) with the pull-up resistors mounted on the shield, you require pull-up or pull down resistors on binary inputs so that you know what state is on and what state is off, the way i have it set up is when the button is open then the input will be high or 1 (pulled up by the resistor) and when it is closed the input will be low or 0. 

So when im finished there will be the shield to make a braumiser control unit and a program for the arduino that plugs into the shield 

cheers matho


----------



## matho

browndog said:


> Nice Matho, so how will I be able to get my hands on one of these shields of yours?
> 
> cheers
> 
> Browndog



hopefully not too long ill work on the code over the xmas break when i get that finished ill be putting out the call for interest in the shield and if we can get enough then ill get the boards made up and make up a kit


----------



## browndog

matho said:


> hopefully not too long ill work on the code over the xmas break when i get that finished ill be putting out the call for interest in the shield and if we can get enough then ill get the boards made up and make up a kit



That's awesome Matho, I hope the members show some interest. How difficult would it be for me to incorporate a flow meter into your sheild and code once finished?

-BD


----------



## matho

browndog said:


> That's awesome Matho, I hope the members show some interest. How difficult would it be for me to incorporate a flow meter into your sheild and code once finished?
> 
> -BD


there are a couple of pins left so that would be a problem and im sure bonj or someone could work out the code, I'm learning the language at the moment, electronics is my hobby , programming is just a necessary evil 

cheers


----------



## sshann001

Hi Matho & Browndog.

I would like to officially register my interest in a kit. I have been following this thread, and the one on the Braumeiser for some time. All very exciting!


----------



## matho

it lives





now too start playing with some code and just getting the text up on the LCD

cheers steve


----------



## ArnieW

matho said:


> it lives
> 
> View attachment 51148
> 
> 
> now too start playing with some code and just getting the text up on the LCD
> 
> cheers steve


Well done Matho.

I'm also interested in a shield kit when things are ready to go.


----------



## Nibbo

Sorry to knock this thread back a little, but i'm having a crap time trying to get my 2005 Mac laptop to befreind my Arduino mega with a 268 chip in her. Part of the issue is i don't have access to the internet at home. So i have been downloading the software i'm thinking i need at work onto a usb and then taking it home to install. I think the problem is getting the usb outlet to start to believe it's a port for the arduino. In some instructions im seeing, they are downloading a file which sets itself up onto the computer which does this. The software i have on my usb stick doesnt seem to have this. I run a command on terminal to check what devices are available and it only brings up the modem. Does anyone out there have any answers or hints that may help?


----------



## justsomeguy

Nibbo said:


> Sorry to knock this thread back a little, but i'm having a crap time trying to get my 2005 Mac laptop to befreind my Arduino mega with a 268 chip in her. Part of the issue is i don't have access to the internet at home. So i have been downloading the software i'm thinking i need at work onto a usb and then taking it home to install. I think the problem is getting the usb outlet to start to believe it's a port for the arduino. In some instructions im seeing, they are downloading a file which sets itself up onto the computer which does this. The software i have on my usb stick doesnt seem to have this. I run a command on terminal to check what devices are available and it only brings up the modem. Does anyone out there have any answers or hints that may help?




Got the FTDI(?) driver installed on the Mac ?

I've had it all work correctly on a circa 2002 machine with no problems once the driver was installed. Haven't run the latest Arduino 1.0 IDE on an old machine so there may be issues there.

Regards,
garyd


----------



## Nibbo

justsomeguy said:


> Got the FTDI(?) driver installed on the Mac ?
> 
> I've had it all work correctly on a circa 2002 machine with no problems once the driver was installed. Haven't run the latest Arduino 1.0 IDE on an old machine so there may be issues there.
> 
> Regards,
> garyd



Well...this is my issue i think. I'm downloading the driver but i'm getting the wrong one or im missing something. I've actually downloaded a few different drivers. I've got 2.2.16 and also 1.0f4.


----------



## Nibbo

I think maybe my laptop doesnt allow the driver to be installed. A pop up appears saying it cant copy due to blah blah blah...needless to say my memorys fragile at best. when it happens next i might print the page.


----------



## justsomeguy

Nibbo said:


> I think maybe my laptop doesnt allow the driver to be installed. A pop up appears saying it cant copy due to blah blah blah...needless to say my memorys fragile at best. when it happens next i might print the page.



There should be an installer for the driver. Run that to get the drivers installed. You should not have to manually copy drivers around. Actually if you do just try to copy drivers to the right place the OS will NOT load them due to security issues. Use the installer as it will put them in the right place with the right permissions so that the OS will load them.

Regards,
garyd


----------



## matho

I have been playing around with a simple thermostat (I have to crawl before i can walk). One thing I'm concerned about is the size of the code 7500 bytes already, considering the whole code for the braumiser v1 was 19k , 9k for the process and 10k for the menu, I hope i don't run out of space. The other thing is I don't like how the Dallas temperature library works, it slows down the loop too much, what I'm thinking of doing is because Ill only have one DS18b20 connected, is i can make a function up that will, start conversion on the first call and then on the next call it will check if the conversion is complete using the feature of the DS18b20 that when it is powered you can send a read command and it will return a 0 when it is doing a conversion and a 1 when complete,if the conversion isn't complete it returns,when it is complete it will read the scratch pad and return the temp, then the next time it is called it will start the whole process over again. doing it this way will speed up the loop because i can do other things instead of waiting 750ms for the conversion. More playing is required





cheers matho


----------



## 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 



> //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_


----------



## ArnieW

matho said:


> 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


----------



## matho

ArnieW said:


> 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


----------



## 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


----------



## bonj

matho said:


> 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...


----------



## Edak

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?


----------



## bonj

Edak said:


> 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


----------



## matho

Bonj said:


> 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


----------



## Edak

Bonj said:


> 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



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.


----------



## matho

Edak said:


> 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


----------



## Edak

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!


----------



## Lurks

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.


----------



## Edak

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.


----------



## Tanga

http://www.slashgear.com/raspberry-pi-25-u...nuary-28204830/

Anyone seen these yet? That add on board sounds interesting (drives motors, sensors, etc). I know arduino is a computer / open source OS as well, but damn, this looks quite high powered.


----------



## QldKev

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


----------



## bonj

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


----------



## Tanga

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.


----------



## Tanga

Bump! On Now.


----------



## benno1973

Did you win a voucher Tanga?


----------



## Tanga

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.


----------



## angus_grant

I have done a bit of looking around at the Arduino as I am part-way through hacking a digital scale system to tell me how much weight is left in the keg. Will be very rudimentary as I will h ave to minus off the weight of the keg in my head, and that will give me the weight of beer left, which I can approximate to how many litres of beer left. Now that is only a stop-gap measure as I want to display how many beers are left.

Given that I am very comfortable sitting in my MS sandbox and don't particularly have the time or inclination to learn how to develop Nix software I have found the NetDuino very interesting. Uses MS Micro framework and you can use the free C# express IDE or full-blown Visual Studio. It is compatible with all the Arduino shields. Sounds like a winner to me. Bit more expensive than the Arduino though. I'll wait until next month and then plonk some cash down and start playing with it.

I'll post up some thoughts once I've had a play with it into a separate thread.

Cheers,
Angus.


----------



## bonj

angus_grant said:


> I have done a bit of looking around at the Arduino as I am part-way through hacking a digital scale system to tell me how much weight is left in the keg. Will be very rudimentary as I will h ave to minus off the weight of the keg in my head, and that will give me the weight of beer left, which I can approximate to how many litres of beer left. Now that is only a stop-gap measure as I want to display how many beers are left.
> 
> Given that I am very comfortable sitting in my MS sandbox and don't particularly have the time or inclination to learn how to develop Nix software I have found the NetDuino very interesting. Uses MS Micro framework and you can use the free C# express IDE or full-blown Visual Studio. It is compatible with all the Arduino shields. Sounds like a winner to me. Bit more expensive than the Arduino though. I'll wait until next month and then plonk some cash down and start playing with it.
> 
> I'll post up some thoughts once I've had a play with it into a separate thread.
> 
> Cheers,
> Angus.


Netduino looks like a great alternative on the same form factor if you're that way inclined. There' s no need to run any 'nix' to do arduino as there is an IDE for Windows and MacOS too.

A flow sensor/meter would integrate well with your beer keg system, as you can use it to measure the volume of the liquid coming out of the keg


----------



## angus_grant

Bonj said:


> Netduino looks like a great alternative on the same form factor if you're that way inclined. There' s no need to run any 'nix' to do arduino as there is an IDE for Windows and MacOS too.
> 
> A flow sensor/meter would integrate well with your beer keg system, as you can use it to measure the volume of the liquid coming out of the keg



I more meant developing for Nix/using C and the development environment. I don't have the spare time to learn a new IDE, a new language (albeit somewhat similar to C#), its constructs, how to do things in it, and then also learn how to programme micro-controllers.

I have Visual Studio, know it fairly well, know C# fairly well so I only have to learn how to programme micro-controllers. Easy... 

Maybe back when I didn't have a pregnant wife, moving back into our unit which needs some repairs, preparations for the baby, blah, blah, blah.....

You are right in recommending a flow meter as it would be easier to programme than a force resistor. I don't really care about the weight, it is more about calculating how much precious beer is left in the keg.

- 19L in keg minus logged total of liquid poured = (L's total beer left / 0.285ml) = pots of beer left.
- Display on LCD.
- ...
- profit!

Anyways, I had a few beers last night from the keg fridge and ended going on the Internet. Bad move: I ended up buying a Netduino with on-board ethernet and SD module. he he I should have it Tuesday or Wednesday so I'll play around with it next week, and post up some results.


----------



## bigfridge

angus_grant said:


> I have done a bit of looking around at the Arduino as I am part-way through hacking a digital scale system to tell me how much weight is left in the keg. Will be very rudimentary as I will h ave to minus off the weight of the keg in my head, and that will give me the weight of beer left, which I can approximate to how many litres of beer left. Now that is only a stop-gap measure as I want to display how many beers are left.
> 
> Given that I am very comfortable sitting in my MS sandbox and don't particularly have the time or inclination to learn how to develop Nix software I have found the NetDuino very interesting. Uses MS Micro framework and you can use the free C# express IDE or full-blown Visual Studio. It is compatible with all the Arduino shields. Sounds like a winner to me. Bit more expensive than the Arduino though. I'll wait until next month and then plonk some cash down and start playing with it.
> 
> I'll post up some thoughts once I've had a play with it into a separate thread.
> 
> Cheers,
> Angus.



Arduino has become very popular with hobbists as the main aim seems to be spending time on the building - rather than just using something that already works.

If you want to look at something that the professionals use - plus it is Australian designed and built -> see http://www.splatco.com/

You can see How it works or why it is so easy to program.

Interested in what you guys think ?


----------



## kirem

bigfridge said:


> If you want to look at something that the professionals use - plus it is Australian designed and built -> see http://www.splatco.com/



Can you please list or link to some 'professionals' that use it?

Proprietry language/bus/communications....... hmmm


----------



## bigfridge

kirem said:


> Can you please list or link to some 'professionals' that use it?
> 
> Proprietry language/bus/communications....... hmmm




Hi Kirem,

It is all on the Splat website at the link that I provided.

Sample applications.

What sure what you mean by "Proprietry language/bus/communications" but You can use C if you want to 'do it the hard way' or the VB like scripting language.

Protocols supported include Modbus, plus serial, network etc.

Customers include most of the appliances with embedded control such as CPAP respirators, industrial dishwashers etc. 

You can see from the list of some of the peripherals that there is a lot of brewery related options;

Dual K-type thermocouple board

Ultrasonic distance measurement + Non-Contact Temperature Measurement (Optional)

On board Temperature and Humidity Measurement + Non-Contact Temperature Measurement (Optional)

Water Level Detector + Analog I/O

RS485 adaptor

Onboard Quadrature Counter

4 analog out

Pressure Sensor

pH Measurement

SD Logger

Ethernet/Internet "SPLat Call Home"


Anything else that you would need for your brewery automation ?


----------



## kirem

Is Xwire and SPice not proprietry?

You list a number of applications, but I asked for a list of 'professionals' that are using it. You state that a number of professionals are using it, who are they?

automated sales?


----------



## matho

by the looks of it the arduino has more program space, RAM , IO and analog channels and costs less that $40
I'm sure they are good units but the arduino has the sheer weight of numbers as in users and freely available information for hacks like me 

cheers matho


----------



## bigfridge

kirem said:


> Is Xwire and SPice not proprietry?
> 
> You list a number of applications, but I asked for a list of 'professionals' that are using it. You state that a number of professionals are using it, who are they?
> 
> automated sales?



As they are mainly used by equipment manufacturers as part of their overall control systems they do not make a lot of noise about it - there is no 'Splat Inside' stickers that I have seen.

If you need a detailed reference list then you would need to speak to the company or one of their distributors eg Dontronics or Ocean Controls

I don't know why you are trying to argue with me about "Is Xwire and SPice not proprietry?" - I am not trying to sell you anything, just save you some time and money based on my experience from the past 5 years.

At least with the Arduino there is no concerns with 'proprietary protocols' as from what I see there are none - you have to build everything yourself.

Perhaps an example will help. I have recently included a quadrature encoder to provide a simple menu navigation. The Arduino code seems to be:

[codebox]/*

RotaryInterrupts - a port-read and interrupt based rotary encoder sketch

Created by Joshua Layne (w15p), January 4, 2011.

based largely on: http://www.circuitsathome.com/mcu/reading-...oder-on-arduino

Released into the public domain.

*/



#define ENC_A 2

#define ENC_B 3

#define ENC_PORT PIND

uint8_t bitShift = 2; // change to suit your pins (offset from 0,1 per port)

// Note: You need to choose pins that have Interrupt capability.



int counter;

boolean ticToc;



void setup()

{

pinMode(ENC_A, INPUT);

digitalWrite(ENC_A, HIGH);

pinMode(ENC_B, INPUT);

digitalWrite(ENC_B, HIGH);

Serial.begin (115200);

Serial.println("Start");

counter = 0;

ticToc = false;

// Attach ISR to both interrupts

attachInterrupt(0, read_encoder, CHANGE);

attachInterrupt(1, read_encoder, CHANGE);

}



void loop()

{

// do some stuff here - the joy of interrupts is that they take care of themselves

}



void read_encoder()

{

int8_t enc_states[] = {0,-1,1,0,1,0,0,-1,-1,0,0,1,0,1,-1,0};

static uint8_t encoderState = 0;

static uint8_t stateIndex = 0;

static uint8_t filteredPort = 0;

uint8_t filter = 0x03; // base filter: 0b00000011

filter <<= bitShift;



Serial.print("raw port value: ");

Serial.println(ENC_PORT, BIN);



Serial.print("filter bitmask: ");

Serial.println(filter, BIN);



filteredPort = ENC_PORT & filter;

Serial.print("filtered port state: ");

Serial.println(filteredPort, BIN);



Serial.print("old encoder state: ");

Serial.println(encoderState, BIN);



encoderState &= filter; // filter out everything except the rotary encoder pins

Serial.print("filtered old encoder state: ");

Serial.println(encoderState, BIN);

encoderState <<= 2; // shift existing value two bits to the left
Serial.print("filtered and shifted (<<2) old encoder state: ");
Serial.println(encoderState, BIN);

encoderState |= filteredPort; // add filteredport value
Serial.print("old encoder state + port state: ");
Serial.println(encoderState, BIN);

stateIndex = encoderState >> bitShift;
Serial.print("encoder state index: ");
Serial.println(stateIndex, DEC);

if (ticToc) {
Serial.print("counter tic: ");
Serial.println(enc_states[stateIndex], DEC);
counter += enc_states[stateIndex];
Serial.print("counter: ");
Serial.println(counter, DEC);
}
ticToc = !ticToc;

Serial.println("----------");
}
[/codebox] 


A Splat controller reads the ODBC with the commands:
[codebox]

OBQC_Clr ;Reset count to zero
OBQC_fGet ;Copy the onboard quadrature count to W register

; Do whatever with read value

; If you want to display it on the LCD
OBLCD_fDispW[/codebox]

As I said, No axe to grind or Product to sell - just trying to help show that the Arduino wheel has already been invented, built, improved and used by many.


----------



## bigfridge

matho said:


> View attachment 51636
> 
> 
> by the looks of it the arduino has more program space, RAM , IO and analog channels and costs less that $40
> I'm sure they are good units but the arduino has the sheer weight of numbers as in users and freely available information for hacks like me
> 
> cheers matho



Not sure what you get for $40, but I was under the impression that you had to add all sorts of shields, interface boards, interupt controllers etc ie it was a very low level approach. Much like programming in assembler 40 years ago.

Program size and RAM requirements depend on how efficient your language is - much better to ask "what can you do with it?"

The IO and Analogue channels are plenty and come 'ready to use' ie already have debounce (or raw values can be read) and pull-down resistors built in. The analogue can read voltages or thermistors directly, the Digital inputs can be used as latched inputs (ie on or off) or high speed counters (to read flow meters).

If you are not interested then things like shadow RAM for automatic recovery after a power failure, battery backed real time clock, built in multi-tasking are probably not much use to you.

It just seems to be all there for what I need to control a brewery.

The controller inside a Braumeister is probably a version of the Splat controller ...

... or at least it could be. ;-)


----------



## benno1973

bigfridge said:


> As I said, No axe to grind or Product to sell - just trying to help show that the Arduino wheel has already been invented, built, improved and used by many.



I really like the Arduino, as I like to understand everything that goes on underneath. Same reason I got into brewing I guess - I like to know exactly what raw ingredients make up my beer, and exactly what these ingredients do. Same with making cheese, sausages, pancetta, etc etc. True, there are more worked up versions that might save me time, I could even go along the path of brewtroller, but where does it stop? Maybe I could just buy a Brewmeister system and be done with it? 

I get what you're saying, but some people like to tinker and find the journey as pleasurable as the destination. Saving time isn't of great importance to me. In fact, ultimately using this technology in brewing isn't *that* important to me, I really just want to understand electronics. And if anything eventuates from that, I can say that I built it. And when it breaks (I know it will, because I built it!), there's the possibility that I might be able to fix it, because I built each component.

And it's cheaper


----------



## kirem

bigfridge said:


> As they are mainly used by equipment manufacturers as part of their overall control systems they do not make a lot of noise about it - there is no 'Splat Inside' stickers that I have seen.
> 
> If you need a detailed reference list then you would need to speak to the company or one of their distributors eg Dontronics or Ocean Controls
> 
> I don't know why you are trying to argue with me about "Is Xwire and SPice not proprietry?" - I am not trying to sell you anything, just save you some time and money based on my experience from the past 5 years.
> 
> As I said, No axe to grind or Product to sell - just trying to help show that the Arduino wheel has already been invented, built, improved and used by many.



Listing applications that the controllers can be used in has some credibility, listing manufacturers that have included their controls in their design has lots of credibilty. YOU wrote


> If you want to look at something that the professionals use


 so who are these professionals (not applications)?

I'm not trying to argue with you, I just asked you to back up what you wrote with solid information and pointed out that they do indeed use proprietry language/bus/communications.

They look like good controllers, but I believe the arduino/sanguino is just as, if not more capable, it's open source and the list of add on boards to add capablity is more extensive than the splat expansion boards list you posted. Shit loads of code has already been written for it, most of the time it is a case of cut and paste, a few mods and upload it.

I'm not arguing, but you can't come in here and write the things you did and not back it up.


----------



## bigfridge

kirem said:


> They look like good controllers, but I believe the arduino/sanguino is just as, if not more capable, it's open source and the list of add on boards to add capablity is more extensive than the splat expansion boards list you posted. Shit loads of code has already been written for it, most of the time it is a case of cut and paste, a few mods and upload it.



Well, this is excellent news - sounds like we are both very happy.

Can't hope for anything better than that !


----------



## kirem

bigfridge said:


> Well, this is excellent news - sounds like we are both very happy.
> 
> Can't hope for anything better than that !



David, have you ever thought of taking up politics? Your ability to skirt around straight forward questions would be a skill useful in politics.

Good luck


----------



## bigfridge

kirem said:


> David, have you ever thought of taking up politics? Your ability to skirt around straight forward questions would be a skill useful in politics.
> 
> Good luck


No, I am not skirting around the questions - I am just unable to do any more research for you.

I provided some information, links to all the resources, technical support and application notes, as well as stating my experience. Unfortunately you appeared to be unhappy with this and demanded that I provided some sort of 'justification' for my experience and opinion.





kirem said:


> so who are these professionals (not applications)?
> 
> I'm not trying to argue with you, I just asked you to back up what you wrote with solid information and pointed out that they do indeed use proprietry language/bus/communications.


Dontronics and Oean Controls supply professional engineers and a quick read of the Splat website and the newsletters and blogs describe dozens of real world uses. If it helps you feel better, I am a professional application developer aand process engineer and I use one.

Don't believe I said anything protocols - except to provide additional information on the support for RS485, HTTP and Modbus. Again this is all dealt with on the Splat site if you search for the terms that interest you.



kirem said:


> They look like good controllers, but I believe the arduino/sanguino is just as, if not more capable, it's open source and the list of add on boards to add capablity is more extensive than the splat expansion boards list you posted. Shit loads of code has already been written for it, most of the time it is a case of cut and paste, a few mods and upload it.


 
Do you have any references or other justification for these sweeping statements ?



kirem said:


> I'm not arguing, but you can't come in here and write the things you did and not back it up.



Ah, I see that we have reached agreement again about something :icon_cheers: 

Good luck


----------



## dr K

Big Fridge
Great to see you firing on both cylinders!
Mayhaps the Triiffids are rising again....there truly is hope for 2012 !!

Kurtz


----------



## kirem

bigfridge said:


> Do you have any references or other justification for these sweeping statements ?


http://www.arduino.cc/
http://sanguino.cc/
it's all there, links to all the resources, technical support and application notes  

Is this what you used your "professional application developer and process engineering" to develop?
View attachment 51660

http://www.aussiehomebrewer.com/forum/inde...st&p=157149
http://www.aussiehomebrewer.com/forum/inde...st&p=661979
I am really quite interested in what you have done/doing/plan to do with a splat and brewing, but getting more than just vague comments or links to websites is like extracting teeth from you.

There is also this interesting reference http://www.aussiehomebrewer.com/forum/inde...p?showuser=1492


> No longer participating on AHB so please contact me via the NNL Brewery Services webpage:
> http://nnlbrewery.com.au


----------



## bigfridge

kirem said:


> I am really quite interested in what you have done/doing/plan to do with a splat and brewing, but getting more than just vague comments or links to websites is like extracting teeth from you.



I am not meaning to be vague - I was only suggesting that some of you may benefit from looking at an alternative technology as much of what you are trying to 'invent' has already been done.

I have never offered to discuss my projects. As a professional developer much of what I do is covered by confidentiality agreements with my clients.

The image that you referenced is an early prototype/test rig. I have now added a Quadrature counter to provide the menu navigation, selection and activation of the n-channel process control system. All in a few hundred lines of code.

My current rig uses a real time clock to fire up the HLT heater, pressure transducer for level control, flow meter and high-low float switch to automate the sparge and controlled kettle fill, boil and whirlpool.

Think how you dial in your cycle times into an automatic washing machine and it fills, washes, spins and beeps that the load is done. 



kirem said:


> There is also this interesting reference http://www.aussiehomebrewer.com/forum/inde...p?showuser=1492



Ah, that's right - I had found that the 'signal to noise ratio' had become unpleasant. Thanks for reminding me.

Over and out.


----------



## angus_grant

Matho (and perhaps others)

I received my NetDuino last night and after quickly doing the "Hello World" equivalent of flashing the onboard LED, and listening for the button push to flash the led, I wanted to quickly move onto something a bit more substantial. I have a spare temp sensor (I bought the stainless steel one for immersing in my fermenter) from my Fridgemate and thought I would hook that up. I couldn't really find any info on what requirements it needed: voltage, etc, etc. I have done some reading on NTC temp sensors and none of them really mention voltage requirements, more on current.

Or do I just ignore the Fridgemate sensor as I can't find technical data and purchase a temp sensor designed for the Arduino/Netduino?

Thanks,
Angus.


----------



## Edak

OK, so I have completed my brewing controller and it is testing wonderfully.

I thought you might like to see a few photos of the set up.

I am really looking forward to starting my first brew in there, currently it's testing with water...

A little unassuming....





A nice bright and large display so I can see it from anywhere 





A tidy rear-panel, with two outputs and Ethernet





A look inside the box, where the magic happens





Doors open






Interface




Tell me your thoughts...


----------



## matho

angus_grant said:


> Matho (and perhaps others)
> 
> I received my NetDuino last night and after quickly doing the "Hello World" equivalent of flashing the onboard LED, and listening for the button push to flash the led, I wanted to quickly move onto something a bit more substantial. I have a spare temp sensor (I bought the stainless steel one for immersing in my fermenter) from my Fridgemate and thought I would hook that up. I couldn't really find any info on what requirements it needed: voltage, etc, etc. I have done some reading on NTC temp sensors and none of them really mention voltage requirements, more on current.
> 
> Or do I just ignore the Fridgemate sensor as I can't find technical data and purchase a temp sensor designed for the Arduino/Netduino?
> Thanks,
> Angus.



sorry angus i missed your post

i don't know too much about reading NTC's with the arduino, have a look at the arduino play ground, I found THIS library with a search for thermistor. The main reason I went with the DS18B20 is that it is accurate to 0.5 deg and it is easy to connect up, one of the problems i had with using a NTC in an analog circuit was the NTC would drop in resistance when current started to flow through it, which makes sense, resistance and current equals power which equals heat, its a fine line between too much current and not enough volts across it. 
hope this helps

cheers


----------



## Lurks

A quick thing I knocked up out of some spare parts and a Arduino, a digital temp probe using a cheap DS18B20 probe. 

Since this photo was taken I added some software features to graph the temperature, show me the rate of change, ping on alerts and added a boil timer. Simple project but worked well.


----------



## angus_grant

Thanks for the posts guys. I was not really finding much info about NTC temp probes and Arduino/Netduino so am happy to change to use the DS188B20 probe give that there is a support library for it for Netduino.

What LCD is that? Looks like a nice one.

I am only just starting with micro-controllers and associated electronics so I think it will be a confusing first few months for me. Have run through Blinky, Light-Switch sample projects (amongst others) and started messing around with an HTTP server on the Netduino listening for requests and switching light on and off, etc. So it is time to start doing something useful.

My first project is to hook up a temp controller to the Netduino, and then a relay to power an urn (or submerged heating element in pot) for my first forays into non Kit + kilo brews. I would like to control the boil time on the urn so start timer and power urn through relay for required time. Then power a water pump through another relay and circulate water through to cool contents of urn.

And then it is onto a full "BrewBot" setup.


----------



## angus_grant

woohoo, ordered two DS18B20 temp probes so should receive those early next week. Where do you guys buy components from? I have bought a book and these two temp probes from Australian Robotics. Anywhere cheaper?

Looking forward to playing with the Netduino and actually doing something useful. Although I did manage to annoy the hell out of my wife with the "blinky" project after a while, so I guess that was somewhat useful.


----------



## Edak

angus_grant said:


> woohoo, ordered two DS18B20 temp probes so should receive those early next week. Where do you guys buy components from? I have bought a book and these two temp probes from Australian Robotics. Anywhere cheape
> Looking forward to playing with the Netduino and actually doing something useful. Although I did manage to annoy the hell out of my wife with the "blinky" project after a while, so I guess that was somewhat useful.



I buy my electronics from seeedstudio, dealextreme, australianrobotics, toysdownunder and eBay.. Seeedstudio is great for getting pcbs, enclosures, cheap arduino stuff and xbee modules. They are a little slower but offer free shipping for orders over 50usd. 

I still had no comments on my brew fridge... :-(


----------



## angus_grant

I like your controller setup.

Is that "zip" a power supply for your micro-controller? And the card towards the top left is a relay?

I bought two Fridgemates to control my keg fridge and my fermentation fridge, but I am looking at building a very simple "BrewBot". I suppose after building the BrewBot V1 I would be able to build a Fridgemate but oh well, too late.


----------



## Edak

angus_grant said:


> I like your controller setup.
> 
> Is that "zip" a power supply for your micro-controller? And the card towards the top left is a relay?
> 
> I bought two Fridgemates to control my keg fridge and my fermentation fridge, but I am looking at building a very simple "BrewBot". I suppose after building the BrewBot V1 I would be able to build a Fridgemate but oh well, too late.


Thanks angus_grant, the zip is an old 5v power supply i had lying around from an old zip drive. Yes, the card on top left is a relay boa"rd. I posted my major parts earlier in the thread. 

Honestly I have gone over the top on this project but it keeps me sane and I enjoyed it. If I were to build another, I would probably wait for "raspberry pi" to be available and build in Linux. 

There's always next time!


----------



## DJR

Not arduino but I have odered lots of 1-wire stuff ( ds1820, ds 2413 ) from RS online- may not be the cheapest but fast free shipping on lots of things


----------



## angus_grant

@edak: the link to the parts you used mentioned an 8-channel relay board. I note in the photo of your controller that there are only 4 relays on the board. Did you chop an 8-relay board in half?

@chinamat: what LCD module did you use there?

I have had to lend my Windows laptop to father-in-law as his has blown up and he needs a pc for ongoing work commitments. Not that it matters as Aus Robotics sent me just the temp sensors and not the probes (has cable plus connector), so they will have to be sent back. sigh...

Cheers,
Angus.


----------



## Edak

angus_grant said:


> @edak: the link to the parts you used mentioned an 8-channel relay board. I note in the photo of your controller that there are only 4 relays on the board. Did you chop an 8-relay board in half?
> 
> @chinamat: what LCD module did you use there?
> 
> I have had to lend my Windows laptop to father-in-law as his has blown up and he needs a pc for ongoing work commitments. Not that it matters as Aus Robotics sent me just the temp sensors and not the probes (has cable plus connector), so they will have to be sent back. sigh...
> 
> Cheers,
> Angus.



Ah yes, I did change a few things...

This is the list of the parts I used.
http://www.ebay.com.au/itm/270844526066 <<< temp sensors
http://www.ebay.com.au/itm/250863942182 <<< 4 channel relay board
http://www.ebay.com.au/itm/140672654374 <<< my cheap fridge
http://www.dealextreme.com/p/8x-digital-tu...ed-module-81873 <<< display+keypad -- I love this thing!
http://www.freetronics.com/products/etherten <<< the Arduino with Ethernet on board, probably from Ausrobotics

Used 5V power supply from ZIP drive.
Power sockets, 4-way plug/socket (to attach/detach sensors) and enclosure from jaycar
USB "service port" socket (not originally pictured) from Altronics

I already had Ethernet socket, CAT5, power cable, dremel, epoxy, etc.


----------



## keifer33

Ok you smart guys Im looking at getting into this whole Arduino thing as I need a new challenge. Now Id like to start off by building something I can use in my brewery so a temperature readout for my mashtun sounds pretty good as a stick thermometer sucks. Now comes the killer question what do I need and can someone who hasn't done anything like this before handle getting an arduino + lcd + temp sensor working with minimal programming?

So what I have worked out I need so far

Arduino Kit - http://www.ebay.com.au/itm/Arduino-Uno-R3-...#ht_1008wt_1396
LCD - http://www.ebay.com.au/itm/Arduino-IIC-I2C...#ht_4309wt_1163
DS18B20 - http://www.ebay.com.au/itm/270844526066#ht_2658wt_1396

Ive got an old 5v usb wall charger already and will source a case at a later date. Is there anything else I'm missing or am doing wrong?


----------



## Edak

keifer33 said:


> Ok you smart guys Im looking at getting into this whole Arduino thing as I need a new challenge. Now Id like to start off by building something I can use in my brewery so a temperature readout for my mashtun sounds pretty good as a stick thermometer sucks. Now comes the killer question what do I need and can someone who hasn't done anything like this before handle getting an arduino + lcd + temp sensor working with minimal programming?
> 
> So what I have worked out I need so far
> 
> Arduino Kit - http://www.ebay.com.au/itm/Arduino-Uno-R3-...#ht_1008wt_1396
> LCD - http://www.ebay.com.au/itm/Arduino-IIC-I2C...#ht_4309wt_1163
> DS18B20 - http://www.ebay.com.au/itm/270844526066#ht_2658wt_1396
> 
> Ive got an old 5v usb wall charger already and will source a case at a later date. Is there anything else I'm missing or am doing wrong?



It looks like you have chosen the same LCD module as I originally was going to use. There was a trick to get it to work but I can help you with that. Do you have any programming experience in C? 
The 5V power supply may be enough, but this means you will be bypassing the on board regulator, so I recommend a 9V supply. 

It's really quite simple but if you have never programmed before or never used a multimeter then I would not expect it to be easy. 
If you only want a readout then there are displays on eBay that come as a package. 
http://www.ebay.com/itm/Digital-LED-C-F-Th...=item56483daea0


----------



## gava

Looks good! Im doing the same type of project at the moment with a little differences... How are you tracking time? millis()? did you allow for the overflow at 50days or you just going to power on for each brew?



Edak said:


> OK, so I have completed my brewing controller and it is testing wonderfully.
> 
> I thought you might like to see a few photos of the set up.
> 
> I am really looking forward to starting my first brew in there, currently it's testing with water...
> 
> A little unassuming....
> 
> 
> 
> 
> 
> A nice bright and large display so I can see it from anywhere
> 
> 
> 
> 
> 
> A tidy rear-panel, with two outputs and Ethernet
> 
> 
> 
> 
> 
> A look inside the box, where the magic happens
> 
> 
> 
> 
> 
> Doors open
> 
> 
> 
> 
> 
> 
> Interface
> 
> 
> 
> 
> Tell me your thoughts...


----------



## keifer33

Edak said:


> It looks like you have chosen the same LCD module as I originally was going to use. There was a trick to get it to work but I can help you with that. Do you have any programming experience in C?
> The 5V power supply may be enough, but this means you will be bypassing the on board regulator, so I recommend a 9V supply.
> 
> It's really quite simple but if you have never programmed before or never used a multimeter then I would not expect it to be easy.
> If you only want a readout then there are displays on eBay that come as a package.
> http://www.ebay.com/itm/Digital-LED-C-F-Th...=item56483daea0



Thanks for the link. Might grab that for now and work on getting a starter kit to learn the basics and then try and build something more complex/fun. Might be easier to start with something that has instructions


----------



## Edak

I am tracking time with millis and my overflow method tests to see if millis is less than the previous time. It will create a discontinuity but will keep working. 

It was a fun project and I am still thinking of refinements but it works well at the moment. My biggest issue is the number of bugs in the ethernet library of arduino 1.0. I set up a watchdog timer to reset the system if ethernet locks up.


----------



## gava

Not as good as above but Im giving my fermenting controller a test run..


----------



## Edak

Nice gava, is that a tablet PC? Nice to have one of those spare.. (I have an Android one but can't bring myself to dedicate to the brewery.

What is your bill of materials?

Went to the BIAB demo at the G+G today and feel as though I left with a bunch of new knowledge (and nearly a 40L crown urn).


----------



## gava

materials. hmmm.. 
$23~ arduino
$4.90~ 4 relay shield
$?? project box
$10~ 1-wire chips
$free cat5 port
$free HP tablet PC
$free cat5 cable
$free Old power extention leads for power 
$time for programming.. well my version of it anyway 
$2 for resisters for the 1-wire setup

thats loose numbers off the top of my head.
If you have old switches floating around i.e. rack mounted ones they have power supplies that could be suitable and got spot to mount..
I'll be chanign it to a old 10mb HUB that was decommisioned at work.


----------



## angus_grant

well just as an update to people, I have received my two DS18B20 temp probes and have wired up to breadboard + Netduino and am reading temps. yay!!! >-| Hey, it's baby steps at the moment!! I have not tried using parasite power mode for them a I can't really find a wiring diagram/code pattern for Netduino yet. And I am figuring if I release this public at some point it will be easier to have it set to two separate pins as inputs for other people. I am also wondering if need to start a "Netduino development" thread? 

I also have them wired to to D0 and D1 (1st and 2nd digital pins set to input mode) on the Netduino as I couldn't really understand how to read multiple sensors on the same bus/pin..... At this stage, not a problem as I have plenty of pins available but I really need to crank out my first BIAB to see what else I need to (and am able to) automate.

Does anyone have a Terminator arm sitting around in a storage facility? That would be a sweet BIAB automated crane set-up!!!!!!!

But at this stage I am happy to be reading two different temp sensors on two different pins. Next step is to sneak in a Craft Brewer heating element into next months purchasing plan (as well as a 4 relay board), fit the element to my 19L Big W pot, and then see what other bits I have left to purchase to try my first auto-BIAB.... :-O

We have a baby on the way so funds are a bit tight. I think I will have to forgo purchasing two kegs next month as funds are getting squeezed tighter and tighter. he he


----------



## gava

When our first was on the way and my partner was still working I spent up big an brought all my beer gear I wanted. Was easier to not miss the cash back then  new baby and new house = not much beer play money


angus_grant said:


> well just as an update to people, I have received my two DS18B20 temp probes and have wired up to breadboard + Netduino and am reading temps. yay!!! >-| Hey, it's baby steps at the moment!! I have not tried using parasite power mode for them a I can't really find a wiring diagram/code pattern for Netduino yet. And I am figuring if I release this public at some point it will be easier to have it set to two separate pins as inputs for other people. I am also wondering if need to start a "Netduino development" thread?
> 
> I also have them wired to to D0 and D1 (1st and 2nd digital pins set to input mode) on the Netduino as I couldn't really understand how to read multiple sensors on the same bus/pin..... At this stage, not a problem as I have plenty of pins available but I really need to crank out my first BIAB to see what else I need to (and am able to) automate.
> 
> Does anyone have a Terminator arm sitting around in a storage facility? That would be a sweet BIAB automated crane set-up!!!!!!!
> 
> But at this stage I am happy to be reading two different temp sensors on two different pins. Next step is to sneak in a Craft Brewer heating element into next months purchasing plan (as well as a 4 relay board), fit the element to my 19L Big W pot, and then see what other bits I have left to purchase to try my first auto-BIAB.... :-O
> 
> We have a baby on the way so funds are a bit tight. I think I will have to forgo purchasing two kegs next month as funds are getting squeezed tighter and tighter. he he


----------



## enoch

If anyone has the dealextreme LED and an 18B20 around I found a nice bit of code at:
http://www3.zansstuff.com/sous-vide
Only single channel but some nicely documented code. Changed the pins to match my setup and it ran first time too which is pretty good.


----------



## angus_grant

Just ordered a LCD-09363 LCD shield plus some stackable headers as the next step in my development. Got the Netduino reading temps, but not much point without being able to display them as well. 

Has anyone had a look at the FEZ Spider Starter Kit? Also uses the MS .Net MF. Comes with a heap of goodies and the hardware blows the NetDuino away (also arduino). 16MB on -board RAM, 72MHz ARM7 processor, built-in real time clock, etc, etc. Mainboard twice the price of the Netduino though. The kit is $290 although that comes with a fair bit of cool stuff as well..

http://www.ghielectronics.com/catalog/product/297


----------



## matho

well I have had some time to work on the code in the last couple of days, this is it, the manual mode is complete now to work on the auto mode and the setup.




> //libraries
> #include<EEPROM.h>
> #include<LiquidCrystal.h>
> #include<OneWire.h>
> #include<PID_v1.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;
> //outputs
> constint Heat = 9;
> constint Pump = 8;
> //variables
> int WindowSize = 5000;
> unsigned long windowStartTime;
> double Setpoint, Input, Output;
> boolean autoLoop = false;
> boolean manuLoop = false;
> boolean waterAdd = false;
> boolean Conv_start = false;
> boolean mpump = false;
> boolean mheat = false;
> boolean wtBtn = false;
> float mset_temp = 35;
> float Temp_c;
> int temp;
> byte mainMenu = 0;
> byte setupMenu = 0;
> byte pidMenu = 0;
> byte autoMenu = 0;
> byte stepTime;
> byte pumpTime;
> byte data[2];
> byte i;
> byte Busy = 0;
> //Specifythelinksandinitialtuningparameters
> PID myPID(&Input, &Output, &Setpoint,200,5,3, DIRECT);
> void *setup*()
> {
> // 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);
> pinMode (Pump,OUTPUT);
> windowStartTime=millis();
> //tell the PID to range between 0 and the full window size
> myPID.SetOutputLimits(0, WindowSize);
> myPID.SetMode(AUTOMATIC);
> }
> 
> void *loop*()
> {
> switch (mainMenu){
> case (0):
> Temperature();
> lcd.setCursor(0,0);
> lcd.print("The Brauduino");
> lcd.setCursor(0,1);
> lcd.print("Temp=");
> lcd.setCursor(6,1);
> lcd.print(Temp_c);
> //read the buttons for menu selection
> 
> if (digitalRead(Button_dn)==0){
> delay(1000);
> if (digitalRead(Button_dn)==0){
> lcd.setCursor(0,0);
> lcd.print(" Manual ");
> lcd.setCursor(0,1);
> lcd.print(" ");
> mainMenu=1;
> while(digitalRead(Button_dn)==0){
> }
> }
> }
> if (digitalRead(Button_prev)==0){
> delay(1000);
> if (digitalRead(Button_prev)==0){
> lcd.setCursor(0,0);
> lcd.print(" Auto ");
> lcd.setCursor(0,1);
> lcd.print(" ");
> mainMenu=2;
> while(digitalRead(Button_prev)==0){
> }
> }
> }
> if (digitalRead(Button_nxt)==0){
> delay(1000);
> if (digitalRead(Button_nxt)==0){
> lcd.setCursor(0,0);
> lcd.print(" Setup ");
> lcd.setCursor(0,1);
> lcd.print(" ");
> mainMenu=3;
> while(digitalRead(Button_nxt)==0){
> }
> }
> }
> break;
> 
> case(1): //manual mode
> delay(1000);
> lcd.setCursor(0,0);
> lcd.print(" Water added? ");
> lcd.setCursor(0,1);
> lcd.print(" Yes Quit");
> wtBtn=true;
> while (wtBtn){
> if (digitalRead(Button_prev)==0){
> manuLoop=true;
> wtBtn=false;
> while(digitalRead(Button_prev)==0){
> }
> }
> if (digitalRead(Button_nxt)==0){
> mainMenu=0;
> wtBtn=false;
> while(digitalRead(Button_nxt)==0){
> }
> }
> }
> while (manuLoop){
> Temperature();
> Setpoint=mset_temp*16;
> Input=Temp_c*16;
> lcd.setCursor(0,0);
> lcd.print(" Manual Mode ");
> lcd.setCursor(0,1);
> lcd.print("ST=");
> lcd.print(mset_temp);
> lcd.setCursor(8,1);
> lcd.print("AT=");
> lcd.print(Temp_c);
> if (digitalRead(Button_up)==0){
> delay(200);
> if (digitalRead(Button_dn)==0){
> digitalWrite(Heat,LOW);
> digitalWrite(Pump,LOW);
> mainMenu=0;
> manuLoop=false;
> lcd.clear();
> }
> else{
> mset_temp=mset_temp+0.25;
> }
> while (digitalRead(Button_up)==0){
> }
> }
> if (digitalRead(Button_dn)==0)
> {
> delay(200);
> if (digitalRead(Button_up)==0){
> digitalWrite(Heat,LOW);
> digitalWrite(Pump,LOW);
> mainMenu=0;
> manuLoop=false;
> lcd.clear();
> }
> else{
> mset_temp=mset_temp-0.25;
> }
> while (digitalRead(Button_dn)==0){
> }
> }
> //turns heat on or off
> if (digitalRead(Button_prev)==0){
> while(digitalRead(Button_prev)==0){
> }
> if (mheat==false){
> mheat=true;
> }
> else{
> mheat=false;
> digitalWrite(Heat,LOW);
> }
> }
> 
> //turns the pump on or off
> if (digitalRead(Button_nxt)==0){
> if (mpump == false){
> mpump=true;
> digitalWrite(Pump,HIGH);
> }
> else{
> mpump=false;
> digitalWrite(Pump,LOW);
> }
> while(digitalRead(Button_nxt)==0){
> }
> }
> if (mheat){
> PID_HEAT();
> }
> }
> break;
> case(2):
> if (digitalRead(Button_up)==0){
> delay(100);
> if (digitalRead(Button_dn)==0){
> mainMenu=0;
> while ( digitalRead(Button_dn)==0){
> }
> }
> }
> break;
> case(3):
> if (digitalRead(Button_up)==0){
> delay(100);
> if (digitalRead(Button_dn)==0){
> mainMenu=0;
> while ( digitalRead(Button_dn)==0){
> }
> }
> }
> break;
> }
> }
> 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 < 2; i++) { // we need 2 bytes
> data_=ds.read();
> }
> unsigned int raw = (data[1] << 8) + data[0];
> Temp_c=(raw&0xFFFC)*0.0625;
> Conv_start=false;
> return;
> }
> return;
> }
> void PID_HEAT (void){
> myPID.Compute();
> /************************************************
> *turntheoutputpinon/offbasedonpidoutput
> ************************************************/
> unsigned long now = millis();
> if(now - windowStartTime>WindowSize)
> {//time to shift the Relay Window
> windowStartTime+=WindowSize;
> }
> if(Output > now - windowStartTime) digitalWrite(Heat,HIGH);
> else digitalWrite(Heat,LOW);
> 
> return;
> 
> 
> }_


----------



## matho

its getting close, today i have sorted out the menus now just get the auto function written and it will be done.
I have been thinking about the setup menu, it has 2 sub menus "brauduino setup" which adjusts the PID settings and the 'Auto settings' which is where you adjust the stage times and temps, what I'm thinking about is in the brauduino setup allowing the users to change the number of stages from 2 to 7 so when the user goes into the Auto setup menu only the number of stages that they want appears and they don't have to scroll through unwanted stages.

so what do people think?

cheers steve


----------



## Edak

matho said:


> its getting close, today i have sorted out the menus now just get the auto function written and it will be done.
> I have been thinking about the setup menu, it has 2 sub menus "brauduino setup" which adjusts the PID settings and the 'Auto settings' which is where you adjust the stage times and temps, what I'm thinking about is in the brauduino setup allowing the users to change the number of stages from 2 to 7 so when the user goes into the Auto setup menu only the number of stages that they want appears and they don't have to scroll through unwanted stages.
> 
> so what do people think?
> 
> cheers steve


Sounds like a good idea, but is there any thing else in the setup menu? It seems a waste to have a menu of one entity. 

I am interested to see how you implemented the stages with their timing. What happens if you have a power glitch. Does it recover? This is important to me. 

Am I right to guess that this is going on the braumiser? It seems as though we cross threads a lot...


----------



## matho

Edak said:


> Sounds like a good idea, but is there any thing else in the setup menu? It seems a waste to have a menu of one entity.
> 
> I am interested to see how you implemented the stages with their timing. What happens if you have a power glitch. Does it recover? This is important to me.
> 
> Am I right to guess that this is going on the braumiser? It seems as though we cross threads a lot...



the setup menu also includes the PID multipliers and the PID window size, so adding a few more sub menus would probably make it more worthwhile.
As for brownouts and loss of power I have been thinking about this, what I could do is make it so that there is a 'auto started' byte in the eeprom that is set every time the 'auto' process is started, when the stage is entered it is recorded in the eeprom, the time left is recorded at set intervals, if the process finishes with out a glitch then the 'auto started' byte is cleared. Before the 'auto' process is entered the 'auto started' byte is read and if it is set then it will ask you if you want to continue with the last process, it can then read the stage and time from the last session and continue from there. This will also let people to exit the process and change a setting and then pick up from where they left off.

Yeah this is for the braumiser, I was asked to supply the braumiser controller so I have decided to develope it for the arduino and make up a sheild for it, this will make it easier for people to modify the code to suit their system.

cheers steve


----------



## Edak

matho said:


> the setup menu also includes the PID multipliers and the PID window size, so adding a few more sub menus would probably make it more worthwhile.
> As for brownouts and loss of power I have been thinking about this, what I could do is make it so that there is a 'auto started' byte in the eeprom that is set every time the 'auto' process is started, when the stage is entered it is recorded in the eeprom, the time left is recorded at set intervals, if the process finishes with out a glitch then the 'auto started' byte is cleared. Before the 'auto' process is entered the 'auto started' byte is read and if it is set then it will ask you if you want to continue with the last process, it can then read the stage and time from the last session and continue from there. This will also let people to exit the process and change a setting and then pick up from where they left off.
> 
> Yeah this is for the braumiser, I was asked to supply the braumiser controller so I have decided to develope it for the arduino and make up a sheild for it, this will make it easier for people to modify the code to suit their system.
> 
> cheers steve



You really are a champ for doing that for other people  
When you are done, send your code my way and I will have a look through as a once-over if you want.

Personally, to attack the brownout problem on my upcoming system (looks like I won't be going the braumiser route) I will have a real time clock in there. This means when the "job" is started it will save the steps and associated time stamps into the EEPROM. When it wakes from a brownout, it reads the current time and compares it to the saved steps and continues on its merry way.

I have not started this project but have been thinking about it in thorough detail. Are you also using the PID Library?

My plan:
Seeduino Stalker
5V power supply
DS18B20 probes (there are some with thermowells on the evilbay, which may be suitable)
25A relays (for any heating elements and the March pumps)
Wireless programming via Xbee so I don't have to bring PC to the garage or the controller into the house.
panel mount power outlets (like the ones I used on the fridge controller)
Serial (I2C) LCD (only 2x16 which I already have) 
4x buttons for menu system.

I am trying to keep this as simple as possible.
Perhaps I could even go for the dealextreme display/buttons again, I really like that piece of kit...


----------



## sean_0

Edak said:


> My plan:
> Seeduino Stalker
> *5V power supply*
> DS18B20 probes (there are some with thermowells on the evilbay, which may be suitable)
> 25A relays (for any heating elements and the March pumps)
> Wireless programming via Xbee so I don't have to bring PC to the garage or the controller into the house.
> panel mount power outlets (like the ones I used on the fridge controller)
> Serial (I2C) LCD (only 2x16 which I already have)
> 4x buttons for menu system.




Hey mate, what's the 5V power supply for? I used to think you needed a 5V adapter to power the arduino, but apparently that's not the case: http://arduino.cc/playground/Learning/WhatAdapter . That is unless you have a really well regulated supply and put it straight on the +5V pin. If you're using the 2.1mm dc jack, you'll need a bit more voltage I think.


----------



## bonj

sean_0 said:


> Hey mate, what's the 5V power supply for? I used to think you needed a 5V adapter to power the arduino, but apparently that's not the case: http://arduino.cc/playground/Learning/WhatAdapter . That is unless you have a really well regulated supply and put it straight on the +5V pin. If you're using the 2.1mm dc jack, you'll need a bit more voltage I think.


Yes, you can bypass the onboard regulator and supply 5V directly to the 5V pin. The voltage required on the DC jack depends on the regulator used, but should be between approximately 7V and 12V. The higher the voltage you supply, the more heat the regulator has to dissipate, so the lower the better. 9V is a good compromise.


----------



## Edak

sean_0 said:


> Hey mate, what's the 5V power supply for? I used to think you needed a 5V adapter to power the arduino, but apparently that's not the case: http://arduino.cc/playground/Learning/WhatAdapter . That is unless you have a really well regulated supply and put it straight on the +5V pin. If you're using the 2.1mm dc jack, you'll need a bit more voltage I think.


Yes but I am using a seeeduino stalker, which runs from 5v and regulates down to 3.3v with a back up lipo battery. 

I bypassed the 5V regulator on the fridge set up, it's easier than sourcing a 9V supply... I have mountain loads of 5v and 12v supplies and no 9V, so I chose the lesser of two evils.


----------



## Edak

Also, now that I mention seeed products, I am totally keen to test the dragrove from them too. Look into it...


----------



## sean_0

Edak said:


> Yes but I am using a seeeduino stalker, which runs from 5v and regulates down to 3.3v with a back up lipo battery.



Ah! sorry, missed that


----------



## matho

Edak said:


> When you are done, send your code my way and I will have a look through as a once-over if you want.



when I'm finished I'm planning on posting the whole code so more experienced coders can review it and fix things up if needed.

cheers


----------



## matho

I have finished with the code, I'm fairly happy with it, all up its about 17k in size so there is room to expand, I'll post the schematics and code after I have tested it a bit more

cheers steve


----------



## Zizzle

Learn some git and chuck it up on https://github.com/ so we can track your changes.

All my brewbot code and other temp controllers and stuff is up there.

https://github.com/Zizzle


----------



## bonj

matho said:


> I have finished with the code, I'm fairly happy with it, all up its about 17k in size so there is room to expand, I'll post the schematics and code after I have tested it a bit more
> 
> cheers steve


Nice work metho! Now we've just gotta get the shield finished and printed and we can all start testing it.


----------



## matho

Zizzle said:


> Learn some git and chuck it up on https://github.com/ so we can track your changes.
> 
> All my brewbot code and other temp controllers and stuff is up there.
> 
> https://github.com/Zizzle



that looks cool I'll will do that zizzle



Bonj said:


> Nice work metho! Now we've just gotta get the shield finished and printed and we can all start testing it.



yeah mate we will, I already have 10 lcd on the way, there are a couple of part that I want to get to see if they are correct before I order the PCB, I think I should order all the parts and print out the PCB on paper to make sure all the parts go together correctly.

cheers steve


----------



## bonj

matho said:


> I think I should order all the parts and print out the PCB on paper to make sure all the parts go together correctly.


Yeah that's a really good idea. It's a good way to avoid component clearance issues.


----------



## Edak

matho said:


> that looks cool I'll will do that zizzle
> 
> 
> 
> yeah mate we will, I already have 10 lcd on the way, there are a couple of part that I want to get to see if they are correct before I order the PCB, I think I should order all the parts and print out the PCB on paper to make sure all the parts go together correctly.
> 
> cheers steve


Where did you get your boards made up matho? 
I am very keen to use the seeedstudio service, very cheap for what you get.


----------



## bonj

Edak said:


> Where did you get your boards made up matho?
> I am very keen to use the seeedstudio service, very cheap for what you get.


Edak, The Seeeduino Fusion PCB service is what I used for my bonjuino and HERMS boards. The quality seems pretty decent and the price is great. I have been doing 10 board orders. They take about 3 weeks from order to your door.


----------



## matho

yeah what bonj said

I haven't used seeedstudio yet but going off the bonjuino they look fairly good so ill be putting an order in for 10 boards soon

cheers steve


----------



## Edak

matho said:


> yeah what bonj said
> 
> I haven't used seeedstudio yet but going off the bonjuino they look fairly good so ill be putting an order in for 10 boards soon
> 
> cheers steve


Judging by the interest you have received on the other thread you might want to order more than 10 boards.  

I am very interested to see your source code and schematics. Which temp sensor are you using again? 

Still keen to make my own braumiser if I can find the right time and parts. I keep hesitating to press the buy button on any pots because I first think I am going to get a good deal and then I find that the quality of the item sucks. I also think that the value of the items is significantly reduced when you have to heavily modify them.

Edit:autocorrect mishap.


----------



## matho

here is the schematic it doesn't look like much but thats because its for a shield design 





and here is the latest board design




I'm using a DS18b20 as a temp probe, I'll be posting the code and eagle files very soon just sorting out a few things. I'm going to get 10 done and see, unfortunately a lot of the parts I'm ordering, a price reduction only occurs at 25+ and I'm not going to outlay the cost for 25 kits because I don't want to be stuck with them.

cheers steve

edit: I'm thinking of making another shield to fit in between the arduino and the brauduino shield to bring out the unused pins so they can be used for other things


----------



## bonj

matho said:


> I'm going to get 10 done and see, unfortunately a lot of the parts I'm ordering, a price reduction only occurs at 25+ and I'm not going to outlay the cost for 25 kits because I don't want to be stuck with them.


Matho, I was wondering if a kickstarter project might be a good way to fund a larger order. We can all contribute and you only get the funding if the target is reached. That way, we all "back" the project, and if you hit the target, you get the funding though kickstarter.


----------



## matho

Bonj said:


> Matho, I was wondering if a kickstarter project might be a good way to fund a larger order. We can all contribute and you only get the funding if the target is reached. That way, we all "back" the project, and if you hit the target, you get the funding though kickstarter.



I don't quite understand, I might order 20 boards and make up 10 kits, the only reservation I have is if I make a mistake on the boards Ill end up with 20 dud boards, I will chat with you later about this cheers mate


----------



## Edak

Bonj said:


> Matho, I was wondering if a kickstarter project might be a good way to fund a larger order. We can all contribute and you only get the funding if the target is reached. That way, we all "back" the project, and if you hit the target, you get the funding though kickstarter.


I love kickstarter, what a great idea! 

I plan to use the Ds18b20 also, have you seen the units with thermowell on eBay or from sure electronics? I might buy a couple but don't know if they would be suitable for food use. 

http://www.sureelectronics.net/goods.php?id=1276
http://www.sureelectronics.net/goods.php?id=1275

What do you think? 
I could just buy some good thermowells and some sensors and wire them up myself.


----------



## seemax

Bought one of these about 6 months ago and it works fine with my Arduino Demi.

Easy to install too, just make sure you get a snug fit as the seal isn't very wide.


----------



## Edak

seemax said:


> I might do my own shield with
> Bought one of these about 6 months ago and it works fine with my Arduino Demi.
> 
> Easy to install too, just make sure you get a snug fit as the seal isn't very wide.


Cheers seemax, I will try them out sometime. 





Steve, 
Looking at your schematic, I see you have pull up resistors on the buttons. Is there any reason why you did this instead of using the internal pull up resistors on the arduino/atmel? Also, I am guessing that you used transistors for the heater and buzzer to be more compatible? I suppose that is a good idea even though some options would be able to use these low output voltage and currents with no transistors. 
Very good work


----------



## bonj

Edak said:


> Cheers seemax, I will try them out sometime.
> 
> 
> 
> 
> 
> Steve,
> Looking at your schematic, I see you have pull up resistors on the buttons. Is there any reason why you did this instead of using the internal pull up resistors on the arduino/atmel? Also, I am guessing that you used transistors for the heater and buzzer to be more compatible? I suppose that is a good idea even though some options would be able to use these low output voltage and currents with no transistors.
> Very good work


Edak, I can't speak for Steve, but I can say that using external pull-up resistors is a Good Thing because with a code base that is freely available and user configurable/modifiable, it removes the need for the internal pull-ups to be configured in the code. A little mistake by an inexperienced user could cause havoc with floating inputs.


----------



## bonj

Also, I got this in my inbox this morning... might be some good savings there (today only).


> Today we're having a massive 20% off sale on all Freetronics Gear http://littlebirdelectronics.com/collections/freetronics .
> Use the coupon code MAYTHEFORCEBEWITHYOU at checkout to save. The sale ends at midnight!


----------



## angus_grant

oh man, I ordered a Freetronics LCD last week. ha ha

I did purchase a colour LCD but worked out afterwards it is a 9-pin LCD and I can't really find any examples using it with the NetDuino, so I ordered a good old 16*2 LCD with keypad as well. This can use the ported LiquidCrystal display library for NetDuino so should be "plug and play". The colour LCD will be on the back burner (and will probably stay there) because I want to make some progress developing my "BrewBot".

Next: order a 2200W heating element from CraftBrewer, and a thermowell for the temp probe. I have read somewhere (perhaps a post on here somewhere) that they filled the thermowell with some form of liquid to get an accurate temp reading. Is this necessary? I was just going to install the thermowell and then shove the temp probe into the thermowell. I may temporarily seal up the end of the thermowell to see if this improves temp readings.

I will be installing the element into my Big W 19L pot for starters to prototype my BrewBot, so am fairly sure this will have enough heating power to get a good boil going seeing people install them into keggles and such. I will be able to use this outside which will please my 6 month pregnant wife who didn't particularly enjoy the aromas of boiling Hallertauer and honey, etc of my last brew.

At this point I am starting to wonder about even moving on to doing full mashes. If I can achieve good beers using extracts and adding my own adjuncts, why move on to the complexity of mashing, BIABs, whirl-pooling, trub, etc, etc...

Anyways, if I decide to move onto mashing, I can then pick up a relay board for my Netduino off eBay to run the heating element through, and will then have the basis for the next phase of actually BIAB'ing: maintaining mashing temps, count-down timers


----------



## Parks

Bonj said:


> Also, I got this in my inbox this morning... might be some good savings there (today only).


Cheers Bonj! Just bit the bullet and bought a board to play with


----------



## matho

Edak said:


> Steve,
> Looking at your schematic, I see you have pull up resistors on the buttons. Is there any reason why you did this instead of using the internal pull up resistors on the arduino/atmel? Also, I am guessing that you used transistors for the heater and buzzer to be more compatible? I suppose that is a good idea even though some options would be able to use these low output voltage and currents with no transistors.
> Very good work



Edak, 

just a left over from my PIC days, I have always put pull-ups on my push buttons. I know that I could have driven the SSR directly from an output pin but I wanted a LED driven off the same pin, then you know on light no output, with a 1.2v drop across the LED I was getting very close to the 3v operating limit of a SSR so I decided to go with the transistor. With the buzzer have you ever heard a piezo at 5v its not very loud so again I went with the drive transistor. Its good that I posted the schematic because looking at it I have noticed some errors like the +5v supply on the relay and the use of BC 547 instead of 2N2222a which is what I'm going with.

cheers steve


----------



## Edak

matho said:


> Edak,
> 
> just a left over from my PIC days, I have always put pull-ups on my push buttons. I know that I could have driven the SSR directly from an output pin but I wanted a LED driven off the same pin, then you know on light no output, with a 1.2v drop across the LED I was getting very close to the 3v operating limit of a SSR so I decided to go with the transistor. With the buzzer have you ever heard a piezo at 5v its not very loud so again I went with the drive transistor. Its good that I posted the schematic because looking at it I have noticed some errors like the +5v supply on the relay and the use of BC 547 instead of 2N2222a which is what I'm going with.
> 
> cheers steve


That's all good Steve, just checking. 
I didn't notice the LED in series because in my mind I shorted the connector since I saw no actual LED symbol.  

I am very keen to see your PCB's when you receive them.


----------



## lagers44

I found this looking through the Altronics updates Altronics , looks like they will start selling Arduino items soon + programming books

For those interested.


----------



## Edak

lagers44 said:


> I found this looking through the Altronics updates Altronics , looks like they will start selling Arduino items soon + programming books
> 
> For those interested.


Sounds good, but I like those guys and have a trade account with them. Hopefully they get more in than what you listed. Thanks for pointing that out.


----------



## matho

so Here is the code I have been working on for the brauduino, there is some more work to do but it seems to be working well, after a bit of advice from zizzle and bonj I have reduced the size of the code from 16.8k to 14.4k compiled. 

cheers steve


----------



## bonj

matho said:


> so Here is the code I have been working on for the brauduino, there is some more work to do but it seems to be working well, after a bit of advice from zizzle and bonj I have reduced the size of the code from 16.8k to 14.4k compiled.
> 
> cheers steve


Thanks for the credit, but all I really did was say "What Zizzle said" haha. Code is looking good. I wonder if it will fit on an atmega168 now... I can't remember how much space is free after the bootloader


----------



## matho

Bonj said:


> Thanks for the credit, but all I really did was say "What Zizzle said" haha. Code is looking good. I wonder if it will fit on an atmega168 now... I can't remember how much space is free after the bootloader



it still was advice


----------



## Edak

matho said:


> so Here is the code I have been working on for the brauduino, there is some more work to do but it seems to be working well, after a bit of advice from zizzle and bonj I have reduced the size of the code from 16.8k to 14.4k compiled.
> 
> cheers steve




I like your modal code, very good job and I see how it will replicate the Braumeister almost perfectly. I really love how you have handled the buttons, very simple!

I am curious to how much ram gets used in your program because every string is loaded into memory and you have nearly 700 characters which get displayed on the LCD.
If you are using arduino 1.0 then it is possible to load them into flash memory (it increases program size, but doesn't use anywhere near this much ram.) using the F().

eg.
lcd.print(" Add Hops");

becomes 
lcd.print(F(" Add Hops"));


Going through your code it's probably not a problem, but just a note... I am really finicky about reducing ram requirements because I have been bitten in the past with some huge data transfer programs.


EDIT:

Where you use delays (eg for the 1_sec buttons), have you considered using a while and reading millis() instead? This way, if the user changes their mind or goes from one button to another there is no risk of having a dead delay.


----------



## matho

Edak said:


> I like your modal code, very good job and I see how it will replicate the Braumeister almost perfectly. I really love how you have handled the buttons, very simple!
> 
> I am curious to how much ram gets used in your program because every string is loaded into memory and you have nearly 700 characters which get displayed on the LCD.
> If you are using arduino 1.0 then it is possible to load them into flash memory (it increases program size, but doesn't use anywhere near this much ram.) using the F().
> 
> eg.
> lcd.print(" Add Hops");
> 
> becomes
> lcd.print(F(" Add Hops"));
> 
> 
> Going through your code it's probably not a problem, but just a note... I am really finicky about reducing ram requirements because I have been bitten in the past with some huge data transfer programs.
> 
> 
> EDIT:
> 
> Where you use delays (eg for the 1_sec buttons), have you considered using a while and reading millis() instead? This way, if the user changes their mind or goes from one button to another there is no risk of having a dead delay.



thanks for the ideas edak I'll keep them in mind I'm still learning.

cheers steve


----------



## Deebo

matho said:


> so Here is the code I have been working on for the brauduino, there is some more work to do but it seems to be working well, after a bit of advice from zizzle and bonj I have reduced the size of the code from 16.8k to 14.4k compiled.
> 
> cheers steve



Not really needed but you could use some resistors to make the different buttons only use one analog input (like http://cdn.shopify.com/s/files/1/0045/8932...LCDShieldv2.pdf )
Might free some up if people want to add a few other sensors?


----------



## angus_grant

Well, I have finally got a few bits together and got a very basic setup going. A Freetronics LCD shield and a DS18B20 temp probe reading the current temp.

The shield I am using has the buttons setup in the way Deebo is talking about. You read in the voltage from the input pin and that tells you which button is currently being pressed. I end up with 6 free pins after the LCD shield, so not many left. I may end up having to look at a shift register to free up more pins if required, although that adds to the overall complexity.

I think the next purchase is a Freetronics terminal shield. This will improve my current setup of the wires twisted around the header pins. I'll probably order a relay board at the same time and one of the Craft Brewer elements at the same time and I should then be able to work on an extract brewing automation.

My goal is to be able to programme in boil time, extract and hops addition alerts with a piezzo element.







Oh, and the name is derived from an 80s cartoon called Astroboy. I did toy with the idea of Mashtroboy, but decided that was pretty crap.

Angus.


----------



## Edak

angus_grant said:


> Well, I have finally got a few bits together and got a very basic setup going. A Freetronics LCD shield and a DS18B20 temp probe reading the current temp.
> 
> The shield I am using has the buttons setup in the way Deebo is talking about. You read in the voltage from the input pin and that tells you which button is currently being pressed. I end up with 6 free pins after the LCD shield, so not many left. I may end up having to look at a shift register to free up more pins if required, although that adds to the overall complexity.
> 
> I think the next purchase is a Freetronics terminal shield. This will improve my current setup of the wires twisted around the header pins. I'll probably order a relay board at the same time and one of the Craft Brewer elements at the same time and I should then be able to work on an extract brewing automation.
> 
> My goal is to be able to programme in boil time, extract and hops addition alerts with a piezzo element.
> 
> 
> 
> 
> 
> 
> Oh, and the name is derived from an 80s cartoon called Astroboy. I did toy with the idea of Mashtroboy, but decided that was pretty crap.
> 
> Angus.



You can get cheaper versions of those same design LCD+keypad combo from dealextreme.com (search for arduino). 

is that 6 free digital pins? I wouldn't have thought so given that the LCD is a parallel type. Personally I prefer to use the I2C LCD screens, which effectively use ZERO digital pins (I2C uses the analog pins).

I LOL'D so hard when I read Mashtroboy. I am a huge fan.


----------



## angus_grant

6 free analogue pins and (I think) 3 free digital pins so the LCD uses quite a lot of pins. At the moment, that is not an issue and I have the LCD working so I will continue down this track.

No-one has really stated what SSR they use? Edak is using a 10A relay shield, but I think that is a bit close to the amps used by the Craftbrewer 2200W element (9.8A if my calcs are correct, which they probably aren't he he). So I was looking at this 25A SSR: http://www.ebay.com.au/itm/SSR25A-SOLID-ST...#ht_2498wt_1164

Is this OK to use?


----------



## Edak

angus_grant said:


> 6 free analogue pins and (I think) 3 free digital pins so the LCD uses quite a lot of pins. At the moment, that is not an issue and I have the LCD working so I will continue down this track.
> 
> No-one has really stated what SSR they use? Edak is using a 10A relay shield, but I think that is a bit close to the amps used by the Craftbrewer 2200W element (9.8A if my calcs are correct, which they probably aren't he he). So I was looking at this 25A SSR: http://www.ebay.com.au/itm/SSR25A-SOLID-ST...#ht_2498wt_1164
> 
> Is this OK to use?



Actually, for my fridge I used that, but for my Ardumiser (I like that name) I will be getting a 2400-3600W element and want to use PID, so I have a 25A SSR relay with heatsink for that. Both came from evilBay (the cheap ones you see there are what I used). Similarly to Matho, I will also be using a 10A standard relay for the pump, given that it does not get controlled by PID.

I can't wait to get all my kit, it will be fun to put together, unless there are problems, in which case it will be SUPER fun!


----------



## angus_grant

ah, yes, that was for your fridge controller.

I have yet to decide on a heating element. I was going to grab one of the Craft Brewer ones, but the "Keg King" thread has me a bit worried about the reliability of them. I am thinking now I might grab one of the DIY ones and bend it up myself. Perhaps a stupid question: can you unbend them?

So I bend it up for my current Big W pot, and then later on, I purchase a new bigger pot and want to use the Big W pot as a malt pipe. I would then want to run the heating element in the outside pot and not inside the malt pipe. I am guessing you might get some metal fatigue and run the risk of snapping the heating element.

I am looking at the Auberins site at their SSRs and just wondering if they would be more reliable than the cheap eBay ones..


----------



## Deebo

Not a big saving (5%) but if anyone wants to order something from littlebird electronics apparently these referrals give us both 5% off?
http://curebit.com/x/np2VO


----------



## enoch

Is anyone using dallastemperature library for the 18b20 running it on multiple buses?
There are plenty of examples of multi-dropping on a single bus but I want to have them on separate buses.


----------



## matho

yeah I have been wondering that too I think you would have to make up a function that would include this


Code:


// Data wire is plugged into port 2 on the Arduino

#define ONE_WIRE_BUS 2



// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)

OneWire oneWire(ONE_WIRE_BUS);



// Pass our oneWire reference to Dallas Temperature. 

DallasTemperature sensors(&oneWire);


get rid of the #define and make it so when you call the function you pass on the bus you want to read then rest would be the same. I don't use the dallas library I just use the one wire library.

I have just tried out this bit of code and it seems to work



Code:


#include <OneWire.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);





// global variables 



float sensor1;



float Temperature(int x){

  static boolean Conv_start;

  float Temp_c;

  byte Busy;

  byte data[2];

 

  OneWire ds(x);

  ds.reset();

  ds.skip();

  // start conversion and return

  if (!(Conv_start)){

	ds.write(0x44,0);

	Conv_start = true;

	return 0;

  }

  // 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 0;

	}

	ds.reset();

	ds.skip();

	ds.write(0xBE);  

	for ( int i = 0; i < 2; i++) {		   // we need 2 bytes

	  data[i] = ds.read();

	} 

	unsigned int raw = (data[1] << 8) + data[0];

	Temp_c = (raw & 0xFFFC) * 0.0625; 

	Conv_start = false;

	return (Temp_c);

  } 

}



void setup()

{

  lcd.begin(16,2);

}



void loop()

{

  sensor1 = Temperature(11);

  if (sensor1!= 0){

	lcd.setCursor(0,0);

	lcd.print(sensor1);

  }

}



so it seems you can pass on the pin that the 18b20 is connected too and it works

cheers steve


----------



## Edak

I use that library and you need to know the address of your sensors. That's it..


----------



## matho

Edak,

enoch wants to use different buses (i.e. different pins) to run multiple sensors , suppose doing that way you don't have play around with ROM codes


----------



## Edak

I would imagine then it would go something like this:



Code:


#define TEMPERATURE_PRECISION 11

#define ONE_WIRE_BUS_1 3

#define ONE_WIRE_BUS_2 4

OneWire oneWire1(ONE_WIRE_BUS_1);

OneWire oneWire2(ONE_WIRE_BUS_2);

DallasTemperature sensorBus1(&oneWire1);

DallasTemperature sensorBus2(&oneWire2);



DeviceAddress ambientThermometer= { 0x28, 0x4F, 0xDF, 0xA9, 0x03, 0x0, 0x0, 0xA0 }; //BLUE

DeviceAddress beerThermometer={ 0x28, 0x3D, 0xDB, 0xA9, 0x03, 0x0, 0x0, 0x49 }; //283DDBA903000049 WHITE



void setup(){

  sensors.begin();

  sensorBus1.setResolution(beerThermometer, TEMPERATURE_PRECISION);

  sensorBus2.setResolution(ambientThermometer, TEMPERATURE_PRECISION);



float temp1=sensors.getTempC(beerThermometer);

float temp2=sensors.getTempC(ambientThermometer);

}

...


----------



## Deebo

Just got 4 of these in the mail from singapore, looks simple as doing what edak suggested. (why do you want to run it on different wires just out of curiosity?)

http://www.pjrc.com/teensy/td_libs_OneWire.html has some sample code to show device ids etc


----------



## enoch

I have set myself a quite nice franken-circulator which is set up for holding a pot at a controlled via PID (Sous Vide). 
I want to also be able to drop it in a pot with the HE coil for a HERMS and plug it into a different DS18b20 in a thermowell.
I have played the "what sensor is that" game with a few sensors on the same bus but it is just a bit to much hassle when you want to control the HERMS pot temp or the HERMS outlet temp or the something else temp and monitor the ones you aren't controlling.




Oh and thanks for the helpful replies above. I will have a crack so can get the DSB back in action.


----------



## Edak

I am going to make a Sous Vide for my wife also, but simply using one of the off the shelf (eBay) cheapo PID controllers controlling a kettle element and maybe using a aquarium bubbler to move the water around. I haven't thought much further than that..

Perhaps I could just use my braumiser when I complete it, we already have the vacuum sealer..


----------



## enoch

Edak said:


> I am going to make a Sous Vide for my wife also, but simply using one of the off the shelf (eBay) cheapo PID controllers controlling a kettle element and maybe using a aquarium bubbler to move the water around. I haven't thought much further than that..
> 
> Perhaps I could just use my braumiser when I complete it, we already have the vacuum sealer..



It is worth the effort. I started using my hlt, then a mashmaster and a crock pot. 
New circulator with pump, element, float switch is almost safe for the kitchen :excl: .


----------



## matho

when I looked at the dallas library I didn't like the 750ms delay for the 12bit read , I know you can turn it of and time it yourself but there is a function in the DS18b20 that if you issue a readbit command when conversion is still taking place it will return a 0 and once it is finished it returns a 1, this only works in powered mode. This allows me to keep polling the sensor until it is finished and for the processor to continue to exitcute different code whilst conversion is taking place.


----------



## Edak

matho said:


> when I looked at the dallas library I didn't like the 750ms delay for the 12bit read , I know you can turn it of and time it yourself but there is a function in the DS18b20 that if you issue a readbit command when conversion is still taking place it will return a 0 and once it is finished it returns a 1, this only works in powered mode. This allows me to keep polling the sensor until it is finished and for the processor to continue to exitcute different code whilst conversion is taking place.



All true, although 12 bits is not necessary. I was using 11bits and having 0.125C resolution at 325ms intervals. That is probably not necessary either but I do like the idea of removing the delay altogether so I wil see how your code works for me. I noticed that the codespace dropped by about 2K when I removed the Dallas library. 

Good job!


----------



## Deebo

I read someplace if you request temp readings on the DS18b20 too often it slowly heats up the sensor and it gives higher and higher readings. (Only just got mine so haven't tested this yet)


----------



## matho

Deebo said:


> I read someplace if you request temp readings on the DS18b20 too often it slowly heats up the sensor and it gives higher and higher readings. (Only just got mine so haven't tested this yet)



I haven't noticed this effect, I have had the unit running for over an hour with 2 other thermometers next to it and they were within 1 deg of each other. Once the sensor is in a thermowell and in liquid I would think the effect of self heating would reduce because there would be a large mass to take the heat away. On the braumiser when I was testing the temp reading of the DS18B20 stayed with my trusty lab thermometer all the way to about 86 deg then it started to vary and by the boil was low by about 1.5 deg. 

if your worried about this you could change the code to



Code:


#include <OneWire.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);





// global variables 



float sensor1;



float Temperature(int x){

  static boolean Conv_start;

  static unsigned double startTime;

  float Temp_c;

  byte data[2];



  OneWire ds(x);

  ds.reset();

  ds.skip();

  // start conversion and return

  if (!(Conv_start)){

	ds.write(0x44,0);

	Conv_start = true;

	startTime = millis();

	return 0;

  }

  // check for conversion if it isn't complete return if it is then convert to decimal

  if (Conv_start){

	  if( (millis()-startTime) >= 60000){

	   ds.reset();

	   ds.skip();

	   ds.write(0xBE);  

	   for ( int i = 0; i < 2; i++) {		   // we need 2 bytes

		 data[i] = ds.read();

	   } 

	   unsigned int raw = (data[1] << 8) + data[0];

	   Temp_c = (raw & 0xFFFC) * 0.0625; 

	   Conv_start = false;

	   return (Temp_c);

  }

return 0; 

}

}



void setup()

{

  lcd.begin(16,2);

}



void loop()

{

  sensor1 = Temperature(11);

  if (sensor1!= 0){

	lcd.setCursor(0,0);

	lcd.print(sensor1);

  }

}



which should read the sensor every minute, depending on your PID settings you might want to reduce the amount of times you call your PID function as well


----------



## Edak

In my opinion that would be way too slow for the pid algorithm to work well. I think it's best left the way it is.


----------



## bonj

This document touches on the ideal sample rate on page 7. It is a good read for anyone interested in the workings of PID control and basic tuning methods.View attachment PID_without_a_PhD.pdf


----------



## matho

Edak said:


> In my opinion that would be way too slow for the pid algorithm to work well. I think it's best left the way it is.



I think your right Edak, anyway I did my own little experiment tonight , after 1.5 hrs








fairly close I would say.

also going off the thermal resistance of a to-92 package of 180degc/w in still air and a typical current during conversion of 1mA you get a temp rise of 0.9 deg now its only converting for a max of 750mS which would give you a temp rise of about 0.675 deg, which is a far call from the 2 deg that I have read


----------



## matho

for anyone wanting to make a brauduino at home attached is a PDF with top and bottom traces and part location and parts list, I have made it so all the parts that can't be soldered both sides are only soldered on the bottom, all other parts should be soldered both sides. there are 2 jumpers labelled 12v and 5v with the relay in the parts list insert the 5v jumper and not the 12v one.

cheers steve

View attachment braumiser_homemade1.pdf


----------



## bonj

matho said:


> for anyone wanting to make a brauduino at home attached is a PDF with top and bottom traces and part location and parts list, I have made it so all the parts that can't be soldered both sides are only soldered on the bottom, all other parts should be soldered both sides. there are 2 jumpers labelled 12v and 5v with the relay in the parts list insert the 5v jumper and not the 12v one.
> 
> cheers steve
> 
> View attachment 53997


looks good matho. I'll be holding out for a manufactured one. I'm a big fan of solder masks


----------



## matho

Bonj said:


> looks good matho. I'll be holding out for a manufactured one. I'm a big fan of solder masks


yeah mate I agree, they make they make soldering up a lot easier, I just posted it for the die hard DIY'er 

edit: just looking at the pdf, page 1 is the bottom trace, page 2 is the top component, page 3 is the top trace and page 4 is the bottom component, the arduino is pluged in from the top, when you are making transfer style of traces it can get a bit confusing
oh and I couldn't find any 10k resistors on little bird electronics so they will be needed to be sourced from another location.

cheers


----------



## matho

I have changed the code a little bit and fixed a few bugs after testing this morning

Brauduino code

cheers steve


----------



## matho

added a pause option so any part of the auto mode can be paused


----------



## Edak

matho said:


> added a pause option so any part of the auto mode can be paused


Out of curiosity, why did you find this necessary?


----------



## matho

in the nextgen thread it was suggested that I put it in the original braumiser so I thought I would in this one, I have used it once or twice, just handy to have I guess and not hard to implement.


----------



## matho

is a quick video of the setup menu sorry about the quality but you get the idea. To enter the setup menu I hold down the 'ENTER' button for 1 sec, to navigate between the 'Unit parameters' or the 'Auto parameters' its up button for auto and the down button for unit. Once inside the menu it is up or down to change the parameter and the 'ENTER' button to save and move to the next parameter and to quit it is pressing the up and down button at the same time, quitting will not save the parameter that is displayed at the time.

more video of the manual mode and the auto mode to come

cheers steve


----------



## matho

is a video of the manual mode. To enter manual mode I hold down the 'down' button for 1 sec. It then prompts me to add water, after confirming the prompt I can adjust the temperature with the up and down buttons, turn the heat on and off with the 'Start' button and the pump on and off with the 'Enter' button. To Quit I push the 'up' and 'down' buttons at the same time to take me back to the start screen.

I'm not 100% happy with how the PID library works, the problem is that the I component of the pid can wind out if there is an error for too long which is only clamped but the window size, which is ok if you have a small window size but if you have a large window size then the PID becomes slow to respond because it has to wind back the I. I'm going to have a bit of a play in a real life situation not just putting my finger on the end to simulate a heat source.


----------



## Edak

matho said:


> is a video of the manual mode. To enter manual mode I hold down the 'down' button for 1 sec. It then prompts me to add water, after confirming the prompt I can adjust the temperature with the up and down buttons, turn the heat on and off with the 'Start' button and the pump on and off with the 'Enter' button. To Quit I push the 'up' and 'down' buttons at the same time to take me back to the start screen.so
> I'm not 100% happy with how the PID library works, the problem is that the I component of the pid can wind out if there is an error for too long which is only clamped but the window size, which is ok if you have a small window size but if you have a large window size then the PID becomes slow to respond because it has to wind back the I. I'm going to have a bit of a play in a real life situation not just putting my finger on the end to simulate a heat source.




Both videos look good, I have the benefit of 4 lines on my lcd so the function of the buttons is always displayed and not ambiguous. I have finished the first iteration of the code, there were only a few lines from yours that I borrowed. 
Will Make a video of the interface and let you see it. First I have to get my wireless programming working, because that is my priority.


----------



## matho

sounds good Edak,

 is a video of the auto mode. To enter the auto mode I press the 'start' button for 1 sec, if there has been an uncompleted brewing cycle it will prompt for a resume. I selected no to start a new brewing cycle. It prompts me to add water and then goes onto the first stage 'Mashin', once the temperature has been reached it will start to count down the timer when finished it will prompt to add malt and wait for a confirm or quit. In any stage the set temperature can be increased or decreased if wanted. After the malt has been added and it has been acknowledged it will enter the stages, you can set it up to have 1 to 9 stages, 1 being mashin only, 9 being mashin plus 8 steps. I quit to show the resume function as you can see it picks up where it left off, at the end of all the stages it will prompt to remove the malt. After the malt has been removed it will enter the boil, the set temperature can be set between 94 deg and 120 deg, of course it will never get to 120 but set to 120 you will know that you have 100% power, up here at 600m above sea level water boils at 96 and wort boils at 98, I find that at 97 I get a simmer and at 101 I get a vigorous boil. There are up to 8 hop alerts that can be set up to go off during the boil. At the end of the boil an alert goes off and the resume function gets turned off so the next time you enter auto mode it will only prompt for water. During any part of the process I can quit by pressing the up and down buttons at the same time.

cheers steve

edit: in the video the screen looks light blue but in real life its a deep blue.


----------



## Siborg

Well I'll be damned! I haven't been brewing as of late because I've gone back to Uni (studying I.T) and what do I happen to stumble across? You guys are writing code for your brewing gear! And, if I'm not mistaken, it's in C++, the language I've been studying this semester. Interesting stuff.


----------



## matho

yep arduino is based on c++, I'm only learning this stuff myself if you want to see some interesting code look at zizzle's stuff on github

here

cheers steve


----------



## matho

so I have upgraded for arduino 0022 to arduino 1.0 and found a compiler error with the custom character instead of writing

lcd.Write(0);

I had to change it to 

lcd.print((char)0);

but reading further I might change it to

lcd.write((uint8_t)0);

the v1.0 version is HERE

cheers steve


----------



## Edak

Yeah, 1.0 screws with everything. I upgraded a long time ago.


----------



## matho

well I have been playing around with Kicad and have made up a board for the brauduino on it. Its an Ok PCB design software and even better cause its open source 

HERE  is the project, this isn't the design that I have used to get the boards made up but it looks ok 

cheers steve


----------



## angus_grant

I received my USB data acquisition device and have hooked up my DS18B20 temp and am reading temps from it. It is very easy as the temperature code has been built into the device. So I just tell the digital pin it is in temp mode and read back some ASCII text from the digital pin which gives me the temp. I have 7 other digital or analogue pins (I tell the pin which mode it is in) to control through simple serial port commands (which are so easy to do in C#). So I'll be able to control my 25A SSRs for heating element and pump.

I am planning on my C# app parsing BeerSmith or BeerMate recipe files and build up the schedule straight from the file instead of entering all the info again.

I'll hook up the Netduino to a flow controller I have and set up a display on my keg fridge to read how many litres of beer have been poured. Thus letting me know how little beer is left in the keg. At least I'll get some warning that the beer I am pouring will be my last from the keg. :'(


----------



## Edak

angus_grant said:


> ..
> I'll hook up the Netduino to a flow controller I have and set up a display on my keg fridge to read how many litres of beer have been poured. Thus letting me know how little beer is left in the keg. At least I'll get some warning that the beer I am pouring will be my last from the keg. :'(



LOVE that idea!


----------



## vortex

Is it possible to wire up an STC1000 temp probe into an arduino, and then output that temp to the STC1000 so it continues to control the temps? I'd like to hook up the arduino to the fermenter probe to graph it's temperatures, but don't want to have multiple temp probes around the place if I don't have to...

I don't exactly understand how the temp probe works, so I don't know if this would actually work or not.


----------



## Edak

vortex said:


> Is it possible to wire up an STC1000 temp probe into an arduino, and then output that temp to the STC1000 so it continues to control the temps? I'd like to hook up the arduino to the fermenter probe to graph it's temperatures, but don't want to have multiple temp probes around the place if I don't have to...
> 
> I don't exactly understand how the temp probe works, so I don't know if this would actually work or not.



Not really. Instead I wold recommend that you have a different sensor for logging.


----------



## mILLrAT

vortex said:


> Is it possible to wire up an STC1000 temp probe into an arduino, and then output that temp to the STC1000 so it continues to control the temps? I'd like to hook up the arduino to the fermenter probe to graph it's temperatures, but don't want to have multiple temp probes around the place if I don't have to...
> 
> I don't exactly understand how the temp probe works, so I don't know if this would actually work or not.



The STC probe is a thermistor, that is the resistance of the probe changes in proportion to the temperature (logarithmic relationship). You can measure a thermistor on the arduino using a voltage divider circuit and an analog input. You then need a calibration equation to turn the measured resistance into a temperature. It is a lot of mucking around. Also the arduino only uses a 8 bit analog to digital convertor and at one end of the temp scale (low end from memory) you might find the resolution is one degree celsius.

I use an arduino for temp control of the fermenter fridge. I use a DS1820 probe that I tape to the outside of the fermenter and 2 solid state relays, one for the heater, one for cooling. A LCD for display. I am currently playing with a SD card for data logging.


----------



## bonj

mILLrAT said:


> The STC probe is a thermistor, that is the resistance of the probe changes in proportion to the temperature (logarithmic relationship). You can measure a thermistor on the arduino using a voltage divider circuit and an analog input. You then need a calibration equation to turn the measured resistance into a temperature. It is a lot of mucking around. Also the arduino only uses a 8 bit analog to digital convertor and at one end of the temp scale (low end from memory) you might find the resolution is one degree celsius.
> 
> I use an arduino for temp control of the fermenter fridge. I use a DS1820 probe that I tape to the outside of the fermenter and 2 solid state relays, one for the heater, one for cooling. A LCD for display. I am currently playing with a SD card for data logging.


I was not aware that the STC probe is a thermistor. That is interesting information.

I do however, have to correct you on the ADC on the arduino, as it is in fact a 10 bit unit.


----------



## Edak

Bonj said:


> I was not aware that the STC probe is a thermistor. That is interesting information.
> 
> I do however, have to correct you on the ADC on the arduino, as it is in fact a 10 bit unit.



Either way, it is a LOT of fuffing around and even if you can get the arduino to measure the thermistor. Do you know what the input impedances are of both measurement circuits? The suggestion of using a voltage divider will almost definitely stuff up the measurement of the non-arduino temperature controller. In other words it greatly depends on how the other device works...

The typical method for measuring these is to use a known current source, which is a great method for using voltage dividers. 

It's ohms law (V=IR). If you change the resistance then you will change the current flow or the voltage. If you set the voltage and change the resistance then the current will change, but how is an arduino going to measure a change in current? By running it across another series of resistors. This is called a wheatstone bridge. 

You will need a wheatstone bridge to measure fine differences in resistance, this is the ONLY method for strain gauges and other small resistance changes. This is not really basic stuff because you will then need to have balanced resistors and reference voltages, etc and as I said earlier it also depends on the measurement circuit of the other controller. 

When there is a constant current source (which is how the devices I work with every day) then changing the resistance directly translates to a change in the voltage across the resistor, which is EASILY measured with a standard ADC.

My 2c is not to bother with it, use a DS18B20.

Speaking of which, I just received my awesome temp probe from sure electronics, the one with the DS18B20 in a stainless thermowell. NIIIICE!


----------



## bonj

I totally agree on the DS18B20. They're good little units and simple to use. I have some stainless thermowells I got from http://www.brewershardware.com/ which are awesome.


----------



## Edak

Bonj said:


> I totally agree on the DS18B20. They're good little units and simple to use. I have some stainless thermowells I got from http://www.brewershardware.com/ which are awesome.



Yes but these DS18B20 sensors had the perfect thermowell already attached. 
Cool sensor 

edit:I like the link you provided, cheap fittings!


----------



## bonj

Edak said:


> Yes but these DS18B20 sensors had the perfect thermowell already attached.
> Cool sensor
> 
> edit:I like the link you provided, cheap fittings!


They those premade sensor ones you linked look awesome! Brewers Hardware does some premade ones, but not as cheap as the ones you linked from Sure Electronics. Nice find.


----------



## angus_grant

OUCH. Have a look at the shipping costs though. $US60 for shipping, and that was only for 3 cam fittings... :-O


----------



## Edak

angus_grant said:


> OUCH. Have a look at the shipping costs though. $US60 for shipping, and that was only for 3 cam fittings... :-O



From where?


----------



## angus_grant

Edak said:


> From where?



Brewers Hardware in the US.


----------



## matho

been thinking of adding a small proto area to the brauduino so it can bring out the spare pins and ppl can use them something like this





thoughts?

cheers steve


----------



## MastersBrewery

matho would that be for like add an input or output or i2c? (think its called i2c) :blink:


----------



## matho

wasn't the plan but I suppose you could, I was just thinking there are 4 spare pins and they could be used for other things like controlling another SSR or adding volume sensing via load cells.

I am thinking adding wireless comms of some sort so i can make up a "pager" type device for the brauduino so you don't have to stay in ear shot of it when brewing, but I'm still thinking about it and haven't designed anything yet.

cheers steve


----------



## matho

Ok after receiving the PCB's yesterday they look good so I have decided to post the EAGLE files that I used to create them. I don't want ownership of the Brauduino so here they are do with them as you please, maybe develop it further.

View attachment ahb_brauduino.zip


cheers steve


----------



## dmac80

matho said:


> wasn't the plan but I suppose you could, I was just thinking there are 4 spare pins and they could be used for other things like controlling another SSR or adding volume sensing via load cells.
> 
> I am thinking adding wireless comms of some sort so i can make up a "pager" type device for the brauduino so you don't have to stay in ear shot of it when brewing, but I'm still thinking about it and haven't designed anything yet.
> 
> cheers steve



I've been working on a similar setup with ethernet, i've modified your code to add a webpage that i can access though my home network. It will show number of steps selected, current step, current set temp, actual temp, and a few other things. It's still a work in progress and increases the program size somewhat, but it will be handy for me as i can do some parenting inside and know the status of the brew out in the shed.
I also added a start delay timer and pre heat routine to allow setup the night before and have water at mash in temp when i wake up.

Cheers Dan


----------



## matho

dmac said:


> I've been working on a similar setup with ethernet, i've modified your code to add a webpage that i can access though my home network. It will show number of steps selected, current step, current set temp, actual temp, and a few other things. It's still a work in progress and increases the program size somewhat, but it will be handy for me as i can do some parenting inside and know the status of the brew out in the shed.
> I also added a start delay timer and pre heat routine to allow setup the night before and have water at mash in temp when i wake up.
> 
> Cheers Dan




sounds awesome Dan can wait to see pics, I have a delay setup in the original braumiser but I have never used it so I left it out on the brauduino. Thats the beauty of the arduino very easy for people to change the code to suite them, when you have it up and running I would love to see some of the code

cheers steve


----------



## dmac80

matho said:


> sounds awesome Dan can wait to see pics, I have a delay setup in the original braumiser but I have never used it so I left it out on the brauduino. Thats the beauty of the arduino very easy for people to change the code to suite them, when you have it up and running I would love to see some of the code
> 
> cheers steve



Yeah Steve, programming the Arduino is fairly straight forward once you get your head around the syntax (for most simple functions). I haven't got any pics of the webpage at the moment (left the arduino at work), but it is very basic html text, no frills.

View attachment DodgyBrau.txt


It helps that your code was well written. I can guarantee that mine won't be though. I changed the button assignment also as i had bought a freetronics display (probably wouldn't buy another) with 5 buttons with dropping resistors that go into analog 0.

I've been looking at adding mash and boil programming to the ethernet interface, but the program was getting a bit large. 

Got a cheap Arduino Mega off ebay with an ethernet shield so i might still do it.

Cheers


----------



## matho

looks good dan, I'm still learning the language myself the code is only readable because of the advice of Zizzle, now he knows his coding .

cheers steve


----------



## Clutch

http://www.lifehacker.com.au/2012/05/do-it...g-temperatures/


----------



## matho

Did a test run today, the unit performed well electrically and thermally, the heatsink only got about 20deg above ambient so I happy there, the PSU was running the unit and a 15w pump and that was all good too.








what I wasn't happy with was the PID, even when I had Kp set to my MAX value which was 200 it still couldn't get oscillation, when I introduced the Ki I would then get overshoot and a slow response and no amount of Kd would stop the overshoot. Basically the heat would stay hard on until it actually went over temp and the it would start to ramp down, the best I could get was about 0.5 deg swing each way. I have a few ideas one of them is the sample time, it was set to the default of 0.1 sec. I think that with a ramp rate of about 1.5 deg/min and a resolution of 0.0625, it is allowing the I to ramp up without any input from the D.

I = I+((Ki x sampletime_in_sec)x error)

and

D = (Kd/sampletime_in_sec) x (input - lastinput)

with a temp rise of 1.5 deg/min this would give a temperature change of 0.0625 about every 3 seconds which would allow the I to change 30 times before D can be used to pull it back. My window size was set to 1 second, I was thinking of setting the sample time to the window size which would then reduce the amount of times that the I could change without D holding it back.

what are others experience with the PID library in the arduino

cheers steve


----------



## matho

Ok so I have been giving this some thought and have realized that with a window size of 1000 millis and a gain of only 200 on the P, the error would have to be 5 deg for the output to be 100% on P only. So what I think was happening yesterday was the P term was dropping off too early and then the I term kept ramping because of the constant error. The I term is reduced by the D term in proportion to the rate of change or by the error going negitive (overshoot) , so with the slow rate of change and the lack of P control near the setpoint then I term was bound to oscillate. 

So the plan is:

1. increase the sample rate time because of the slow rate of change 

2. increase the bandwidth of the P term gain to a 500 limit ( from 200)

3. set the window time to 500 millis and just mutilply the output to get a longer window time if needed

the reason for the last point is that the I term is limited by the window size, so fixing it to 500 hopefully it doesn't take too long for the I term to be reined in.

cheers steve


----------



## ArnieW

matho said:


> Ok so I have been giving this some thought and have realized that with a window size of 1000 millis and a gain of only 200 on the P, the error would have to be 5 deg for the output to be 100% on P only. So what I think was happening yesterday was the P term was dropping off too early and then the I term kept ramping because of the constant error. The I term is reduced by the D term in proportion to the rate of change or by the error going negitive (overshoot) , so with the slow rate of change and the lack of P control near the setpoint then I term was bound to oscillate.
> 
> So the plan is:
> 
> 1. increase the sample rate time because of the slow rate of change
> 
> 2. increase the bandwidth of the P term gain to a 500 limit ( from 200)
> 
> 3. set the window time to 500 millis and just mutilply the output to get a longer window time if needed
> 
> the reason for the last point is that the I term is limited by the window size, so fixing it to 500 hopefully it doesn't take too long for the I term to be reined in.
> 
> cheers steve


Hi Steve,

I've decided the PID is not needed in my rig. The reason is that the amount of mash liquor being heated directly at any one time is quite small compared to the thermal mass of the grain and liquor in the pipe. I just have a simple on/off heater control for mashing (boil I can set % power) and measuring the temp of the liquor flowing over the top of the pipe shows it is pretty much rock solid at target.

I like the idea of PID but my tendency is to over complicate things. I've decided this is one bit that was more complex than it needed to be.

Again kudos for all your development work - an impressive bit of kit and offering to the brewing world.

cheers, Arnie


----------



## matho

ArnieW said:


> Hi Steve,
> 
> I've decided the PID is not needed in my rig. The reason is that the amount of mash liquor being heated directly at any one time is quite small compared to the thermal mass of the grain and liquor in the pipe. I just have a simple on/off heater control for mashing (boil I can set % power) and measuring the temp of the liquor flowing over the top of the pipe shows it is pretty much rock solid at target.
> 
> I like the idea of PID but my tendency is to over complicate things. I've decided this is one bit that was more complex than it needed to be.
> 
> Again kudos for all your development work - an impressive bit of kit and offering to the brewing world.
> 
> cheers, Arnie



thanks again Arnie for the advice, I'll keep it in mind, if this all gets to complicated then I might just do that.

cheers steve


----------



## angus_grant

yeh, I've done a bit of reading on the theory of PID temp control and figured I would first approach temp control with a simpler method with the aim of KISS.

At this stage I am thinking of some percentage based formula. The closer the temp is getting towards target (smaller % difference) then shorter duty cycle on the heating element. I figure it will need some improvements when the mash gets added as that will confuse things a bit. Or maybe not?

Once the target has been met, switch it over to smaller percentage difference triggering the heating element. Adding insulation to the pot should help reduce the amount of temp maintenance needed.

Sounds good in theory.


----------



## matho

so with a bit more thought and playing around with a spreadsheet I have decided to have the heat on until the temperature is 5 degs from the set point then the PID takes over. I just tried it out on 20l with a 2400w element and it ramped up and settled on the setpoint without any overshoot.



Code:


void PID_HEAT (void){

  if((Setpoint - Input)>5){

	digitalWrite(Heat,HIGH);

  }

  else{

  myPID.Compute();

  unsigned long now = millis();

  if(now - windowStartTime>WindowSize)

  {									 //time to shift the Relay Window

	windowStartTime += WindowSize;

  }

  if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);

  else digitalWrite(Heat,LOW);

  }

}


I also increased the sample time to 5 seconds, divided Ki by 100 and limited the output to 100. the setting I used in the trial today was Kp = 50, Ki = 0.01 , Kd = 10 and with a window size of 500ms. The change over between ON and PID is a bit messy with the element being off for about 10 sec whilst the PID ramps up so I'll look into the pid manual/pid auto command to see if that will help and if the setpoint only changes by 1 deg it takes a while for the pid to respond.

cheers steve


----------



## dmac80

matho said:


> so with a bit more thought and playing around with a spreadsheet I have decided to have the heat on until the temperature is 5 degs from the set point then the PID takes over. I just tried it out on 20l with a 2400w element and it ramped up and settled on the setpoint without any overshoot.
> 
> 
> 
> Code:
> 
> 
> void PID_HEAT (void){
> 
> if((Setpoint - Input)>5){
> 
> digitalWrite(Heat,HIGH);
> 
> }
> 
> else{
> 
> myPID.Compute();
> 
> unsigned long now = millis();
> 
> if(now - windowStartTime>WindowSize)
> 
> {									 //time to shift the Relay Window
> 
> windowStartTime += WindowSize;
> 
> }
> 
> if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);
> 
> else digitalWrite(Heat,LOW);
> 
> }
> 
> }
> 
> 
> I also increased the sample time to 5 seconds, divided Ki by 100 and limited the output to 100. the setting I used in the trial today was Kp = 50, Ki = 0.01 , Kd = 10 and with a window size of 500ms. The change over between ON and PID is a bit messy with the element being off for about 10 sec whilst the PID ramps up so I'll look into the pid manual/pid auto command to see if that will help and if the setpoint only changes by 1 deg it takes a while for the pid to respond.
> 
> cheers steve



That's a good idea Steve. I found with my current Auber PID it was slow to ramp, but controlled at the setpoint well, which led to me manually controlling my mash steps till i reached setpoint. I overcame this with a similar idea of driving the heater on with a deviation alarm, which negated the need for more aggressive PID settings.

Cheers


----------



## matho

dmac said:


> That's a good idea Steve. I found with my current Auber PID it was slow to ramp, but controlled at the setpoint well, which led to me manually controlling my mash steps till i reached setpoint. I overcame this with a similar idea of driving the heater on with a deviation alarm, which negated the need for more aggressive PID settings.
> 
> Cheers



thanks mate, I probably could have used 2 PID setting but that would mean adding more menus and that's just too much f'ing around so I went with this idea, what I would like to do is to have a separate I term limit so I can limit it to a percentage of the output, then I could put an agressive Ki in and it would only affect the lower power settings which would be good to bring the temp up to the set point after the P has dropped away, but that would mean changing the library.

anyway HERE is the code, to see the change I have done click on the history button then click on the rectangle up the top right with all the numbers in it 

cheers steve


----------



## matho

So after discussing this with Dmac last night I have come up with this



Code:


void PID_HEAT (void){

  if((Setpoint - Input)>5)

  {

	digitalWrite(Heat,HIGH);

	if ((Setpoint - Input)<6)

   {

	myPID.Compute();

	}

   }

  else{

  myPID.Compute();

  unsigned long now = millis();

  if(now - windowStartTime>WindowSize)

  {									 //time to shift the Relay Window

	windowStartTime += WindowSize;

  }

  if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);

  else digitalWrite(Heat,LOW);

  }

}


this should give the P time to wind before the change over to PID up but not let I term go too far, I haven't tried it yet but it should work.

cheers steve


----------



## dmac80

matho said:


> So after discussing this with Dmac last night I have come up with this
> 
> 
> 
> Code:
> 
> 
> void PID_HEAT (void){
> 
> if((Setpoint - Input)>5)
> 
> {
> 
> digitalWrite(Heat,HIGH);
> 
> if ((Setpoint - Input)<6)
> 
> {
> 
> myPID.Compute();
> 
> }
> 
> }
> 
> else{
> 
> myPID.Compute();
> 
> unsigned long now = millis();
> 
> if(now - windowStartTime>WindowSize)
> 
> {									 //time to shift the Relay Window
> 
> windowStartTime += WindowSize;
> 
> }
> 
> if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);
> 
> else digitalWrite(Heat,LOW);
> 
> }
> 
> }
> 
> 
> this should give the P time to wind before the change over to PID up but not let I term go too far, I haven't tried it yet but it should work.
> 
> cheers steve



Looks good Steve,

If i get my shit together over the weekend and finish mine i'll give it a test.

Cheers


----------



## matho

dmac said:


> Looks good Steve,
> 
> If i get my shit together over the weekend and finish mine i'll give it a test.
> 
> Cheers



Awesome, saves me from doing it 

cheers


----------



## matho

just incase you haven't seen it on the other thread

The Brauduino ZIP

the zip contains the manuals,programs and eagle files I used to make the brauduino

cheers steve


----------



## matho

I have been playing with the PID library and have added a function called SetITermClamp which will allow you to clamp the ITerm to stop it winding up 

View attachment PID_Iclamped.zip


I hope it works I complied a small bit of code with it included and didn't bring up any errors, this is the first time I have played with a library so I could have stuffed it up, when I get a chance I'll try it out on my test rig.

to set the ITerm clamp the code would be

myPID.SetITermClamp(0,20);

which would hold the ITerm between 0 and 20, hopefully this will help stop the overshoot and oscillation problems.

I have been playing with a spreadsheet, its really rough but I have been working on some options 

View attachment pid1.xls


the options are a 1 second sample rate with D being subtracted from ITerm instead of the output , a 5 second sample rate with ITerm clamped to 20 and a 1 second sample rate with ITerm clamped to 20.

cheers steve


----------



## matho

I loaded up the library to my unit this afternoon, it does clamp I so I'm happy about that, I would suggest clamping ITerm to just above the percentage of the output required to keep a constant temperature at the maximum temperature required for the mash, basically what your losses are. This would stop I term from causing an overshoot but allow it to remove the constant error that persists with P drive only, if you are getting a bit of overshoot you could ramp up D to hold it back.

cheers steve


----------



## matho

after having a look around, I came across this PID library

View attachment PID_Beta6.zip


it is the library that the Brewtroller uses, it was written by the same guy that wrote the PIDv1 library but it looks like it has a better algorithm for stopping I from running away. I don't think will use it but thought I might post it for others if they want to play with it.

cheers steve


----------



## Edak

matho said:


> after having a look around, I came across this PID library
> 
> View attachment 55366
> 
> 
> it is the library that the Brewtroller uses, it was written by the same guy that wrote the PIDv1 library but it looks like it has a better algorithm for stopping I from running away. I don't think will use it but thought I might post it for others if they want to play with it.
> 
> cheers steve


Thanks Steve, I will check it out when I progress with my hbBM.


----------



## matho

hey Edak to make that library compile you have to change the #include wiring.h to wiring.c in the .cpp file but it seems pretty good.

I have been playing with the standard library and while the clamp worked OK it wasn't very practical. After looking at the PID beta6 library there was a bit of code that stopped the I from intergrating if the output was at max or min, so I tried putting that into the library. It worked really well for the first step but on the second step ITerm was already ramped and caused overshoot. So after some discussion with Bonj, I have changed the library so that if P is above output max Iterm is set to zero and if its under output min then Iterm is reset to zero. I tried it out today and it worked really well with no overshoot.

View attachment PID_V102.zip


there is nothing to do but use the library instead of the standard library.

cheers steve


----------



## Edak

matho said:


> hey Edak to make that library compile you have to change the #include wiring.h to wiring.c in the .cpp file but it seems pretty good.
> 
> I have been playing with the standard library and while the clamp worked OK it wasn't very practical. After looking at the PID beta6 library there was a bit of code that stopped the I from intergrating if the output was at max or min, so I tried putting that into the library. It worked really well for the first step but on the second step ITerm was already ramped and caused overshoot. So after some discussion with Bonj, I have changed the library so that if P is above output max Iterm is set to zero and if its under output min then Iterm is reset to zero. I tried it out today and it worked really well with no overshoot.
> 
> View attachment 55523
> 
> 
> there is nothing to do but use the library instead of the standard library.
> 
> cheers steve


That sounds like the best solution. Good idea!


----------



## angus_grant

In the interests of no longer polluting this Arduino thread with my Windows development crud (), I have started a separate thread for my system.

I have ended up finding a PID sample so will use that and see how it works. At the moment I have a temp over-shoot problem using straight temp measurement so will have to do something about that before moving toa full-sized vessel. At the moment I am driving my kitchen kettle and the temp ramps very quickly.


----------



## matho

I just noticed that in the brauduino code the PID was receiving only a 0.25 deg resolution which wasn't my intent so I have changed the code so it receives the 12bit resolution 

brauduino code

I haven't added the changed the PID library in it, probably should.

cheers steve


----------



## dmac80

matho said:


> I just noticed that in the brauduino code the PID was receiving only a 0.25 deg resolution which wasn't my intent so I have changed the code so it receives the 12bit resolution
> 
> brauduino code
> 
> I haven't added the changed the PID library in it, probably should.
> 
> cheers steve



Steve,
What's the reason for leaving the display at .25 degC resolution?
Cheers dan


----------



## matho

dmac said:


> Steve,
> What's the reason for leaving the display at .25 degC resolution?
> Cheers dan



its because of screen formatting, if I displayed the full 12 bit resolution then it would be 4 decimal places (I think), 0.25 just seems neater 

cheers


----------



## dmac80

The 0.25 deg display was bugging me a little, so i came up with this. Not sure it's the most elegant way to go about it, but it appears to work ok for me.

// reads the DS18B20 temerature probe 
void Temperature(void){
float tempcalc;
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 ( int i = 0; i < 2; i++) { // we need 2 bytes
data_ = ds.read();
} 
unsigned int raw = (data[1] << 8) + data[0];
tempcalc = (raw & 0xFFFF) * 6.25; 
abs(tempcalc);
Temp_c = tempcalc / 100;
Conv_start = false;
return;
} 

}

Cheers_


----------



## matho

cool mate,

so does that keep it to 2 decimal places?


----------



## dmac80

matho said:


> cool mate,
> 
> so does that keep it to 2 decimal places?



Yep,

Appears to change in .06-.07 deg increments and it should round down to the nearest .01 deg.
I know the sensor probably isn't that accurate, but it's easier to see the temp trending up or down with the smaller increments.

I'm hoping to finally give the new controller a test run this weekend (long overdue). I might just jump straight in with a brew rather than water tests, POR ale, nice and simple.

Cheers 
Dan


----------



## matho

sounds good mate, just go for a brew, what's the worst thing that could happen


----------



## matho

haha, I feel like an idiot.
I was just playing with the lcd.print and had a look at print.cpp and it seems that if you print a float it defaults to 2 decimal places so me anding 0xFFFC to the raw didn't keep it to 2 decimal places it was automatically doing it in the print function. If you want more or less decimal places you simply put a comma after the float variable and then the number of decimal places you want like this 

lcd.print(Temp_c,1);

if you keep it to 1 decimal place and use the full 12 bit resolution the displayed temp rises but a nice and neat 0.1 degs 

cheers steve


----------



## randyrob

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.





Browser Output (Auto Mode)




Browser Output (Manual Mode)




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

Cheers Rob.


----------



## bonj

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.


----------



## ArnieW

randyrob said:


> 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:


----------



## randyrob

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.




Cheers Rob.


----------



## ArnieW

randyrob said:


> 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


----------



## bradsbrew

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


----------



## bonj

randyrob said:


> 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:


----------



## bonj

bradsbrew said:


> 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!


----------



## andytork

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


----------



## Edak

andytork said:


> 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.


----------



## andytork

Edak said:


> 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


----------



## MastersBrewery

andytork said:


> 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.


----------



## andytork

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!



MastersBrewery said:


> 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.


----------



## randyrob

andytork said:


> 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.








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

Cheers Rob.


----------



## vortex

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


----------



## matho

hey votex,

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

cheers steve


----------



## randyrob

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.


----------



## vortex

Too easy, thanks guys!


----------



## Edak

Cheapest place I found was my favourite site dealextreme...

LINKY


----------



## andytork

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



vortex said:


> 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


----------



## Edak

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.


----------



## vortex

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.


----------



## Edak

vortex said:


> 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._


----------



## vortex

Edak said:


> 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 _


----------



## andytork

Or you could use a pointer to your array


----------



## Edak

andytork said:


> Or you could use a pointer to your array



go on... care to explain how to do that in his little piece of code (without having to rewrite the whole program)?


----------



## Yorg

I did a google search for difference between bonjuino and brewtroller, and amazingly got zero documents.
Can someone please tell me?


----------



## bonj

Yorg said:


> 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.


----------



## Edak

Bonj said:


> 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.


----------



## vortex

Not Arduino, but this turned up today:



Raspberry Pi by auvortex, on Flickr

Sweet


----------



## bonj

vortex said:


> Not Arduino, but this turned up today:
> 
> 
> 
> Raspberry Pi by auvortex, on Flickr
> 
> Sweet


Nice! Coincidently, I just ordered one


----------



## Edak

I am ashamed to say that mine is just sitting on my desk doing nothing at the moment.


----------



## Lakey

Recieved my bonjuino today, thanks bonj. Now its off to jaycar to buy a soldering iron and put this thing together.


----------



## randyrob

I'm saving my pennies for the BonjPi to come out.


----------



## bonj

randyrob said:


> I'm saving my pennies for the BonjPi to come out.


Haha.... not on the horizon! I have no idea about factory assembly... no contacts etc.

I know you need something like a pick and place machine and an easy bake oven


----------



## matho

hey bonj,

got my bonjuino today looks good





thanks mate

cheers


----------



## bonj

matho said:


> hey bonj,
> 
> got my bonjuino today looks good
> 
> View attachment 56353
> 
> 
> thanks mate
> 
> cheers


awesome


----------



## daemon

Bonj said:


> Nice! Coincidently, I just ordered one


Is it in stock in Australia yet?


----------



## Edak

matho said:


> hey bonj,
> 
> got my bonjuino today looks good
> 
> View attachment 56353
> 
> 
> thanks mate
> 
> cheers




Oooh, the orange is so bright!

Matho, I like how you align your resistors so the colour codes all point the same way.

I just met BreakBeer, who has purchased both of your boards but is still waiting for his BM shield. He's a nice guy so hurry up and get it to him .


----------



## bonj

Daemon said:


> Is it in stock in Australia yet?


element14's site said 307 in stock in the UK warehouse when I ordered. they were gone within hours, so who know whether mine was shipped or not...


----------



## matho

Edak said:


> Oooh, the orange is so bright!
> 
> Matho, I like how you align your resistors so the colour codes all point the same way.
> 
> I just met BreakBeer, who has purchased both of your boards but is still waiting for his BM shield. He's a nice guy so hurry up and get it to him .




mate, just waiting on a few parts to show up then the last lot of 10 would be ready to go out. the relays are coming from the UK and the LCD's are coming from hong kong, I was hoping for them to turn up today but now hopefully next week.

cheers

edit: about the resistors, it's a bit OCD I know


----------



## randyrob

I got the PCB's on friday, soldered it up, put it inside an enclosure and gave it a good run in on the weekend and it works perfectly, very happy, bit of a tight fit inside the tiny enclosure tho!































Cheers Rob.


----------



## bigfridge

vortex said:


> Not Arduino, but this turned up today:
> 
> 
> 
> Raspberry Pi by auvortex, on Flickr
> 
> Sweet




Got my first RasPi a few weeks ago - you just have to place an order and it will arrive ..... eventually.

Very impressive bit of gear. I have a lot of Linux experience (mainly Redhat Enterprise but I go back as far as SCO ACE) and I got Fedora running very easily. Burn the SD card and on first boot it expanded the root filesystem to take up the full card capacity - very nice.

Since then I have downloaded heaps of stuff with Yum or built from RPM's and source. There were some little minor version conflicts but it wasn't too difficult to work through as there is good support for the ARM platform - all came together nicely.

Very spooky to be running an X client on my pc (using Xming) from this tiny little thing sitting in my wiring closet.

I aim to use it as a web/email frontend to my SPLAT controller over Modbus.

HTH,
Dave


----------



## bonj

bigfridge said:


> Got my first RasPi a few weeks ago - you just have to place an order and it will arrive ..... eventually.


Just received my Raspberry Pi


----------



## vortex

I finally plugged mine in last night - installed Raspbmc base install to the SD card on my laptop, plugged it into the TV and Ethernet, and walked away. Came back after dinner, XBMC was installed & up and running, worked with Samsung TV Remote *perfectly* via CEC/HDMI. Total investment of time, 10 mins!

Took an additional 30mins of messing around to enable UPnP and then add my NAS to it's sources - but that was more about me not being familiar with XBMC than anything 

I love it!


----------



## breakbeer

Received my Bonjuino the other day, Thanks again mate!


----------



## bonj

vortex said:


> I finally plugged mine in last night - installed Raspbmc base install to the SD card on my laptop, plugged it into the TV and Ethernet, and walked away. Came back after dinner, XBMC was installed & up and running, worked with Samsung TV Remote *perfectly* via CEC/HDMI. Total investment of time, 10 mins!
> 
> Took an additional 30mins of messing around to enable UPnP and then add my NAS to it's sources - but that was more about me not being familiar with XBMC than anything
> 
> I love it!


Awesome! I'm having a hard time with mine. Possible SD card issue, possible power supply issue 



breakbeer said:


> Received my Bonjuino the other day, Thanks again mate!


Awesome! Can't wait to see your finished brewery!


----------



## vortex

I got my 1-wire temp sensors, but I have no idea which wire is which! The colours are Green, Yellow and Red. I presume the Red wire is +5v, but the other two I'm a bit lost on. Thoughts?


----------



## bonj

vortex said:


> I got my 1-wire temp sensors, but I have no idea which wire is which! The colours are Green, Yellow and Red. I presume the Red wire is +5v, but the other two I'm a bit lost on. Thoughts?


Hmmm edumacated guess: green = GND, yellow = DATA, red = 5V

Can you ask the mob you bought them from?


----------



## gava

pretty sure thats correct, I have a few of them to.



Bonj said:


> Hmmm edumacated guess: green = GND, yellow = DATA, red = 5V
> 
> Can you ask the mob you bought them from?


----------



## sean_0

Bonj said:


> Hmmm edumacated guess: green = GND, yellow = DATA, red = 5V
> 
> Can you ask the mob you bought them from?



Yup, I've got a few and that's how mine are wired


----------



## randyrob

Bonj is on the money (as usual)

My ones came with this blurb

Output leads: red (VCC), yellow (DATA), green (is) (GND)


The probe of this temperature sensor is DS18B20 original chip
High quality stainless steel tube
Waterproof and corrosion-resistant
Shell size: 6 mm (Diameter), Length of Cable: 100 cm
Power supply range: 3.0V to 5.5V
Temperature range: -55C to +125C (-67F to +257F)
Accuracy: 0.5C (-10C to +85C)
No other components, unique single bus interface


----------



## vortex

Thanks guys!


----------



## mkj

I've got my ambient fermenter temperature logging over bluetooth going. It's an atmega328 (not arduino, since I already have plain AVR stuff), talking bluetooth to my home router with OpenWRT, then to a webserver. Kind of overkill, yes . Runs off 3xNiMH batteries, lasts about 3 weeks (should be more, need to measure what's using too much current). I'm using DS18B20 sensors, one in a Brewers Hardware thermowell. It's a Dealextreme $6 bluetooth module, think wavesen.com make them. Source here.






The right axis is temperature, left is battery voltage. The live site lets you zoom in, click the left axis to zoom out.


----------



## Edak

Sounds like someone was inspired by uberfridge.  
Looks good. There looks to be a lot of variation in the wort temp, but can't do much without a fermentation fridge.


----------



## vortex

Nice graph! That graph is pretty much what i'm aiming for as the end result, with a little more info (such as fridge air temp), over two fridges.


----------



## vortex

Been off work today looking after a crook kid, so took the chance to play with the OneWire sensors.

Quite easy to work with, especially considering I have very little electrical knowledge.




ArduFerm OneWire by auvortex, on Flickr


----------



## Edak

vortex said:


> Been off work today looking after a crook kid, so took the chance to play with the OneWire sensors.
> 
> Quite easy to work with, especially considering I have very little electrical knowledge.
> 
> 
> 
> 
> ArduFerm OneWire by auvortex, on Flickr



Isn't it nice when things just work!

Spare no expense with those freetronics things...

Doesn't that LCD and keypad module take up a lot of pins?


----------



## vortex

So, sprintf() on Arduino doesn't deal with floats so well - I still get ? marks when printing a float. Does anyone have a workaround for this? Or is the workaround to just not use sprintf()? Some googling shows this has been an issue for a long time, but was supposed to be fixed in Arduino 0013 - but I guess that fix didn't cover sprintf().


----------



## vortex

Edak said:


> Doesn't that LCD and keypad module take up a lot of pins?



It does if you assign the buttons to pins - but you don't have to. I'm not for this project.


----------



## bonj

vortex said:


> So, sprintf() on Arduino doesn't deal with floats so well - I still get ? marks when printing a float. Does anyone have a workaround for this? Or is the workaround to just not use sprintf()? Some googling shows this has been an issue for a long time, but was supposed to be fixed in Arduino 0013 - but I guess that fix didn't cover sprintf().


Hmm... I can't say that I've noticed floats not working. Although I can't remember if I've used floats with it on arduino....

Perhaps try strcat?


----------



## vortex

Bonj said:


> Hmm... I can't say that I've noticed floats not working. Although I can't remember if I've used floats with it on arduino....
> 
> Perhaps try strcat?



Just found dtostrf(), that worked 

http://dereenigne.org/arduino/arduino-float-to-string


----------



## zxhoon

Long time stalker in the Arduino thread... 

I just picked up an etherten a couple of weeks ago and got it talking on my lan the other night which is more than I could do with the cheap evilbay ardiuno and ethernet shield I was banging my head against a wall with...



Edak said:


> Isn't it nice when things just work!
> 
> Spare no expense with those freetronics things...
> 
> Doesn't that LCD and keypad module take up a lot of pins?




am I missing something?

http://www.freetronics.com/products/lcd-ke...ld#.UD3Pz6PN1Ns

states the LCD shield uses one analog input for the buttons and 6 digitals for the LCD? or do you guys use serial for LCD?


----------



## Edak

I use an I2C LCD, which means zero digital pins required! 
If I were to pair this up with analog buttons then I would have all digital pins available still!


----------



## bonj

Edak said:


> I use an I2C LCD, which means zero digital pins required!
> If I were to pair this up with analog buttons then I would have all digital pins available still!


I use the 4bit mode for the LCD on my HERMS PCB, 6 pins there. I also use the analog pins in digital mode (digital pins 14-19) for my pushbuttons.... but it seems that I used pins for the LCD connection that conflict with the ethernet shields, so the next revision (if I have any interest from others) will be more compatible.

I have made some real progress on the HERMS controller this week. I now have working config menus, and working step mashing... with configurable steps. Just working on the PID tuning config menus/eeprom saving/reading, and same for loading and saving custom mash programs.... but as it stands now, it is a working HERMS controller


----------



## OneEye

hey guys... just soldered mine together and wanted to test the LCD and see if I could get it talking to me. I plugged it into the computer and she boots up fine... the LCD comes on but when I try to use one of the example 'Hello World' sketches it doesn't do anything. I've changed the pins to 2,3,4,5,6. Anything else I'm missing?


----------



## matho

hey moosebeer,

the code should read


Code:


LiquidCrystal lcd(2, 3, 4, 5, 6, 7);


and in 'setup'



Code:


lcd.begin(16,2);


let us know if you have anymore problems

cheers steve


----------



## OneEye

Thanks Matho... I did actually have that code in there but went back and realised there may have been a few dodgy solder joints so fixed those up and am now getting my LCD to display text. It's hard to read though... the 2x16 white squares on the display are too bright to be able to read the text properly.

Edit... just looked over the schematics and realised that the 5k pot is my answer!


----------



## matho

moosebeer said:


> Thanks Matho... I did actually have that code in there but went back and realised there may have been a few dodgy solder joints so fixed those up and am now getting my LCD to display text. It's hard to read though... the 2x16 white squares on the display are too bright to be able to read the text properly.



adjust the trim pot (the blue thing up near the LCD) that is the contrast control just turn in back and forth until you find what looks best

cheers steve


----------



## matho

here is picture to explain




cheers


----------



## bonj

It Lives!




While my original design goals have now been accomplished:

Multiple steps with independent temperature set points and times.
PID controlled temperature
Preset commonly used mash programs
Custom mash program entry, saving and loading (to/from EEPROM)
PID tuning parameter entry, loading and saving (EEPROM)

I can't help feeling the need to implement PID autotuning with the arduino PID autotuning library....


----------



## bonj

I have received some interest in my controller locally, and am thinking if there's enough interest I may put some sort of a kit together.

Full features are:

Up to 10 steps per mash program (each step contains a temperature and a time)
Number of steps configurable per program in the menu
2 Preset mash programs (Zwickel's Ale, Zwickel's Lager) (possibility of more, or for changing the presets in the code (see below about open sourcing))
2 Custom program slots (can load and save your entered program) (possibility for more than 2 custom slots(see open sourcing below), it just makes the menus a little longer to traverse)
PID controlled temperature
PID tuning parameters can be edited and saved for future use
Easy 3 button operation (left, right, select)
Code will be open sourced (when I decide on which license to use.... front-runners are BSD and GPLv2)
I'm *thinking* about incorporating the PID autotune library

Unlike Gryphon's HERM-IT controller, it won't be available pre-built. If you're after a prebuilt unit that is featured similarly to this one, check the HERM-IT out.


----------



## bonj

Added to my HERMS controller build log... including youtube video of its operation:
HERMS Controller Build Log


----------



## vortex

I've been looking into making a custom shield (more out of interest than necessity) and have come up with this schematic in Eagle:




arduferm_circuit by auvortex, on Flickr

I'm not 100% on the SSR relay control with Arduino though - I've got 5v connected to the +ve on the relay headers, and the negative to the pin which will control the SSR (they will be digital pins, defined in software). Do they look right?

I plan on changing those screw terminals to solder pads though, but that works well enough for a diagram I suppose.


----------



## bonj

vortex said:


> I've been looking into making a custom shield (more out of interest than necessity) and have come up with this schematic in Eagle:
> 
> 
> 
> 
> arduferm_circuit by auvortex, on Flickr
> 
> I'm not 100% on the SSR relay control with Arduino though - I've got 5v connected to the +ve on the relay headers, and the negative to the pin which will control the SSR (they will be digital pins, defined in software). Do they look right?
> 
> I plan on changing those screw terminals to solder pads though, but that works well enough for a diagram I suppose.


I went the other way round, on my HERMS controller board, with the + connected to the arduino pin, and - connected to GND.

I also made it rather generic, with pin header style connections on the outer edge of the board, with just broken out connections so I could wire it how I like with jumpers. 





I also added a few things I might use in other projects, like opto-isolated (with 4N25 optocoupler) BD135, a bunch of unconnected pull-up/pull-down resistor spots for push buttons etc., GND rail, V+ rail, specific connection for DS1820, LCD...


----------



## vortex

I swapped the relay headers around to the correct way now:



arduferm_schematic by auvortex, on Flickr

Who does your PCB's Bonj? Looks good.


----------



## bonj

I get mine done through seeedstudio's fusion pcb service. They have a minimum of 10 PCBs per order.


----------



## Edak

I am just curious Vortex, unless I missed it earlier, why do you require 4 outputs? Are you going to use solid state relays only? Have you considered wireless control/monitoring with xbee or similar? 

If you are getting boards made up then pack the features in there just in case I say..

edit : what about a display? You can get i2c lcds or a display slash interface from DealExtreme like the one on my fridge controller.


----------



## Logman

Bonj said:


> I have received some interest in my controller locally, and am thinking if there's enough interest I may put some sort of a kit together.


Hey Bonj,
I'm up for having a go at putting one together - will probably test my skills a bit but I've done STC's etc so I'll get there :lol: . How much are you planning on supplying as part of the kit? Have you had enough interest to continue at this stage?


----------



## vortex

Edak said:


> I am just curious Vortex, unless I missed it earlier, why do you require 4 outputs? Are you going to use solid state relays only? Have you considered wireless control/monitoring with xbee or similar?



The plan is to control heating and cooling circuits for two separate fridges, so 4 circuits  All SSR's. Haven't considered wireless, because the whole house has ethernet, and the fermentation fridges are next to a spare point. May as well use it  Have PoE capability on that port too so will likely power the Arduino with that.



Edak said:


> If you are getting boards made up then pack the features in there just in case I say..
> 
> edit : what about a display? You can get i2c lcds or a display slash interface from DealExtreme like the one on my fridge controller.



I have the 16x2 Freetronics LCD at the moment but as has been said it does use a lot of pins. I have seen the I2C displays since and they look good (larger display, key functionality and less pins); but I'm not out of pins yet anyway so I might look at changing to one of those displays down the track when I build the RIMS/HLT controller.


----------



## bonj

Logman said:


> Hey Bonj,
> I'm up for having a go at putting one together - will probably test my skills a bit but I've done STC's etc so I'll get there :lol: . How much are you planning on supplying as part of the kit? Have you had enough interest to continue at this stage?


At this stage, the kit will consist of just the PCB, and instructions on what other parts you will need, and how to wire up the PCB.


----------



## Logman

Bonj said:


> At this stage, the kit will consist of just the PCB, and instructions on what other parts you will need, and how to wire up the PCB.


Ok thanks mate, well I'm up for one if you decide to go ahead, I'll check the thread to see what happens. Looks like a cool way to do a HERMS.

:icon_cheers:


----------



## Raf

Bonj said:


> At this stage, the kit will consist of just the PCB, and instructions on what other parts you will need, and how to wire up the PCB.




Bonj,
You can put me down for a kit as well.

Would it be possible to control a ferment fridge as well similar to what Vortex is planning or should I keep it seperate?


----------



## Edak

vortex said:


> The plan is to control heating and cooling circuits for two separate fridges, so 4 circuits  All SSR's. Haven't considered wireless, because the whole house has ethernet, and the fermentation fridges are next to a spare point. May as well use it  Have PoE capability on that port too so will likely power the Arduino with that.
> 
> 
> 
> I have the 16x2 Freetronics LCD at the moment but as has been said it does use a lot of pins. I have seen the I2C displays since and they look good (larger display, key functionality and less pins); but I'm not out of pins yet anyway so I might look at changing to one of those displays down the track when I build the RIMS/HLT controller.



Hi again Vortex, 

I personally think that using SSRs to control fridges is a bit of overkill. Firstly SSRs generate about 1W of heat for every amp that passes through them, hence you may need heatsinks (unless you have a metal enclosure you can use). Secondly, they are large. Thirdly, they are expensive. 

I would recommend that you use standard relays because they don't switch very regularly, require no heatsink, are cheaper and smaller.
Something like this will get you sorted in seconds and has the option of full isolation (if desired)
http://dx.com/p/arduino-compatible-4-chann...e-144762?item=2

I used this display/control combo, which only requires 3 pins to drive 8x 7 seg displays, 8x 2-colour LEDs and 8x buttons.
http://dx.com/p/8x-digital-tube-8x-key-8x-...e-81873?item=11
Arduino library - http://code.google.com/p/tm1638-library/

Be aware that if you are using Ethernet to connect directly to the arduino that you will get very close to running out of code space and maybe RAM because the Ethernet library requires a lot of resources especially if you plan on hosting any pages from the arduino itself. When you combine this with suitable PID control for your fridges (i recommend that you look at the source code of the uberfridge for fridge temperature control) you run out of space very quickly. Another thing to watch for is that the Ethernet library is not very stable in Arduino 1.0 so you should go straight to Arduino 1.0.1.

My fridge sits on over 29k code and uses the following libraries:

#include <stdlib.h>
#include <SPI.h>
#include <Ethernet.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TM1638.h>
#include <EEPROM.h>
#include <Wire.h> 
#include <avr/wdt.h>

Note also that you will run out of pins more quickly than you think. My defs (digital):

0-1 = HW serial
2 = 
3 = One-Wire BUS for temp sennsors
4 = SPI CS for SD CARD (this is built into the EtherTen)
5 = TM1638 DATA
6 = TM1638 CLOCK
7 = TM1638 STROBE
8 = Heater Output
9 = Cooler Output
10 = SPI CS for ETHERNET (Wiznet)
11-13 = SPI

Note that my display and all push buttons only use 3 pins! What are your pin definitions and how do you fit any control and the LCD in there?

My fridge generally keeps beer temps to within 0.15C of set point (measured from the side of the fermenter). I still need to fine-tune the code and PID settings but a little tolerance is okay. If you want a look at the data, let me know via PM.

EDIT: Graaaamah


----------



## vortex

Edak said:


> I personally think that using SSRs to control fridges is a bit of overkill. Firstly SSRs generate about 1W of heat for every amp that passes through them, hence you may need heatsinks (unless you have a metal enclosure you can use). Secondly, they are large. Thirdly, they are expensive.
> 
> I would recommend that you use standard relays because they don't switch very regularly, require no heatsink, are cheaper and smaller.
> Something like this will get you sorted in seconds and has the option of full isolation (if desired)
> http://dx.com/p/arduino-compatible-4-chann...e-144762?item=2



To be honest, I thought SSR's were the only option for relays that worked with AC, though the research I was doing was based around the element in my RIMS system. The relay board does look like a good option though, so I'll definitely look at those a bit more closely. I was also considering SSR's because of how easy they are to work with (given that I'm very new to building circuits) but an add-on board like that is very attractive and probably not difficult to implement.



Edak said:


> I used this display/control combo, which only requires 3 pins to drive 8x 7 seg displays, 8x 2-colour LEDs and 8x buttons.
> http://dx.com/p/8x-digital-tube-8x-key-8x-...e-81873?item=11
> Arduino library - http://code.google.com/p/tm1638-library/
> 
> Be aware that if you are using Ethernet to connect directly to the arduino that you will get very close to running out of code space and maybe RAM because the Ethernet library requires a lot of resources especially if you plan on hosting any pages from the arduino itself. When you combine this with suitable PID control for your fridges (i recommend that you look at the source code of the uberfridge for fridge temperature control) you run out of space very quickly. Another thing to watch for is that the Ethernet library is not very stable in Arduino 1.0 so you should go straight to Arduino 1.0.1.



I was worried about that as I haven't got an Ethernet capable Arduino as yet but had read that could be an issue. I'm planning for the controllers functionality over ethernet to be very limited - simply serving a single page with the current status (formatted as JSON for easy parsing on the server) that will be read by an external script on a server elsewhere in the house, and an automated process on the arduino to read from the same server to download it's settings. 

It might be a case of "try it and see", but currently the relay control, OneWire temp reading etc is all in around 11k. Still some code to be written though and libraries to include as yet 



Edak said:


> Note also that you will run out of pins more quickly than you think. My defs (digital):
> 
> 0-1 = HW serial
> 2 =
> 3 = One-Wire BUS for temp sennsors
> 4 = SPI CS for SD CARD (this is built into the EtherTen)
> 5 = TM1638 DATA
> 6 = TM1638 CLOCK
> 7 = TM1638 STROBE
> 8 = Heater Output
> 9 = Cooler Output
> 10 = SPI CS for ETHERNET (Wiznet)
> 11-13 = SPI
> 
> Note that my display and all push buttons only use 3 pins! What are your pin definitions and how do you fit any control and the LCD in there?



Again this was another concern. I mapped out what I think the pins would map to:


Code:


/* PinMap: 

 *

 * 1

 * 2

 * 3   One Wire Data

 * 4   LCD

 * 5   LCD

 * 6   LCD

 * 7   LCD

 * 8   LCD

 * 9   LCD

 * 10  ETH

 * 11  ETH

 * 12  ETH

 * 13  ETH

 * 14

 * 15  SSR ?

 * 16  SSR ?

 * 17  SSR ?

 * 18  SSR ?

 * 19

 * 20

 * 21

 * 22

 */

This relies on being able to use some of the Analogue pins as Digital which could be done in code if what i've read is correct (I could have mis-understood this).

My LCD is only using the LCD, I haven't played with the extra buttons in this project yet as I don't really have a need to use them, so that saves one pin from memory.

Depending on weather what i've thought above is correct or not, then I may need to look to moving to I2C LCD sooner rather than later - or dropping it all-together. I do have a PC in the garage as well which I could use to access the interface running on the server.



Edak said:


> My fridge generally keeps beer temps to within 0.15C of set point (measured from the side of the fermenter). I still need to fine-tune the code and PID settings but a little tolerance is okay. If you want a look at the data, let me know via PM.
> 
> EDIT: Graaaamah



PID is certainly something I'd like to look at. I have tried to keep things simple for now though so that it's essentially an STC1000 on steroids, but I will certainly look at it again later.

Thanks for all your suggestions and comments, very much appreciated!


----------



## Edak

vortex said:


> To be honest, I thought SSR's were the only option for relays that worked with AC, though the research I was doing was based around the element in my RIMS system. The relay board does look like a good option though, so I'll definitely look at those a bit more closely. I was also considering SSR's because of how easy they are to work with (given that I'm very new to building circuits) but an add-on board like that is very attractive and probably not difficult to implement.
> 
> 
> 
> I was worried about that as I haven't got an Ethernet capable Arduino as yet but had read that could be an issue. I'm planning for the controllers functionality over ethernet to be very limited - simply serving a single page with the current status (formatted as JSON for easy parsing on the server) that will be read by an external script on a server elsewhere in the house, and an automated process on the arduino to read from the same server to download it's settings.
> 
> It might be a case of "try it and see", but currently the relay control, OneWire temp reading etc is all in around 11k. Still some code to be written though and libraries to include as yet
> 
> 
> 
> Again this was another concern. I mapped out what I think the pins would map to:
> 
> 
> Code:
> 
> 
> /* PinMap:
> 
> *
> 
> * 1
> 
> * 2
> 
> * 3   One Wire Data
> 
> * 4   LCD
> 
> * 5   LCD
> 
> * 6   LCD
> 
> * 7   LCD
> 
> * 8   LCD
> 
> * 9   LCD
> 
> * 10  ETH
> 
> * 11  ETH
> 
> * 12  ETH
> 
> * 13  ETH
> 
> * 14
> 
> * 15  SSR ?
> 
> * 16  SSR ?
> 
> * 17  SSR ?
> 
> * 18  SSR ?
> 
> * 19
> 
> * 20
> 
> * 21
> 
> * 22
> 
> */
> 
> This relies on being able to use some of the Analogue pins as Digital which could be done in code if what i've read is correct (I could have mis-understood this).
> 
> My LCD is only using the LCD, I haven't played with the extra buttons in this project yet as I don't really have a need to use them, so that saves one pin from memory.
> 
> Depending on weather what i've thought above is correct or not, then I may need to look to moving to I2C LCD sooner rather than later - or dropping it all-together. I do have a PC in the garage as well which I could use to access the interface running on the server.
> 
> 
> 
> PID is certainly something I'd like to look at. I have tried to keep things simple for now though so that it's essentially an STC1000 on steroids, but I will certainly look at it again later.
> 
> Thanks for all your suggestions and comments, very much appreciated!



I don't know how you get that digital pin map, you only have 14 digital pins (marked 0-13). This is why you cannot use Ethernet with a parallel LCD. 

Even with my set up you will have to disconnect the SD card interface to fit your fourth relay in there.


----------



## vortex

Edak said:


> I don't know how you get that digital pin map, you only have 14 digital pins (marked 0-13). This is why you cannot use Ethernet with a parallel LCD.
> 
> Even with my set up you will have to disconnect the SD card interface to fit your fourth relay in there.



Reading on http://arduino.cc/en/Reference/PinMode it says "The analog input pins can be used as digital pins, referred to as A0, A1, etc.", but that still makes 20, not 22, as I thought. But again I'm probably missing something.


----------



## Edak

vortex said:


> Reading on http://arduino.cc/en/Reference/PinMode it says "The analog input pins can be used as digital pins, referred to as A0, A1, etc.", but that still makes 20, not 22, as I thought. But again I'm probably missing something.




Ah yes, you are right. I have always refrained from doing so but I don't see any logical (pardon the pun) reason why you couldn't.


----------



## bonj

Raf said:


> Bonj,
> You can put me down for a kit as well.


Done


> Would it be possible to control a ferment fridge as well similar to what Vortex is planning or should I keep it seperate?


It would be possible, but You'd have to add that part to the code. The output side would be fine. Just another digital output with another SSR.


----------



## bonj

I am currently taking pre-orders for another batch of bonjuinos. Parts have been ordered and will arrive in about 2 weeks.

PM me if you're interested and I will send you a link to the payment page.


----------



## bonj

That's it folks, all kits from this batch are accounted for.


----------



## Zizzle

Been a while since I caught up on this thread.

If anyone is considering a new design, then I would recommend getting away from the 16x2 LCDs. They look like crap and don't display much.

Chinese 320x240 colour LCDs are super cheap on ebay.

Look at this, stm32 dev board with 2.8" touch screen LCD for < $30 delivered.

http://www.ebay.com/itm/STM32F103RBT6-deve...=item3a68965ee7

GPIO is broken out and these ARM cpus have more than enough grunt.

I have a FreeRTOS software stack on github that works with the LCD and touch screen on the boards that I have.


----------



## vortex

Looks good. Could be worth a look.


----------



## Edak

Thank you but this is an Arduino thread. 
You can get all that development stuff at DealExtreme cheap, maybe even cheaper.


----------



## Zizzle

LOL Arduino police are here to lock down the thread. No one mention anything else. In a thread that started years before the police even joined the forum. :lol:


----------



## Edak

Zizzle said:


> LOL Arduino police are here to lock down the thread. No one mention anything else. In a thread that started years before the police even joined the forum. :lol:


LOL. Zizzle call me police but keeping on topic you are thread hijacking.


----------



## bonj

:lol:

Oh the humanity!

Since I started the thread way back when, I can say that the original intention of the thread was to encourage home development of brewing equipment. This thread was actually forked off from Zizzle's original brewbot thread because we started cluttering it up with general development talk. I have no issue with Zizzle's post.


----------



## Edak

The fact of the matter is that Arduino development is within the grasp of many home-brewers who have no other electronic/programming knowledge. ARM programming is much more sophisticated, requires a large learning curve and has less of a community surrounding it, therefore it is less suitable for this forum. I am not precious about Arduino, my issue was mainly the "...They look like crap..." comment, which suggests that the designs that people are currently working on are inferior whereas really they are just simplistic.

I am fully into development on other platforms, but I still like an open source and easy to develop platform such as Arduino because it is more accessible.

My 2c, wasn't trying to start a flame war.


----------



## vortex

Zizzles post prompted me to investigate the ST range of boards; and it's pretty well as suggested by Edak - it's not as community oriented as Arduino, and not as electronics newb friendly (important to me) due to the smaller community (IMO).

One board that looked good, however, was the Maple board which is intentionally built to be a lot like Arduino (uses the IDE as an example, and is _mostly_ pin-compatible), and I'm tempted to pick one or two up to have a look. But, like always, I need to remind myself to finish the project's I have on the go right now before looking at new ones! 

For my needs, Arduino suits what I want to do perfectly, though a 20 x 4 I2C LCD would be a nice upgrade - particularly when I look at HLT/RIMS/Pump control. 

Personally if I want a more powerful platform I would probably look at Raspberry Pi.


----------



## bonj

I kind of agree on the raspberry pi. 

But I don't mind the HD44780 LCDs. They nice and cheap, easy to implement and easy to read. I'm kind of against increasing complexity for no good reason.


----------



## glenwal

Wouldn't the cheapest and eaisest way to get a nice touchscreen interface onto something like this be with an ethernet shield and a cheap android tablet.


You can get 7" tablets for around the $60 mark now days.


----------



## Malted

What about an Arduino Fart-O-Meter?


----------



## Zizzle

Malted said:


> What about an Arduino Fart-O-Meter?




Gold! On topic and all!

This thread has always had people discussing control options, from Windows based PCs, RasPis, PicAxe you name it. And the options are always changing. A new raft of ARM Cortex CPUs are just coming out. Some even in DIP packaging.

BTW you can pre-order the TI ARM lanchpad board for $5, bargain. http://www.ti.com/tool/ek-lm4f120xl

The problem with the RasberryPI is the limited I/O available. Why spend money on extra boards to get to I/O when you get a cheaper board with I/O already?

7" tablet has the problem less - you don't need pins for display I/O just pump/heat control. But the form factor may not be great. 2-3" LCDs fit in a project box nicely.

With the ST touch boards all the display is already wired. No need for push buttons / knobs of the outside of the box. Just the touch LCD. No need to abbreviate text, or try to scroll 16x2 chars. Can actually do nice graphics instead of hacked characters.

Sure the tool chain complexity is a little higher - but also comes with more power (a decent debugging story). I'm sure most people building the Matho/Bonj controller don't really hack on the code - so you only need a couple of people to run the toolchain and do the hacking.


----------



## Zizzle

Saw this go past in the feed the other day. Food grade heat shrink.

http://www.adafruit.com/blog/2012/09/14/ne...ameter-12-long/

Could be useful.


----------



## bonj

Zizzle said:


> Saw this go past in the feed the other day. Food grade heat shrink.
> 
> http://www.adafruit.com/blog/2012/09/14/ne...ameter-12-long/
> 
> Could be useful.


Awesome find, Zizzle! That could be very useful....


----------



## kymba

hey i've just grabbed some heatshrink from the local jaycar with the intent of waterproofing some ds18b20's

one was just the standard clear heatshrink material listed in the catalogue is 'Polyolefin' and states that it is alright to 120 degrees

the other was in a packet and had bold writing stating that it was made from "polyvinylidene fluoride" http://www.jaycar.com.au/productView.asp?ID=WH5526. A quick search reveals that this stuff is used as a beverage filtering membrane so should be ok for wort


----------



## vortex

I don't know about you blokes but I'll stick to a stainless thermowell that doesn't mind an overnight PBW soak with the rest of the fermenter


----------



## bonj

vortex said:


> I don't know about you blokes but I'll stick to a stainless thermowell that doesn't mind an overnight PBW soak with the rest of the fermenter


totally, but for other applications, food grade shrink tubing is a good thing to have available..

kymba: anything with "vinyl" in the name scares me for food contact at higher temperatures.


----------



## vortex

Not Arduino related, but I just ordered a BeagleBone SBC for my RIMS brewery build. They're a lot like the Raspberry Pi except they have a massive number of GPIO pins (silly amount of pins v's 8 on the RasPi), native Ethernet (not a USB device like RasPi), 256mb DDR2 RAM. Comes with an Embedded Linux distro (Angstrom), plus there are others that can be installed. Basically a BeagleBoard slimmed down to its basic hardware. Not as many shields available as there are for Arduino, but it's only been out around 12 months.

http://beagleboard.org/bone
http://beagleboard.org/hardware/design/
http://www.adafruit.com/products/513

More expensive than the RasPi, it will be total overkill for what I'm doing, but there's nothing like overkill


----------



## Feldon

Stepping way outside of my skill set posting in this thread, but noticed this announcement a few days ago re an open source gizmo for controlling/logging fermentation called BrewPi. 

Thought you blokes might be interested.

_"BrewPi is an open source fermentation controller that runs on an Arduino (for now) and a Raspberry Pi. It can control your beer temperature with 0.1 degree precision, log temperature data in nice graphs and is fully configurable from a web interface."_

http://brewpi.com/brewpi-released-all-sour...racker-lets-go/


----------



## Ronin

Anyone seen this?

http://www.freetronics.com/pages/jaycar-water-flow-gauge

I'm thinking of putting one on the outlet of my mash tun so I know how much water has gone into the mash.


----------



## bonj

Ronin said:


> Anyone seen this?
> 
> http://www.freetronics.com/pages/jaycar-water-flow-gauge
> 
> I'm thinking of putting one on the outlet of my mash tun so I know how much water has gone into the mash.


I have the same flow sensor but I haven't done anything with it yet. It was initially earmarked for a garden watering controller. I bought mine from futurlec.


----------



## vortex

Yeah I saw that, considering trying one in my RIMS to detect stuck mashes and sound an alarm if flow drops below a certain point. 

Though, Jaycar says this:


> With 1/2" BSP connections and 0 - 80C temperature range, this unit could be used in hot water, although we recommend operation in temperatures no higher than 45C.



so it might not be a viable option afterall


----------



## RdeVjun

Slashdot has a related story: http://hardware.slashdot.org/story/12/10/0...ntation-chamber


----------



## Zizzle

Now this could be a win. Pretty pricey though.

http://dangerousprototypes.com/2012/10/03/...uts-arduinolcd/


----------



## Zizzle

Ronin said:


> Anyone seen this?
> 
> http://www.freetronics.com/pages/jaycar-water-flow-gauge
> 
> I'm thinking of putting one on the outlet of my mash tun so I know how much water has gone into the mash.



I, like Ben, have the futurlec version which I have never used.

I seem to remember someone mentioning that they don't work very well for measuring actual volumes precisely, but can't remember where/who.


----------



## Edak

Those flow sensors can only measure with any accuracy if the port is full, which means if you have any air in the tube it won't work. Just something to note...


----------



## Superoo

Hi Edak,
I think that will be same with any other flowmeter. If theres air / bubbles in the fluid it is measured and counted as fluid incorrectly. 
But it depends on what accuracy you are trying to achieve, and the purpose of the flowmeter as to whether this is a problem or not. 

Its probably too hard to fit an air elimination system to a brew rig, requires floats and stuff. 
Although there is a way with a pressure switch, but you then require a bit of pressure in the line so that a pressure drop can be detected and then acted on by the processor.

The best solution is probably to just try and design the system so that it doesnt end up with air in the line in the first place. 

There are optical 4-20mA level sensors available for prevention of tanks running out / overfilling etc, but I'm mot sure if you can get them for higher temps. 

2c


----------



## vortex

Zizzle said:


> Now this could be a win. Pretty pricey though.
> 
> http://dangerousprototypes.com/2012/10/03/...uts-arduinolcd/


I think fitting the LCD software and anything else meaning full inside 32k would be a real challenge.


----------



## Malted

vortex said:


> I think fitting the LCD software and anything else meaning full inside 32k would be a real challenge.




Well out of my depth here but the image suggests a 4MB flash memory?


----------



## vortex

Malted said:


> Well out of my depth here but the image suggests a 4MB flash memory?


That would be on the LCD itself for fonts and other LCD-related crap. The Arduino Uno R3 has 32k flash for programs itself: https://www.sparkfun.com/products/11021


----------



## Zizzle

vortex said:


> That would be on the LCD itself for fonts and other LCD-related crap. The Arduino Uno R3 has 32k flash for programs itself: https://www.sparkfun.com/products/11021



Exactly. So what do see taking up extra space on the Arduino?

ezLCD has a text based command protocol. Load your images an fonts into it's flash using a PC and issue a few characters from the Arduino to get them to display. Doing that would probably take up less space than the 16x2 LCD driver lib that arduino has.


----------



## Edak

Zizzle said:


> Exactly. So what do see taking up extra space on the Arduino?
> 
> ezLCD has a text based command protocol. Load your images an fonts into it's flash using a PC and issue a few characters from the Arduino to get them to display. Doing that would probably take up less space than the 16x2 LCD driver lib that arduino has.


Sending strings is very inefficient with arduino because they consume ram and flash. This means unless you use the f() feature every string in your program sits permanently in the RAM, of which you only have 2k. 

Did you guys read that the next generation of arduino will support ARM processors? That would be cool.


----------



## vortex

Edak said:


> Did you guys read that the next generation of arduino will support ARM processors? That would be cool.


Yep, Arduino Due. Only 100mhz though, which is of course enough for a lot of stuff but next to other ARM CPU boards they won't look as good (RasPi/Beagle 700mhz). The new Google ADK2012 boards are based on these boards - they've been "coming soon" for about 6 months


----------



## Zizzle

Edak said:


> Sending strings is very inefficient with arduino because they consume ram and flash.



I know you just want to big-note yourself in this thread, and you're probably deliberately missing the point, but if you are using a 16x2 LCD to display text you are probably using strings.

Like this:

https://github.com/mathoaus/braumiser-contr...duino2.pde#L368

or this:

https://github.com/mathoaus/braumiser-contr...uduino2.pde#L86

The ezLCD is no different - if not, more efficient.

Anyway the arduino LCD lib adds ~2kB to the binary size. Which is a fair amount of strings for menus etc. for ezLCD before you get to the equivalent binary size.

And I think you ment storing not sending is inefficient. But as you already pointed out, it is well known and easy to fix.


----------



## vortex

16x2, bah 



40x4 vs 16x2 by auvortex, on Flickr




4x40 LCDs by auvortex, on Flickr

40x4  Akafugu do an I2C backpack for these screens (handles the two enable lines), two on the way. Should be here any day.


----------



## vortex

Got my Akafugu 7 segment displays today. Soldered them up tonight. They're nice and bright! Just applied some power so far to make sure My soldering was OK  So far, so good. These displays will be used to display HLT and MLT temps on the brewery (so, not with an Arduino...)




Akafugu 7 segment display by auvortex, on Flickr




Akafugu displays connected by auvortex, on Flickr


----------



## bonj

vortex said:


> Got my Akafugu 7 segment displays today. Soldered them up tonight. They're nice and bright! Just applied some power so far to make sure My soldering was OK  So far, so good. These displays will be used to display HLT and MLT temps on the brewery (so, not with an Arduino...)
> 
> 
> 
> 
> Akafugu 7 segment display by auvortex, on Flickr
> 
> 
> 
> 
> Akafugu displays connected by auvortex, on Flickr


Nice! 

Are you sure you didn't want some GIANT 7 segments? :lol:


----------



## vortex

Perfect for when you need to see the temps from 5kms away  Actually, with the brightness of these they can probably do that job too


----------



## bonj

vortex said:


> Perfect for when you need to see the temps from 5kms away  Actually, with the brightness of these they can probably do that job too


LOL yeah. I keep trying to think of a reason to get them because they look rad....


----------



## Zizzle

vortex said:


> 40x4  Akafugu do an I2C backpack for these screens (handles the two enable lines), two on the way. Should be here any day.



Looks a lot like the LCD I used in the orginal brewbot.







But the i2c will be a win. Look at the ribbon cable I had to use to run that LCD:


----------



## Edak

Zizzle said:


> I know you just want to big-note yourself in this thread, and you're probably deliberately missing the point, but if you are using a 16x2 LCD to display text you are probably using strings.
> 
> Like this:
> 
> https://github.com/mathoaus/braumiser-contr...duino2.pde#L368
> 
> or this:
> 
> https://github.com/mathoaus/braumiser-contr...uduino2.pde#L86
> 
> The ezLCD is no different - if not, more efficient.
> 
> Anyway the arduino LCD lib adds ~2kB to the binary size. Which is a fair amount of strings for menus etc. for ezLCD before you get to the equivalent binary size.
> 
> And I think you ment storing not sending is inefficient. But as you already pointed out, it is well known and easy to fix.



Hey Zizzle I think you missed _my _point. 

I totally agree that the LCD you were talking about is a good idea. You say to use only characters for the graphic LCD, which is great. If you use a 16x2 then you need to send strings. I was trying to further your point by saying that Strings are bad, admittedly I was not clear about this.

Your point about using 2k for the driver is a bit misleading though, because the graphic LCD uses the Serial library, which uses 1.3k of flash.

Thanks for flaming me though, much appreciated.

Vortex, 
I2C displays are great! If you have any trouble getting it to work with the LiquidCrystal_I2C driver let me know because I personally had to make a change to it to get it to work for mine, possibly because I bought a cheap eBay display from China and their documentation was wrong. If you are using a regular 5V Arduino you will be alright, but if you have a 3.3V Arduino, like some of the Pro minis you will have problems with the I2C backpack because they expect different signal levels.


----------



## vortex

Edak said:


> Vortex,
> I2C displays are great! If you have any trouble getting it to work with the LiquidCrystal_I2C driver let me know because I personally had to make a change to it to get it to work for mine, possibly because I bought a cheap eBay display from China and their documentation was wrong. If you are using a regular 5V Arduino you will be alright, but if you have a 3.3V Arduino, like some of the Pro minis you will have problems with the I2C backpack because they expect different signal levels.



Thanks Edak. I'll them setup over the weekend, I'll be testing with one of the Uno's I have, so 5v won't be a problem.


----------



## vortex

Soldered up the Akafugu backpack and the LCD, glad I put pins on each and used a ribbon cable to connect them. I'm reasonably certain the pinouts are different, as only 1/2 the display works indicating one one of the Enable lines is correct, and the other is incorrect... I had to crimp the IDC connectors the wrong way around as Pin 1 is on the wrong side of the connector - but I could have also got the wrong IDC plugs! Assuming "pin 1" is in the same spot on each connector and everything lines up, it's just a straight connection so I'm not sure if any of that matter or not really, but it's entirely likely the pins are flipped. Having said that, I wouldn't have thought even 1/2 the display would work then...

About to lookup the LCD pinout and compare it to the Akafugu backpack pinout to see if I can resolve the problem. Shouldn't be a huge issue 




4x40 Display by auvortex, on Flickr


----------



## vortex

Hmm. Pinouts are identical. Made a new ribbon cable to eliminate that, too. Could solder up some veroboard and connect directly to test with the LiquidCrystal440 library...


----------



## Edak

vortex said:


> Hmm. Pinouts are identical. Made a new ribbon cable to eliminate that, too. Could solder up some veroboard and connect directly to test with the LiquidCrystal440 library...


Did you define your display size correctly? What code have you used?


----------



## vortex

Silly me  I forgot I still needed to set cursor locations  I was assuming because the example script didn't do it, that it wasn't required with this backpack for some reason. But, as soon as I throw those in, all OK 
I'm using the TWILiquidCrystal library, which is a version of the Arduino LiquidCrystal library designed to work over I2C/TWI, just by changing the library it uses.




ArduFerm Display by auvortex, on Flickr

Library: https://github.com/akafugu/twilcd/tree/mast...WILiquidCrystal
Backpack: http://store.akafugu.jp/products/33
Displays: http://www.ebay.com.au/itm/200545027053?ss...#ht_3788wt_1097


----------



## Edak

vortex said:


> Silly me  I forgot I still needed to set cursor locations  I was assuming because the example script didn't do it, that it wasn't required with this backpack for some reason. But, as soon as I throw those in, all OK
> I'm using the TWILiquidCrystal library, which is a version of the Arduino LiquidCrystal library designed to work over I2C/TWI, just by changing the library it uses.
> 
> 
> 
> 
> ArduFerm Display by auvortex, on Flickr
> 
> Library: https://github.com/akafugu/twilcd/tree/mast...WILiquidCrystal
> Backpack: http://store.akafugu.jp/products/33
> Displays: http://www.ebay.com.au/itm/200545027053?ss...#ht_3788wt_1097


Niiiice! 

Looking good now vortex


----------



## bonj

vortex said:


> Silly me  I forgot I still needed to set cursor locations  I was assuming because the example script didn't do it, that it wasn't required with this backpack for some reason. But, as soon as I throw those in, all OK
> I'm using the TWILiquidCrystal library, which is a version of the Arduino LiquidCrystal library designed to work over I2C/TWI, just by changing the library it uses.
> 
> 
> 
> 
> ArduFerm Display by auvortex, on Flickr
> 
> Library: https://github.com/akafugu/twilcd/tree/mast...WILiquidCrystal
> Backpack: http://store.akafugu.jp/products/33
> Displays: http://www.ebay.com.au/itm/200545027053?ss...#ht_3788wt_1097


That is one massive LCD!


----------



## Zizzle

Bonj said:


> That is one massive LCD!



Size queen!


----------



## bonj

You think he's over-compensating?

It's not the size of your LCD that matters, it's the amount useful information you display on it.


----------



## Jono_w

Hey Guys,
Save me reading 30 odd pages, has anyone worked on a Fermentation cabinet heating / cooling setup with PID? I have a large fridge I need to control and if someone has started this or knows of code it will save me heaps of time. I have not found any source with both heating and cooling.
Cheers
Jono


----------



## bonj

Jonathon said:


> Hey Guys,
> Save me reading 30 odd pages, has anyone worked on a Fermentation cabinet heating / cooling setup with PID? I have a large fridge I need to control and if someone has started this or knows of code it will save me heaps of time. I have not found any source with both heating and cooling.
> Cheers
> Jono


Hey Jono

I don't know of anyone that has done both heating and cooling with PID. I assume you understand the problem with PID controlling something that you can't turn on and off quickly (without risking compressor damage), but adding an additional PID instance to an existing piece of code shouldn't be too hard. The other alternative is to use a single PID instance, and activate the heater when the PID output is positive, and the cooling when output is negative. 

Another way to do it might be setpoint on/off cooling, with a compressor saving feature similar to a fridgemate, and PID heating. So the PID heating will compensate for the cooling overshoot.

You can see my PID HERMS controller code at: https://github.com/Bonj/HERMS_rv2


----------



## vortex

There is an Arduino PID library at: http://www.arduino.cc/playground/Code/PIDLibrary I haven't used it yet, my controller isn't up and running yet and to keep things simple to start with im simply checking if(temp > target) enableCooling() else if(temp < target) enableHeating() (pseudocode obviously). I have a 0.5c buffer built in to the temp checking, and a cooling compressor delay.

I'm replacing an STC1000 and that's all it does, I'm not sure a fermentation controller _needs_ PID control (though I'm nearly out of space so may struggle to include the library!)


----------



## Jono_w

Bonj said:


> Hey Jono
> 
> I don't know of anyone that has done both heating and cooling with PID. I assume you understand the problem with PID controlling something that you can't turn on and off quickly (without risking compressor damage), but adding an additional PID instance to an existing piece of code shouldn't be too hard. The other alternative is to use a single PID instance, and activate the heater when the PID output is positive, and the cooling when output is negative.
> 
> You can see my PID HERMS controller code at: https://github.com/Bonj/HERMS_rv2



Thanks Bonj,

Yeah with compressor delays it makes the PID difficult. Ill have to look into it further, the weather down here is bloody erratic to say the least. Forecast 27c mon - 10c tues makes it hard to keep the yeast happy.

Cheers.


----------



## bonj

Jonathon said:


> Thanks Bonj,
> 
> Yeah with compressor delays it makes the PID difficult. Ill have to look into it further, the weather down here is bloody erratic to say the least. Forecast 27c mon - 10c tues makes it hard to keep the yeast happy.
> 
> Cheers.


Erratic all times of the year from what I've seen. We spent a week camping in Port Fairy over the xmas holidays and we had 36 one day, 15 the next. Rain, wind (lots and lots of wind), heat...


----------



## Jono_w

Bonj said:


> Erratic all times of the year from what I've seen. We spent a week camping in Port Fairy over the xmas holidays and we had 36 one day, 15 the next. Rain, wind (lots and lots of wind), heat...



4 seasons in a day..
Only 40mins away , come down for a beer next time mate.


----------



## bonj

Jonathon said:


> 4 seasons in a day..
> Only 40mins away , come down for a beer next time mate.


Sounds like a plan.


----------



## dmac80

hi Jonathon,



I haven't managed to test mine yet but have written some code (read: bastardised matho's) to pid control the heater, but control cooling on offset and deadband. 

I also added a setpoint rate of change calc to enable temp ramping at a set rate. I can post the code when I get home tomorrow night if you like.


Cheers



Dan


----------



## bonj

Sounds awesome dmac. I like the rate of change calc idea. That's awesome.


----------



## dmac80

Bonj said:


> Sounds awesome dmac. I like the rate of change calc idea. That's awesome.




Thanks bonj,


The rate of change was the main reason I wrote it, I wanted to be able to punch in a final setpoint (say, to ramp up a couple of degrees and the end of a lager ferment) and have it ramp there at my desired rate, to keep the yeasties happy.


----------



## Jono_w

dmac said:


> hi Jonathon,
> 
> 
> 
> I haven't managed to test mine yet but have written some code (read: bastardised matho's) to pid control the heater, but control cooling on offset and deadband.
> 
> I also added a setpoint rate of change calc to enable temp ramping at a set rate. I can post the code when I get home tomorrow night if you like.
> 
> 
> Cheers
> 
> 
> 
> Dan



Sounds great Dan,
Cheers.


----------



## Edak

Jonathon said:


> Hey Guys,
> Save me reading 30 odd pages, has anyone worked on a Fermentation cabinet heating / cooling setup with PID? I have a large fridge I need to control and if someone has started this or knows of code it will save me heaps of time. I have not found any source with both heating and cooling.
> Cheers
> Jono


That is what I did in my fridge. 

Look at something called uberfridge, which is what I based my code on. I have since bastardised the code so much that mine is possibly too specific to my needs, but I would be happy to share it with you, but first read his site and how the code works.


----------



## dmac80

As promised Jono,

View attachment Ferment_Controller.txt


As i said before, i haven't fully tested it in anger yet.

Setpoint Rate of change (ROC) is on deg/day, cool min time is minimum on time of cooling out put in seconds (to protect fridge compressor), cool offset is the offset from the setpoint that the fridge will start up and cool hys is the hysteresis for the resetting of the fridge start command.

Up and down buttons will get you to the setup menu, previous and next buttons will get you to the setpoint rate of change override, to allow instant setpoint changes.

Set up to use a DS18B20 temp sensor and 16 x 2 lcd display.

Cheers
Dan


----------



## Jono_w

dmac said:


> As promised Jono,
> 
> View attachment 57809
> 
> 
> As i said before, i haven't fully tested it in anger yet.
> 
> Setpoint Rate of change (ROC) is on deg/day, cool min time is minimum on time of cooling out put in seconds (to protect fridge compressor), cool offset is the offset from the setpoint that the fridge will start up and cool hys is the hysteresis for the resetting of the fridge start command.
> 
> Up and down buttons will get you to the setup menu, previous and next buttons will get you to the setpoint rate of change override, to allow instant setpoint changes.
> 
> Set up to use a DS18B20 temp sensor and 16 x 2 lcd display.
> 
> Cheers
> Dan



Fantastic Dan,
Sounds like you have it all covered, will have a play. I owe you a beer or 3. I'll let you know how it goes.
Much Appreciated, 
Cheers..


----------



## enoch

Sweet arduino control malting kiln with code at:
Malt kiln.
I must get back to brewing/duino!


----------



## Zizzle

Just saw this which could be a pretty cool drop-in upgrade for the old 16x2.

http://dangerousprototypes.com/2012/10/15/...ober-15th-2012/

Another interesting non-arduino option for control:

http://squonk42.github.com/TL-WR703N/

~$22 on ebay. Runs linux. 32MB ram. Has USB,wifi,ethernet,UART built in.

Only a couple of I/O pins free, but you can use them for i2c so add some more io via expanders. Or use a USB based i/o board.

Hell it's cheaper than a Pi or Arduino and has wifi.


----------



## jonw

Hey guys,

I'm just getting up to speed on Arduino and I've got a bunch of stuff on its way from Deal Extreme (slowly.)

I'm planning on making a controller that will share a single 10A input across my HLT and direct fired RIMS MLT, with PID control on both of them. I've been through matho's code, which I'm starting to understand (not having a coding background) but that's obviously specifically for a single vessel system.

Anybody have any ideas how to "power share" across two PIDs, with the MLT PID having preference over the HLT? Is it as simple as:-

Calculate MLT PID
If result = power on MLT
set HLT element off
set MLT element on
else
set MLT element off
calculate HLT PID
if result = power on HLT
set HLT element on.
end if
end if

If they both have the same PID window size, is that going to clash?

Anybody else tried to do this? I know it's in Brewtroller trunk, but I can't get my head around the code yet.

Cheers,

Jon


----------



## dmac80

jonw said:


> Hey guys,
> 
> I'm just getting up to speed on Arduino and I've got a bunch of stuff on its way from Deal Extreme (slowly.)
> 
> I'm planning on making a controller that will share a single 10A input across my HLT and direct fired RIMS MLT, with PID control on both of them. I've been through matho's code, which I'm starting to understand (not having a coding background) but that's obviously specifically for a single vessel system.
> 
> Anybody have any ideas how to "power share" across two PIDs, with the MLT PID having preference over the HLT? Is it as simple as:-
> 
> Calculate MLT PID
> If result = power on MLT
> set HLT element off
> set MLT element on
> else
> set MLT element off
> calculate HLT PID
> if result = power on HLT
> set HLT element on.
> end if
> end if
> 
> If they both have the same PID window size, is that going to clash?
> 
> Anybody else tried to do this? I know it's in Brewtroller trunk, but I can't get my head around the code yet.
> 
> Cheers,
> 
> Jon



Hey Jon,

I'm no expert, but my bet would be to duplicate all the pid code and add some code to fire the HLT in period of the window not used by the MLT. In the PID_HEAT function maybe something like this:


myPID.Compute();
unsigned long now = millis();
if(now - windowStartTime>WindowSize)
{ //time to shift the Relay Window
windowStartTime += WindowSize;
* digitalWrite(HeatHLT,LOW);*
}

if((OutputMLT*(WindowSize/100)) > now - windowStartTime) 
{
digitalWrite(HeatMLT,HIGH);
*HLTwindowStartTime = now;* //New unsigned long variable to note last time of MLT heating
}
else {
digitalWrite(HeatMLT,LOW);
* if((OutputHLT*(WindowSize/100))>now - HLTwindowStartTime) digitalWrite(HeatHLT,HIGH);
else digitalWrite(HeatHLT,LOW);
}
*

The bold text is stuff i've added. May need some fine tuning but i reckon something similar to this should work. HLT will lose heat when MLT output is high, which is to be expected.

Cheers
Dan


----------



## vortex

Can't wait to plug it in 



BeagleBone by auvortex, on Flickr


----------



## Sam England

Evening Jon,
I'm interested to see what you come up with, as I'm planning on doing something similar by butchering Matho's code. It won't happen until after Xmas due to other commitments though. :angry: 
I've converted two kegs with a common spigot so that I can transfer the malt pipe (similar to ArnieW BrauBushka) from one to the other after mash out and then recirc the preheated sparge water from the second keg through the drained malt pipe and hopefully get better efficiencies and maintain the clean wort. Partigyle(??) brewing has also sprung to mind by doing high grav in first keg and using the second keg to boil the lower grav sparged second keg. This would also require repetitive switching or a delay to the start of the second boil.
The main keg has 3kW and the second 2.5kW and I was hoping to run it off a single 15A line with switching between the two. I can't see any issues other than my programming!!
To ensure both aren't on at the same time I was going to try and incorporate a checking loop so that keg 1 always overrides keg 2, but keg 1 can't kick in until after keg 2 has been turned off. I'm sure this will stuff with the accuracy of the PID control slightly, but I'd rather not run a second power cord on another circuit, and it's a challenge!!

Good luck and I'll follow your progress with interest.

Cheers BB


----------



## mkj

Zizzle said:


> Look at this, stm32 dev board with 2.8" touch screen LCD for < $30 delivered.
> 
> http://www.ebay.com/itm/STM32F103RBT6-deve...=item3a68965ee7


Thanks for posting that, waiting for mine to arrive. I've been using an AVR but it's a bit too small to talk directly to a webserver. Agree that arduino dev tools are simpler though.

In the interim I've got my AVR controlling the fermentation fridge, STC-1000 style but with graphs on a webpage and a bit more overshoot control. For the mains-control part rather than SSRs I got a remote control power socket  and wired in an optocoupler to control the relay's transistor. Be careful though, even the "low voltage" bits are referenced to the mains high side... For $10 a socket it's cheaper than building an enclosure, and it's a nice size.

I was originally going to control it with a 433mhz RF module but that's a bit too unreliable for something as important as fermentation!


----------



## Zizzle

mkj said:


> Thanks for posting that, waiting for mine to arrive.



Cool, some others are interested in these so I'm putting together a Ubuntu VirtualBox image with the toolchain installed and setup, a simple FreeRTOS example project with touch and LCD drivers working and an easy to use menu framework.

Might not be quite a simple as arduino but should be easy enough to get going.


----------



## ArnieW

Zizzle said:


> Cool, some others are interested in these so I'm putting together a Ubuntu VirtualBox image with the toolchain installed and setup, a simple FreeRTOS example project with touch and LCD drivers working and an easy to use menu framework.
> 
> Might not be quite a simple as arduino but should be easy enough to get going.


Yeah thanks again for that Matt. :icon_cheers: 

I've got one of these on my desk and can see the potential but just didn't know where to start. Good to hear others are experimenting too.


----------



## jonw

Blue Baggers said:


> I'm interested to see what you come up with, as I'm planning on doing something similar by butchering Matho's code....



Here's what I've come up with so far. I knocked this up in notepad rather than the IDE, so syntax may well be wrong. I'm really just thinking through the logic.



Code:


void ControlHeat() {

  // Control heat output based on PID calculations

  // MLT takes preference over HLT



  PID_WINDOW_SIZE = 5000; // this lives in the variable declarations, not in the main loop.

  unsigned long NOW = millis();



  // If the HLT is enabled, calculate the PID output



  if HLT_HEAT_ENABLED && ((HLT_TEMP_SETPOINT - HLT_TEMP_CURRENT) > 5.0) {		   // HLT's heating but we're more than 5deg below setpoint

	HLT_PID_OUTPUT = PID_WINDOW_SIZE;								// = window size

	}

  else if HLT_HEAT_ENABLED && ((HLT_TEMP_SETPOINT - HLT_TEMP_CURRENT) < 5.0) {	// HLT's heating but we're LESS than 5deg below setpoint  

	HLT_PID.Calculate();

	}

  // else HLT PID isn't enabled

  end if



  // Do the same as above for the MLT

  // If the MLT is enabled, calculate the PID output



  if MLT_HEAT_ENABLED && ((MLT_TEMP_SETPOINT - MLT_TEMP_CURRENT) > 5.0) {		   // MLT's heating but we're more than 5deg below setpoint

	MLT_PID_OUTPUT = PID_WINDOW_SIZE;								// = window size

	}

  else if MLT_HEAT_ENABLED && ((MLT_TEMP_SETPOINT - MLT_TEMP_CURRENT) < 5.0) {	// MLT's heating but we're LESS than 5deg below setpoint  

	MLT_PID.Calculate();

	}

  // else MLT PID isn't enabled

  end if



  if (NOW - PID_WINDOW_START_TIME) > PID_WINDOW_SIZE)) {  // If we've past the end of a window, roll it over to start again

	PID_WINDOW_START_TIME += PID_WINDOW_SIZE;			// Put a debug in here to log window increment

	}



  if (MLT_HEAT_ENABLED && ! HLT_HEAT_ENABLED) {			// MLT is ON, but HLT is OFF

	if (MLT_PID_OUTPUT > (NOW - PID_WINDOW_START_TIME)) {   // Output within window

	  digitalWrite (HLT_HEAT,LOW);					// switch HLT off...

	  digitalWrite (MLT_HEAT,HIGH);					// then switch MLT on.

	  }

	else

	  digitalWrite (MLT_HEAT,LOW);					// switch MLT OFF.

	end if;



  else if (HLT_HEAT_ENABLED && ! MLT_HEAT_ENABLED) {			// HLT is ON, but MLT is OFF

	if (HLT_PID_OUTPUT > (NOW - PID_WINDOW_START_TIME)) { // Output within window

	  digitalWrite (MLT_HEAT,LOW);					// switch MLT off...

	  digitalWrite (HLT_HEAT,HIGH);					// then switch HLT on.

	  }

	else

	  digitalWrite (HLT_HEAT,LOW);					// switch HLT OFF.

	end if;





  else if (HLT_HEAT_ENABLED && MLT_HEAT_ENABLED) {				// Both enabled: HLT is ON, AND MLT is ON

	if (MLT_PID_OUTPUT > (NOW - PID_WINDOW_START_TIME)) { // Output within window

	  digitalWrite (HLT_HEAT,LOW);					// switch HLT off...

	  digitalWrite (MLT_HEAT,HIGH);					// then switch MLT on.

	  }

	else if ((MLT_PID_OUTPUT + HLT_PID_OUTPUT) > (NOW - PID_WINDOW_START_TIME)) { // Output within window

	  digitalWrite (MLT_HEAT,LOW);					// switch MLT off...

	  digitalWrite (HLT_HEAT,HIGH);					// then switch HLT on.

	  }

	else

	  digitalWrite (HLT_HEAT,LOW);					// switch HLT OFF.

	  digitalWrite (MLT_HEAT,LOW);					// switch MLT OFF.

	end if;



  else // Neither HLT nor MLT enabled

	  digitalWrite (HLT_HEAT,LOW);					// switch HLT OFF.

	  digitalWrite (MLT_HEAT,LOW);					// switch MLT OFF.



  end if;



}


----------



## Sam England

Cheers for posting that Jon.
I've had a quick look through it and I can see that your logic covers some of the issues I was having with guaranteeing the switching but still preferencing the mash.
It will be a good base to start with when I finally get around to working on my rig again.

BB


----------



## jonw

Anybody know why matho's got this line in his PID_HEAT function:-



Code:


if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);


Specifically, why he's using Output*(WindowSize/100) rather than just Output as per the PID examples?

Cheers,

Jon


----------



## bonj

jonw said:


> Anybody know why matho's got this line in his PID_HEAT function:-
> 
> 
> 
> Code:
> 
> 
> if((Output*(WindowSize/100)) > now - windowStartTime) digitalWrite(Heat,HIGH);
> 
> 
> Specifically, why he's using Output*(WindowSize/100) rather than just Output as per the PID examples?
> 
> Cheers,
> 
> Jon


Because we're controlling an on off heating element. we need to determine the duty cycle. Straight output is for controlling motors and the like that can be controlled via a motor controller etc.


----------



## jonw

Bonj said:


> Because we're controlling an on off heating element. we need to determine the duty cycle. Straight output is for controlling motors and the like that can be controlled via a motor controller etc.



Thanks Bonj. So output is a percentage rather than a fixed value between 0 and Windowsize?


----------



## bonj

jonw said:


> Thanks Bonj. So output is a percentage rather than a fixed value between 0 and Windowsize?


To be honest, I don't actually know. I *assume* it is a percentage or an 8-bit value between 0 and 255 or similar. Whatever the actual value, it tells the rest of the code how often to switch the element on and for how long.


----------



## jonw

Bonj said:


> To be honest, I don't actually know. I *assume* it is a percentage or an 8-bit value between 0 and 255 or similar. Whatever the actual value, it tells the rest of the code how often to switch the element on and for how long.



I did a bit of debugging, and the output value returned is a a value between the output limits i.e. between 0 and WindowsSize in this case.

I'll put my code up on github when I work out how. I'm pretty happy with the power sharing code - seems to work pretty well at this point. Now I just need the LCD to arrive so I can start work on the UI.


----------



## Zizzle

Zizzle said:


> Cool, some others are interested in these so I'm putting together a Ubuntu VirtualBox image with the toolchain installed and setup, a simple FreeRTOS example project with touch and LCD drivers working and an easy to use menu framework.



Done. With videos.

http://zizzle-brewbot.blogspot.com/2012/10...creen-demo.html

If anyone tries it out, let me know how you get on.


----------



## Edak

Zizzle said:


> Done. With videos.
> 
> http://zizzle-brewbot.blogspot.com/2012/10...creen-demo.html
> 
> If anyone tries it out, let me know how you get on.


Great guide Zizzle, I am sure that it will be enough to get others interested.


----------



## vortex

Zizzle said:


> Done. With videos.
> 
> http://zizzle-brewbot.blogspot.com/2012/10...creen-demo.html
> 
> If anyone tries it out, let me know how you get on.



Nice work


----------



## randyrob

Anyone using Nixies to display time/temperature?

I just got some soldered up into some PCB's that I designed, Just gotto knock up an enclosure.





Cheers Rob.


----------



## bonj

randyrob said:


> Anyone using Nixies to display time/temperature?
> 
> I just got some soldered up into some PCB's that I designed, Just gotto knock up an enclosure.
> 
> View attachment 58088
> 
> 
> Cheers Rob.


That's so 1337


----------



## vortex

Can any of you guys give me a hand with I2C on Raspberry Pi at all? Having a hell of a time getting the hardware side to play ball...


----------



## vortex

vortex said:


> Can any of you guys give me a hand with I2C on Raspberry Pi at all? Having a hell of a time getting the hardware side to play ball...


Actually, it looks like the 7 segment display board and LCD I have has a dodgy I2C implementation.


----------



## Edak

vortex said:


> Actually, it looks like the 7 segment display board and LCD I have has a dodgy I2C implementation.


Does that mean you have figured it out vortex?


----------



## vortex

Edak said:


> Does that mean you have figured it out vortex?


If you define "give up and buy a better board" as "figuring it out", then yes 

Actually, I started a thread on the Raspberry Pi forum, and the maker of the boards I'm using found that it's not quite implemented correctly: http://www.raspberrypi.org/phpBB3/viewtopi...=44&t=27235
Something about sending the I2C bus high, but that's over my head really.


----------



## jonw

Can any of you guys give me any hints on setting PID tuning parameters?

I'm building an arduino based controller, and I'm using the PID library for my HLT and MLT direct fired RIMS. I don't know where to start with the PID parameters, or how to use the PID autotune library - the doc and example for the latter are fairly light on.

I think Matho used Kp = 100, Ki = 20, Kd = 5 in the Braumiser. That may not suit my 3V system, but it's a starting point for the time being.

Cheers,

Jon


----------



## bonj

jonw said:


> Can any of you guys give me any hints on setting PID tuning parameters?
> 
> I'm building an arduino based controller, and I'm using the PID library for my HLT and MLT direct fired RIMS. I don't know where to start with the PID parameters, or how to use the PID autotune library - the doc and example for the latter are fairly light on.
> 
> I think Matho used Kp = 100, Ki = 20, Kd = 5 in the Braumiser. That may not suit my 3V system, but it's a starting point for the time being.
> 
> Cheers,
> 
> Jon


Tuning is the hardest part of the whole process in my opinion, and the lack of documentation on the autotune library makes it pretty well useless. Of the multiple iterations I've run it through, I can get a much better tune just by manually following the process in this article: http://www.embedded.com/design/embedded/42...D-without-a-PhD (link to the original pdf in the top of the article, or just read on for the html version)


----------



## Edak

I tried to explain it here


----------



## vortex

Picked up a couple of I2C relay boards:



Relay board by auvortex, on Flickr

Small one has 8 relays, [email protected], I2C connection.




Relay board by auvortex, on Flickr

Big one has 8 relays, 30a @250v. I2C connection also. Likely to need a bloody big heatsink 

Got them from http://www.ereshop.com/shop/i2cbus-boards-c-143.html ordered last thursday, arrived today. Not the cheapest boards around but should do the job! Documentation is a little thin on the ground, though  Ti chip, so hoping it's common enough that there is plenty of doco around for it.


----------



## vortex

vortex said:


> Picked up a couple of I2C relay boards:
> 
> (snipped)
> 
> Got them from http://www.ereshop.com/shop/i2cbus-boards-c-143.html ordered last thursday, arrived today. Not the cheapest boards around but should do the job! Documentation is a little thin on the ground, though  Ti chip, so hoping it's common enough that there is plenty of doco around for it.



FWIW, they both use the PCF8574 I/O Expander chip as outlined on the link above, and documentation is fairly easy to come by. For example: http://garagelab.com/profiles/blogs/tutori...er-with-pcf8574
The work I'll be doing will be in C++ but shouldn't be hard to get it working (and there may already be a library, I haven't looked yet)
Edit: Well that was hard: http://arduino.cc/forum/index.php?topic=109340.0 

One of the boards will be used with Arduino, the other with BeagleBone or Raspberry Pi.


----------



## jonw

Bonj said:


> Tuning is the hardest part of the whole process in my opinion, and the lack of documentation on the autotune library makes it pretty well useless. Of the multiple iterations I've run it through, I can get a much better tune just by manually following the process in this article: http://www.embedded.com/design/embedded/42...D-without-a-PhD (link to the original pdf in the top of the article, or just read on for the html version)



Thanks guys.

Bonj, That's a good article. I'd be grateful if you would elaborate on your tuning process, just so I can make sure I'm on the right track. For example, did you start off with "set all gains to zero", and does that mean Kp, Ki, and Kd are all zero for the Arduino PID implementation, or have I misunderstood that and e.g. Kp != proportional gain?

Also, I think the Arduino PID library defaults to PI rather than PID. There's a command to set it to PID, but I don't see that in anybody's code. Are people happy just using PI? If so, that sounds like it makes the tuning process a little easier.

Cheers,

Jon


----------



## zxhoon

You won't be needing a heatsink as they are mechanical relays not Solid State Relays (SSR), what's the end application for them? 
If it is turning a heating element on and off you might want to check the rated number of switching actions for the relays. 
Looks like 100,000 on the smaller ones, can't find one on the larger ones.


----------



## vortex

zxhoon said:


> You won't be needing a heatsink as they are mechanical relays not Solid State Relays (SSR), what's the end application for them?
> If it is turning a heating element on and off you might want to check the rated number of switching actions for the relays.
> Looks like 100,000 on the smaller ones, can't find one on the larger ones.



Oh, thanks for clearing that up  Glad to hear it actually as I wasn't sure how I was going to handle mounting it to a heatsink.
The large ones will be as you thought, two of those at least will be for 240v elements (HLT and RIMS), two others at least for March pumps. One will also end up controlling a LBP for HLT recirc.
The 4 of the small ones will be used in a fermentation controller (really didn't need 8!) for switching heating and cooling circuits on; I can build in protection for excessive switching pretty easily into the software for both.


----------



## zxhoon

There's pros and cons for both types, obviously SSRs don't wear out, but being an electronic part they can still fail and can typically fail ON, they are also susceptible to mains voltage spikes although on a domestic supply these are less likely.

Mechanical relays wear out and contacts can weld shut if used on too high a power load or large inductive loads, compressor motors, things with a large inrush current, etc.

I'm not sure how often your heating elements will need to cycle on but at say twice a minute for an hour that is 120 actions which would give over 800 hours... perhaps not an issue but something to be aware of, should be fairly easy to change them if needed down the track anyway


----------



## bonj

jonw said:


> Thanks guys.
> 
> Bonj, That's a good article. I'd be grateful if you would elaborate on your tuning process, just so I can make sure I'm on the right track. For example, did you start off with "set all gains to zero", and does that mean Kp, Ki, and Kd are all zero for the Arduino PID implementation, or have I misunderstood that and e.g. Kp != proportional gain?
> 
> Also, I think the Arduino PID library defaults to PI rather than PID. There's a command to set it to PID, but I don't see that in anybody's code. Are people happy just using PI? If so, that sounds like it makes the tuning process a little easier.
> 
> Cheers,
> 
> Jon


What I tend to do, is arbitrarily pick a P value, and then follow their instructions with regard to setting the I and D values. Following the very basic premise that the P gain sets to speed at which you approach your target and the I gain sets the rate at which you adjust for error over time (If the correction isn't correcting enough, it accumulates the I gain to correct faster... that can lead to over correction and instability if the accumulator has a chance to run away. This is why Matho only enables PID control within 5C of the target temperature and also why we experimented with clamping the accumulator (I use the modified library in my HERMS, but matho elected not to, in favour of the 5C method)). The D term attenuates (dampens) the speed at which you approach the target as you get closer, so as to hopefully avoid overshoot.

Apart from that, you basically have to run the system a number of times under similar to expected conditions in order to adjust the gains by trial and error. I played with mine in a 2.4KW kitchen jug which enabled me to check it was working and the tuning iterations were faster (albeit completely different from an actual system), but the jug is so over powered for the volume of water that it is very hard to tune. 

The arduino PID algorithm, incidently doesn't disable the D term by default. Most people are happy with a PI system, or even a PD. The article I linked does a good job of explaning the benefits and drawbacks of the various configurations.


----------



## jonw

Bonj said:


> What I tend to do, is arbitrarily pick a P value, and then follow their instructions with regard to setting the I and D values. Following the very basic premise that the P gain sets to speed at which you approach your target and the I gain sets the rate at which you adjust for error over time (If the correction isn't correcting enough, it accumulates the I gain to correct faster... that can lead to over correction and instability if the accumulator has a chance to run away. This is why Matho only enables PID control within 5�C of the target temperature and also why we experimented with clamping the accumulator (I use the modified library in my HERMS, but matho elected not to, in favour of the 5�C method)). The D term attenuates (dampens) the speed at which you approach the target as you get closer, so as to hopefully avoid overshoot.
> 
> Apart from that, you basically have to run the system a number of times under similar to expected conditions in order to adjust the gains by trial and error. I played with mine in a 2.4KW kitchen jug which enabled me to check it was working and the tuning iterations were faster (albeit completely different from an actual system), but the jug is so over powered for the volume of water that it is very hard to tune.
> 
> The arduino PID algorithm, incidently doesn't disable the D term by default. Most people are happy with a PI system, or even a PD. The article I linked does a good job of explaning the benefits and drawbacks of the various configurations.


Bonj, thanks. I'd got the PID library and PID autotune library confused - it's the latter that defaults to PI.

I've since looked through the PID library to see how the output is calculated, and it's a whole lot simpler than I'd thought. In the sort of scenario a PID's going to be used for in a home brewery, it seems to me that the D term is ineffective unless the gain (Kd) is very high. For example, in my HLT, I'm getting about 1 degree a minute temp rise. That's a small fraction of a degree per second. Unless Kd is several hundred, the impact of the D term is going to be insignificant. However, my DS18B20 measures at 12 bits, so increments in 0.0625 degree jumps every several seconds. I therefore get several seconds of D=0 followed by one of D=high, i.e. noise. I've therefore effectively disabled D by setting it to 1.

When I originally went through Matho's code, I didn't understand why (a) he'd disabled PID until within 5 degrees, and ( B) set the PID output to 100 when his PID window size is 5000ms (at least I think he's done that, now I'm not sure 

I had my PID output set to 5000, as that's what my window size is. The trouble is the I term winds up to 5000 very quickly, and unless Ki is large, the accumulator takes ages to unwind and you get huge overshoot. I've now set my output to 100, and just use a multiplier to convert that to my window size (i.e. max output x 50 = window size.) With Ki limited to max output, it's a lot quicker to unwind with a smaller Ki. Here's the sort of response I'm getting on a test run of my HLT ~ 2/3 full with Kp = 100, Ki = 1.4, Kd = 1




I'm still getting some overshoot, but no oscillation, and it settles down to target temp within a few minutes. That's fine for the HLT. Next is the direct fired RIMS MLT which might be a bit more tricky to tune.

Cheers,

Jon


----------



## bonj

When I was testing with my electric jug, the best I could do was:

Kp=5, Ki=0.5, Kd=98. I also clamped the Ki to never go over 5 to prevent wind up.

With those values, I was getting around a 0.7°C overshoot, which isn't bad considering it is a 2.4KW element in a 1.7L vessel.


----------



## matho

I have spent a lot of time playing with the pid library but I just went with the original one and turned it on 5 degs to go which reduces the amount of Ki wind-up but if you look at the PID beta 6 library http://code.google.com/p/arduino-dac/source/browse/DecaTest_v2/ArduinoCode/libs/PID_Beta6/?r=23 it does not intergrate unless the output is below maximum output which limits it from winding up. I have played with clamping Ki, which works well but can cause overshoot or undershoot depending on how much you clamp it to. I also have changed the standard library so that when kp is above max out Ki is 0 and if kP is negative then Ki is 0, that work OK but could be a bit notchy.

Iterm clamp library http://www.mediafire.com/?oo9e5b0t7g1l08w

Iterm clamp + no intergration when limits are exceeded http://www.mediafire.com/?4do6ld357286azp

Iterm clamp + Iterm set to 0 if outputs are exceeded http://www.mediafire.com/?4do6ld357286azp

the last one was made up for step mashing.

The PID figures in the brauduino code was a bit of a guess as don't know what system the unit is going to be used on.

Heating water takes a very long time so increase you sample time to reduce the number of times that Ki intergrates also if you make it long enough you will eliminate the problem you mentioned with the KD. 

I'll upload a spreadsheet that I used to get my head around all this pid stuff

cheers steve


----------



## bonj

matho said:


> if you look at the PID beta 6 library http://code.google.com/p/arduino-dac/source/browse/DecaTest_v2/ArduinoCode/libs/PID_Beta6/?r=23 it does not integrate unless the output is below maximum output which limits it from winding up.


I like the sound of that change. It makes a lot of sense. I think they should really have a go at fixing that autotune library because it's a PITA to work with and you pretty much need to tune *it* for it to tune the PID... not ideal.


----------



## matho

I haven't tried or even looked at the autotune so I don't know about it but the PID beta 6 library looks like a better library to me, the brewtroller uses it for its PID. here http://www.mediafire.com/view/?9ewpb6mib64nbvk is the spreadsheet that I put together to have a play with pids, its not very flash and it would take too long to explain how it works but have a play and a look and you should be able to work it out. I converted it from .ods to .xml so it might not work as well.

cheers steve


----------



## Edak

I skipped the autotune, but I do use the v102 library with the clamp, works a treat for me.


----------



## mr_wibble

vortex said:


> Picked up a couple of I2C relay boards:
> [ ... ]
> Small one has 8 relays, [email protected], I2C connection.
> [ ... ]
> 
> Big one has 8 relays, 30a @250v. I2C connection also. Likely to need a bloody big heatsink
> 
> Got them from http://www.ereshop.com/shop/i2cbus-boards-c-143.html ordered last thursday, arrived today. Not the cheapest boards around but should do the job! Documentation is a little thin on the ground, though  Ti chip, so hoping it's common enough that there is plenty of doco around for it.


These look nice, and I guess an 8-port board would mostly do a whole brewery.

I've been playing with these: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=218
They're not I2C, but $3.95 is about my price point 

Once I finalise my design, I plan on buying a few of these, and when the mechanics wear out, just dropping in a new one.
They also have 4-port and 8-port relay boards.

cheers,
-kt


----------



## IainMcLean

Hello chaps.

At the risk of bending the rules and seeing that you are all invested in Arduino tech, and followers of this thread might be wondering where to get a good deal I thought I'd bring to your collective attention the Arduino gear I'm flogging :

http://aussiehomebrewer.com/topic/70939-full-arduino-kit-books/#entry1006326


----------



## Judanero

For the Arduino aficionados out there, I'm looking to try and build an automated brewery that will control:

2x 2400w elements in one vessel, a ~1000w element in another, a march pump, a klaixon pump, a brown pump, three temp probes, 12v atv winch, one or two 12v motors, probably two float switches.

Can I run all these things from one controller? If not can one controller be triggered from another? E.g- once mashout is completed can the main vessel controller trigger another to engage, with the other controller operating the winch, heating of sparge water, and pumping of the heated sparge water?

If it's not possible I will look to just make two controllers, and after a few runs overseeing the brewday manually, should have the temp ramp timing sussed enough to set both controllers independently but working together (if that makes sense).

Any insight/advice would be much welcomed as I have essentially zero knowledge on all things Arduino.


Cheers


----------



## vortex

So, two elements, means two relays from one output, another element relay from another output, three relays for three pumps (one is 12v but controlling is no different) a relay for the winch, relays for another two more 12v motors.

Two float switches on inputs. What about temp sensors for mash temps?

Anyway, I count at least 10 relays. That's a lot of relays.

You can buy I2C relay boards which have 8 relays, i have some of those, so in theory you can control enough relays.
Temp sensors the DS18B20 OneWire's are OK, they work with Arduino OK too.
Inputs for float switches should then have ample space available.

Programming logic _should_ fit on the ROM of an Uno, so that might work OK but if the budget isn't too tight, have a look at the Arduino Mega, which has a lot more ROM space for sketches.

Or do what I did and use something like a BeagleBone/RaspberryPi, which are embedded linux platforms, way more powerful and way more flexible.


----------



## Judanero

Cheers for the reply Vortex, 

I'll look into the l2c relay board you mentioned, sounds like that might be the go.

I already have the DS18B20 sensors but they have three wires from memory.
The plan was to use two of them in the main vessel for the mashing (was thinking if possible to use the average temp between the two sensors-not sure if that's even possible and may be over complicating things) and use the other sensor in the sparge water vessel.

Float switches aren't a necessity-more just a piece of mind thing to ensure I've always got wort above the elements.

Definitely have some more reading/research to do! :icon_cheers:


----------



## MastersBrewery

Judanero said:


> I already have the DS18B20 sensors but they have three wires from memory.


Yes they have 3 wires, they run on a one wire bus (one wire for data) and can be daisy chained, I'm sure one of the guru's will chime in and explain it better.


----------



## bonj

MastersBrewery said:


> Yes they have 3 wires, they run on a one wire bus (one wire for data) and can be daisy chained, I'm sure one of the guru's will chime in and explain it better.


You can't explain it much better than that. Each sensor has its own address, and I think 7 can be run on the same bus (data wire).

I've just received the parts for more bonjuinos if that interests you. They require assembly and a separate programming cable (USB to serial cable with FTDI FT232RL chip) / breakout board (FT232RL basic breakout (usually a bit cheaper than the cable (around $12))), but are a bit more flexible than a standard arduino. You can see the differences here: http://www.bigfathooker.com/bfh/bonjuino.php

Arduino's can be configured to talk to each other either by I2C or serial, but as vortex said, with that many I/Os and associated code, you may want to think about an Arduino Mega.


----------



## vortex

Judanero said:


> I'll look into the l2c relay board you mentioned, sounds like that might be the go.


I picked up two boards from here, 10amp x 8 for fermentation controller, and 30amp x 8 for the brewery.
http://www.ereshop.com/shop/i2cbus-boards-c-143.html


----------



## MastersBrewery

vortex said:


> I picked up two boards from here, 10amp x 8 for fermentation controller, and 30amp x 8 for the brewery.
> http://www.ereshop.com/shop/i2cbus-boards-c-143.html


If your using relays to control Heating elements with PID you will need SSR's (solid state relay) due to high frequency of switching, those little ones will burn out. These would need one digial pin for each device (eg Kettle or HLT).


----------



## vortex

MastersBrewery said:


> If your using relays to control Heating elements with PID you will need SSR's (solid state relay) due to high frequency of switching, those little ones will burn out. These would need one digial pin for each device (eg Kettle or HLT).


Not what I've been told. I was told they could have shorter service life, I can live with that, but I'm implementing the PID algorithm in software which I'm writing so I will have my own protections built in also.


----------



## MastersBrewery

vortex said:


> Not what I've been told. I was told they could have shorter service life, I can live with that, but I'm implementing the PID algorithm in software which I'm writing so I will have my own protections built in also.


problem being if it goes pear shape they are know to fail in the closed position when over heated, so software won't turn it off. though as a fail safe you could use a second relay the remains closed constantly whilst device is in use.


----------



## vortex

Yep, the plan is to switch active and neutral, as I have more relays than I need anyway. To hopefully prevent those issues, but also for safety.


----------



## Edak

I would still recommend against mechanical relays for pid because of the electrical noise and associated glitches you will face. That is a lot of EMI and a Shitload of clicking noise!

Also if you are using 3x PID then you will use a lot more code space than the rest of us who use only one. I would go with the previous version of the mega, which you can source really cheaply these days. DX.com


----------



## vortex

Edak said:


> I would still recommend against mechanical relays for pid because of the electrical noise and associated glitches you will face. That is a lot of EMI and a Shitload of clicking noise!
> 
> Also if you are using 3x PID then you will use a lot more code space than the rest of us who use only one. I would go with the previous version of the mega, which you can source really cheaply these days. DX.com


Thanks. My brewery will be using a BeagleBone so code size isn't an issue.


----------



## Edak

yes, but the clicking would drive you insane!

I have an expensive data logger which uses physical relays for all analog channels (to provide full channel-channel isolation), the clicking drives me crazy so I use digital sensors only.


----------



## vortex

I'll see how they go. Not the end of the world if I need to move to SSR's but I really like the I2C interface to these.


----------



## andytork

Edak said:


> I would still recommend against mechanical relays for pid because of the electrical noise and associated glitches you will face. That is a lot of EMI and a Shitload of clicking noise!
> 
> Also if you are using 3x PID then you will use a lot more code space than the rest of us who use only one. I would go with the previous version of the mega, which you can source really cheaply these days. DX.com


EMI Causes lots of issues with Arduinos (I know from recent 1st hand experience). Even the 12v solenoid through an opto isolated relay board caused EMI. First thing to go on Arudino is serial comms when EMI is around making it a bugger to debug.

If you have any EMI issues go to Jaycar and buy a few "MS4001" for $5 each , place them near your load. Our you could spend weeks making RC snubbers and go mad


----------



## matho

made a brauduino shield into a simple fermentation controller












/*
brauduino semi automated single vessel RIMS
created by s.mathison
using part code orginal developed by Michael Pilcher 2/9/2010 
Copyright (C) 2012 Stephen Mathison

compiled on Arduino V1.0

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/



//libraries
#include <EEPROM.h>
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <avr/pgmspace.h>
OneWire ds(11);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

// push buttons
const char Button_up = A3;
const char Button_dn = A2;
const char Button_prev = A1;
const char Button_nxt = A0;


// outputs
const int Heat = 9;
const int Cool = 8;
const int Buzz = 10;

//Global Variables

unsigned long convStartTime,displayTime,start,buttonPress;

float Temp_c,setTemp,hyst;

byte data[2];
byte firstNumber;
byte secondNumber;
byte remainder;
byte second;
byte minute;
byte hour;
byte day;
byte compDelay;
byte compTime;

const byte gBigFontShapeTable[] PROGMEM	=	{
//*	LT[8] =
B00111,
B01111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
//*	UB[8] =
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B00000,
B00000,
//*	RT[8] =
B11100,
B11110,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
//*	LL[8] =
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B01111,
B00111,
//*	LB[8] =
B00000,
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111,
//*	LR[8] =
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11110,
B11100,
//*	UMB[8] =
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B11111,
B11111,
//*	LMB[8] =
B11111,
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111


};

const byte gBigFontAsciiTable[] PROGMEM	=	{


0,	1,	2,	3,	4,	5, //	0x30	0
1,	2,	32,	32,	255,	32, //	0x31	1
6,	6,	2,	3,	7,	7, //	0x32	2
6,	6,	2,	7,	7,	5, //	0x33	3
3,	4,	2,	32,	32,	5, //	0x34	4
255, 6,	6,	7,	7,	5, //	0x35	5
//	0,	6,	6,	7,	7,	5, //	0x35	5
0,	6,	6,	3,	7,	5, //	0x36	6
1,	1,	2,	32,	0,	32, //	0x37	7
0,	6,	2,	3,	7,	5, //	0x38	8
0,	6,	2,	32,	32,	255, //	0x39	9


};


boolean Conv_start = false;
boolean run = false;
boolean cool_on = false;
boolean showlp = false;

//***********Start of the Functions***************

static void	BigNumber_SendCustomChars(void)
{
uint8_t	customCharDef[10];
uint8_t	ii;
int jj;

for (ii=0; ii<8; ii++)
{
for (jj=0; jj<8; jj++)
{
customCharDef[jj]	=	pgm_read_byte_near(gBigFontShapeTable + (ii * 8) + jj);
}
lcd.createChar(ii, customCharDef);
}
}

// 1 second button press
int Button_1sec_press (int Button_press){
if (digitalRead(Button_press)==0){
delay (1000);
if (digitalRead(Button_press)==0){
lcd.clear();
while(digitalRead(Button_press)==0){
}
return 1;
}
}
return 0;

}




// repeat button press
int Button_repeat (int Button_press){
if (digitalRead(Button_press)==0){
delay(200);
return 1;
}
return 0;
}

// holds whilst button pressed 
int Button_hold_press (int Button_press){
if (digitalRead (Button_press)==0){
delay(50);
while (digitalRead (Button_press)==0){
}
return 1;
}
return 0;
}

void display_lcd (int pos , int line ,const char* lable){
lcd.setCursor(pos,line);
lcd.print(lable);
}


// reads the DS18B20 temerature probe 
void Temperature(void){
// start conversion and return
if (!(Conv_start)){
ds.reset();
ds.skip();
ds.write(0x44,0);
Conv_start = true;
convStartTime = millis();
return;
}
// check for conversion if it isn't complete return if it is then convert to decimal
if (Conv_start){
if ((millis()-convStartTime)<1000){
return;
}
ds.reset();
ds.skip();
ds.write(0xBE); 
for ( int i = 0; i < 2; i++) { // we need 2 bytes
data_ = ds.read();
} 
unsigned int raw = (data[1] << 8) + data[0];
unsigned int whole = (raw >>4);
unsigned int remain = (raw & 0X000f);
Temp_c = (raw) * 0.0625;
firstNumber = whole/10;
secondNumber = whole%10;
remainder = (remain * 10)/16;
Conv_start = false;
return;
} 

}
//************************************************************************
//*	returns the width of the character
static int	DrawBigChar(byte theChar , int xLocation)
{
int offset;
int ii;
byte	theByte;
offset = theChar *6; 
lcd.setCursor(xLocation, 0);
for (ii=0; ii<3; ii++)
{
theByte	=	pgm_read_byte_near(gBigFontAsciiTable + offset + ii);
lcd.write(theByte);
}

lcd.setCursor(xLocation, 1);
offset	+=	3;
for (ii=0; ii<3; ii++)
{
theByte	=	pgm_read_byte_near(gBigFontAsciiTable + offset + ii);
lcd.write(theByte);
}

}
// displays large font numbers
void PrintDegC(void){

lcd.setCursor(13,0);
lcd.print("o");
lcd.setCursor(8,1);
lcd.write(4);
lcd.setCursor(14,1);
lcd.write(8);
lcd.write(6);
}

//Prints current Temperature in large font
void displayBigTemp(){
DrawBigChar(firstNumber,0);
DrawBigChar(secondNumber,4);
lcd.setCursor(8,1);
lcd.write(4);
DrawBigChar(remainder,10);
PrintDegC();


}

//Timing of the fermentation 
void ferment_timing()
{
if ((millis()-start)>1000){ // timing routine
start = millis();
second++;
if (second>59){
second = 0;
minute++;
if(minute>59){
minute = 0;
hour++;
if(hour>23){
hour=0;
day++;
}
}
}
}

}

float change_temp(float& temp_change,int upper_limit,int lower_limit)
{
// Increase set temp
if (Button_repeat(Button_up)){ 
temp_change+=0.1;
if (temp_change > upper_limit)temp_change = upper_limit;
}
// decrease temp
if (Button_repeat(Button_dn)){
temp_change-=0.1;
if ( temp_change < lower_limit) temp_change = lower_limit;
}

}
void heatOff(){
digitalWrite(Heat,LOW); 
}

void heatOn(){
digitalWrite(Heat,HIGH); 
}
void coolOff(){
digitalWrite(Cool,LOW);
if (cool_on){
compTime = minute;
cool_on =false;
}
}
void coolOn(){
if ((minute - compTime)>= compDelay){
digitalWrite(Cool,HIGH);
cool_on= true;
}
}

void save_settings (int addr,int data)
{
EEPROM.write(addr,highByte(data));
EEPROM.write((addr+1),lowByte(data));

} 



void save_settings (int addr,byte data){

EEPROM.write(addr,data);

}

int change_set(byte& set_change,int upper_limit,int lower_limit,int step_size)
{
// Increase set temp
if (Button_repeat(Button_up)){
set_change+=step_size;
display_lcd(0,1," ");
}
if (set_change > upper_limit)set_change = upper_limit;

// decrease temp
if (Button_repeat(Button_dn))
{
set_change-=step_size;
display_lcd(0,1," "); 
}
if ( set_change < lower_limit) set_change = lower_limit;
}

// settings for the unit
void set(){
for(int i=0;i<3;i++){
boolean setLoop = true;
byte setting;
float settingFloat;
int settingWord;
if (i==0){
setTemp= word(EEPROM.read(50),EEPROM.read(51));
setTemp=setTemp/10.0;
while (setLoop){
display_lcd (0,0,"Set Temp = ");
lcd.print(setTemp);
change_temp(setTemp,35,2);
if(Button_hold_press(Button_nxt)){
setTemp=setTemp * 10;
settingWord = word(setTemp);
save_settings(50,settingWord);
setLoop = false;
}
}
}
if (i==1){
setting = (EEPROM.read(52));
display_lcd(0,0," ");
while (setLoop){
settingFloat =setting/10.0;
display_lcd (0,0,"Hyst = ");
lcd.print(settingFloat);
change_set(setting,20,1,1);
if(Button_hold_press(Button_nxt)){
save_settings(52,setting);
setLoop = false;
}
}

}
if (i==2){
setting = EEPROM.read(53);
display_lcd(0,0," ");
while (setLoop){
display_lcd (0,0,"Comp Delay = ");
lcd.print(setting);
change_set(setting,9,2,1);
if(Button_hold_press(Button_nxt)){
save_settings(53,setting);
setLoop = false;
setTemp = word(EEPROM.read(50),EEPROM.read(51));
setTemp = setTemp/10.0;
lcd.clear();
}
}

}
}
}
void loadSettings(){
setTemp = word(EEPROM.read(50),EEPROM.read(51))/10.0;
hyst = EEPROM.read(52)/10.0;
compDelay = EEPROM.read(53); 
}

//control process
void control(){

loadSettings();

while (run){ 
Temperature();
if (showlp){
display_lcd(0,0,"Time=");
lcd.print(day);
lcd.print(":");
lcd.print(hour);
lcd.print(":");
lcd.print(minute);
lcd.print(":");
if(second<10)lcd.print("0");
lcd.print(second);
display_lcd(0,1,"S/A=");
lcd.print(setTemp);
lcd.print("/");
lcd.print(Temp_c);
change_temp(setTemp,35,2);
if (Button_hold_press(Button_nxt)){
lcd.clear();
showlp =false;
}

}
else displayBigTemp();
ferment_timing();
if (Temp_c>=setTemp)heatOff();
if (Temp_c<=setTemp)coolOff();
if (Temp_c<=(setTemp-hyst))heatOn();
if (Temp_c>=(setTemp-hyst))coolOn();
if (Button_hold_press(Button_nxt)){
showlp = true;
lcd.clear();
}
if (Button_1sec_press(Button_prev))run= false;
}
}
void setup(){
lcd.begin(16,2);
pinMode (Button_up,INPUT);
pinMode (Button_dn,INPUT);
pinMode (Button_prev,INPUT);
pinMode (Button_nxt,INPUT);
pinMode (Heat,OUTPUT);
pinMode (Cool,OUTPUT);
pinMode (Buzz,OUTPUT);
// assignes each segment a write number

BigNumber_SendCustomChars();
setTemp = word(EEPROM.read(50),EEPROM.read(51));
setTemp = setTemp/10.0;


}

void loop(){
if (Button_1sec_press(Button_prev)){
run = true;
control();
}
if (Button_1sec_press(Button_nxt)){
set();
}

digitalWrite(Heat,LOW);
digitalWrite(Cool,LOW);
second = 0;
minute = 0;
hour = 0 ;
day = 0;
display_lcd(1,0,"Ferment Control");
display_lcd(1,1,"Set Temp = ");
lcd.print(setTemp);

}










I'm thinking I might merge the two codes as they share a fair bit and make an all in one controller. I had the LCD scramble when switching the fridge so I put a 2200uF 16v electrolytic cap across the 12v supply to de-couple it a bit more, it has seemed to fix the problem._


----------



## Edak

Good job there mate, i love the big font


----------



## RodrigoRicco

Hey Guys, I´m new here and eletronics stuffs, I´m from Brazil! Let me ask something. I have to change anything in the board to connect 2 pumps, 2 thermo heater? Or, I have to connect directly those pumps in the same conector.


----------



## vortex

vortex said:


> I'll see how they go. Not the end of the world if I need to move to SSR's but I really like the I2C interface to these.


So I ended up getting some cheap SSRs and de-soldering some of the mechanical relays:




Relay board by auvortex, on Flickr

Fucked up one of the traces by getting it too hot when desoldering, and it came away from the board. Fortunately it was just the ground, so if my dodgy fix doesn't work I can just solder to another ground point pretty easily at least!

Flickr image above doesn't work, just click the link. Have the new seppo overlords nuked external images?


----------



## digger

matho said:


> made a brauduino shield into a simple fermentation controller


I'm interested in something like this (I think, not much of a programmer so very much muddling through it). What I'm after is a device to control a ferment temp with ranges for example start ferment at 18 degrees, let naturally warm to 21 then keep it steady there till finish. 

Was considering using an rpi but am more than happy to kit up an arduino for it for sure. Any tips greatly appreciated.


----------



## vortex

Arduino can do that pretty easily at a basic level. Otherwise you could just use an STC1000, which will be easier and about the same cost. Depends if you actually want to get your hands dirty in code or not I guess.

If you're still interested in building, look for DS18B20 temp sensors, and for relays they can be controlled easily with the onboard pins.


----------



## digger

vortex said:


> Arduino can do that pretty easily at a basic level. Otherwise you could just use an STC1000, which will be easier and about the same cost. Depends if you actually want to get your hands dirty in code or not I guess.
> 
> If you're still interested in building, look for DS18B20 temp sensors, and for relays they can be controlled easily with the onboard pins.


I'm looking to more automate the entire process from pitching basically, so have something sitting there watching the temp from initial until it hits the target on it's own then kick on, rather than me have to turn something on, constantly check an stc etc.

I'm willing to learn code for it but at this stage don't really have a great deal of knowledge on it. More the hardware production side of things normally.


----------



## Edak

I want to build a raspberry pi for this AKA brewpi. 

Sent from my Nexus 4 using Tapatalk


----------



## MastersBrewery

Edak said:


> I want to build a raspberry pi for this AKA brewpi.
> 
> Sent from my Nexus 4 using Tapatalk


or you could skip the raspberry and do it all in one with this : http://arduino.cc/en/Main/ArduinoBoardTre unfortunately not shipping till US spring
(yes I caught it on the brewpi forum, but cool bit of kit)


----------



## Edak

MastersBrewery said:


> or you could skip the raspberry and do it all in one with this : http://arduino.cc/en/Main/ArduinoBoardTre unfortunately not shipping till US spring
> (yes I caught it on the brewpi forum, but cool bit of kit)


... and I bet it is going to be very expensive!


----------



## MastersBrewery

My guess around the $90: Raspberry is $50 odd, then an arduino say $10-15, so bling factor and the no f#*king around with multiple boards, cables, and power supplies, costs $30, oh and for the brewpi project I was looking at a usb hub to break out a second board for 2nd ferm chamber, this would skip that, as it has 4 host ports instead of 2 on the pi. I supose we'll see early next year.


----------



## Edak

Yeah and then the year after for it to be supported by brewpi project


----------



## lael

Be nice if they included wifi on it like the spark core!


----------



## Edak

I really like the idea of spark core, I wish they had been around when building controllers for fermenting fridge and keezer. No more dismantling boxes to reprogram.


----------



## vortex

I don't like the Tre. Seems like a hack to try and win back some of the RasPi crowd back to an Arduino based device.

My Arduinos basically went in the bin when I got my RasPi's and BeagleBone's (white and black) and I don't see them ever coming out again. Doesn't make sense to me to plug an Arduino into a RasPi like in BrewPi when the RasPi can do everything the Arduino can do..


----------



## MastersBrewery

lael said:


> Be nice if they included wifi on it like the spark core!


Has a dedicated wireless port ... Xbee I think was mentioned though I don't know what protocols that uses

Ed. I do agree wifi should have been included on board and was a glaring omission on the Raspberrypi for the very reasons Edak mentions, even if you just want a standalone device, the ease of reprogramming is obvious


----------



## Edak

The benefit of having Arduino connected to raspberry pi is that a more complex system is more likely to fail and thus in the event of failure or lock up of the processor, the low level operations will always run and control beer comfortably.


----------

