An 8-Bit Waterfall using Arduino

So far my Arduino projects have all needed only a small number of output pins. In a previous post I talked about moving some of the logic off the Arduino and into other integrated circuits in order to free up pins on the Arduino. While this can help, I’m sure there will come a time when I’ll need more output pins then the Arduino Uno has to offer.

Arduino 8-Bit Waterfall

One solution would be to upgrade to an Arduino Mega as it has 54 digital output pins compared to the 14 digital pins on the Arduino Uno. The cost difference of around £15, however, doesn’t make this an attractive option. Fortunately there is a much cheaper way of adding extra output pins; 8-bit shift registers.

Whilst you don’t need to know the full details of how a shift register works an understanding of the basic principle will help. Essentially data is shifted into the chip one bit at a time using two pins; a data pin specifying the bit value and a clock pin that is triggered to show when the bit has been set. Once all the bits have been passed to the chip a third pin (known as the latch) is triggered at which point each bit is output on a separate pin of the chip. In the case of an 8-bit shift register (the 74HC595N for example) this allows us to control 8 pins (one for each bit) using just three pins on the Arduino (one each for data, clock and latch). In this way we can add five new digital output pins to an Arduino for just 70p (I got five chips for £3.50 from oomlout).

READ  Tweetosapien: Hack a Robosapien With Arduino to React to Tweets

The 74HC595N is in fact such a common way to add extra pins to an Arduino that there is a simple tutorial already available, although I didn’t find this before I’d already wired up the circuit you can see to the left. Due to a shortage of space on my breadboard I only bothered to wire LEDs to three of the output pins, but it should be clear how to add LEDs to the other five output pins should you wish to. Also it’s worth noting that I haven’t needed to add a capacitor to the latch pin (a capacitor would ensure a smooth flow of power, but the Arduino on it’s own seems to work fine and I didn’t have any spare capacitors lying around). It’s important to make sure you pull the enable pin to ground otherwise you’ll find the lights flicker uncontrolably, if they come on at all.

Using this circuit I can cycle through all combinations of the three LEDs by writing the numbers 0 to 7 to the data pin. This works because we only need three bits to encode numbers 0 to 7 which will cause the relevant pins to go LOW/HIGH as appropriate. For those of you who aren’t so comfortable with binary the following table will help.
Arduino 8-Bit Waterfall schematic

Integer Binary
1 1
2 1
3 1 1
4 1
5 1 1
6 1 1
7 1 1 1

So to turn on the yellow LED we would write 2 to the chip or to turn on the green and orange LEDs we would write 5. The following simple sketch can be used to show that this does indeed work.

Major Components in Project


For more detail: An 8-Bit Waterfall using Arduino

READ  Arduino Interrupts and Debouncing

JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory:

This Post / Project can also be found using search terms:

  • waterfall display using arduino
  • 8 bit waterfall using arduino
  • an 8-bit waterfall using arduino
  • Arduino graphic waterfall

Leave a Comment

= 4 + 3

(Spamcheck Enabled)

Read previous post:
Vibration Foam Speaker
Vibration Foam Speaker

Concept: Very simple, using an arduino and the play melody basic program, create a music playing speaker out of a...

Scroll to top