Brewbot Module

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Jared311

Well-Known Member
Joined
Feb 28, 2008
Messages
500
Reaction score
2
Location
Columbia, MD
Hey Folks,

As if I don't have enough work on my hands building my HERMS, I am also designing a temperature regulating module in parallel. The best part is my CS buddy is going to team up with me and do all the JAVA / GUI code. Below are some of the essential notes from our kick off meeting. More to come!

Hardware:

* Custom designed PCB
* Microcontroller with built in ADC's
* 4MHz crystal oscillator
* Bluetooth transceiver with antenna for serial communication with PC
* Mutiple input ports for thermocouples
* I/O Terminals for control of additional devices i.e. pumps, solenoids
* AC-DC & DC-DC converters to be capable of running on 120VAC
* Serial port for debugging and optional communication with PC
* LCD display for module status
* Single tone speaker for audible warnings

Software:

* JAVA GUI based
* Takes incoming data and converts it to temperatures using polynomial fit
* Generates real time plots and other visual features
* User configures software based on their brewery i.e. number of sensors, sensor locations, pump usage
* User inputs batch parameters i.e. mash time, mash temp, hop schedule
* Software communicates to microcontroller when necessary and gives commands based on configuration. i.e. modulate pump for heat exchanger, activate solenoids, turn on heating elements
* Software stores all gathered information into an XML file (Batch Log) that can be loaded later within the same software

Please let me know if there are any additional features that you would want to have if you were to have one of these modules in your setup.

Brewbots roll out!
:rockin:
 
i'm not sure what exactly is going on there, but does this thing regulate your temp or what exactly? i'm interested. i shouldnt be this confused about anything related to beer!
 
Yes, the main feature is that it will monitor temperature and regulate it. If you have electric heating elements, you could have the software fire relays that pass the AC voltage. Or if you have a pump that controls your HLT heat exchanger you could have a relay to that as well. Eventually I am going to replace all my valves with solenoids so that the software could even automate the entire brewing process with precise control.
 
Sounds somewhat similar to a project I started a while back: microcontroller-based board with USB communication with PC, with character LCD and menu buttons for standalone use, with SD card for long-term datalogging, plenty of analog inputs for temperature sensors, a couple relay outputs, and plenty of spare I/O pins for whatever else. I made the PCB, populated it, got it displaying stuff, logging temperature, communicating with PC and displaying temperature graphs... And then sort of lost motivation, as I so often do - partly because I'm a hardware guy, and the prospect of having many hours of additional programming when the hardware was all finished wasn't so thrilling.
 
Might a thermistor make more sense in this application than a thermocouple? Thermocouples tend to be for up to several hundred degrees C and you're talking about probably no more than 110C (If you go all the way to boil, I don't know all your acronyms but I get a feeling this may be for mashing and maybe boiling?) I also think thermistors tend to be cheaper than thermocouples. I was thinking of something along the lines of this for a fermentation control system (central air for maybe 4 different fermentations).
 
Why not brew beer by hand???? I like the brewing process, why the *uck would you want to automate the whole shebang? Way to much for me!
 
Why not brew beer by hand???? I like the brewing process, why the *uck would you want to automate the whole shebang? Way to much for me!
I get the strangest feeling you're not an engineer... Some of us have as much fun tinkering with gadgets to make the process easier as we do with the brewing itself. The more automation you introduce, the more precise control and repeatability you can have over the process. Of course it's not for everyone, but as a geek I love having more ways to monitor what's going on, and more ways to control it.

A few years back I bought a supercharger for my car. The day it arrived, someone I knew was dumbfounded at why I would want such a thing - she honestly did not see any point whatsoever to giving a car more power when it was already able to get you from point A to point B. The concept of driving enjoyment with a more powerful car was completely foreign to her. One comment was "Why on earth would you want that, so you can speed illegally?". Different strokes for different folks!
 
KB12 said:
Might a thermistor make more sense in this application than a thermocouple? Thermocouples tend to be for up to several hundred degrees C and you're talking about probably no more than 110C (If you go all the way to boil, I don't know all your acronyms but I get a feeling this may be for mashing and maybe boiling?) I also think thermistors tend to be cheaper than thermocouples.
I haven't ruled out the idea of a thermistor entirely. The only way I can even use a thermocouple is if I am able to design an extremely low offset amplifier circuit. Otherwise I will probably use thermistors mounted in thermowells and use some sort of constant current IC and measure the voltage still with the ADC. I did order a nice looking thermocouple off ebay for $6 and am going to test it out to see how feasible it is for this design. To answer your second question, this module will be used in the hot liquor tank, mash lauter tun, boiling pot, and perhaps during fermentation as well.


