Archive for September, 2007

74HC595 8-bit Shift Registers!

Friday, September 14th, 2007

How’s that for a geeky title? Tired of the geekiness? TOO BAD! I’m a geek, and this is something you’re just going to have to deal with.

I received a package of goodies from Sparkfun yesterday, and immediately put it to work. Here’s the deal:

Normally, driving LEDs requires the use of one digital output pin on the Arduino board per LED (you drive some current down a pin, it flows through the LED, and lights up—cut the current and the LED goes dark). Once you get past a couple LEDs, however, your available pin inventory starts to get a little thin, and you start running out of room for things like sensors or servo outputs. The answer is a shift register.

Except for the obligatory 5V input and a connection to ground, a shift register requires just three digital connections to the Arduino. Then, up to eight LEDs (or other components) are connected to the output pins of the register, and then the magic starts. By twiddling the current on the three lines controlling the shift register, you start ‘programming’ the chip, describe the desired state of the eight outputs, and when you indicate that the ‘programming’ is done, the eight output lines flip on or off as you’ve requested. It’s a very powerful technique.

(Further, it’s possible to control multiple shift registers using those same three connections. Very cool. If you’re a geek. Which I am.)

Read the rest of this entry »

Next Step: Servos

Friday, September 7th, 2007

I hied down to my local hobby shop yesterday and paid $11 for a servo—it’s a little motor with some circuitry that allows it to be controlled via a very simple protocol, which also happens to be very easy to interface with my Arduino board.

A few minutes after returning home, I’d plugged it in and had it spinning back and forth under my control. Very cool. Very simple.

This sort of closes the loop: I can now read the Arduino’s physical environment via sensors, and then interact with that environment via servo. Now I just need a project. Some ideas:

  • An analog clock, driven by two small servos, with hour and minute hands that swing through 180 degrees instead of in full circles
  • A drawing machine which either gathers information from the environment or which harvests information from the internet, via a program running on my computer. Creating an articulated arm would be the most complicated part of this idea—perhaps I can find an inexpensive one already built somewhere…

I don’t know. This is almost too cool. Read the rest of this entry »