Pages

Monday, 4 October 2010

Arduino and loads of LEDs

Needing to hook up lots of LEDs to an Arduino?  The obvious choice is to simply hook the LEDs to the digital output pins and away you go.  However, this will only give you 14 LEDs.

OR, you can hook one of these fellas.  Catchily named "75HC595" - but known as a Shift Register.  From just three pins on the Arduino you can drive 8 LEDs!  and the fun doesn't stop there... hooking up another one of these puppies to (essentially) the same pins gives you another 8 LEDs :- a total of 16 LEDs off just three pins on the Arduino!!  ...I don't know what the limit is but I've seen somebody driving 24 LEDs with three of these chained together. Very cool.





So, here's what I've done so far...

First up - one '595



Next - two '595s — I just ran out of red LEDs!



Lastly - I added a potentiometer to control which LED is lit.





It's a ball and it's pretty darn simple!


Next challenge - experiment with a similar chip... "74HC166" ...which allows eight buttons or switches to be connected to three Arduino pins - and can be chained together also!   ;)


[m]

No comments:

Post a Comment