Projects

Kids Basics: Decision Maker

Using a 555 Timer & CD4017 Decade Counter

Daniel Koch

Issue 31, February 2020

Build a versatile decision maker to avoid indecision, favouritism, and arguments.

BUILD TIME: 2 hours
DIFFICULTY RATING: BEGINNER

A recent incident in the office inspired this month’s Kids’ Basics. It is often easier for us as a team to decide what to have for lunch, then one person can drive to one place to get it. However, from the options, no one could actually make a decision. We don’t mean every person wanted something different. We just all liked and felt like something from each of the available options.

This led to the idea of building a versatile decision maker that could be configured from a simple yes/no two-option machine through to ten options.

We had to scrap the idea of switching the number of outputs, as there was just too much wiring for Kids’ Basics. There’s quite a bit as it is, but the project is still manageable, and much of the wiring is just repetition. We’re using a now-familiar Integrated Circuit (IC), the CD4017 decade counter, along with a 555-based clock. We’re going to use all ten outputs this time, and the clock will be much faster than in the Starry Sky project. This project will be housed in a cardboard gift box, so that you can customise it to your own liking.

The Build:

The whole circuit fits on a standard solderless breadboard. When building, take care to place things exactly where they need to go, counting rows and columns to help you along. We’re powering our prototype with a 9V battery, but it would still work if you have one of the 4xAA 6V battery packs made up from a previous project.

If this is your first time using a breadboard, you can check out our Breadboarding Basics Classroom in Issue #015.

Parts Required:JaycarAltronicsCore Electronics
1 x Solderless BreadboardPB8820P1002CE05102
1 x Pack of Breadboard Wire LinksPB8850P1014ACE05631
2 x Pin to Pin Jumper LeadsWC6024P1022PRT-12795
20 x Plug-to-socket Jumper WiresWC6028P1017PRT-12794
1 x 9V Battery SnapPH9232P0455CE05205
1 x 9V BatterySB2423S4970BCE05337
10 x 750Ω Resistors *RR0569R7555-
1 x 2.2kΩ Resistor *RR0580R7565COM-05095
1 x 10kΩ Resistor *RR0596R7582COM-05092
1 x 100nF Capacitor #RM7125R3025BFIT0118
1 x 1μF CapacitorRE6032R5018CE05130 *
1 x 100μF CapacitorRE6130R5123CE05258
1 x 555 Timer ICZL3555Z2755002-512-LM555CN
1 x 4017 Decade Counter IC %ZC4017Z4017-
10 x LEDs 5mm % ZD0150Z0800COM-09856 *

Parts Required:

* Quantity used, may be sold in packs.

# We used an MKT capacitor, but you can use any type with the correct value.

% We used red, but colour choice is yours.

Step 1:

Place the breadboard in front of you with the outer red (+) rail away from you and the outer blue rail (-) closest to you. Insert the 555 with the notch or dot on the case facing the left.

Add the two wire links to join the power rails, upper blue (-) to lower blue (-) and upper red (+) to lower red (+).

Step 2:

Insert the CD4017 IC and the wire links to connect both ICs to the power rails. Note which rail each link ends up in.

Step 3:

Insert the cluster of wire links around the 555 IC. The 2.2kΩ resistor (red, red, black, brown, brown or red, red, red, gold) also gets installed now.

Step 4:

Insert eleven resistors around the CD4017 IC. The one between the upper blue (-) rail and pin 14 is 10kΩ (brown, black, black, red, brown or brown, black, orange, gold). All the others are 750Ω (violet, green, black, black, brown or violet, green, brown, gold).

Step 5:

Insert the 1μF capacitor between pin 2 of the 555, and the lower blue (-) rail. Insert the 0.1μF capacitor between pin 5 of the 555, and the upper blue (-) rail. Install the 100μF capacitor between the upper red (+) and blue (-) rails.

Step 6:

Cut two plug-to-plug jumper wires in half, and bare the ends. Screw each half of one wire into either side of the bed lamp switch, and twist each half of the other wire through the terminals of the pushbutton switch.

Step 7:

Plug one end of the wired pushbutton switch into the breadboard to meet pin 3 of the 555. Plug the other into pin 14 of the CD4017 IC.

Step 8:

Plug one end of the wired bed lamp switch into the most left-hand row on the breadboard. Plug the other end into the upper red (+) power rail.

Step 9:

From a set of plug-to-socket jumper wires, peel off 20 cores together. Plug the anode (positive, usually marked by a longer leg) of an LED into the far left socket, then the cathode (negative, often marked with a flat on the case) into the next left socket. Repeat this process for all ten LEDs.

Step 10:

Plug the negative lead from the first LED into the lower blue (-) rail, then the positive lead into the end of the left-most resistor. Repeat for the next six LEDs so that you have three left.

Step 11:

The last three LEDs have their positive leads installed into the resistors in the top right corner of the board, and their negative leads into the upper blue (-) rail.

Step 12:

Install the battery snap with the black (-) wire into the upper blue (-) rail and the red (+) wire to meet the bed lamp switch. Connect your battery and test by pressing the pushbutton.

Circuit diagram. Read more about these in Issue #007
Fritzing diagram. Learn more about these in Issue #016

TESTING

Due to the many jumper wires plugged into this circuit which prevents clear images being taken, don’t become disillusioned if the circuit doesn’t work the first time. There’s plenty of scope for incorrect connections here. Press the button several times first, as the circuit will still work even if a couple of LEDs are not connected correctly.

While you may get no light the first time, the next press will very likely land on a different LED, which may light up. If so, check the LED connections very carefully, both at the LED end, and the breadboard end.

If no LEDs light, it’s time to check the connections to your pushbutton, at both the switch end, and the breadboard end. A faulty or misplaced connection here will prevent the CD4017 IC from being driven. Also, check the position of all the components around the 555 IC. If it is still not working, check any remaining connections, including the power switch, and component orientations.

HOW IT WORKS

The circuit is based on a CD4017 decade counter, which we dealt with in Issue #027. For a full run-down, you can access that article online or look back if you have the print issue. This was our Star Struck project. To recap, the CD4017 is a decade counter, meaning it has ten outputs, only one of which is on, or ‘high’, at any given time. A clock signal, being just a string of on/off or high/low pulses, is fed to the counter, which switches to the next output at the beginning of the high of the clock cycle. In issue 27, we used the first five outputs, 0 to 4, and used the sixth, output 5, to trigger the reset. In this project, we use all ten outputs, and the reset is simply grounded. The IC loops to the beginning once all outputs have been triggered.

Other things are a little different this time. The 555 timer is set up exactly the same way as last time, but with different component values. In the Star Struck project, we wanted a low frequency of 2.8Hz, or 2.8 full cycles per second, to slowly twinkle the LEDs.

This time, however, we want the outputs to switch so fast that you cannot see the individual LEDs light well enough to be able to stop the circuit on a chosen LED, otherwise it would not really be effective as a decision maker. We chose a 2.2kΩ resistor and a 1μF capacitor to give us 263Hz. That’s slow enough to see the LEDs flicker, but gives most people no chance of knowing where the output will stop once the button is released.

Some readers will be familiar with the 555 from previous projects. Having one resistor and one capacitor to set the timing is less common. The more familiar circuit involves two resistors, and the relationship between them sets both the high and low times of the cycle, independently. While this enables versatile designs, the decade counter advances at the very beginning of the clock cycle’s high time, meaning the total cycle time is all that matters. How much of it is high and how much is low is irrelevant in this case.

The outputs of the CD4017 are connected via dropping resistors to LEDs. No driving transistor is used as the single LED is within the 10mA current limit of the IC with the resistor values chosen. They will not be very bright, but will still be functional. We used transistor drivers in Star Struck because we wanted full brightness from 30mA white LEDs, and because we were building the dimming circuit as well. Ten transistors would not fit on the board as we have it, however.

The pushbutton is connected between the output of the 555 oscillator and the clock input of the CD4017. Combining all of this, using your decision maker simply involves pressing and holding the pushbutton for an amount of time of your choosing. When the button is pressed, clock pulses flow to the decade counter, which starts counting very fast. When the button is released, the output that was lit at that time stays lit.

Boxing It Up:

The circuit as presented works electronically, but isn’t practical as a decision maker. We need a way to mount the LEDs so they can be easily and consistently seen, as well as a way to label them. As such, we’ve chosen to mount our circuit in a dollar-shop cardboard gift box. These come in all shapes and sizes, so you can choose one that suits you.

They are easy enough to work with, but be careful not to get one that is too thick - you won’t be able to make holes in it if a pencil does not go through. Additionally, some are coloured and some are plain cardboard, but our main interest is the surface. If you can find one that is very glossy, it should work ok with dry-erase or whiteboard markers to label the LEDs. Alternatively, you can use a pencil and eraser, or adhesive notes such as Post-It® notes to label your LEDs. You could also just number the LEDs and use a piece of paper to draw up a table reflecting your decision allocations.

Step 13:

Having chosen your box, decide on what system you will use to mark your decisions. Because the box we already had on hand was not shiny enough for whiteboard markers, we chose numbers, but spaced far enough apart so that we could use Post-Its®. Mark the positions your LEDs will take.

Step 14:

On the top or side of the box, mark a spot for the ‘Decide’ pushbutton switch. Mark a spot on the side or back for the power switch.

Step 15:

Use a pencil to start holes at all the marks on your box. If your box is too thick, you may need to start with a metal skewer, but use your adult for help in this step no matter what. Use a pencil to enlarge the holes to the sizes required. The LEDs will need to fit snugly, but the switches will need larger holes and fit with a nut that screws on.

Step 16:

Place the circuit into the box, and install the bed lamp switch in the side or back. The plastic nut should fit firmly down on the cardboard.

Step 17:

Screw in the ‘Decide’ pushbutton, you may need to disconnect the wires from the breadboard until you’ve finished installing the LEDs.

if you mounted the pushbutton in the lid - its wires are shorter than those on the LEDs.

Step 18:

Install the LEDs in no particular order. In fact, it looks better if they appear to be lighting randomly. You may wish to bend the leads parallel to the box surface and tape the LEDs in place. Reinstall the pushbutton leads into the breadboard if needed, and place the lid on.

USING IT

To make a decision you don’t want to be responsible for, where you have equal favour for all options, label the LEDs or allocate their numbers to the decision options. There are ten LEDs, so if you have, say, three options, you could label three LEDs with each, so only one is unused. This will reduce the number of button presses required to achieve a result, without the LED that gets lit up being unallocated.

We set our LEDs up in two rows, allowing room for Post-It® labels but also meaning the two columns can become ‘yes’ and ‘no’. Whatever you do, make sure each decision option has equal treatment, for fairness. So, if you have four options, use eight LEDs, and leave two unused. Otherwise, you’ll have two options with two LEDs and two options with three LEDs.

WHERE TO FROM HERE?

Other than the presentation, which is limited only by your imagination, you could try making the number of outputs variable. This will require more wiring and a second breadboard if you want to keep things neat. You’ll need a single pole, twelve-position rotary switch, set to a limit of eight positions. The common terminal connects to the reset pin of the CD4017, while the eight switched terminals connect to outputs 2 to 9. Outputs 0 and 1 are always used, because you’ll never have less than two options, often ‘yes’ or ‘no’. If you have less than two, the decision has been made without you.