Why not brew beer by hand???? I like the brewing process, why the *uck would you want to automate the whole shebang? Way to much for me!
Its amazing how if you switch all the valves from manual to auto that people think the entire process has changed. Its still very much hands on. The difference is that software would allow you to control the valves so that you couldn't open the wrong valve at the wrong time. Relax, I love brewing and being involved in the batch.
 
Might a thermistor make more sense in this application than a thermocouple?

I get 0.03°C accuracy out of my Maxim DS1624s on my Arduino.

I'm moving all of my sensors (from thermistors, then LM35s) to DS1624. They're $8 each, but the samples were free (-:

(they are, however, a few orders of magnitude harder to read than the previous sensors)

S
 
I get 0.03°C accuracy out of my Maxim DS1624s on my Arduino.
What application are you using these for? Those ICs have a built in thermal sensor so you can only measure ambient temperatures. Although, I wonder if you could just mount these in a thermowell and obtain similar accuracy. Now they don't actually mention the SPI protocol in their datasheet, but it seems that is the method they are using for serial communication. If so, that would be great because I have a ton of assembly code I have written in the past for SPI interfaces.
 
They use I2C (or TWI/Two-Wire).

I'm still building mine, but the first one, I've embedded in a capped 1/2" copper pipe and filled the wire side with epoxy. The copper is a good thermal conductor, so it's still very responsive.

I intend to place one in my fermenter fridge, one in my kegerator, and one in the room for ambient.

I'll also semi-automate my mash/boil with one in the mash tun (for HERMS) and another in the boil kettle for cooling. The kettle, I'm considering putting into a thermowell, yes.

S
 
LM35s are temperature controlled voltage regulators. I used LM34s which is the same thing but the out is in F not C. Anyways they would work fine for the longest time and then occasionally they would start to remp up and max out. I dont know if it was moisture or my supply voltage but it became a major pain in the butt. Ended up going back to type K thermocouplers.
 
My LM35s are very noisy.

I'd expect the green line to be much smoother (though the cable to the fermenter is not shielded, and it's ~4m long):

keg-3600.png


Which is part of why I'm switching to DS1624s.

I'm fermenting a lager (-:

S
 
My LM35s are very noisy. I'd expect the green line to be much smoother (though the cable to the fermenter is not shielded, and it's ~4m long)
What's your sampling rate of data that you displayed on the plot? At first glance it seems like maybe you aren't sampling fast enough and so you are getting square like features in your wave forms. I also noticed that if you look at the data from a distance it follows an almost sine wave like pattern which could be due to your temperature regulation. The last question I have is where was the sensor located and how was it mounted?
 
Well, that was just a visual representation. The LM35, measured directly is noisy. It's analog, so <shrug/> close enough for most applications, though.

Anyway, yes, the sine wave is due to temperature regulation. Here's 6 hours:
keg-21600.png


It is sampled 500 times and averaged, once per minute (to get that plot):
Code:
  for (int i=0; i<BEER_CONTROLLER_TEMP_SAMPLE; i++) {
    aRead = aRead + ( 5.0 * analogRead(_sensorPin) * 100.0) * 10.0 / 1024.0;
  }
  aRead = aRead / BEER_CONTROLLER_TEMP_SAMPLE;

Mounting is semi-insulated within my fermentation fridge (has a pad of foam on it, and is pressed up against the carboy that's fermenting right now).

If I sample twice, immediately, it can swing by as much as 1.5°C. The sampling+average dampens the noise.

The DS1624s, on the other hand, give very consistent and accurate results. (-:

S
 
I too have noticed that those LM35's are pretty unstable. I always assumed it was because I was using them on a breadboard with a less-than-optimal power supply and filtering and that if I treated them right they'd be more stable/accurate... Guess that's not the case?

Someone really needs to make a temp sensor that's more useful for these kind of apps with features like:
1) Accurate and stable
2) In a small case with leads on one side (like the LM35) suitable for sticking in a probe
3) Digital interface (preferably I2C)
4) Linear, so no fancy math required on the microcontroller side except perhaps a simple offset correction for calibration
5) Cheap - a buck or two, none of this $8/ea crap.
 
