Brew computer Mk 2

The forum for discussing all kinds of brewing paraphernalia.
Toby

Re: Brew computer Mk 2

Post by Toby » Tue Apr 20, 2010 8:05 am

That looks nice. Have you had a look at BrewTroller (www.brewtroller.com), I've got one and very impressed with level of functionality and importantly the level of support from the community around it.

User avatar
awalker
Under the Table
Posts: 1018
Joined: Fri Apr 20, 2007 1:57 pm
Location: Colchester, Essex

Re: Brew computer Mk 2

Post by awalker » Tue Apr 20, 2010 8:48 am

Toby wrote:That looks nice. Have you had a look at BrewTroller (http://www.brewtroller.com), I've got one and very impressed with level of functionality and importantly the level of support from the community around it.

Looks great Toby

Not as fun as making your own though *** Thinks a frustrated former electronic/software engineer ***
Fermenter(s): Lambic, Wheat beer, Amrillo/Cascade Beer
Cornys: Hobgoblin clone, Four Shades Stout, Wheat Beer, Amarillo/Cascade Ale, Apple Wine, Cider, Damson Wine, Ginger Beer

JamesE

Re: Brew computer Mk 2

Post by JamesE » Tue Apr 20, 2010 10:21 am

Hi Howard,

The stand alone ATMega looks interesting. I have been thinking about just such a thing using an ATMega328 on its own. I already have an Arduino Duemilanove so I figure that I can just swap the chips around and use the board to upload via USB. Do you think this would work? From your schematic I see all that is needed external to the chip is the 16Mhz crystal and power supply.

Funnily enough I also just breadboarded a bathroom scale hack for mash tun level measurement. After cleaning away years of crusty talcum power I cut off the original electronics and replaced with an instrumentation amplifier to give 0-5 V for the Arduino in the range 0-40Kg. Hopefully I'll test it on the next brew.

James

Toby

Re: Brew computer Mk 2

Post by Toby » Tue Apr 20, 2010 12:54 pm

awalker wrote:
Toby wrote:That looks nice. Have you had a look at BrewTroller (http://www.brewtroller.com), I've got one and very impressed with level of functionality and importantly the level of support from the community around it.

Looks great Toby

Not as fun as making your own though *** Thinks a frustrated former electronic/software engineer ***
I Know exactly what you mean, unfortunately I've not got the time to code at home anymore, mainly due to young kids and a stupid commute, or more importantly, the electronic engineering skills. I've got a large graveyard of unfinished ambitous 'home coding projects', always the case that once I crack the hard / interesting part of the project motivation fails.

adm

Re: Brew computer Mk 2

Post by adm » Tue Apr 20, 2010 3:59 pm

awalker wrote:Excellent thanks for sharing.
Have received my freebies temp sensing just need to get stuckin and do it.
Is there a link for the free Maxim parts anywhere.....I can't seem to find that offer on their (US) website..?

JackA

Re: Brew computer Mk 2

Post by JackA » Tue Apr 20, 2010 9:01 pm

This is the part I have ordered for reading a K-type thermocouple:
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3194/t/or

Just click the sample button.

Here is a list of all the different temperature related chips they make:
http://para.maxim-ic.com/en/search.mvp? ... ree=master

adm

Re: Brew computer Mk 2

Post by adm » Tue Apr 20, 2010 9:22 pm

Thanks. I'm going to order up some of the 1-wire digital sensors and have a play with the Arduino reading them and then see if I can get it to fire solenoid valves and SSRs.....

Now....who knows how to write the code for a PID controller....?

adm

Re: Brew computer Mk 2

Post by adm » Tue Apr 20, 2010 9:52 pm

OK, so here's where i start showing my complete ignorance of all things programming related.

The hardware side of things I am comfortable with, but as soon as I start seeing the "squiggly bracket code".....I start to lose it.

The only time I have EVER written code in my life was good old BASIC many, many years ago - and also test programs for old Marconi System 80 in-circuit test systems back in the mid 80s....in their own screwed up language ("Incite" I think it was called).

Anyway - first dumb question: Howard - what language is the code example you posted written in? Is it C++ or something similar. I have just downloaded the "Processing" development environment and am having a play around with that and your code looks very similar. But then Processing says it's very similar to Java..... All the variable setup bits i kind of get, but when the squigglies start showing up I realise I need to do some serious background reading....

So seeing as I need to learn basic squiggly programming, I might as well learn the right language straight off the bat! Should it be Java, C++ or something totally different?

JamesE

Re: Brew computer Mk 2

Post by JamesE » Tue Apr 20, 2010 10:29 pm

The Arduino language is based on C/C++ so I think this would be the best for you to look at.

I'm not an expert but I've used both Arduino and Processing a bit. There is a relationship between the two environments in the sense that Arduino is based on Processing. Processing is more for graphics/animation whereas Arduino is more for embedded electronics programming. Although the two codes look very similar, the Processing code is actually converted to Java code when you run the sketch (press play in the environment). On the contrary, Arduino code is converted to some sort of machine code that will run on the ATMega chips. Learning some C/C++ will definitely be useful.

Also, from your previous post, I tried and failed to get free OneWire samples from Maxim. I ended up buying from http://www.sparkfun.com which is worth taking a look at anyway - loads of geeky stuff on there!

Finally, for PID code, there is at least one library already existing for Arduino. I didn't use it yet but intend to upgrade my on/off controller code to PID using this library soon. http://www.arduino.cc/playground/Code/PIDLibrary

adm

Re: Brew computer Mk 2

Post by adm » Tue Apr 20, 2010 10:48 pm

Excellent - thanks James!

I'm off to go and find some C/C++ beginners resources. Luckily enough, there seems to be plenty of stuff out there.

And that sparkfun website looks cool. I'm already thinking about how to use a barometric pressure sensor to measure liquid volumes.....it would be nice to be able to control the water input to the HLT, and then pump volumes from one vessel to another. I can see this project might start to get complicated....

howard

Re: Brew computer Mk 2

Post by howard » Wed Apr 21, 2010 4:13 pm

Yes it is all written in C. Luckily the Arduino development environment does not contain that many commands, so once you get used to putting a ; at the end of every line, and stay well away from pointers to arrays of pointers, it is easy to learn.

There are 2 pieces of code in the controller chip, the bootloader and the user code. You can buy a ATmega328 with the bootloader for about £5, or you can get it without and build one of these - http://arduino.cc/en/Hacking/ParallelProgrammer. After this you can load the compiled code from the PC. To program I take the ATmega out my Ardunio then connect the TX and RX via the USB connector on the veroboard version to the TX and RX pins on the Ardunio. To program you compile and upload from the PC, then press the reset button. I seem to have made it sound far harder than it is.

I got my temp sensors from Farnell, and a lot of the other bits as well. Bitsbox http://www.bitsbox.co.uk/ is also a good source.

I looked at the BrewTroller and also have looked at Halflucks http://www.halfluck.com/automation/habs setup, but decided I want something a bit different.

My digital scales are coming along nicely, unfortunetly I might not get them finished this week as I have a business trip to China (Ash allowing) on Sat.

adm

Re: Brew computer Mk 2

Post by adm » Wed Apr 21, 2010 4:31 pm

Thanks Howard,

I'm getting along OK with this lark now......I loaded up the Xcode development tools on my Mac and I've been working through some basic C programming tutorials this morning. It's quite fun actually.....and I wrote the code for a calculator this morning. WooHoo!

I'm waiting on the arrival of an Arduino Duemilanove board from Hong Kong, but in the meantime I've got the Processing IDE and also the Arduino IDE downloaded. I had a good tinker with Processing, but as it seems so focussed on graphics, I thought I'd just skip straight to C and start to learn the basics of that instead.

I've also got some sensors and other bits and pieces on order, so once all the hardware arrives, it should be a simple case of hooking up the USB to the Mac and start messing around....

I was thinking about how to measure the amount of wort in the HLT - obviously you're thinking the same with the bathroom scale idea, although in my new brewery project I don't think I'll be able to measure the weight of the HLT, so I'm wondering if it's possible to incorporate a tube from the bottom of the HLT that is sealed at the top and incorporates a barometric pressure sensor so that as the HLT fills, the water column compresses the air in the tube to give a value from the sensor that can then be converted into a volume of liquid. Fun, fun, fun......

Toby

Re: Brew computer Mk 2

Post by Toby » Wed Apr 21, 2010 8:18 pm

Pressure sensors work pretty well for measuring the volume in the HLT, I've got them set up for both the HLT and the Boiler. There are some good single chip dual port pressure sensors, but you need to calibrate them to get accurate readings.

howard

Re: Brew computer Mk 2

Post by howard » Wed Apr 21, 2010 8:19 pm

Yep - I've seen a few pressure based solutions for measuring volume but you have to watch the temperature range. My scales do 150 kG so I guess with a steel HLT of say 50 kG you could still do 100l. For really big stuff you can put a scale under each to the 4 legs, you then get a total of 600 kG. If anyone want to give it a go I can make the electronics, for say a barrel a month for the next year :D

adm

Re: Brew computer Mk 2

Post by adm » Sat May 01, 2010 9:52 pm

OK....I've got the Arduino board, a grab bag full of assorted components, some Dallas 1 wire digital temperature sensors (which is a total lie as they need 3 wires) and I'm now learning how to make it all talk properly.

So far, i can read temperatures and make LEDs flash accordingly (which is me simulating solenoid valves....).

Next question.....does anybody know of any digital flow sensors that might be suitable for this kind of application?

Ideally, I'd like to be able to programme the system to do something like "fill HLT with 50 litres" or "pump 50 litres from vessel A to vessel B".......but how does one measure the flow volume? Are there any halfway decently priced digital flow sensors that could be used, or does it need to be a (weight 1) - (weight 2) calculation to figure out how much liquid has gone from A to B? I presume that flow measurement means some kind of impeller in the liquid flow - or are there any purely optical options?

Any ideas?

Post Reply