Home Brew Forums

Home Brew Forums (http://www.homebrewtalk.com/forum.php)
-   DIY Projects (http://www.homebrewtalk.com/f51/)
-   -   Arduino and two elements (http://www.homebrewtalk.com/f51/arduino-two-elements-334782/)

GriFF3n 06-12-2012 02:05 AM

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

http://i.imgur.com/sesAT.jpg

lincoln 06-12-2012 04:35 AM

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.

berndtr 06-12-2012 06:25 AM

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

BetterSense 06-12-2012 07:28 AM

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?

Yuri_Rage 06-12-2012 08:07 AM

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.

gx1400 06-12-2012 01:25 PM

1 Attachment(s)
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.

gx1400 06-12-2012 01:31 PM

Quote:

Originally Posted by BetterSense (Post 4164049)
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.

GriFF3n 06-12-2012 02:14 PM

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!

berndtr 06-12-2012 02:21 PM

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.

gx1400 06-12-2012 02:40 PM

Quote:

Originally Posted by berndtr (Post 4164504)
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.


All times are GMT. The time now is 06:20 PM.

Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.