To drive a solenoid you will need a power transistor and a protection diode, check this diagram for how to wire it to an Arduino or other microcontroller. You will need a fairly good power supply to drive a solenoid, as a lot of current will rush into the solenoid to charge up the electro-magnet, about 1 Amp, so be careful of trying to power/activate from a computer's USB.
Dear all,easy question today (I hope). I would like to use a Solenoid with Arduino, something like this: https://www.adafruit.com/product/2776They say So, a few things:1) what kind of transistor should I use? Would this be ok?https://www.adafruit.com/product/976
2) So, I cannot power it from the USB? Because it looks like this is what they are doing. If not, what kind of external battery should I use?
3) I would like to operate 2 solenoids at the same time. Can I just plug the second solenoid to a separate transistor/diode/battery?
Thank you all for your time
t has to handle 5V and 1.1A, so this completely rules out simple BJT's which don't haveenough saturated current gain to drive 1.1A from an Arduino pin. (Saturated gain is about10 to 20 for a single BJT).
A darlington has enough current gain, but will lose 1V or more, so will need a 6V supply or so,and may need a small heatsink.
A logic level MOSFET with 0.3 ohms or less on-resistance will be perfectly fine.The TIP120 from a 6V supply and with 1k base resistor would be fine, remember the Arduino 5Vrail cannot provide enough current anyway so a separate supply for the solenoid is needed
6V or 7.4V capable of 1.5A or so?
Separate transistor and diode, but why not use the same battery and ensure its powerful enough (3Acapable)
If I connect two solenoids to the same battery and turn them on at the same time, wouldn't I need more Volts to power both the solenoids?
That power supply you posted is only 2A. If you only intend to drive one solenoid at a time that will work, and it might work okay for two. But you'd be maxing it out, and it may cause your solenoids or arduino to behave strangely when it can't quite keep up. With power supplies and current, you always want to have more current capacity than expected demand, as the components will only pull as much current as they need to run. So you want an overhead.
If you get the 4A power supply, then you can run the arduino and the solenoids off it together. How you go about connecting them will depend on the connectors on the solenoid you actually get and personal taste. Some solenoids have spade connectors, others use JST, others pigtails, and on and on and on. I like to keep a healthy stock of DC barrel adapters on-hand for exactly these purposes.
These mosfets on ebay are literally the first ones to pop up when I do a search for "mosfet," and they will be more than adequate for what you're doing. They have a Gate Threshold Voltage of 2.0V, and 8 mOhm on resistance, and can handle more amps than you'll be able to supply it reasonably.