Have you run out of output pins for your Arduino? Well this is the solution for you! In this tutorial I will show you the hardware and the code needed to control multiples of 8 number of outputs, using just 3 of your Arduino pins. The main idea of this Instructable is to create a module which can either operate separately or be hooked up to another module thereby increasing the outputs by another 8 pins.

Materials Required:

Uses of this project:

  • A basic understanding of shift registers.
  • Ability to increase your output pins to either control relays or any other output modules.
  • Free the arduino pins to increase the number of sensors that can be used.

In this instructable I have tried a different approach, where I soldered the individual components on the strip board and also testing. I have also provided to you a breadboard diagram of how the circuit will look like, as well as the code with which u are capable of controlling a maximum of 40 shift registers in parallel. The main inspiration behind this tutorial is the Arduino ShiftOut tutorial.

Step 1: Introduction to The Shift Register

What is the Shift Register:

The Shift Registers fundamental purpose is to increase the number of Input/Output pins of the Micro-controller. The Shift Register used can either be a 74HC595 which is made for increasing the Output pins, While the 74HC164 is the Shift Register made to increase the Input pins. The most important point to note is that a number of Shift Registers can be cascaded. So that the Micro-controller can control 8 to the power of n Output/Inputs using just 3 pins. This cascading can also be called as daisy chaining of the Shift Registers.

Pins of The Shift Register:

The most important pins of the Shift Register are listed as follows:

Serial In (PIN 14):

The pin which shift the next input for the Shift Register.

RCK (PIN 12):

When this pin is pulled high, it will shift the register.

Serial Clock (PIN11):

Needs to be pulled high to set the output to the new Shift Register values, This must be pulled high directly after SRCLK has gone LOW again.

QH' (PIN 9):

The significance of this pin is that it can be connected to the Serial In (PIN14) of the next Shift Register and the daisy chain can increase.

Working of The Shift Register:

The shift register can be compared to a game of data moving along junctions. They will move to the other junction when the RCK pin of the shift register changes to HIGH and thus the data can be transmitted to any number of Shift Registers using the following principle. The shift register can maintain the values using the Serial Clock (PIN 11). Whenever the serial clock pin goes high then the RCK pin will go low and so on till the required data is transmitted.

I have included a 123D Circuit diagram describing the connections of the Shift Register to the Arduino. As well as the basic connections needed for the shift register to work. The second 123d circuit diagram provided shows the connections for the second Shift Register and so on.

Daisy Chaining Shift Registers:

The Shift Registers can be increased by connecting the QH' pin with the second Shift Registers Serial in (PIN 14). Thus the number of output is limited only to the number of Shift Registers that can be connected. The code which is provided with the option to connect upto 40+ Registers. I have also provided a real time diagram of the module and the connections to the arduino using the modules.

<p>Slick! Thanks for posting this!</p>
<p>your welcome :)</p>

About This Instructable


58 favorites

Bio: I am currently doing my BE in mechanical engineering but im more interested in physics and robotics and such stuff.I am new here hope ... More »
More by Naren_Murali: Balancing Instructable Robot Arduino Real Time Clock (DS1307) 3 Arduino Pins to 24+ Output Pins
Add instructable to: