FiveFiveFive

Playing with microcontrollers like Arduino is fun, but I’ve still got a lot to learn, or re-learn, about electronics. I’m continuing to make my way through Charles Platt’s Make: Electronics book, where the last couple experiments I’ve worked on have involved the 555 timer chip.

If you look around on the web, you’ll see that electronics hobbyists have an interesting kind of relationship with this particular IC. For example, they build giant 555 replicas to use as piano benches and footstools. It’s a little like the way role-playing gamers treat their 20-sided dice – part tool, part symbol.

There’s a reason for that – this little 8-pin chip is pretty versatile. At its core, the 555 is a kind of flip-flop. It has two inputs (trigger and reset), and a single output that is either on or off. You hook up various resistors and capacitors to the remaining pins to control the behavior. Experiment 18 in Make: Electronics really highlights its flexibility – each of the 3 555s operates in a different mode providing a distinct behavior.

The project is a “reflex timer”. The idea is that you press the start button, and then wait. A few seconds later, an LED turns on, and a 3-digit timer starts counting. The test is to press the stop button as quickly as you can once the LED lights up. The counter ought to be set up to count in milliseconds, but I left mine running at a more sedate 4Hz or so because it was easier to see what was happening in the video.

The first 555 timer is configured to use its “monostable” mode. In this mode, the output is usually off. The start button is hooked up to the 555’s trigger, and when it is pressed the 555 output emits a pulse that lasts for several seconds. The duration of the pulse is controlled by a capacitor and resistor – the pulse lasts until the capacitor discharges down to 1/3 of the circuit’s input voltage. Using a capacitor and resistor like this will be familiar from the oscillator project from a while back.

The second timer starts and stops the clock, and uses “bistable” mode. In this mode, the 555 can be switched off by a signal on its reset pin, and switched on by a signal to its trigger pin. It stays on or off until the next signal. In this case, the end of the pulse from the first timer signals the second one’s reset pin (turning it off), and the stop button signals the trigger (turning it on).

That probably sounds backwards, doesn’t it? That’s because the chips that are storing the count have a “clock disable” input. To start the clock, we turn off the disable input, and to stop it again, we turn the disable back on. That kind of thing happens a lot in electronics. Luckily, as a software guy, boolean algebra is one thing I’ve got down cold.

The final 555 timer is used to update the clock. It uses “astable” mode, where the 555 basically feeds back into its own trigger input. The result is an oscillator that runs at a steady frequency controlled by the resistors and capacitors it uses. Every time it switches on, the clock advances by one.

So how does the clock itself work? It uses a trio of 4026 decade counter chips. Each one of these ICs can count from 0 to 9. It has an input, which advances the clock by one, and a “carry” output that is triggered when the count wraps around from 9 back to 0. By connecting the carry of one counter to the input of the next, you can have one chip control the 1’s digit, the next control the 10’s, and the last control the 100’s digit of a 3-digit number.

The other neat thing about these counter chips is that they have outputs designed to be hooked up to a “seven-segment” display, like you might see on an alarm clock or a microwave oven. In this case I’m using one component that has 3 seven-segment displays, but each one is controlled individually. The display is really just a bunch of LEDs, but by turning them on and off in a particular pattern you end up with a numeric display. Honestly, it’s fun just to watch it count up from 0 to 999.

This experiment was a really fun project for me, because I appreciate having such a cool output as the numeric display. It was also a fun challenge to get it working correctly. For one thing, it’s a really tight fit to get those components on a single breadboard, and it was tricky to get my fingers into some of those spaces between parts. There’s a lot of connections that have to be made to get this all running correctly. Also, I went through the construction of the circuit in stages, as described in the book. Several times, there was some interim circuitry that had to be modified or removed to make way for the next stage, and everything had to be diligently checked to make sure everything was hooked up the right way.

The worst part of doing a project like this on a breadboard? Knowing that you’re going to have to tear it all apart to make way for the next project!