Pages: [1] 2   Go Down
Author Topic: Driving a solenoid  (Read 2292 times)
0 Members and 1 Guest are viewing this topic.
South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do I understand correctly that the TIP102 in this circuit should be a TIP120?

http://arduino.cc/playground/uploads/Learning/solenoid_driver.pdf


...so I could use this circuit (with a TIP120) to drive a 12volt, 6.9watt solenoid?
thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, TIP102 is a misprint as a 102 is a PNP transistor. A NPN TIP120 transistor is a great choice and will work fine at your load wattage.

Lefty
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27071
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looking at Figure 4 of the datasheet, you would seem to be okay with the ~600mA you'd have going thru this part.
http://www.learn-c.com/tip120.pdf
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Latvia
Offline Offline
Newbie
*
Karma: 0
Posts: 17
hobyist
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

beter use MOSFET lower Rdson example IRFZ44 - low gate charge, high curent low Rds but it is too great for 7w but with reserve - never will blow off - conection diagramm the same
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
beter use MOSFET lower Rdson example IRFZ44
I have an IRF510 in my junk box, that should work good, right?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
beter use MOSFET lower Rdson example IRFZ44
I have an IRF510 in my junk box, that should work good, right?

A IRF510 is not a logic level mosfet and requires +10vdc gate/source voltage to fully saturate on.

Lefty
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, so how does this look.  Here are the specs, and attached is the schematic.  I'm just wanting to make sure I get it right so I don't ruin my Duemilanove.

Solenoid: 12 VDC, 6.9 watts
R1:         2.2K
D1:         1N4004
Q1:         IRFZ44

This irfz44 isn't available at Radio Shack, but for $3 I can get 2 of them shipped all the way from Thailand, where ever that is...


* Solenoid Switch.JPG (12.94 KB, 610x400 - viewed 49 times.)
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27071
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have the Drain & Source connections swapped. Drain to motor, Source to ground.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a very nice logic level mosfet available in the US.

http://www.sparkfun.com/products/10213
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a very nice logic level mosfet available in the US.

http://www.sparkfun.com/products/10213
I'll take a look at this.

You have the Drain & Source connections swapped. Drain to motor, Source to ground.
In plumbing, the drain goes to the ground, so I thought it would be the same...
Thanks, I don't think I'll ever get these FETs, Mosfets, and transistors things completely figured out in my head.

Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a very nice logic level mosfet available in the US.

http://www.sparkfun.com/products/10213
I am using this as in the drawing in post #6 (with the source and drain corrected).  But Sparkfun's example has R1 setup up different, in this example:
http://www.sparkfun.com/datasheets/Components/General/MOSFET-Power-Control-v10.pdf

Is one better than the other, or will they both work the same?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes it can be a little confusing, these resistors used with N-channel logic level mosfet switching transistors. In reality the mosfet will switch on and off without using either resistor, but they do serve useful purposes and should be included. The resistor wired between the arduino output pin and the gate of the mosfet is to protect the output pin from large current spikes as the mosfet gate capacitance is charged or discharged initially when commanded on or off. Once the mosfet gate is fully charged or discharged there is no DC current flow from the output pin and the gate. This should be a rather small resistor value so as not to slow down the switching transition time too much, 300-1,000 is a good range to use. The resistor used between gate and source terminals on the mosfet is to insure that the mosfet is 'forced' off in the unusual case where the arduino board my be powered off but the +12vdc is still on, this is more a safety issue then a circuit requirement. That resistor can be pretty large and 10k is a good value to use.

Also be sure you have a wire run between the 12vdc power supplies negative terminal to a arduino ground pin as the mosfet won't switch without the connection made.

Hope that helps.

Lefty
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for explaining that for me.
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I just remembered you mentioned this just recently:
Quote
The resistor wired between the arduino output pin and the gate of the mosfet is to protect the output pin from large current spikes as the mosfet gate capacitance is charged or discharged initially when commanded on or off. Once the mosfet gate is fully charged or discharged there is no DC current flow from the output pin and the gate. This should be a rather small resistor value so as not to slow down the switching transition time too much, 300-1,000 is a good range to use.
« Last Edit: April 02, 2011, 10:18:03 am by SouthernAtHeart » Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 651
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes it can be a little confusing, these resistors used with N-channel logic level mosfet switching transistors. In reality the mosfet will switch on and off without using either resistor, but they do serve useful purposes and should be included. The resistor wired between the arduino output pin and the gate of the mosfet is to protect the output pin from large current spikes as the mosfet gate capacitance is charged or discharged initially when commanded on or off. Once the mosfet gate is fully charged or discharged there is no DC current flow from the output pin and the gate. This should be a rather small resistor value so as not to slow down the switching transition time too much, 300-1,000 is a good range to use. The resistor used between gate and source terminals on the mosfet is to insure that the mosfet is 'forced' off in the unusual case where the arduino board my be powered off but the +12vdc is still on, this is more a safety issue then a circuit requirement. That resistor can be pretty large and 10k is a good value to use.

Also be sure you have a wire run between the 12vdc power supplies negative terminal to a arduino ground pin as the mosfet won't switch without the connection made.

Hope that helps.

Lefty
Could it be that without the pull-down resistor to ground (gate to source) when I power up the system, the mosfet could momentarily turn the 12v water solenoid on?  Kinda like the H-bridge without pull-downs on the control pins let a motor 'jump' when powering up?
I don't have pull-downs on my mosfets, but can put them on if this scenario happens.  The mosfet and Arduino will always be on at the same time, other than powering up.
Logged

Pages: [1] 2   Go Up
Jump to: