6vdc solenoid help.

hello

i have the duemilanove board, and just found this 6v DC solenoid at a local workshop.

i read the pdfs on relays and solenoids, but i thought maybe the arduino's internal power supply of 5v might suffice for driving the solenoid to maybe hit a bell or something.

do i need a transistor to do this? or do the digital outputs of the arduino serve as on off switches for the solenoid?

also, code examples would be awesome....!

thanks guys
:wink:

-dataplex

but i thought maybe the arduino's internal power supply of 5v might suffice

Sorry no way.

do i need a transistor to do this?

Yes

also, code examples would be awesome

digitalWrite(pin, HIGH) for on and
digitalWrite(pin, LOW) for off

You won't be able to connect the solenoid directly to an output pin. You will need at least a transistor, and more likely a transistor and a diode, to deal with controlling the solenoid while protecting the processor from spikes when the solenoid turns off. You may have to feed it more than 5V, too.

This thread has some similar discussions and schematic ideas.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233596069/all