Ss Brewing Technologies Giveaway!

Home Brew Forums > Home Brewing Beer > DIY Projects > Arduino and two elements
Reply
 
LinkBack Thread Tools
Old 06-12-2012, 02:05 AM   #1
GriFF3n
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2011
Location: Belcamp, Maryland
Posts: 11
Default Arduino and two elements

I'm looking to do a project with my Arduino to control my HLT. I built a kettle following disintegr8tor's How To and it works great. I'd like to control the two elements with a single arduino and temp probe. I've found how to control one relay with an arduino, but not how to control two . I'd like to control both with a single digital output, but am not sure how to connect the two relays. I'm thinking I can just branch off of the connection between the transistor base and resistor and then mirror what is happening on the other side. Was going to use mechanical relays too. Does this sound right? (Ugly sketch I know)

__________________
GriFF3n is offline
 
Reply With Quote Quick reply to this message
Old 06-12-2012, 04:35 AM   #2
lincoln
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
lincoln's Avatar
Recipes 
 
Join Date: Dec 2009
Location: san jose, ca
Posts: 205
Liked 4 Times on 4 Posts
Likes Given: 1

Default

Yes that will work. Also depending on how much current the coils draw and how much the transistor can dissipate you can wire the coils in parallel and only have one transistor. It depends on the accentual parts used. If you have the part numbers I can look it up.

__________________
Quote:
Originally Posted by Atonk View Post
... beer perv i guess that's me
lincoln is offline
GriFF3n Likes This 
Reply With Quote Quick reply to this message
Old 06-12-2012, 06:25 AM   #3
berndtr
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2012
Location: Klamath Falls, Oregon
Posts: 13
Liked 1 Times on 1 Posts
Likes Given: 3

Default

I would use mosfets instead of bjt's as the arduino pins are too fond of current being pulled through them.

__________________
berndtr is offline
GriFF3n Likes This 
Reply With Quote Quick reply to this message
Old 06-12-2012, 07:28 AM   #4
BetterSense
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2011
Location: Richardson, Texas
Posts: 977
Liked 45 Times on 35 Posts
Likes Given: 3

Default

AVRs can output about 20mA. This is enough to drive most small transistors. Lots of people use transistors with AVR microcontrollers; darlingtons are popular because of the high gain.

Is there a reason you want to use 2 relays? If your relay can handle it, why not run both elements off one relay?

__________________
BetterSense is offline
GriFF3n Likes This 
Reply With Quote Quick reply to this message
Old 06-12-2012, 08:07 AM   #5
Yuri_Rage
Gritty.
HBT_MODERATOR.png
Feedback Score: 0 reviews
 
Yuri_Rage's Avatar
Recipes 
 
Join Date: Jul 2006
Location: Southwest
Posts: 13,916
Liked 607 Times on 376 Posts
Likes Given: 54

Default

You have a number of options at hand:

One output, one SSR relay, one or more current draw - easiest

One output, one transistor, one mechanical relay, one or more current draws - second most complex

One output, one (or more) transistors, one (or more) mechanical relays, multiple current draws - next most complex

Two outputs, two SSRs, multiple current draws - rather easy in the grand scheme

Two outputs, two (or more) transistors, two (or more) mechanical relays, multiple current draws - likely a lot of complexity where less would suffice.

__________________
Homebrewed Blog..........YouTube Channel .......... Shirts, posters, etc
Yuri_Rage is offline
GriFF3n Likes This 
Reply With Quote Quick reply to this message
Old 06-12-2012, 01:25 PM   #6
gx1400
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2012
Location: Kansas City, Missouri
Posts: 52
Liked 1 Times on 1 Posts

Default

I second the FET idea. Here is my relay driver I use on a regular basis straight from work. Excuse the interpage connect... basically its a 1k ohm resister to the gate of an Si2318DS N-channel FET that switches ground on the coil of the relay.

I use some pretty expensive Teledyne relays for high reliability applications, but this should work for anything without too ridiculous of a coil current.

relay-control-fet.jpg  
__________________
gx1400 is offline
 
Reply With Quote Quick reply to this message
Old 06-12-2012, 01:31 PM   #7
gx1400
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2012
Location: Kansas City, Missouri
Posts: 52
Liked 1 Times on 1 Posts

Default

Quote:
Originally Posted by BetterSense View Post
AVRs can output about 20mA. This is enough to drive most small transistors. Lots of people use transistors with AVR microcontrollers; darlingtons are popular because of the high gain.

Is there a reason you want to use 2 relays? If your relay can handle it, why not run both elements off one relay?
And this!

DPDT relay will give you two switchable lines to work with.
__________________
gx1400 is offline
 
Reply With Quote Quick reply to this message
Old 06-12-2012, 02:14 PM   #8
GriFF3n
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2011
Location: Belcamp, Maryland
Posts: 11
Default

Wow, so many responses! Love this forum!

Here are the relays I intend to use: DIGIKEY.

I will be using two relays because I want the ability to bypass one of them to have on when it is time to actually boil. The Arduino control will be done with a temperature sensor. I will set the temperature to my strike temp and have the elements on until it reaches that temp, then turn off. I will then mash and heat sparge water with a second temperature setting. Once I am done collecting my runnings I will bypass the arduino and have one element fully on.

I will have to research FETS, I've never used them before.

I'll have to draw up my full schematic here so everyone can see what I am trying to do. Thanks again for all the advice fellas!

__________________
GriFF3n is offline
 
Reply With Quote Quick reply to this message
Old 06-12-2012, 02:21 PM   #9
berndtr
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2012
Location: Klamath Falls, Oregon
Posts: 13
Liked 1 Times on 1 Posts
Likes Given: 3

Default

N-channel fets are pretty straight forward, put voltage on the gate and current passes from drain to source with a little voltage drop across the device.

__________________
berndtr is offline
 
Reply With Quote Quick reply to this message
Old 06-12-2012, 02:40 PM   #10
gx1400
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2012
Location: Kansas City, Missouri
Posts: 52
Liked 1 Times on 1 Posts

Default

Quote:
Originally Posted by berndtr View Post
N-channel fets are pretty straight forward, put voltage on the gate and current passes from drain to source with a little voltage drop across the device.
As he said, FETs are nice, simple switches. They have the advantage over BJTs of having a high input impedance, so there is very little current draw on the Gate-Source junction.

That relay should work, it is rated for 30A, so make sure you consider that if you ever plan to upgrade to higher rated elements. It doesn't look like there is any diode protection for the coil collapse so be sure to throw some fast switching diodes like a 1N914 reverse biased across the coil do you don't fry your arduino when the coil turns off.

Another option to consider mentioned above are SSRs. They would probably fit your purpose, are pretty cheap, and non-mechanical so you don't have to be as concerns with contact failures.

Lastly when you do your programming, make sure you work in some hysteresis so you don't constantly flip your coils. If this is for your HLT, I'd recommend a 2-3 degree swing either direction from your set point.
__________________
gx1400 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 instead of BCS or Brewtroller OEHokie DIY Projects 75 06-17-2014 03:37 PM
Arduino, now what? CoalCracker DIY Projects 27 01-09-2012 11:40 PM
Looking for some help with an Arduino Keezer goaticus DIY Projects 6 05-08-2011 03:46 AM
Project Box for Arduino BulldogBrewer DIY Projects 0 09-30-2010 08:27 PM
Arduino for PID? rockytoptim DIY Projects 2 12-25-2009 02:51 PM