Hello, for a project I am trying to use a computer program I wrote to control 10 solenoids. A link to the type of solenoid is listed below. I figured the best way to do this would be to use the ATMEGA8U2 Arduino board and control it via the USB port. I have no experience with Arduino and very little hardware experience in general. The issue I am running to in this planning stage is powering the solenoids. Unfortunately the solenoids draw significantly more milliamps than the suggested maximum output of the pins on the Arduino. So, I am guessing that I will have to power them with an external 5v power supply. From what I gather this means that I need to use a transistor for each solenoid and set it up like this:
- Hook the external power to the solenoid
- Hook the ground of the solenoid to the collector of the transistor.
- Hook an output pin from the Arduino to the base of the transistor.
- Hook the emitter of the transistor to ground.
Am I super confused or is this the way to do it? I am guessing we I will also want a diode between the solenoid and the collector of the transistor, correct?
The Arduino: ATMEGA8U2 Breakout - DEV-10277 - SparkFun Electronics
10 of these solenoids: Solenoid - 5V (Small) - ROB-11015 - SparkFun Electronics
10 of these transistors: http://www.mouser.com/ProductDetail/Diodes-Inc/DCP68-25-13/?qs=ptj1V1atRAps4ov8RyYB8w%3D%3D, is this a good transistor to use or should I be looking for something else?
Does this list look okay?
On related note, how does a solenoid work? I understand it pushes or pulls, but do I have to reverse the motion or does it spring back after the current is turned off?
Any input would be really appreciated.
EDIT: I just noticed I posted this in the wrong forum (curse multiple tabs...). Could I mod please move this to the the "Project Guidance" forum? Thanks.