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 separate power supply made me nervous about safety and about potentially damaging lower voltage components in the pinball machine. So I used an optocoupler to isolate the high voltage side (right) from the low logic level voltage side (left). The high side mosfets all have a common ground because there is a return via D1 to the voltage supply to deal with transients. There is a separate
LR12LG-G Linear Regulator (not shown) that provides the gate voltage. It was chosen because it was the cheapest 100V rated regulator.
|
Isolated MOSFET Driver Circuit |
What are all these components for?
- Q1 is a P40NF10 logic level mosfet and sinks the Q1 input to ground. This is what will handle the current from the solenoids.
- OK1A is one of two optocoupler circuits in the D223 SOIC-8 package. This is the physically isolating element between the high voltage side on the right and the low voltage side on the left.
- R101 is a current limiting resistor so we do not put too much current through the optocouple diode. It is set to limit the 5V input to 10 mA which seems to be the minimum current for maximum performance. It could work with a lot less but I am not concerned with power consumption as the pinball machine will be a hog anyways.
- R102 is a pull down resistor to be used if the buffered input Q1_G cannot be pulled to ground. It's not a bad idea to keep it in anyways.
- R103 is to surpress transients and the inrush current into the mosfet. Many circuits don't include it but it gives me piece of mind. Why 4.7 Ohm? The mosfet gate is essentially a capacitor and a large resistor will slow the response time. It would work fine with a 100 Ohm resistor as I am not switching anything at high frequencies.
- R104 discharges the Q1's gate. R103 and R104 form the gate discharge path. R103 / R104 can set the minimum turn on / off times.
- D1 is a flyback or freewheeling diode that suppresses transients. When the solenoid is turned off, the magnetic field collapses which induces a current in the solenoid. This causes a voltage spike which can lower the lift of your mosfets.
|
MOSFET Driver Board PCB Layout |
The PCB layout now has some nice curves! The small things drive you nuts. I could never figure out a best practice for placing mounting holes. So I ended up following
Dangerous Prototypes case design. I used a 3.2 mm diameter hole to fit a M3 screw that was spaced 4 mm from the horizontal and vertical edges. Then added in a 4 mm radius fillet.
Hi Mike, thanks for sharing your design for the pinball solenoid driver. I've also made a solenoid driver coil for my pinball machine using opto-isolators. My only concern is that I've read that Opto isololaters have a half-life of about five years and that they deterioriate after that. Consequently I'm presently redesigning to use BJTs to drive the gates of my FETS. The other issue that I found is that my flipper driver FETs (IRL540Ns) failed quite regularly because the flipper coils (Sterns) seemed to draw more current than the other coils. After considerable research I went over to a parallel MOSFET design for each flipper and that seems to have sorted out the problem as I no longer have the failure. Thanks again for sharing, I'll be reading on with interest! - Mike
ReplyDelete* solenoid driver "board"
DeleteI really enjoyed reading about your MOSFET driver board project! The use of OrCAD PCB Designer seems to have paid off as the final product looks very professional. It's also great to see that you included a detailed description of your design process and the challenges you faced along the way. Thanks for sharing your experience with us!
ReplyDelete