Skip to main content

Solenoid PWM Voltage Control

In my initial solenoid power board design, I used a PWM signal to control the power to the solenoids.  I used an AND gate so that the PWM signal could be constantly running but require the microcontroller's command to turn on.  This is done by putting the other pin on the AND gate to HIGH.  I have added a PWM component to the single pulse generator so that I am able to control the average voltage of the pulse.

I am also trying to offload as much work as possible off the microcontroller so that it runs quickly.  For most of the solenoids in the pinball machine, the power that is required will not change during the game.  The only ones that I can think would possible change would be the pop bumpers.  I would like them to be stronger during certain periods of play.  To do this, I think I will need to use a 50V power supply in order to be able to play the game at a lower power level and then to have enough reserve to raise it to a noticeable difference.  I have utilized the ever versatile 555 timer to produce the PWM signal.

To add the PWM generator to the circuit, I used the following:

TS555 - Low Power CMOS Timer
2x 1N4148 Switching Diodes
2x 1 nF ceramic capacitors
1x 10 KOhm resistor
1x 100 KOhm trim pot
1 x random ceramic capacitor for the control voltage pin

The single pulse generator and the PWM generator providing a single pulse output with a controllable voltage.
I tried using one of my IL766 optocouplers to provide the 12V required for my STP40NF10 MOSFETs to run at their full capacity but they are too slow.  I checked the optocouplers' output with my oscilloscope and where the sharp drops in voltage were suppose to be, all I saw were gradual slopes.  It did not even manage to drop the voltage 10%.  The optocouplers worked on my old solenoid circuit because the PWM signal provided by the microcontroller had a low frequency.  Unfourtunately, when applied to the solenoids, they make quite a bit of noise.  I just need a frequency that is higher than what we can hear.  Perhaps a small capacitor for high voltages could smooth out the voltage on solenoid side of the circuit.

EDIT: Checked the output of the MOSFET.  The PWM portion of the signal seems to be getting through but I think the inherent capacitance of the MOSFET does not let it switch as fast as the PWM.  So to reduce the time constant for the MOSFET, I changed out the large resistor I had connecting the gate to the ground with a smaller 2 KOhm.

Comments

Popular posts from this blog

Pinball Cabinet Beginnings

I was getting to the point where I really needed to build on something. I have numerous pinball parts but have nothing to attach them to. I managed to find some pinball plans for a Williams Widebody pinball machine. All the measurements are in mm sadly even though all pinball cabinets are in inches. I converted and change it all to the nearest quarter inch. Well sort of. The guy who measured this was intending on using 45 deg cuts in the corners. My skill saw is too cheap for that so I changed the measurements for butted joints. The interior is set for a 23.5" wide playfield. The length of the cabinet is 51.5" in total. I used 3/4 inch plywood so the bottom would be 50" long for example. You can pretty much dimension the rest from there.  I did get a little chipping of the plywood but I went out and bought a blade with more teeth for finer cuts. It's a 60 tooth saw blade and my skill saw doesn't really have enough power for it so I have

MOSFET Driver Board

Final version?  I hope so.  I have gone back and redesigned my solenoid driver board several times.  In previous versions I attempted to offload some of the logic from the microcontroller.  For example, I used a Schmitt-Trigger [74HC14] with an RC network to provide a single pulse to the solenoid.  Also, I added in a PWM signal to set the average voltage 'seen' by the solenoid.  This worked but was very limiting to have the pulse length hardwired in and it was difficult to adjust without more expensive precision potentiometers. I chose to simplify my circuit to make it a general MOSFET driver for flexibility.  Since I have more than enough space inside my pinball cabinet, it was not a problem to have the extra boards.  The boards were designed to have 4-channels since by default I would get a minimum of 10 boards for the same price from Seedstudio.  Also, the cheapest board option was restricted to 10cm x 10cm otherwise the price balloons quickly. Driving 48V from a separa

Pinball Solenoid Control

Pinball solenoids come with designations like 23-800.  The first number, 23 in this case, represents the American Wire Gauge (AWG) used.  The second number, and the more important number, is the number of windings which is related to its power rating.  A solenoid with less windings, say 400, is more power and is used for such applications as actuating the flippers.  These solenoids get very hot very quickly, which increases the resistance of the solenoid thereby decreasing the current and therefore the power.  To avoid overheating, these high powered solenoids will have two coils.  One for the main actuation of the solenoid, and another to maintain the position.  The second solenoid will have a smaller wire gauge and more windings.  In example, my flipper 'coils' are 15-411, 15 AWG and 411 windings.  They are quite strong and found in some of the latter Williams pinball machines such as the popular Adams Family machine.   You can find a lot of good additional information