Shop OBEX P1 Docs P2 Docs Learn Events
Controlling 12V 7watt Solinoid Valve — Parallax Forums

Controlling 12V 7watt Solinoid Valve

Rusty78Rusty78 Posts: 33
edited 2005-08-29 15:56 in Robotics
Hey guys/gals
·
··············· Well taking everything I've learned from the "Controlling voltage of Components" thread..I'm now looking into controlling a 12 Volt, 7 watt solenoid valve. So I've chosen the 2n4401 npn switching transistor and would just like a second opinion from some real pros! I chose it based on the approximate current draw for the solenoid which I calculated to be 7/12 = 0.583A. The 2n4401 states that it can handle up to 0.6A..can anyone tell me if I've done this correctly and if the 2n4401 is the proper choice. If it isn't, please do let me know where I went wrong...ohh so much to learn!!
················ Also, I've found an 8 cell AA battery holder that will provide the 12 volts I need. I want to solder·a 2.1 mm barrel jack to its leads and connect that directly to the barrel connector on the BOE. Just to be sure, is it ok to have a 12 volt input·to the BOE via that barrel connector (it's printed·6-9VDC·on the actual PCB)? I'll be using the Vin·sockets on the BOE to power the solenoid...any objections?
··············· Any feedback would be greatly appreciated. Thank you kindly for your time!
·
Cheers mates,
·
R.K.

P.S. I've attached the datasheet for the 2n4401

