Electronics > Beginners

How does an electronic safe use a 9v battery to power a solenoid?

(1/4) > >>

flyingblindonarocketcycle:
I have a gun safe with an electronic lock. I guess its a piece of junk as the electronics failed with in days of getting it. I thought it would be a good beginner micro controller project to replace the electronics.  I have an adafruit ItsyBitsy 32u4 chip and I wired up the 4x3 keypad.  The short version of this story is success...almost.  The safe locking solenoid does not need to capable of much force at all but how do I control it with a 9v battery and not drain the battery very rapidly?

The solenoid at rest has a very weak spring that keeps the pin out and blocks a mechanism keeping the safe locked.  When the solenoid is activated it pulls the pin out of the way and the safe handle is allowed to be turned and open the door.

The MCU circuit to control the solenoid was taken from https://www.bc-robotics.com/tutorials/controlling-a-solenoid-valve-with-arduino/

The code puts the ship to sleep. Wakes on a button press. Stays awake if a button is pressed within a short period. watches for the combination to entered. triggers the solenoid for a short period when the combination is entered.  It appears that the solenoid is drawing over 400ma when activated. 

How can a 9V survive long like that?  How is it that a 9V operated electronic safe is common place when they use a solenoid?

Thanks
FBOARC

Rerouter:
400mA x 2 seconds = 0.22mAh

They would be using some capacitance to get around the batteries ESR, but the total amount of energy used is rather small per actuation.

flyingblindonarocketcycle:
Are you saying that activating a solenoid with a 9V batter powered circuit is not insane?  I have been searching the internet and even on the adafruit forum I have been told that you can't use a solenoid with a battery.  Obviously someone figured it out as safes do exactly that.  But are you saying its no big deal?  This is very encouraging! 

Do you mind expounding on what you mean by the batteries ESR?

I should also mention that I did build this circuit and try it and sadly it only worked for a couple days. I have not yet pulled the micro out to see if it is damaged.

rstofer:
ESR => Equivalent Series Resistance.  This internal resistance limits how much current the battery can deliver and, more important, how the output voltage is related to the output current (Ohm's Law works here).  An ideal battery has 0 Ohms of ESR, a real battery will have some.

So, by putting a capacitor in parallel with the battery, it will charge to the same voltage but when it comes time to activate the solenoid, the capacitor probably provides most of the energy because it will  have lower ESR.  It's not free energy, the capacitor has to recharge from the battery.

For a gun safe used a couple of times per day, a pair of 9V batteries will last more than a year.  Based on Sargent & Greenleaf A Series lock.

https://www.sargentandgreenleaf.com/products/electronic-locks/aseries/


Rerouter:
It is not wise to operate a solenoid for a long period of time off a battery, small pulses are OK if you mitigate the other issues

Batteries have an internal resistance, for short duration pulse loads you can treat them like a power supply with a resistor between the supply and your load, this means drawing a large amount of current will make the voltage on your load decrease, and generate some heat in the ESR / resistor,

The value of this ESR tends to get worse as the battery depletes, and changes with temperature,


This is making some assumptions, but lets say your solenoid resistance is about 22 ohm (9V / 0.4A), a 9V battery is normally 1.5-5 ohm ESR for the first 50% of its capacity
For your solenoid, you could on a proper supply work out what its "Actuation Voltage" is, e.g. what voltage is the minimum to make it unlock, this tells you how low the voltage can droop before it stops working
As for why your circuit stopped working, that is harder to say, its possible the nductive spikes carried into the rest of the circuit, (This is why circuits have decoupling capacitors and reverse polarity diodes across inductive loads)

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod