Solenoid Purge/Test Button

Hi All.

Arduino newbie here, I have built a circuit to control a solenoid.

I want to add a Purge/Test button to the solenoid so I can see if its working/override the digital out pin.

The Circuit I used is as pictured at the link below.

My question is, If i place a button from the 5v pin to the line from pin 9, will it blow the arduino ? Or will i have to use a diode to protect pin 9 from reverse current while its LOW ?

Any Help most welcome.

Not sure what you're trying to achieve, but it seems that you're proposing to connect an output pin to the 5V line. That would blow the pin's output driver when the output was set LOW.

It kind of goes back to what you actually want to test with the switch, the solenoid only? the transistor also? If it was my set-up I would wire a test switch into a unused digital input pin and in the sketch code test for it being on and turn on the output pin until the switch is turned off. Simple code to add and would test everything including that the arduino was functioning correctly.

If you do just want external wired testing, use a SPDT spring loaded momentary switch with the common switch terminal going to the base resistor, the normally closed going to the digital output pin and the normally open contact going to +5vdc.


Thanks PeterH. I didn't think that was a good idea !!!

What I'm trying to achieve is, to be able to run solenoid manually, if Arduino's pin is low.

reteolefty, thats sounds like a good idea to me. I better get learning the code !!

Thank you both