Comments

  • KenMKenM Posts: 657
    edited 2005-08-11 06:54
    Rusty,

    The 2n4401·on paper·should work for your application. You correctly interpreted the data sheet and theoretical current from your solenoid.

    In my opinion it is not a good choice.

    Although the 0.583 amps is indeed less than the rated 0.6 amps I don't·recommend running the transistor so close to the maximum rating.

    You also need to calculate the correct base resistor.

    Also, at the switching current of close to 0.6 amps the hfe drops to about 40, meaning the stamp pin would need to source about 15 mA (well within limits but using up much of the stamps current capability with just one of the pins) See a good write up by Beau

    http://forums.parallax.com/showthread.php?p=545918

    Another method is to use a mosfet transistor as shown.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken

    Post Edited (KenM) : 8/11/2005 6:59:14 AM GMT
    869 x 555 - 53K
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-11 19:16
    Thank you kindly Ken,

    ······························ I see what you're saying..but what is the difference between a npn switching transistor and a mosfet transistor? Also, can I input the 12V directly into the barrel jack of the BOE?

    Thanks again for your help,

    Cheers,

    R.K.
  • dandreaedandreae Posts: 1,375
    edited 2005-08-11 19:28
    The BOE can take up to a 12v supply with no issues.



    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-11 19:29
    Rusty,

    ·· The MOSFET can handle more current for starters.· It will also require a lot less current to turn it on.· And yes, you can technically put 12V into the BOE if it's regulated.· 12V unregulated supplies run much higher and could damage the Stamp Module's regulator, since the Stamp Module runs off the Vin on that board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-11 19:32
    Awesome,
    ············· I've found an 8 AA cell battery holder...I'm assuming that's considerd a regulated supply? What's an example of·an unregulated supply?

    Thanks again everyone,

    Cheers,

    R.K.·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-11 19:43
    Rusty,

    ·· Yes, you can use 8 AA batteries.· An example of an unregulated supply would be many Wall Adapters.· The lesser expensive ones are usually unregulated, so at lower current draw they're putting out higher voltages that what they're rated at.· This is normal, but can be dangerous for the Stamp Module if it goes to far over the rated input level.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-08-11 20:48
    A "regulated supply" has a regulator in the circuit, which 'clamps' the output voltage at a particular value, regardless of output current (up to a point, anyway). An "unregulated supply" usually has a full-wave rectifier and a capacitor. It's voltage can vary quite a lot depending on the output current.

    8 AA batteries act like a really-good regulated supply (at least until the juice runs out). They do put out 12 volts, so you'll need a regulator in the circuit. The 'Vin' pin of the BS2 feeds an on-module regulator, so you'll be ok there.
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-15 03:01
    Hey guys...
    ··············· Thanks yet again for all the responses...I've recently come across a 5V solinoid valve rated at 100mA. I was wondering if it would be a good idea to drive this directly via the Stamp from the Vdd ouput on the BOE.·I'm assuming I'd still need the "flyback" diode·( I'm not sure if it has·a built in diode..it's built for RC "Robots" and seems pretty advanced - built to be·pluged directly into an RC Reciver)? Can anyone tell me if I'm on the right track? I've attached the only documentation I've been able to find up till now.

    Cheers!

    R.K.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-15 05:24
    Rusty,

    ·· Even though the solenoids are 5V, you should still have a separate supply for them.· You should also have a driver from the Stamp I/O pins, and finally, you should still use a diode for protection.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • KenMKenM Posts: 657
    edited 2005-08-15 05:27
    Rusty,

    Off the top of my head you should not attempt to run a 100 mA solenoid from the stamp vdd pin....but if I am wrong somebody will surely chime in.

    A flyback diode should be used with any inductive (coil of wires) load.

    I have been out of town but I see others have addressed your previous questions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-08-16 14:11
    While you can run your BasicStamp at 15ma source on one pin for awhile, what happens when you decide to change your program to turn on more pins and you do not modify your hardware?

    Pretty soon you have a lot of pins working together and topping out the total current budget of the BasicStamp (80ma?). It really is best to get all your transistors switching at 1mA or 1.5mA. That way, you have ten times the leeway for additions rather than a complete circuit and software redesign.

    Everyone seems to forget to mention that other concept - Wattage.
    The total wattage really indicates the amount ot heat the package can take before failure. It is the real bottom line. Since there is a voltage component [noparse][[/noparse]Amps X Volts = Watts = heat], in some cases you may want to consider a lower voltage as helping you avoid getting too hot. It many cases, the publications give a Max Voltage, a Max Amps, and a Max Watts. Obviously, it is whatever comes first that fries the semiconductor - not the one you prefer to look at.

    AND, when 8AA batteries are fresh, you may find yourself at 14volts, not 12volts.· You don't need a voltage regulator, but you do need to have some protective leeway.· If that is too high, just pop a diode or two ·in series to knock off 0.7volts/ diode.· This will be a protection against connecting the wrong polarity too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Kramer) : 8/16/2005 2:14:49 PM GMT
  • YanroyYanroy Posts: 96
    edited 2005-08-16 15:58
    I'm curious as to where you've been finding these solenoid valves... I've been looking everywhere online for some small, cheap solenoid valves that don't run on 120AC for a project I'd like to attempt in the near future (you'll love this... it's an automated bartender).· I'd appreciate it if you'd let me in on your source(s).· Thanks.
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-17 03:10
    Yanroy,

    ············ Yeah check out McMaster-Carr dont leave home with out it. check out http://www.mcmaster.com/··on page 889· for compressed air control valves..I've bought the :

    attachment.php?attachmentid=73902

    for my project..I'll let you know how it goes.

    Kramer, Ken and Chris,
    ······························· Thank you so much for your feedback..I'm starting to see what you mean regarding the managment of the BS2 current. I ended up ordering a 12 V, .67Watt solinoid (so I guess I wont need to use a mosfet). I will try to draw out my idea of the circuit and post it here to see if I've made any mistakes.

    Cheers,

    R.K.
    541 x 29 - 3K
  • YanroyYanroy Posts: 96
    edited 2005-08-17 14:43
    That's one of the most impressive collections of solenoids I've found yet, however they're really expensive!· I need something around $5 or less.· I shouldn't be that hard... I can pick up a motor for that price, or even just a pull-solenoid, but not a solenoid valve...· I'm going to be needing at least 16 of these things and they need to be able to handle liquids, so I don't think the ones you directed my to are an option... thanks a lot for the help though.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-08-18 07:06
    Sadly with solenoids, you pay for choice. Discount is only available for surplus which comes and goes.

    12VDC at .67Watts may be driven by a Darlington Transistory [noparse][[/noparse]Array]. Since they often have protection diodes inside, they make it one jump from the BasicStamp to the +12V solenoid.

    You might use a UNL2803 [noparse][[/noparse]and then have 8 lines of control], but you have to see if you are going to overheat the IC by turning on everything at the same time and leaving it on [noparse][[/noparse]it seems likely with solenoid water values - you may want to water the lawn for 2 hours.]

    So, if you really are going to run in an 'all on' state, you should consider individual Darlingtons with heat sinks at they are famous for getting hotter, faster than any other transistor configuration. If that won't work, go back to the MOSFETs. Generally, after MOSFETs are in a circuit and functioning, there is no future problem with static electricity. During assembly, working in a humid environment will reduce the risk of static electricity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • FreezeSukkaFreezeSukka Posts: 41
    edited 2005-08-22 15:12
    Yanroy,

    Here are a couple of sites that I have found that have solenoids very cheap.

    http://www.allelectronics.com/cgi-bin/category.cgi?category=575&type=store

    http://www.goldmine-elec-products.com/products.asp?dept=1178

    Hope it helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    P.S. This is what this part of the alphabet would look like if "Q" and "R" were eliminated.
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-25 04:31
    Hey guys,
    ·
    ······················· Right on, I finally had some time to go through all of your posts on this tread and a few others, plus some very helpful websites. So here’s what I’ve come up with and hopefully I’ve made all the right decisions.
    ·
    ··········· What I’ve noticed with selecting the proper transistor is to keep the switching current as low as possible and to watch for heat generated. I selected the ZTX605 Darlington transistor since it had a switching current of 1mA.
    ·
    ··········· The current to the collector (load current) for my 12V, 0.67 Watt Solenoid is 55.8 mA (0.67 W/12 V). I feel like the ZTX605 is overkill (max load current = 1A) but it· keeps the switching current to a low 1mA· (As recommended by Kramer). The C-E Voltage drop is 1.5 V so I calculated the heat generated to be 83.7 mW. I’m assuming this isn’t to much heat for the surface area of the transistor..am I right?
    ·
    ··········· Ok, here come more questions :
    1)····· The datasheet talks about “saturation voltage” and “Turn On” voltage. What are the differences between the two?
    2)····· Also, I’ve looked into how to specify my flyback diode but I’ve had problems finding out on how to actually do this. Do I just find diode that can handle the equivalent to my load current? Any help or direction to the appropriate documentation would be greatly appreciated.
    ·
    I’ve attached my version of the circuit…any feedback / constructive criticism would be greatly appreciated. Thank you to all you guys for your continued help and patience...
    ·
    Cheers!
    ·
    R.K

    Post Edited (Rusty78) : 8/25/2005 10:04:04 PM GMT
    803 x 726 - 53K
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-29 13:24
    Hey,

    ········ So I'm having issues specifing my flyback diode..I'm assuming that my most critical spec. will be the diodes peak inverse voltage. I'll be using a 12 V source, I reckon I ·should I spec. some thing higher..hence adding a saftey factor..can someone recommend a specific diode for this ? Thank you kindly for your time.

    Cheers,

    R.K.
  • dandreaedandreae Posts: 1,375
    edited 2005-08-29 15:56
    Hello,

    You can use a 1N4007 diode for this project I believe.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
Sign In or Register to comment.