I think I am going to order a couple of those DS1624s and see what kind of readings I can get within a thermowell.
 
Request samples from maxim.com it takes a while, but they're free
Thanks, I will give that a try.

Update:

Haha I clicked on the link and it brought me to Maxim Magizines website. I wish I could request some samples from them... ;)
 
I too have noticed that those LM35's are pretty unstable. I always assumed it was because I was using them on a breadboard with a less-than-optimal power supply and filtering and that if I treated them right they'd be more stable/accurate... Guess that's not the case?

I dont know, I had mine directly powered by a wall-wort with minimal filtering too. The thing woud be dead nuts on and then after a few weeks it would start to rail high. I always thought it had something to do with condensation forming on the leads.
 
I dont know, I had mine directly powered by a wall-wort with minimal filtering too. The thing woud be dead nuts on and then after a few weeks it would start to rail high. I always thought it had something to do with condensation forming on the leads.
When you were making measurements, did you continuously power the IC or only when making a measurememt? I am guessing its better to power it down when you aren't using the sensor. Maybe if you leave it running it will heat up and cause the voltage to ramp. When I work with thermistors or thermocouples we always make sure to only bias them when making a measurement to prevent offsets.
 
When you were making measurements, did you continuously power the IC or only when making a measurememt? I am guessing its better to power it down when you aren't using the sensor. Maybe if you leave it running it will heat up and cause the voltage to ramp. When I work with thermistors or thermocouples we always make sure to only bias them when making a measurement to prevent offsets.

Continuous, They draw microamps so the potential for heat build up is minimal. I dont know why it failed but I had two do the same thing. We use them at my place of work to monitor temps around the building for over a year and the trends never show the eratic feedback I was getting. I am thinking it was my choice of power supply.
 
Perhaps with a better regulated power supply with good decoupling caps, and also a smoothing cap or RC low-pass on the sensor output, the LM35 might do better?
 
I requested some samples of the DS1624s. As soon as they get here I will give them a shot. I haven't thought about it enough yet, but I am planning on mounting them in a thermowell. I will probably end up soldering them onto a tiny pcb that has some sort of mechanical connection. This way I can remove them without having to remove a bunch thermal epoxy. If anyone has a better idea, I am all ears.
 
Concerning the LM35 and with any analogue / digital IC's, I'd use a 7805 or similar voltage regulator with good sized uF caps on both sides of the 7805. Make sure to use .1uF caps across all IC supply voltage pins, including the LM35. You could plop a cap after the output of the LM35 to average the reading.

From the graphs, it looks like you may also try increasing your ADC granularity. ADC's generally have a optimal reference voltage. Adjust your sample voltage from the LM35 up to that reference voltage. Stick an op amp between the LM35 and the ADC, and adjust the gain to "spread" the analogue signal out over all the bits of your ADC. I.E., on a fermenter/fridge, you max temp might be 60F/15C. If your ADC reference voltage is 5vdc, then make your op amp out read 5v at 60F/15C. On a 10 bit ADC then your granularity would by 15C/1024 = .015 deg/bit.

On the software side, use a summing register to sum up and average the readings. Also the LSB of the ADC is always flakey. It WILL twiddle between 0 to 1 when your temperature signal is on the bit's cusp. Try lobbing off the last bit off the ADC by masking it off in software. Your granularity will double to .03 deg / bit, but in reality that is all most ADC's can accurately do.

Physically speaking, I found the LM35 to be very quickly responsive to temperature changes. To get a more accurate reading, try (1) keeping the LM35 dry, and (2) add a thermal mass, AKA a heatsink, or chunk of copper to the LM35.

Don't use thermistors for direct readings. They are not linear, and the math needed to correctly determine the readings is intense (lots of e's and logs, and the such). They are however great for simple thermostats, where you 're less concerned with the absolute temperature, and you're just trying to keep the temperature at a certain relative set point. Thermistors not correctly implimented can self heat pretty bad too.

my $0.02
 
Sounds like an ambitious project with ground up hardware design, might be easier to use existing I/O boards and design interfaces to fit sensors. Have a similar project under construction with industrial hardware and code in C++ that has taken a while to complete. Would like to be able to upload a Promash brewing session file to control program and let system do the drudge work watching flows, temps and levels while i have other things to do.
 
Back
Top