Fun with Driving Solenoids
I got frustrated trying to figure out the best way to drive some solenoids. I was looking for something foolproof that I didn't need to design myself. I'm trying to build as much as I can with JLCPCB Assembly which limits parts. I settled on the Infineon BTS724G. It's an automotive part that has all the protections you can think of. Good for an unmonitored art installation.
But I was torn on the circuit design. Do I need decoupling caps? Do I need my own snubber diodes or will the chip handle it?
In a moment of frustration I just made a circuit board and figured I would measure and test it.Simple schematic of wiring up the BTS724G The schematic in meat space with solenoids.
First off, the data sheet states the traces should be designed for max short circuit current of 12A. Ooops, my power traces are 20mils with 1oz copper. My little firestarter :).
Let's wire up the scope and see what we have. I have two 0.9A solenoids running at 12V. Powered by some random power supply I had in the bin.C1 is Power, C2 is Solenoid, No Cap. 0.84V Peak to Peak
Ok. Some ripple. Don’t know if it’s bad or not. Let’s try throwing a filter capacitor on the power input and see what we get.660uF cap, 1.11V Peak to Peak. It's worse!!!!
I tried first with 47uF and it got worse. Tried 660 and it got even worse worse. Ugh. Totally not what I expected.10,000uF Cap. Phew, 0.47V Peak to Peak
Grabbed a 10,000uF cap from an old power supply, that’s more like it.
What I theorize was happening was the filter cap was so small it was getting completely drained trying to power the solenoid. When the solenoid moved and went to constant power, the cap needed to refill, which caused that bigger transient as an empty cap wants to fill up quickly. The big cap showed that filter caps can help if they are big enough.
This leaves me in a quandary. I was hoping to power a voltage regulator off this 12V line to feed back to the ESP32. I am using a Lolin D32 Pro and I think I need to feed it 5V which is then regulated down. Maybe 2 voltage regulators will do it?
- Previous: 20 years in the making