Serial Shift Register MOSFET driver (version 1.1)

My BubbleDisplay project needed to control sixty DC motors or solenoids to control air injection into individual columns of liquid. Due to the large number of outputs needed, I am using a chain of (74HC595) serial shift registers so that three I/O pins can control all sixty outputs. As each serial shift register has 8 outputs, this requires eight chips (for a total of 64 outputs, four are unused). The 74HC595 can not source/sync enough current to drive the motors/solenoids directly, so I am using a TO-220 N-Channel MOSFET rated at 60 volts and 32 amps (digikey: FQP30N06L-ND) to drive the load, with an 1N4001 rectifier diode to handle current spikes. Because I had to make 8 (9 for a hot spare) copies of this circuit, I decided that fabricating a printed circuit board was the only way to go.

Circuit board with 8 LED's and 8 MOSFETS connected to a 74HC595 shift register

It only took me two tries (Moving from Version 1.0 to 1.1) before I was happy with the design, which you can see (populated for testing) above. Looks a lot nicer than the prototype, right?
protoboard with MOSFETS and LED's

I used the open source KiCad EDA software suite for the schematic capture and board layout and was quite happy with it. (Be sure to go through the Tutorial if you are just getting started!).

If you want to make yourself a copy, you can download the GERBER files that I used at OSHPark to make yourself a batch:
shiftMosfet_oshPark_1.1

I am also posting my entire KiCad project directory in case you need to make changes:
shiftMosfet_1.1_kicad

The parts needed to populate (one) board (with digikey part numbers) are as follows. Listed prices are for quantities large enough to populate at least 8 boards:

1 74HC595 IC 8-BIT SHIFT REGISTER 16-DIP        $0.63		digikey.com	296-1600-5-ND
1 CONN FEMALE 8POS .100" R/A GOLD               $0.767		digikey.com	S5483-ND
1 CONN HEADER 8POS .100 R/A 15AU                $0.333		digikey.com	609-3321-ND
8 MOSFET N-CH 60V 32A TO-220                    $0.94		digikey.com	FQP30N06L-ND
8 1N4001 RECTIFIER 50V 1A DO-41                 $0.1184		digikey.com	1N4001DICT-ND
8 RES MF 1/4W 10K OHM 1% AXIAL                  $0.0394	        digikey.com	S10KCACT-ND
8 LED SS 5MM 625NM RED DIFF	                $0.0932		digikey.com	754-1264-ND
8 RES 560 OHM 1/4W 5% CF MINI                   $0.0228		digikey.com	S560QCT-ND

The right angle (R/A) headers allow you to daisy chain boards next to one another, but you could omit them and connect the boards using hook-up wire (not recommended for a large number of boards…) You may note that with the exception of the extra BATT + connection (allowing the MOSFETS to switch a voltage higher than logic level to the outputs) the connections are in the exact same order as SparkFun’s 74HC595 breakout boards so you can daisy chain them together. Although the 8 pin header has a BATT+ connection, if you are switching large currents you should also connect up the extra large GROUND and BATT+ pads with larger gauge wire. You could also NOT daisy chain the BAT+ connection and drive each board or set of boards from its own supply.

20 thoughts on “Serial Shift Register MOSFET driver (version 1.1)

  1. Pingback: 22 of 60 tubes running – First scaling up problem rears it’s ugly head. — Jay’s Technical Talk

    • The limiting factor is probably the MOSFETS (specifically, how much of a heatsync you can mount on them). They are rated at 32 amps with a full heat sync. Although if you are driving the whole thing above 10 amps you may need to enlarge the circuit board traces to handle the extra current.)

  2. Dear Sir
    Congratulations the project you did. This project will be my first arduino project .
    I carefully investigated your videos and your blog. I will make Serial Shift Register MOSFET driver (version 1.1) PCB s but and I could not find the arduino uno sketch and circuit diagram for connections. I will also use 60 air pump. I will be gratefull if you share with me. Thanks.

  3. Hi Jay
    I have the source code but i dont know the arduino uno s which legs will be connected to which curcuit inputs you designed (Serial Shift Register MOSFET driver (version 1.1)) .Thanks.

    • I’m afraid that I do not have a circuit diagram for this project. It is a relatively involved project, and I would not advise it as your very first project. That being said the circuit wiring is relatively simple. The source code specifies which pins go out to the RGB led’s and which pins go out to the serial shift MOSFET’s. Of course, you will also need to provide the appropriate (12v for the motors and 5v for the LEDs) external power to each device. I would recommend that you work with a single shift register (use the LED’s on it to get used to programming it before connecting any real motors) and a single strand of RGB LED’s to make sure you have all the signal wires connected correctly before trying to add more power/motors/leds.

      These links will help you learn about the circuits:

      https://www.arduino.cc/en/Tutorial/ShiftOut

      https://learn.adafruit.com/digital-led-strip

  4. Hi. I am trying to open your schematic in Kicad (shiftMosfet.sch) but it complain about 2 missing libraries. Any chance you could provide links to the dependencies lib ? or maybe thoses libs aren’t really used by your schematic.
    The missing libs are : diy_transistors / special

    Thx in advance.

    • Yes, you can PWM the outputs, but the PWM frequency is (much) slower than with a dedicated pin. And every time you add more outputs to your serial line, the speed at which you can PWM them goes down. I wasn’t having any problems turning individual pins on or off with 1-2ms accuracy, so PWM up to 500 Hz would be possible (if my Arduino did nothing else).

      Instead of using PWM to control the motors, I just turned the “weak” ones ones on a few MS earlier than the “strong” motors to get all the bubbles to be the same size.

  5. HI HELLO
    nice job ….
    how do i get to the layout of the pcb board .to change the name logo on the board…if im to copy your pcb layout

    • Search for this sentence in the post above blog post to download a zip file of all the design files:

      I am also posting my entire KiCad project directory in case you need to make changes:
      shiftMosfet_1.1_kicad

  6. hi jay….

    im having a little trouble adding your sketch to the arduino …

    it says…. fatal error: shifter.h no such file or directory found…
    #include

    i tried uploading it to both …… libraries (no joy )
    could you tell me a way i could get round this problem please….

    thank you

Leave a Reply

Your email address will not be published. Required fields are marked *