Projects

12 Projects of Christmas - Part 1

6 of 12 small electronics projects for kids

Daniel Koch

Issue 76, November 2023

Twelve small and visually engaging projects you can do with the kids over the coming Christmas period.

The Christmas holidays are coming up uncomfortably fast, and many parents, grandparents, and carers are wondering what to do with the kids during the holidays. In the lead-up, we present twelve circuits for adults to build with the kids. They are all relatively simple circuits. Even those which have high parts counts and seem complex at first are simple enough - usually just with quite a few lights connected, as in the LED chaser circuit presented first.

The emphasis here is on fun circuits. Most are pointless beyond decorative value. Some cut corners in engineering terms for the sake of simplicity. While this may mean they do not last thousands of hours, they will certainly outlast the interest in them.

While some things done here may not be best practice in engineering terms, all are fit for purpose when all the criteria are considered. In addition, they are all variations of established circuits that have been around for years.

We have aimed this article at those with minimal experience. Therefore, each has a schematic, Fritzing, and some build step photos. This should be enough for most makers, even new ones, to get these circuits built and working.

Most of them have the potential to be taken off the breadboard onto solder protoboards, but we have not done this for any of them. Further, many would benefit from the LEDs being mounted in some sort of display, but we will discuss each in turn.

Each project has an explanation of how it works. These are aimed at people with little electronics knowledge, and they can be a bit repetitive.

That is because we have not assumed that everyone will make or read every circuit in the twelve. Therefore, except for a few places where repeating would take too long (hence the 'refer to project 'x'), each is a stand-alone explanation.

USING SCHEMATICS

While many makers are familiar with schematic or circuit diagrams, there are many newer makers who are not.

This particularly applies to those who have learned to code but come from backgrounds without electronics knowledge as such, and those who have just seen the myriad of great projects on social media and online, and picked up their maker skills along the way.

There are several standards for circuit diagrams. The most common differences are in the symbols used, such as the American zigzag line for a resistor versus the European (and most of the rest of the world) using the empty rectangle standard. However, there are other arguably more important differences.

The biggest is the way Integrated Circuits (ICs) are drawn. Where a specific symbol does not exist as it does for amplifiers, flip flops, and so on, many standards depict ICs as a square or rectangle, with the connections arranged around the shape in any order, to suit the diagram. This results in a reasonably clean diagram.

We have chosen a much rarer standard, which uses a rectangle with all the IC pins in order. This results in many lines crossing over each other. We chose this in the very early days of DIYODE on the basis that, while the lines have to be followed carefully, each line goes to the pin of the IC as you will see it in physical existence.

In other words, pin 3 is the third pin down the left hand side of the IC in both the physical real IC, and the diagram. This makes mistakes less likely in our experience than the arrange-as-needed standard where pin 3 could be the last pin on the other side of a square depicting a 16-pin IC with connections on all sides.

PINOUTS

Rather than crowd the schematics even more with the component pinouts, here are the connections for each component used in the circuits, where we feel a pinout is needed. ICs do not have a physical package shown because the symbols we use are a reflection of the physical package. However, with transistors, it's a different story. You can reference this chart when building any of the following circuits.

BUILD NOTES: EXPANDING OUTPUTS AND MOVING LEDS OFFBOARD

While we present these as breadboard projects only, in the main, there are times when you might want to increase the number of LEDs driven, or move the LEDs elsewhere like the front of a Christmas decoration with the circuit and batteries on the back. Taking LEDs offboard can be done in several ways but the most beginner-friendly is to use plug-to-socket jumper wires like those used with Arduino modules.

Bend the LED legs slightly so that they put pressure on the contact surfaces inside the connector contact, which is slightly wider than the LED leg itself. Then, slide the LED into the sockets and tape or glue it to stop it sliding around. It helps to choose a light and dark colour, so you can keep the negative and positive leads of the LED identified.

Some of these circuits use a transistor output, while others do not. Typically, the ICs involved only handle 10mA at the outputs and resistor values are chosen to reflect this: The LED is still generally bright enough. However, if you want to use multiple LEDs, then a transistor is needed to increase the output current.

If the circuit does not already feature one, then the circuit below can be constructed. The end of the 1kΩ resistor is connected to the output, where the LED and resistor are shown in the relevant circuit diagram. Then, any number of LEDs can be connected in parallel with their own series resistors for current limiting.

You can choose to run the LEDs at full brightness, or reduce the current to connect more LEDs. Most high-brightness LEDs have a constant forward current of 20mA to 30mA depending on manufacturer. Most run well enough and brightly enough on 10mA. The BC547 transistors used in this article have a maximum continuous current rating of 100mA, while the BC337 transistor can handle at least 500mA continuously.

Some brands and models of the BC337 are rated to 800mA. The LEDs cannot be used in series because green, blue, and white types have a voltage drop (needed to make them work) of around 3V to 3.5V. We are using four AA batteries for a supply voltage of 6V, but the reverse-polarity protection diode included has a voltage drop of 0.6V, and the batteries need to be able to run the circuit down to 5V or so.

Further, you cannot use just one resistor to set the current to a group of parallel LEDs. While tempting, each LED has slightly different internal characteristics, so one would take too much of the current. At best, this will cause uneven brightness but in some cases, it will burn out that LED.

LED RESISTORS

Because of the different voltage drops across different colours of LED, different resistors are needed to give the same current value for a given supply voltage. Typically, red and yellow LEDs have a 1.8V to 2V drop, while green, blue, and white have a 3V to 3.5V drop.

The catalogue listings and datasheets for where you buy your LEDs should show both forward current and voltage drop. The table here just makes it easy to choose a resistor based on the voltage drop of your LED and the current you want through it. In the circuit diagrams throughout this article, we have assumed a 3V drop and 10mA forward current in most cases.

To calculate the resistor for an LED, we use Ohm's Law. That tells us that for a given current at a certain voltage, we need a certain resistance. The current we know: It's what we want to flow through the LED, determined by the data of the LED or our circuit's limits (Some ICs handle only 10mA, while our LEDs usually handle 20mA or 30mA).

Desired current (mA)

LED Forward Voltage Drop (V)

5

10

15

20

30

1.5

820

390

270

200

130

1.8

750

360

240

180

120

2

680

360

240

180

120

2.2

680

330

220

160

110

2.5

620

300

200

150

100

2.8

560

270

180

130

91

3

510

240

160

120

82

3.2

470

220

150

110

75

3.3

430

200

150

110

75

3.5

390

200

130

100

68

Resistor Values in Ohms calculated for supply from 4 x AA Batteries through a 1N4004 Diode.
Values are the nearest value from the preffered value system, not the exact calculated value.

The voltage we need to work with is the supply voltage, minus our LED's voltage drop (also called the 'forward voltage'). Bear in mind that four fully charged AA batteries normally give us around 6.2V, but the protection diode in each circuit has its own voltage drop around 0.6V. So, the supply voltage is usually 5.6V, not 6V. Take the LED voltage away from that to leave the voltage you need for the Ohm's Law calculation.

Also, remember to calculate in base units. So, amps, not milliamps (technically amperes but no one says that anymore). 10mA is 0.01A. If it all looks too hard, just use the table we provided.

GLOSSARY

Clock: A regular signal that turns on and off in a set, even pattern. Often a square wave, which means the signal is high for as long as it is low.

GND and 0V: GND is an abbreviation of 'Ground' and comes from bigger electrical systems where the earth itself is used to complete the circuit. In small electronic circuits like these, there is no real ground, just the negative side of the batteries. It is also sometimes labelled '0V'.

Vcc: The term used to show the supply voltage. It may also be shown as V+, +nV, or nV+, where n is the number of volts.

High: In digital terms, high means on, and is a voltage above a certain point. For many of the ICs used, high is anything over 3.5V. The gap between high and low is usually a 'no change' area. For some ICs, high is anything over half the supply voltage.

Low: In digital terms, low means off, but it may not be fully off. Usually, anything below 1.5V for a 5V to 6V circuit is considered low. Most of the ICs used do turn fully off at the outputs when low, but it is useful to know that less than a given voltage but more than 0V at an input is still considered 'low'.

Circuit #1: LED Chaser

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
24 x Plug-to-Socket Jumper Wires-WC6028P1021
12 x 150Ω Resistors * #R1-R3, R5-R7, R9-R11, R14-R16RR0552R7538
4 x 1kΩ Resistors *R4, R8, R12, R13RR0572R7558
1 x 50kΩ Trimmer PotentiometerR17RT4316R2482B
1 x 10µF Electrolytic CapactorC1RE6066R5065
1 x 1N4004 Diode *D1ZR1004Z0109
4 x BC337 NPN TransistorsQ1 - Q4ZT2115Z1035
1 x 4017 Decade Counter ICIC1ZC4017Z4017
1 x NE555 Timer ICIC2ZL3555Z2755
12 x LEDs, Colour of ChoiceLED1 to LED12ZD0152Z0860
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs.

This is one of the more common circuits in learning series and kits but is still great fun and would look good when used with a bauble or star on a Christmas tree.

The idea is to turn four lights on, one after the other. If more than one light is connected to each output, and the groups are arranged the right way, the effect looks like the lights are chasing each other.

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Assemble the components and wire links around the NE555, placed at the left-hand side of the board. Three wire links connect pins 2 and 6, while two more are used for the potentiometer between pins 3 and 6.

Leave space at the left hand side for connecting the diode and battery pack later. Also make sure the striped side of the electrolytic capacitor is in the lower blue (-) rail. The wiper of the potentiometer is hidden under the body, but the wire link shows which row it is on. We also bent out the other legs of this one so they crossed the gap in the board.

Step 2:

Place the 4017 into the board and connect it with wire links between pin 3 of the NE555, and pin 14 of the 4017. These are the brown links with the orange one to cross the gap in the board. The green link joins pin 10 to pin 15, while the orange one grounds the pin 13 clock inhibit control. The two yellow ones are Vcc and GND. Make sure to leave lots of space between the two ICs as we have here, because it will get used later.

Step 3:

Add a 1kΩ resistor from pin 3 to a spot just to the left of the board, and use a wire link to cross the gap. Place a BC337 NPN transistor with its flat side facing you and its middle (Base) leg in the same row as the previous wire link. Fit another wire link from the right-hand (emitter) leg of the transistor, to the upper blue (-) rail. Fit three 150Ω resistors from the upper red (+) rail to empty rows.

Step 4:

Insert a 1kΩ resistor between pin 6 of the 4017, and a spot on the right. Add a wire link to cross the gap, then place a BC337 NPN transistor with its flat side facing away from you and the middle (base) leg in the same row as the wire link. Install another wire link, this one between the left-hand (emitter) leg of the transistor and the upper blue (-) rail. Fit three 150Ω resistors from the upper red (+) rail to empty rows.

Step 5:

Insert a 1kΩ resistor between pin 2 of the 4017, and a row to the left. Add a BC337 NPN transistor with its flat side facing you and its middle (base) leg to the end of the resistor. Take care that it does not end up in a row that is already used for a wire link or the like.

Add a wire link between the right-hand (emitter) leg of the transistor and the lower blue (-) rail. Also add three 150Ω resistors from the lower red (+) rail to empty rows. These need to be somewhere on the other side of the junction of the wire links from IC1 to IC2, as in our photo.

Step 6:

Install a 1kΩ resistor between pin 4 of the 4017, and a row to the right. Place a BC337 NPN transistor with its flat side away from you and its middle (base) leg to the end of the

resistor. Add a wire link between the left-hand (emitter) leg of the transistor and the lower blue (-) rail. Also add three 150Ω resistors from the lower red (+) rail to empty rows.

Step 7:

Add the black wire from a 4xAA battery pack to the lower blue (-) rail. Place a 1N4004 diode with its striped end to the upper red (+) rail and its unmarked end in the first row of the breadboard. Insert the red wire of the battery back into this row. Having the wires further apart than if we put them both in the upper or lower pair of rails means less chance of a short circuit and possibly a fire if one of the battery pack wires works loose and moves.

Note also that in some of the following photos, we disconnected the battery pack and used our benchtop power supply to run the circuit, so you may see two grey wires on a header plugged into the top row.

Step 8:

Using the instructions at the beginning of the article regarding moving LEDs offboard, fit twelve red LEDs of your colour choice to plug-to-socket jumper wires and carefully tape the joins and exposed legs.

Where possible, use a darker colour for the negative (cathode, -) legs and a lighter colour for the positive (anode, +) legs.

Step 9:

Add three LEDs so that the cathodes (-) all go to the right-hand (collector) leg of the upper left transistor, the one connected to pin 3 of the 4017.

The transistor itself is hiding in this photo behind one of the jumper plugs. The anodes (+) of the LEDs go to one 150Ω resistor each.

Step 10:

Repeat this process so that each transistor has three LEDs attached. Remember that the collector of each transistor is the right-hand side if the flat side is facing you, and the right-hand side if the flat face is away from you.

Note also, there are two wire links added in the step, at the far end of the board. One joins the upper and lower blue (-) rails, and the other joins the upper and lower red (+) rails.

Step 11:

Arrange the LEDs from the upper left transistor, the one attached to pin 3 of the 4017, evenly around the outside of your chosen decoration shape. This is an MDF disc we picked up at a hardware store, which will become a bauble decoration.

We marked our twelve holes evenly around it and drilled them, but you could use a hole punch in cardboard. Any shape will do, too, as long as the twelve LEDs are evenly spread around the outside. Notice that the LEDs are spread so that every fourth hole is used.

Step 12:

Add the LEDs from the lower left transistor, the one connected to pin 2 of the 4017. Note that one goes in front of each LED from the previous step. The order is important here, as the diagram at the end will show.

Step 13:

Do the same thing for the LEDs from the lower right transistor, the one connected to pin 4. Again, they go in front of the ones previously installed.

Step 14:

Finally, add the last LEDs which should come from the upper right transistor, the one connected to pin 6 of the 4017. They should fill the remaining holes in the shape. The transistors are arranged from upper left as output 0, lower left as output 1, lower right as output 2, and upper right as output 3. The outputs activate in sequence so the LEDs need to be arranged in this order to give the right effect.

Now all you need to do is install batteries in the holder, and your LED chaser should work!

HOW IT WORKS

The 4017 Decade Counter is an IC that has been with us a long time. It has ten outputs, a clock input, a clock inhibit input, a reset terminal, and a carry out. Clock is just an electronics term for a regular on and off signal, and every time the voltage at the clock input goes from low to high, the counter turns off the current output and turns on the next one. If the reset terminal is given a high, then the counter resets and the count starts again. We use the fifth output to give the high to the reset terminal, meaning we only count to four.

Actually, we count to three. In digital ICs, the outputs always start at 0. So, four outputs means output 0, output 1, output 2, and output 3. So, we have a clock signal coming from the NE555, discussed shortly. It causes the counter to turn on output 0 with its first pulse, then the next pulse turns off output 0 and turns on output 1. Then output 2 is high, then output three. When the next pulse turns on output four, this gives the reset terminal its signal.

The clock pulse is delivered by the NE555 timer IC. This IC has pins for power (8 for Vcc and 1 for GND), trigger (2), output (3), reset (4), control voltage (5), threshold (6), and discharge (7) pins. Pin 2 senses when the voltage has fallen below one third of Vcc, pin 6 senses when it rises above two thirds Vcc, the control voltage pin can be used to alter this upper threshold, and pin 7 connects to GND through an internal transistor when the output pin 3 is low. If the reset pin is high, all this happens. If it is low, everything stops.

Normally to make a repeating signal we connect a capacitor to pins 2 and 6, and charge it with two resistors; one from Vcc to pin 7, and one from pin 7 to pins 6 and 2. As the capacitor voltage increases while it charges, pins 2 and 6 keep an eye on it. When it passes ⅔ Vcc, output pin 3 turns off, and pin 7 is connected internally to GND. Then, the capacitor discharges through the resistor between pins 6 and 7 only, not the pin 7 to Vcc resistor, until pin 2 sees the voltage reach ⅓ Vcc.

This means the off time is never as long as or longer than the on time, because both halves of the cycle use a different total resistance. However, pin 3 is connected to Vcc when it is low, and gives close to Vcc when high. So, to make a square wave generator, which means the high time is equal to the low time, we ignore pin 7. We use pin 3 and a resistor to both charge and discharge the capacitor. Pin 3 starts high and the capacitor is empty. The capacitor charges through the resistor until pin 6 senses the charge voltage has passed ⅔ Vcc, and the output goes low. Now, the capacitor discharges into pin 3 until pin 2 senses the charge voltage has fallen below ⅓ Vcc. Then, the cycle repeats.

The output of the NE555 can source (supply) or sink (carry to ground) 200mA of current, but the 4000 series ICs can only handle 10mA. To run three LEDs per output, we need current amplification. We do that with four BC337 NPN transistors. When current flows from through the base of a transistor, a larger current can flow across the collector and emitter terminals. In an NPN transistor, the current must flow from the base, out the emitter, and to ground. So nothing resists the base-emitter current and reduces the amplification, we usually use the NPN transistor between the load and ground, called a 'low side switch'). In this case, the load is three LEDs, each with its own resistor to limit current. The 1kΩ resistors between the IC outputs and the transistor bases help limit the base current, to protect both the transistors and the IC outputs from exceeding their current limits.

WHERE TO NEXT

This project would really suit the LEDs being mounted around a cardboard star or bauble on a Christmas tree or just sitting on a shelf. It also makes a great sign display if you put the LEDs around a small chalkboard, for example, on a hall table or similar.

Circuit #2: LED Scanner

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
10 x Plug-to-Plug Jumper Wires-WC6024P1022
10 x 330Ω Resistors * #R1 to R10RR0560R7546
1 x 50kΩ Trimmer PotentiometerR11RT4316R2482B
1 x 10µF Electrolytic CapactorC1RE6066R5065
1 x 1N4004 Diode *D1ZR1004Z0109
1 x 4017 Decade Counter ICIC1ZC4017Z4017
1 x NE555 Timer ICIC2ZL3555Z2755
10 x LEDs, Colour of ChoiceLED1 to LED10ZD0152Z0860
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs

This circuit is very similar to the last one, but we use all ten outputs of the IC, and arrange them in a line rather than in a loop.

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Assemble the components and wire links around the NE555, placed at the left-hand side of the board. Three wire links connect pins 2 and 6, while two more are used for the potentiometer between pins 3 and 6. Also make sure the striped side of the electrolytic capacitor is in the lower blue (-) rail. The wiper of the potentiometer is hidden under the body, but the wire link shows which row it is on. We also bent out the other legs of this one so they crossed the gap in the board. Finally, add a 1N4004 diode with its striped end in the upper red (+) rail and its other end in the first row.

Step 2:

Place the 4017 into the board and connect it with wire links between pin 3 of the NE555, and pin 14 of the 4017. These are the green and yellow links with the orange one to cross the gap in the board. The other two yellow ones are Vcc and GND. Make sure to leave lots of space between the two ICs as we have here, because it will get used later. There is another wire link from pin 13 to the upper blue (-) rail, and one more not shown in the image from pin 15 to the upper blue (-) rail.

Step 3:

Add ten 330Ω resistors (value depends on LED colour but current must be 10mA), with one end of each on the lower blue (-) rail, and the other end in a vacant row. Leave two rows between each so the LEDs we fit next are not overcrowded. Also add the black wire from a 4xAA battery pack to the lower blue (-) rail.

Step 4:

Add ten LEDs of your colour choice to the resistors. The short leg, which is the cathode (negative or -) goes to the resistor, while the long leg, which is the anode (positive or +) goes to the empty row to the left of the resistor.

Step 5:

This step caused us much trauma. We really, really dislike having jumper wires all over a breadboard, preferring the neat and flat wire links. However, this time there is no other way. Also, we say 'First LED, Second LED' rather than 'LED1, LED2' because the circuit diagram is labelled by the component position on the drawing but we want the physical layout of the board: LEDn on the drawing is not necessarily LEDn on the board.

Use plug-to-plug jumper wires to connect pin 3 (output 0) of the 4017 to the anode of the second LED. Connect pin 2 (output 1) to the fourth LED; pin 4 (output 2) to the sixth LED; pin 7 (output 3) to the eighth LED; and pin 10 (output 4) to the tenth LED. Then, connect pin 1 (output 5) to the ninth LED; pin 5 (output 6) to the seventh LED; pin 6 (output 7) to the fifth LED; pin 9 (output 8) to the third LED; and pin 11 (output 9) to the first LED. IF that is confusing, there is a diagram in the 'How It Works' section.

Step 6:

Last of all, connect the red battery pack wire to the unmarked end of the diode in the very first row. Your LEDs should now light up one at a time in a back-and-forward pattern.

HOW IT WORKS

For this circuit, we use almost the same arrangement as the chaser. The clock driver based around the NE555 is exactly the same, and the 4017 works the same way, too. So, if you didn't build that circuit, have a look at its 'How It Works' section to find out what we're on about.

The difference here is that instead of an output being fed to the reset terminal, all ten outputs are used. The device self-resets after the last output goes high. The scanning effect is given by the way we arrange the LEDs. The LED order is shown in the build steps above.

Although the counter works from 0 to 9, the LEDs are arranged with the first five going left to right, with the second five spaced in between going right to left. This way, the lights appear to run to one side and then back again, but it is a different set of lights each time. The overall impression is more effective at certain speeds.

As an alternative, you can arrange the LEDs from 0 to 9, then have the effect where the lights run up the strip then start again. We have not used transistors here, electing to keep the LEDs limited to 10mA.

Circuit #3: Pulser

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
7 x 330Ω Resistors * #R6 to R12RR0560R7546
2. x 4.7kΩ Resistors *R1, R3RR0588R7574
1 x 10kΩ Resistor *R4RR0596R7582
1 x 20kΩ Resistor *R5RR0603R7589
1 x 100kΩ Trimmer PotetiometerR2RT4318R2483B
1 x 10µF Electrolytic CapacitorC1RE6066R5065
1 x 100µF Electrolytic CapacitorC2RE6310R5123
1 x 1N4004 Diode *D1ZR1004Z0109
6 x 1N4148/1N914 Signal Diodes *D2 to D7ZR1100Z0101
1 x BC327 PNP TransistorQ1ZT2110Z1030
1 x NE555 Timer ICIC1ZL3555Z2755
7 x LEDs, Colour of ChoiceLED1 to LED7ZD0152Z0860
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs

This circuit lights a row of LEDs one by one, quite quickly, from one side to the other then off again, like it is pushing and pulling the light in and out. You can explore by changing the number of LEDs and the speed of the effect, as well as the brightness of the LEDs and how this affects the operation of the circuit.

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Assemble the components and wire links around the NE555, placed at the left-hand side of the board. Three wire links connect pins 2 and 6.

Also make sure the striped side of the electrolytic capacitor is in the lower blue (-) rail. The wipe of the potentiometer is hidden under the body, but connects to the end of the 4.7kΩ resistor above it. The grey wire link connects the other end of the potentiometer to pin 7. Finally, add a 1N4004 diode with its striped end in the upper red (+) rail and its other end in the first row.

Out of shot to the right, connect the two red (+) rails with a wire link, and the two blue (-) rails with another wire link. This is visible in some of the other photos.

Step 2:

Insert a BC327 PNP transistor with its flat side away from you, to the left of the NE555 as shown. Place a 20kΩ resistor between pin 3 of the NE555 and the middle (base) leg of the BC327. Also add a 10kΩ resistor between the lower red (+) rail and the base. A wire link connects the left-hand (emitter) leg of the BC327 to the upper red (+) rail, while a 100µF capacitor is installed with its striped negative leg to the base, and its other lead to the emitter.

Step 3:

Install one LED with its long positive (anode, +) leg in the right-hand (collector) leg of the BC327 and its short negative (cathode, -) leg to the right. Insert a 330Ω resistor from the cathode, across the gap in the board. Place a 1N4148 or 1N914 diode from the end of the resistor, to the right, with its striped cathode end away from the resistor. Now, insert the other six 330Ω resistors and five diodes so that the diodes are end to end and the resistors are connected at the junctions. Finally, connect a wire link from the final diode and resistor junction, to the upper blue (-) rail.

Step 4:

Place six more LEDs, each one with the short cathode leg to a resistor and the long anode leg to the left of it.

Step 5:

Add wire links to join the BC327's collector to the second LED's anode, then each LED's anode further down the line.

Step 6:

Connect the black wire of a 4xAA battery pack to the lower blue (-) rail, and the red wire to the unmarked anode side of the diode. Add batteries and check the LEDs. They should be lighting up from the right-most one, in a sliding brightness up and down the line.

You may not get all the LEDs to light. The circuit was originally designed for 9V, but if you experiment with different LEDs, different diodes, and different values for the 20kΩ and 10kΩ resistors, you might be able to change this. Adjusting the potentiometer adjusts the speed of the pulse.

HOW IT WORKS

There are two sections to this circuit: The timer, and the LED ladder. The timer is built around an NE555 timer IC connected in traditional Astable setup. This means that it has two stable states and switches between them on its own. This IC has pins for power (8 for Vcc and 1 for GND), trigger (2), output (3), reset (4), control voltage (5), threshold (6), and discharge (7) pins.

Pin 2 senses when the voltage has fallen below one third of Vcc, pin 6 senses when it rises above two thirds Vcc, the control voltage pin can be used to alter this upper threshold, and pin 7 connects to GND through an internal transistor when the output pin 3 is low. If the reset pin is high, all this happens. If it is low, everything stops.

When power is first applied, pin 3 is high, and the internal discharge transistor between pin 7 and GND is off. Current flows from Vcc, through R1, R2, and R3, to charge capacitor C1. As it charges, the voltage across it increases, monitored by pins 2 and 6. When the voltage rises to two thirds Vcc, the internal state changes: Pin 3 goes low, and the internal discharge transistor between pin 7 and GND turns on, connecting that path.

Now, the capacitor discharges through R3, R2, and pin 7. The current through R1 goes through pin 7 to ground, too, because it is a path of less resistance. That's why we have R1 and not just R2 and R3: Without it, pin 7 would be destroyed through overcurrent because it goes straight to ground with little resistance.

As the capacitor discharges (it is no longer being charged because the current through R1 goes to ground via pin 7 and not the higher resistance path through R2 and R3, so it will not charge the capacitor), the voltage across it falls. When it reaches one third Vcc, pin 2 senses this and the internal state of the NE555 changes again. The discharge transistor inside pin 7 turns off, pin 3 goes high, and the cycle repeats.

Pin 3, the output pin, can both source (provide) and sink (carry to ground) 200mA. That is quite a lot but it is not always the best way to use the output. In this case, we use it to turn on and off a transistor. PNP transistors like Q1, a BC327, work when current can flow from the emitter, through the base, and to ground. When pin 3 is low, current can flow via R5, through pin 3, to ground, so the transistor will turn on. However, the transistor will pass current from emitter to collector that is a given number of times greater than the current from emitter to base.

We have a 100µF capacitor C2 connected between the base of Q1 and Vcc. A capacitor works by having two electrodes inside it, with a gap between. If a voltage difference is applied, a charge builds up across the plates. We often do this by connecting one side of the capacitor to ground, but it does not have to be.

As long as one side is more positive than the other, it will work. So, when pin 3 goes low, current flows through it but the capacitor, which has been charged, discharges too. Because R5 is there, it does not discharge instantly but over time. So, the voltage falls slowly, and Q1 turns on gradually. When pin 3 goes high, the capacitor charges again slowly, turning the transistor off slowly.

Ohm's Law is the rule we use to describe the relationship between current, voltage, and resistance. Without going into too much detail and making this longer than it already is, the gradual current change through Q1 is turned into a voltage increase because of the resistance of the components that follow. On the collector output of Q1 is a ladder of LEDs, each with its own resistor to limit the current through it.

The ladder is made up of these LED/resistor sets in parallel. However, notice D2 to D7 in between? Each diode has a voltage drop, which is the voltage that must be across each diode before it will conduct. The LEDs have a voltage drop, too, but because they're in parallel, we only need to consider it once.

As the current through Q1 increases, LED 7 eventually lights, because the voltage gets high enough to overcome its voltage drop. However, LED 6 has D7 between it and ground, adding another 0.6V drop. Only when the voltage has increased will LED 6 light. Each diode adds 0.6V to the total, so LED 1 needs 3.6V more to light than LED 7 did. When the transistor starts turning off again, the process reverses.

Circuit #4: RGB LED Controller

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
1 x 220Ω Resistor * #R3RR0556R7542
1 x 270Ω Resistor * #R2RR0558R7544
1 x 360Ω Resistor * #R1RR0561R7547
1 x 50kΩ Trimmer PotentiometerR4RT4316R2482B
1 x 10µF Electrolytic CapacitorC1RE6066R5065
1 x 1N4004 DiodeD1ZR1004Z0109
1 x 4040 Binary Counter ICIC1ZC4040Z4040
1 x NE555 Timer ICIC2ZL3555Z2755
1 x Common Anode or Common Cathode RGB LEDLED1ZD0270Z0999
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs

This circuit uses a special kind of counter to generate different colours from an RGB LED, the kind with individually-controllable LEDs inside one plastic package. The circuit as shown uses a common-anode LED, which means one anode (+) runs to all three internal LEDs, and connecting the cathode (-) of each determines whether it is on or off. The circuit would work ok with a common cathode version, too, but we'll explain that in the 'How It Works' section.

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Assemble the components and wire links around the NE555, placed at the left-hand side of the board. Three wire links connect pins 2 and 6, while two more are used for the potentiometer between pins 3 and 6.

Make sure the striped side of the electrolytic capacitor is in the lower blue (-) rail. The wiper of the potentiometer is hidden under the body, but the wire link shows which row it is on. We also bent out the other legs of this one so they crossed the gap in the board. Finally, add a 1N4004 diode with its striped end in the upper red (+) rail and its other end in the first row.

Step 2:

Insert the 4040 IC, its wire links to the power rails, and the three wire links that join pin 3 of IC1 to pin 10 of IC2.

Step 3:

Insert an RGB LED into the breadboard. Unfortunately, many have different pin connections but ours eas green, blue, common, and red from left to right. The resistor values on the circuit diagram match the voltages of our LED for 10mA but yours may be different.

Add a wire link for the common. The circuit diagram is for a common anode LED, so the link would go to the red (+) rail. Ours, however, is for a common cathode LED so the link goes to the blue (-) rail.

Step 4:

Plug the black wire from a 4xAA battery pack into the lower blue (-) rail and the red wire into the anode (unmarked) end of the diode. The LED should light immediately. Adjusting the potentiometer changes the speed of the colour changes. There are three more wire links to add.

Out of shot to the right, one joins the upper and lower red rails, while another joins the upper and lower blue rails. There is also one from pin 11 of the 4040 to the upper blue (-) rail. We found this was necessary after building it, to keep the reset pin stable.

HOW IT WORKS

One of the simpler circuits in the series, this one reuses the NE555-based clock generator from the first two projects, so see Circuit #1: The Light Chaser for an explanation. The visual element of this circuit is a common-anode RGB LED. Some RGB LEDs are digital, having a little IC embedded in them and need digital data sent to them to light up. Others have a controller built in and have a fixed pattern. However, many are this four-pin design where one common power pin connects to either the anode or cathode of each of the three LEDs embedded inside the same case, and the other terminals are used to control each one. That is why they are drawn as three LEDs with a box around them in the circuit diagram: Because they are three LEDs, in one case.

The heart of the operation is the 4040 Binary Counter IC. Binary counters have a clock input, and a number of outputs. This one has twelve outputs in total. The number of outputs does not always relate to the number of stages, but more on that shortly. In a binary counter, each output undergoes a complete cycle for every two cycles of the stage before. So, the first output (Q1) turns on with the first clock pulse, then off for the next clock pulse, then on again for the pulse after. So, for every two on/off clock cycles, the first output has only completed one cycle. The second output (Q2) turns on and off once for two complete cycles of the stage before, which means it takes four clock cycles for Q2 to complete one. Q3 completes a cycle for every two of Q2's cycles, which means eight clock cycles.

These counters are sometimes called 'dividers' because each output undergoes a cycle for a given number of clock inputs, so it can 'divide' the clock input. Because each takes double the number of the stage before to cycle, the numbers can get quite big. For a twelve-stage counter,

the outputs are: Q1 = 2 clock cycles; Q2 = 4 clock cycles; Q3 = 8; Q4 = 16; Q5 = 32; Q6 = 64; Q7 = 128; Q8 = 256; Q9 = 512; Q10 = 1024; Q11 = 2048; Q12 = 4096. That means it takes 4096 clock cycles for the twelfth output to undergo one full cycle!

We can use this to our advantage. Turning on different combinations of LEDs in the RGB LED makes different colours of light. Red and green make yellow, red and blue make purple (actually Magenta), and green and blue make cyan, a light blue. All three make white, but for reasons way beyond this article, it's rarely a very good white. By connecting the LED to the binary inputs, we have different LEDs on at a given time, because of the binary nature of the outputs. The last output is on while the middle output could be off, for example. Try slowing down the flash rate with the variable resistor R4 to watch which LED is on and off at a given moment. Purely for simplicity, the diagram starts from Q1 but for board layout reasons, we started from Q2 and just made a faster clock timer.

On the subject of resistors, each LED in the RGB LED has its own resistor because each colour still has a different forward voltage, just like if we were using individual LEDs. Check the data for the LED you buy, in case they are different to ours. Our Example had a red die of 1.8V, a green die of 2.8V, and a blue of 3.2V. We set them all to be 10mA, hence the different resistor values. By the way, 'die'; is the technical term for the microscopic chemical layers on the semiconductor wafer, the tiny part that actually makes up the LED itself. The rest of what you see is just connections and casing.

The 4040 has outputs which source and sink. Because they operate at the same voltage that we supply the LED with, we can use them, with common anode or common cathode LEDs. For common anode, the current goes through the LEDs to the outputs of the IC. When the outputs are low, the LED can light because current flows. When the outputs are high, the voltage is the same on both sides of the LED so no current flows. To use a common cathode LED, just connect the individual anodes to the outputs of the IC and the common cathode to ground.

This controller is not perfect: There is no equal red, green, and blue time, for example. However, as an RGB controller with no coding or microcontrollers required, it's pretty good.

We mentioned before that not all binary counters have a direct relationship between the number of stages, and the number of outputs. In some counters, there are more stages than pins to break them out to. So, some stages do not have outputs. They're still there inside, feeding the next stage, but you cannot access them.

The 4060, for example, is a fourteen-stage counter but it only has ten outputs. Q1, Q2, Q3, and Q11 do not have pins. That's ok in some cases but not others. For example, if you just want to make a long-duration timer, you can choose an output and clock pulse to suit. However, in project #6, the display would look off without Q11. The lack of Q1, Q2, and Q3 would not matter because we would just increase the clock time to compensate. However, on the 4040, all stages have an output.

Circuit #5: Timer Light

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
1 x 24Ω Resistor *R1RR0533R7519
1 x 150Ω Resistor * #R5RR0552R7538
2 x 1kΩ Resistors *R3, R4RR0572R7558
1 x 3.3MΩ Resistor *R2RR1660R7088
1 x 1000µF Electrolytic CapacitorC1RE6316R5182
1 x 1N4004 DiodeD1ZR1004Z0109
1 x BC547 NPN TransistorQ1ZT2152Z1040
1 x BC327 PNP TransistorQ2ZT2110Z1030
1 x White High-Brightness LEDLED1ZD0290Z0877B
1 x Pushbutton SwitchSW1SP0602S1122
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs

This neat little circuit activates an LED at the push of a button, which turns itself off after a set time. On top of that, it does it in a way that uses no standby power from the batteries. This is great for dark cupboards or pantries, or anywhere that you need to see but might forget to turn off the light later.

It might even be good for younger kids who wake up in the night and want to see in their room to feel secure, but the light will turn off again later. The duration of the 'on' time is adjustable, both with a dial and with component choice.

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Insert a 1N4004 diode with its striped cathode end into the upper red (+) rail and its unmarked cathode end into the first row. Install a pushbutton switch and a wire link from one side of it to the upper red (+) rail.

From the other side, insert a 24Ω resistor off to the right, and a 1000µF capacitor with its positive lead to the other end of the resistor, and its striped negative lead in the upper blue (-) rail.

Step 2:

Insert a 3MΩ resistor from the junction of the capacitor and 24Ω resistor, off to the right. Place a BC547 NPN transistor with its flat side away from you and its middle (base) leg in the same row as the 3MΩ resistor. Add a wire link between the left-hand (emitter) leg and the upper blue (-) rail. Fit a 1kΩ resistor between the upper red (+) rail and the right-hand (collector) leg of the transistor, then another from this junction off to the right.

Step 3:

Insert a BC327 PNP transistor with its flat side facing away from you and its middle (base) leg in the same row as the 1kΩ resistor. Add a wire link between the upper red (+) rail and the left-hand (emitter) leg of the transistor. From the right-hand (collector) leg, add a 150Ω resistor off the right, and a high-brightness white LED with its long anode (positive, +) leg to this resistor and its short cathode (negative, -) leg in the upper blue (-) rail.

Step 4:

Insert the black wire from a 4xAA battery pack into the lower blue (-) rail. The red wire from the battery pack goes to the unmarked end of the diode in the first row. Also use two wire links, one to join the upper and lower red (+) rails and another to join the upper and lower blue (-) rails. Strictly speaking they are unnecessary in this build and the black battery wire could go straight into the upper blue rail. However, keeping the black and red wires spread apart reduces the chance of a short circuit should one battery wire pull loose and move.

Install four AA batteries, and press the button. The LED should light and stay lit when you release the button. It will illuminate for quite some time. You can change the timings by increasing or decreasing the value of the capacitor, or the 3.3MΩ resistor, or both.

HOW IT WORKS

This circuit is built around basic discrete components. 'Discrete' means separate or individual, as opposed to integrated circuits like the NE555. At first, nothing is happening because current has nowhere to flow. Q2 is a PNP transistor which needs to have current flow from its emitter, through the base, and to ground in order to conduct current from its emitter to its collector.

There is no path between its base and ground because the NPN transistor Q1 will only conduct if current flows from its base, though its emitter, and eventually to ground and this cannot happen because there is no current to the base.

That all changes when switch SW1 is pressed. This delivers a sudden burst of current to the junction of R1, R2, and C1. R1 is a 24Ω resistor which is included just to limit the current a little bit - capacitors can charge and discharge quite quickly with a large current. Enough current flows through R2 to turn on the base of Q1 a little. It will not 'saturate', or turn on fully to pass its rated current of 100mA, but we do not need it to.

However, most of the current through SW1 and R1 charges C1, a 1000µF electrolytic capacitor. Capacitors work by having two electrodes separated by a gap. When a voltage difference is applied, a charge builds up on the plates. This capacitor has one side connected to ground, so the voltage difference is the supply voltage minus whatever drops over the 24Ω resistor. The capacitor charges very quickly.

The small amount of current able to flow from Q1's collector to its emitter is enough to turn on Q2. Before this, Q2 was kept firmly off because of R3, a 1kΩ resistor to Vcc. Having Q2's base at Vcc (with no current flowing there is no voltage drop across the resistor) means absolutely no current

flows out its base because the base and emitter are both at the same voltage. However, with Q1 conducting, R1 is connected to ground, and current flows along this path. Current can also now flow from Q2's emitter, through its base and the current-limiting R4 (there to stop the base current getting high enough to damage Q2's base), and then through Q1's collector-emitter path to ground. This causes Q2 to conduct current across its emitter-collector path, giving current to the LED and its current-limiting resistor R5.

However, the LED stays lit when you release SW1. That is because of the charged capacitor. That capacitor keeps its charge until the charge has somewhere to go. In the real world, there is some internal loss of charge, but most will stay until it has a way to get to ground. That way is through R2 and Q1's base-emitter path, to ground. The high resistor value for R2 ensures that the charge discharges slowly at a low current, just enough to keep Q1 doing what we need to.

To change the timings, you can increase or decrease R2. Making it too large will mean the transistor never turns on enough. You can also play with the size of C1.

WHERE TO NEXT

This project would be great built into a small cardboard or even plastic box, which can be stuck to a convenient place with Blu Tack or double sided tape. You could put it in a dark cupboard or on a bedside table, or even in the bathroom at night so a bit of light spills out the door afterwards to find your way back to your room.

Circuit #6: LED Stacker

Parts Required:IDJaycarAltronics
1 x Solderless Breadboard-PB8815P1009A
1 Packet Wire Links-PB8850P1014A
12 x Plug-to-Plug Jumper Wires-WC6024P1022
13 x 330Ω Resistors * #R1 to R12, R14RR0560R7546
1 x 50kΩ Trimmer PotentiometerR13RT4316R2482B
1 x 10µF Electrolytic CapacitorC1RE6066R5065
1 x 1N4004 DiodeD1ZR1004Z0109
1 x 4040 Binary Counter ICIC1ZC4040Z4040
1 x NE555 Timer ICIC2ZL3555Z2755
13 x LEDs of Choice, See textLED1 to LED13ZD0152Z0860
1 x 4AA Battery Pack-PH9200S5031 + P0455

Parts Required:

# Value Depends on LED Choice, See Text. *Quantity used in build. Product may only be available in packs

This project is purely a visual entertainment tool, and a practical demonstration of how binary counters work at the same time. It features a row of twelve LEDs, each of which lights up for twice the time of the one to the left of it (or right if you build it that way).

Step 1:

Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Assemble the components and wire links around the NE555, placed at the left-hand side of the board. Three wire links connect pins 2 and 6, while two more are used for the potentiometer between pins 3 and 6. Make sure the striped side of the electrolytic capacitor is in the lower blue (-) rail. The wiper of the potentiometer is hidden under the body, but the wire link shows which row it is on. We also bent out the other legs of this one so they crossed the gap in the board. Add a 1N4004 diode with its striped end in the upper red (+) rail and its other end in the first row. Finally, install a 330Ω resistor between the pin 3/potentiometer wire link, and a spot on the right. Insert an LED with the long anode (positive, +) leg to the resistor and the short cathode (negative, -) leg to the lower blue (-) rail.

Step 2:

Install the 4040, plus the wire links that join pin 10 of this IC to pin 3 of the NE555. That's the green, orange, and white links in this case. You will also need a link between pin 16 and the upper red (+) rail, pin 11 and the upper blue (-) rail, and pin 8 to the lower blue (-) rail.

Step 3:

Place twelve 330Ω resistors to the right of the 4040. All have one end in the lower blue (-) rail, and the other end in an empty row. There is a two-row separation between each.

Step 4:

Insert twelve LEDs, with the short cathode (negative, -) leg to the resistor, and the long anode (positive, +) leg to the left of that. There should be one row separating each LED.

Step 5:

Use plug-to-plug jumper wires to connect the first three LEDs. We strongly dislike this messy method but the pin order does not correspond to the counter stage order so wire links will never work. Pin 9 goes to the first LED, pin 7 goes to the second LED, and pin 6 goes to the third LED. The plug goes in the anode (long leg) of the LED.

Step 6:

Continue with the next nine LEDs. Pin 5 to LED 4; Pin 3 to LED 5; pin 2 to LED 6; pin 4 to LED 7; pin 13 to LED 8; pin 12 to LED 9; pin 14 to LED 10; pin 15 to LED 11; and pin 1 to LED 12.

Step 7:

Plug the black wire from a 4xAA battery pack into the lower blue (-) rail and the red wire into the anode (unmarked) end of the diode. The LED on pin 3 of the NE555 should light immediately after adding batteries. Adjusting the potentiometer changes the speed of pulses to the 4040. There are two more wire links to add. Out of shot to the right, one joins the upper and lower red rails, while another joins the upper and lower blue rails.

HOW IT WORKS

We have used the 4040 binary counter already, to make the RGB LED controller. However, This project demonstrates its operation in a much clearer way. IC2 is set up to provide a square wave in the same way as it was for circuits #1, #2, and #4.

See #1's 'How It Works' section for a detailed description. The difference here is that we have added an LED to the output, LED13 and its current-limiting resistor LED13. This allows us to see the clock output and compare it to the binary counter outputs.

IC1 is a 4040 binary counter. If you made circuit #4 you're already familiar with the details but for those who did not, a binary counter has a bunch of internal counter stages, each of which counts one full on/off cycle for every two cycles of the stage before it. So, while output 1 turns on after two clock cycles and turns off after two more, it takes 4096 clock cycles to make output 12 turn on, and another 4096 to turn it off.

We have connected each output of the 4040 to LEDs through a resistor chosen to limit the current to 10mA, the maximum the 4040 can handle. The value is based on our LED choice, so you may need to change the resistor values.

All this circuit does is provide a visual display of how a binary counter works, but many people find it mesmerising to watch, including us! Note that the LEDs are arranged in order except for LED13, which is moved to the first position.

If you like, you can choose a different colour for this LED to make the clock signal LED obvious. Component tags are named for their position in the circuit diagram, not their physical board position.

NEXT MONTH: Part 2 - Another 6 projects