I'm going to be doing an Arduino presentation at the Orlando Ruby Users Group (demo'ing RAD http://rad.rubyforge.org) and I would like to do a simple BarMonkey project.
It's my understanding that using a transistor, I can use a digital out to control the transistor like a switch to turn power on/off from the pump. I'll be writing some Ruby to send off commands to the Arduino over serial to tell it which pin and for how long. This will result in a nice little drink dispensing system controlled by the Arduino.
Is my logic on controlling the pump with a transistor correct?
Also, can I get 12VDC 1A off of the Arduino or will I need to power the pumps with another power source and drop a diode in my circuit so I don't end up messing up my Arduino.
You cannot "get" 12V off of the arduino, it is not a power supply and requires a power source to operate. What will you be powering the arduino with? You could attempt to power your pump with whatever you power your arduino with, make sure it has enough power for both.
You cannot "get" 12V off of the arduino, it is not a power supply and requires a power source to operate. What will you be powering the arduino with? You could attempt to power your pump with whatever you power your arduino with, make sure it has enough power for both.
Well the Arduino will be powered via USB since I'll be sending it commands over the serial port.
For the pumps I think I'll be using a 12V wall wort.
Only one pump will be operating at a time so I think I should be in good shape. The pumps are shipping today I believe so I will hopefully get them shortly so I can begin playing around in time to get it polished up for the talk.
For the pumps I think I'll be using a 12V wall wort.
I hope that you can find a walwart that can handle 1A, not always easy.
The USB will only provide 5v, not twelve. You should still be able to switch the 12V to the pump with a low output from the arduino hooked to the base of a PNP through a 1 to 10K resistor. Tie the emitter to the 12 V and the collector to the pump positive lead.