Project tutorial
Arduino 74hc595 Rgb Leds With 20 Effects

Arduino 74hc595 Rgb Leds With 20 Effects © MIT

In this Tutorial, I will show you how to make an RGB-led circuit with 20 effects by using Arduino UNO and shift registers 74hc595.

  • 238 views
  • 0 comments
  • 2 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
×1
74hc595
×1

Apps and online services

About this project

Arduino 74hc595 Rgb Leds With 20 Effects.
if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['cdc53b0fcc'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356975/1arduino_74hc595_rgb_leds_with_20_effects_EhhR8shmCW.png?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

In this Tutorial, I will show you how to make an RGB-led circuit with 20 effects by using Arduino UNO and shift registers 74hc595.

I am thinking about how to control more than 20 led with Arduino Uno because Arduino Uno only has 13 digital pins. So how It's possible?

That's why I am using shift register 74hc595. We need only 3 Arduino digital pins to control multiple RGB-leds using 74hc595 shift registers. If want to learn how shift register works? click here.

Supplies
if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['aa38df1d1e'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356978/img_20210720_022550_mwIEvB6Nrp.jpg?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

Let's start with gathering components for 74hc595 RGB-led effects.

  • Arduino Uno
  • Shift registers (74hc595) X 5
  • RGB LEDs X 12
  • 270-ohm Resistor X 36
  • Full-size breadboard X 2
  • Jumper Wire.

if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['55452f7ce8'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356979/rgb_led_74hc595_bb_E1YUCQd3Ps.png?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

How many RGB LEDs can an Arduino control?

The answer is 2 RGB LEDs is controlled by Arduino Uno because one RGB LEDs require 3 PWM pins to control the brightness and color, but there is only six PWM pin in Arduino Uno.

How to control multiple LEDs with Arduino?

As you know, we have only 6 PWM pins and, if we want to control multiple LEDs by Arduino Uno is not possible, so that's why we are using shift registers 74hc595to control multiple LEDs. By using numerous shift registers as a daisy chain technique, we can run as many LEDs as you want.

So in this tutorial, I will show you how to make a circuit and how to program it.

Circuit diagram
if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['c0cbd9f0a1'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356982/rgb_led_74hc595_bb_p67hr7CWjT.png?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

The circuit diagram seems complex, but it's not that I'll guide you through step by step to build the circuit.

Take a breadboard after that, start placing shift registers on the breadboard and make sure that each IC having a gap in-between.

Now we have to connect RGB LEDs, but there are two types of RGB LEDs.

  • Common anode LED
  • Common cathode LED
if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['cfc0dcebac'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356983/c1_8B1vTldEjf.png?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

In this tutorial, I'm using a common cathode LED, so bend the tall lead (cathode pin) of the led and connect it to the GND terminal of the breadboard. Do the same for all RGB LEDs.

*For common anode LED circuit diagram and code should be different.

Next, connect a 220-ohm resistor to each pin of the RGB LED to protect the led from high current.

if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['edd4b21a22'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356985/gnd1_l5DXug003q.png?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' },{ URL: 'https://hackster.imgix.net/uploads/attachments/1356986/img_20210720_035722_SGgamLTD1x.jpg?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

Next, connect shift register pins 16 (VCC) and 10 (SRCLR) to the breadboard 5v terminal and connect pins 8 (GND) to the breadboard GND terminal.

To build a daisy chain circuit, we have to connect the shift register to another.

Now, connect a jumper wire between shift register pin 9 (Q7`) to another shift register pin 14 (DS) for sending data to another IC. Do the same for other shift registers.

Connect a jumper wire between shift register pin 13 (OE) to another shift register pin 13 (OE). OE pin is used to control the brightness of the LEDs. Do the same for other shift registers.

Connect a jumper wire between shift register pin 12 (RCLK) to another shift register pin 12 (RCLK). Do the same for other shift registers.

Connect a jumper wire between shift register pin 11 (SRCLK) to another shift register pin (SRCLK). Do the same for other shift registers.

Now we have to connect RGB LEDs to the shift register.

  • Connect led pin 1 to shift register pin 15 (Q0).
  • Connect led pin 2 to shift register pin 1 (Q1).
  • Connect led pin 3 to shift register pin 2 (Q2).
  • Connect second led pin 1 to shift register pin 3 (Q3).
  • Connect second led pin 2 to shift register pin 4 (Q4).
  • Connect second led pin 3 to shift register pin 5 (Q5).
  • Connect third led pin 1 to shift register pin 6(Q6).
  • Connect third led pin 2 to shift register pin 7(Q7).
  • Connect third led pin 3 to another shift register pin 15(Q0).

Repeat the same process for other RGB LEDs.

Next, we need to connect the shift register (74hc595) to the Arduino Uno to control it.

  • Connect the shift register Pin 14 (DS) to the Arduino pin 12.
  • Connect the shift register Pin 13 (DS) to the Arduino pin 11.
  • Connect the shift register Pin 12 (RCLK) to the Arduino pin 10.
  • Connect the shift register Pin 11 (SRCLK) to the Arduino pin 9.

Now, we have to supply the power to the circuit:

  • Connect the Arduino 5v pin to the breadboard 5v terminal, and connect the Arduino GND pin to the breadboard GND terminal.

Now the circuit is completed. Connect the Arduino Uno to the computer via USB cable.

Select your COM port and Arduino board.

Now, Upload the code and play with it.

Code for 74hc595 RGB LEDs With 20 Effects.
if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['f05481bee7'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1356987/f8bwiabku43g4ba_jZS528Oij2.jpg?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

Now the circuit is completed. Connect the Arduino Uno to the computer via USB cable.

Select your COM port and Arduino board.

Now, Upload the code and play with it.

Visit this link for code. Click here

Watch This Tutorial

If you like this video so subscribe to my channel and comment down on what next video you want to see?

Previous Projects:

Arduino 74hc595 with 18 led effects. Click here

74hc595 shift register control with button without arduino. Click here

More interesting projects on My website:

MrElectrouino

Contact me on instagram: _mr_electrouino_

#TAGs

arduino 74hc595, 74hc595 projects, arduino rgb led rainbow code, 74hc595 led chaser, arduino shift register projects, arduino led projects, arduino 74hc595 rgb

Schematics

Arduino 74hc595 Rgb Leds With 20 Effects
Circuit diagram
Rgb led 74hc595 bb z8mh79mwgj

Comments

Similar projects you might like

Christmas Star with RGB LEDs

Project tutorial by Team ArduinoNSK

  • 3,082 views
  • 0 comments
  • 5 respects

Arduino RGB Color Mixer

Project tutorial by FIELDING

  • 20,583 views
  • 7 comments
  • 20 respects

8x8x8 RGB LED Cube

Project tutorial by John Bradnam

  • 16,462 views
  • 21 comments
  • 45 respects

RGB LED Snowflake with Arduino Uno

Project in progress by James Cameron

  • 17,422 views
  • 8 comments
  • 35 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 6,908 views
  • 1 comment
  • 19 respects

Kids RGB LED Star Nightlight

Project tutorial by Unexpected Maker

  • 7,082 views
  • 1 comment
  • 22 respects
Add projectSign up / Login