Ss Brewing Technologies Giveaway!

Home Brew Forums > Home Brewing Beer > Electric Brewing > Arduino, PID, or other?
Reply
 
LinkBack Thread Tools
Old 03-22-2012, 04:29 PM   #51
jpalarchio
Feedback Score: 1 reviews
Recipes 
 
Join Date: Jan 2009
Location: Holly, MI
Posts: 542
Liked 48 Times on 39 Posts
Likes Given: 10

Default

An I2C LCD and I2C rotary encoder / button pad will also cut down on your pins too. I2C only takes a couple pins.

Look at something like this: http://spikenzielabs.com/SpikenzieLabs/I2C-SPI_LCD.html

You can find I2C backpacks for many of the common LCD types.

__________________
jpalarchio is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 06:51 PM   #52
Islandboy85
Feedback Score: 0 reviews
Recipes 
 
Join Date: Nov 2009
Location: Dallas, Texas
Posts: 634
Liked 8 Times on 7 Posts
Likes Given: 1

Default

Quote:
Originally Posted by ScottSingleton
When you're making your list of your I/O needs do know that the DS18B20 temperature probes only use one I/O. They're one-wire technology and you can run many on one I/O port. The only downside is the actual time it takes to poll the chip since you can only poll one at a time and I think it takes about 700-750ms for one to respond.

So if you had 5 temp probes on one I/O to get a reading from each would take about 3.5 seconds total from start to finish. -- but only using one I/O is pretty nifty.
That's awesome. I just read here http://www.adafruit.com/products/642 that they have individual is numbers. I was wondering how the system would know the difference in which sensor was sending he signal. The 3.5 second time wouldn't be much of an issue I would think with a kettle and HLT, buy may be woryh separating the RIMS RTD for faster response. I will need to go home tonight and have a beer after the gym and read up on how multiplying works.
__________________
Islandboy85 is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 07:05 PM   #53
trigger
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2010
Location: portland
Posts: 628
Liked 5 Times on 5 Posts
Likes Given: 2

Default

If you're for sure going to have a 3 vessel rims with that many sensors, pumps, etc. and going to use a graphic LCD I would highly recommend going with the MEGA. The uno is great, but the MEGA 2560 has 4 times the SRAM. You might be able to get away with muxing inputs on the uno, but if your sketch overflows the RAM it's just not going to run properly. You could get creative with your programming, but for $20 more you'll have a lot more I/Os and less concern about running into problems with the RAM.

__________________

The power to tax, once conceded, has no limits; it contains until it destroys. I was not joking when I told them to dig into their own pouches. It may not be possible to do away with government — sometimes I think that government is an inescapable disease of human beings. But it may be possible to keep it small and starved and inoffensive — and can you think of a better way than by requiring the governors themselves to pay the costs of their antisocial hobby?

R. A. Heinlein

trigger is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 07:05 PM   #54
jpalarchio
Feedback Score: 1 reviews
Recipes 
 
Join Date: Jan 2009
Location: Holly, MI
Posts: 542
Liked 48 Times on 39 Posts
Likes Given: 10

Default

Basically each sensor has a unique address (sort of like the MAC address on a network card) and you query each sensor by it's address.

Getting the one-wire sensors working on the Arduino is real straight forward and there are tons of code samples out there. Seems about everyone with an Arduino wants to measure temperature and put it on an LCD.

It'll probably be a little easier to understand when you have an Arduino and sensor to play with. I know the Microcenter by me had Arduino UNOs for $15 for a while which was a real good price; I think they're back to about twice that again. The one-wire sensors can bad had for about $2 each on eBay if you're willing to wait 4-6 weeks from China. This is for a bare sensor, no wiring or probe or anything. If you're going to use them in kettles, I'd recommend looking at the sensors or at least the stainless temperature probes from Brewers Hardware.

Keep in mind there is both a DS18S20 and DS18B20 sensor and their resolution is different and thus your code could vary.

__________________
jpalarchio is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 07:16 PM   #55
ScottSingleton
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2012
Location: Manassas, VA
Posts: 438
Liked 7 Times on 6 Posts
Likes Given: 11

Default

I know we're getting way off-track here but I do love the one-wire solutions

I bought my temp sensors from Brewershardware.com. He mounts the DS18B20s in a SS thermoprobe and glues them up. I just wired them into my bus with a 4.7K resistor bridging the I/O line and the 5v feed from the controller. This allows the DS18s to draw current from the board.

Each DS18 has a unique address (which you can poll through code to get)

The pseudo code is something like this

Assign one-wire interface to I/O pin

send Reset command
send DS18 ROM address to I/O
Tell DS18 to get Temp

send Reset Command
send DS18 ROM address to I/O
read scratchpad from ROM


That's it. Each time you send a command you basically send a reset, then the Rom address, then the command you want that particular chip to perform.

if you only have one temp sensor on the IO then you send a generic (I think it's xFF) to the bus then the command and the sensor respond. I believe that doing that with multiples on the same IO causes a collision on the line.

There is TONS of code out there for the one-wire temp sensors. Really easy to wrap your head around once you start playing with it.


I have 5 temp sensors in my Rig right now running off of two I/Os.

The first one is the HLT which has a sensor in the tank through the sight glass 'T' and one in the RIMS. The RIMS sensor controls the RIMS PID and the tank is just for display.

That same principal runs on the I/O for the MLT except the third sensor is for the Boil kettle for monitoring.

__________________
ScottSingleton is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 07:44 PM   #56
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

One thing I have noticed about the code for the ds18b20 in arduino is that it is mainly focused on the parasitic mode and the code pauses for the 750ms that conversion takes which really slows down the loop. If you have a ds18b20 in powered mode you can use the readbit command to identify if conversion has taken place, you start conversion, then readbit command will return a 1 if conversion is comlete or a 0 if it isn't so you don't need to wait for conversion to happen just keep on polling it until conversion has taken place then read the temp. This is a bit tricky when you have multiple sensors but you could also use the 'skip rom' command and then the 'start conversion' command to start all the sensors then come back in 1 second and individually read each sensor, this will free up time for other bits of code to be executed whilst conversion is taking place.

__________________
matho is offline
 
Reply With Quote Quick reply to this message
Old 03-22-2012, 09:47 PM   #57
Islandboy85
Feedback Score: 0 reviews
Recipes 
 
Join Date: Nov 2009
Location: Dallas, Texas
Posts: 634
Liked 8 Times on 7 Posts
Likes Given: 1

Default

Quote:
Originally Posted by trigger
If you're for sure going to have a 3 vessel rims with that many sensors, pumps, etc. and going to use a graphic LCD I would highly recommend going with the MEGA. The uno is great, but the MEGA 2560 has 4 times the SRAM. You might be able to get away with muxing inputs on the uno, but if your sketch overflows the RAM it's just not going to run properly. You could get creative with your programming, but for $20 more you'll have a lot more I/Os and less concern about running into problems with the RAM.
I had planned on using the mega after seeing how many I/o it had. One down side is that the Arduino compatible 4.2" touch screen I was looking at runs halfthe speed on the mega for some reason, but I suppose that's not a big deal since I won't be writing in it or drawing pictures.
__________________
Islandboy85 is offline
 
Reply With Quote Quick reply to this message
Old 03-23-2012, 12:22 AM   #58
ScottSingleton
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2012
Location: Manassas, VA
Posts: 438
Liked 7 Times on 6 Posts
Likes Given: 11

Default

we really need to get an automation Forum here... these kids of posts aren't just for electric brewers; heck I'm a hybrid direct fire assisted RIMS.

__________________
ScottSingleton is offline
 
Reply With Quote Quick reply to this message
Old 03-23-2012, 12:27 AM   #59
EFaden
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2006
Location: Rochester, New York
Posts: 546
Liked 12 Times on 12 Posts
Likes Given: 1

Default

Quote:
Originally Posted by ScottSingleton View Post
we really need to get an automation Forum here... these kids of posts aren't just for electric brewers; heck I'm a hybrid direct fire assisted RIMS.
+1.. I'd love to see an automation specific forum.
__________________

-Eric

EFaden is offline
 
Reply With Quote Quick reply to this message
Old 03-23-2012, 12:28 AM   #60
jpalarchio
Feedback Score: 1 reviews
Recipes 
 
Join Date: Jan 2009
Location: Holly, MI
Posts: 542
Liked 48 Times on 39 Posts
Likes Given: 10

Default

Agreed

__________________
jpalarchio is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino driving an SSR thomashp Electric Brewing 4 11-08-2010 06:00 AM