Using VIN to power solenoids

Hello!

For my first project in Arduino, I am trying to use two solenoid locks and a relay to lock a drawer.

The two solenoids I plan on using are 12V and draws 650ma when pulling into the unlocked state (which only lasts a few seconds).

The solenoids can be found here:

All the tutorials I've seen use battery packs to power the solenoid, but would it be safe to use a 12v power supply for the arduino and send power through the VIN port? My only concern is the current limit of 1A it has (so I've read).

I'd like to avoid using battery power in case it runs out of power the drawer would remain locked, making it impossible to change the battery...

I haven't bought any parts yet because of this concern, so any advice is greatly appreciated!

, but would it be safe to use a 12v power supply for the arduino and send power through the VIN port?

No.

My only concern is the current limit of 1A it has

That is caused by a diode between the power jack and the Vin pin. It is rated at 1A so you should not pull more than 800mA on that criteria alone.

a current passing through a wire sets up a magnetic field. a magnetic field crossing a wire sets up a current.

a solenoid is a coil. a coil is a very long wire compacted into a small space. it creates a large magnetic field. when the current is removed that magnetic field collapses into the coil. this collapsing field is a magnetic field in motion. it generates a brief but intense current in the wire, backwards. a collapsing 6 volt field generates a -321 volt spike, as measured by me many years back.

this -321 volt spike generates a condition identified as ZZZZT - POOF! in your Arduino.

do not use your Arduino as a current source. do not use your Arduino as a fuse.

this -321 volt spike generates a condition

Yes that is why you use a reverse biased diode across any solenoid you use.

I see, well I'm glad I asked! Do you have any advice on a battery pack/power supply that can take care of what I need?

Well why do you want to use the Vin pin when you have a perfectly good 12V supply. Is it the physical difficulty of connecting several things to the same plug?

If so you could do with one of these:- Clever Little Box CLB-JL53 DC 2.1 x 5.5mm Female to Terminal Block 2pin | Rapid Online

Wow I had no idea those existed. Just goes to show how much I have to learn. I'll just set up the two in parallel and I guess I'll be good to go. Thanks!

Here's something on Amazon that may do what you are planning.

I did make a multiple peddle board for my son about 20 years ago, and I must say if I would have used one of those or even the multiple chains it would have left his effects peddles as a charred lump of molten electrons.

I found that the power grounding on the peddles did not match the signal grounding due to ground lift resistors in some units and not others. You don’t notice when they are all powered by 9V batteries but it is a disaster if you use the same supply.

I had to make independent power supplies for each peddle but powered from a single mains supply.

Are you peddling your old racontages again? :grinning:


And the ever-recurring explanation.

A very real danger is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator is a usable source of 5 V power or indeed, a usable means of powering a "real world" project. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

I see you are peddling your normal “the barrel jack is just for ornamentation” again. While simplistically it is true there are many situations where the current draw from the Arduino is so small as it is fine to do this.

So say driving a servo or two is fine, because the servo control takes sod all current. Note this is not powering a servo from the regulator’s output.

As it driving a solenoid through a FET is fine as the FET takes sod all current. It is all a mater of perspective.

While beginners often crave clear and simple rules, in electronics the rules are often not simple. The truth is that as long as the current drawn is such that the regulator’s chip temperature ratting is not exceeded then it is fine to put 12V into the power jack.

OK, so you are ratting me out again. Oh well ... :grinning: