Solenoid Valve Strange Behavior

Hi everybody,

I’m trying to get ride of rust over my brain by doing a little project, i wasn’t use any electronics through past 20 years (since i was graduated), i am an amateur photographer, so my project is controlling 12v DC solenoid valve by arduino to be able to photograph water drop collision.

Everything goes well, using TIP120 transistor and 1n4001 diode, and when i turn the power on and program starts, the solenoid works very well in exact timing of my program.

But, once i disconnected the 12v DC power while the arduino still running, the solenoid keep actuated for a while (for about 2 to 6 more times).

I wonder from where it got the power to actuate?!!!

below is my exact circuit.

http://www.martyncurrey.com/controlling-a-solenoid-valve-from-an-arduino/

SolCir01.png

The only viable explanation I can think of is "parasitic" power.

While the TIP series is very useful a lot of us use different types of MOSFET.
The most common being the IRF series.

Instead of just removing power to the TIP consider a dual pole dual throw switch to also break the signal line too.

Bob.

I think you unplugged the 12V supply at the mains, not disconnect it from the solenoid circuit? That would explain what you see.

Thanks guys,
What i can understand from bob and MarkT answers i should disconnect the power on the solenoid circut(which i didn't in first place).
That is OK, but i need to know where this power came from or stored in?!!!
And i need to know is this power will be harmful?
Thanks in advance.

Usually there is some residual power stored in capacitors.
Depending on the size and the implementation there can often be enough to activate some electronic items.

It would sound like the effect you saw.

Bob.

Thanks bob, but i didn’t used any capacitors, do you think the solenoid itself has some inside it?

What happens if you pull the plug out of the barrel socket on the breadboard?

I had a similar issue with a solenoid valve "getting alive" (trembling) without any software command. This was happening when I connected the base of the TIP120 to the digital pin 12 (MISO) of Arduino Nano. It seems that there is a line interference between this pin and the USB when the USB is in use and also during the reset of NANO. I solved simply moving to the pin 9.
Maybe this can help if you are not effectively using pin 2 as shown in the schematic.

That is OK, but i need to know where this power came from or stored in?!!!
And i need to know is this power will be harmful?

I suspect the power you are seeing is stored in the capacitors in the power adapter (which others alluded to). I have one 12V adapter that starts up very slowly and can power my (low power) circuit of more that 10 seconds after being removed from the mains.

The power you are experiencing is no more that the adapter can power when plugged in, and for a shorter period of time.

As per JohnRob says.

I really dont know of many power supplied that do NOT have capacitors involved in them somewhere.
just because it may be in a box or wall wart does not exclude them.
They are often used in the filtering of the power supply itself.

They can charge quite quickly and discharge quite slowly in some cases keeping a charge for years.

JCA34F:
What happens if you pull the plug out of the barrel socket on the breadboard?

i didn't try that, i just shut the power off, maybe i'll try this and tell you.

Thanks a lot guys for yopur kind support, realy appreciate it.

Ipposnif:
I had a similar issue with a solenoid valve “getting alive” (trembling) without any software command. This was happening when I connected the base of the TIP120 to the digital pin 12 (MISO) of Arduino Nano. It seems that there is a line interference between this pin and the USB when the USB is in use and also during the reset of NANO. I solved simply moving to the pin 9.
Maybe this can help if you are not effectively using pin 2 as shown in the schematic.

I’ll double check and try to pick up another pin and see if this will help.

ballscrewbob:
As per JohnRob says.

I really dont know of many power supplied that do NOT have capacitors involved in them somewhere.
just because it may be in a box or wall wart does not exclude them.
They are often used in the filtering of the power supply itself.

They can charge quite quickly and discharge quite slowly in some cases keeping a charge for years.

Maybe the power supply adapter itself, i’ll try to unplug it and check.

mdeglah:
Thanks bob, but i didn't used any capacitors, do you think the solenoid itself has some inside it?

Your 12V power supply no doubt has a good amount of capacitance built in, to be able to deliver a nice and stable voltage. Recently I had to replace a cap in such a power supply - 33µF on the high voltage side so rectified probably charged to some 370V, seems to be a pretty common value. That's a good amount of power stored there already!

Ipposnif:
I had a similar issue with a solenoid valve "getting alive" (trembling) without any software command. This was happening when I connected the base of the TIP120 to the digital pin 12 (MISO) of Arduino Nano. It seems that there is a line interference between this pin and the USB when the USB is in use and also during the reset of NANO. I solved simply moving to the pin 9.

Sometimes a BJT or darlington needs a resistor from base to emitter to keep the base from floating and self-triggering.