Make your own indoor twinkling starry sky, and learn about counters at the same time.
BUILD TIME: 4 HOURS + Drying time DIFFICULTY RATING: BEGINNER
This star-lit sky is made with ‘dollar shop’ canvas, so it is scalable from tiny to huge. It is also customisable depending on your art skills, from a plain black sky to a realistic deep blue with horizon and clouds. We’ll even describe how to make it work for a forest firefly scene.
All of this will be based around the CD4017 decade counter, an old but versatile and still-produced Integrated Circuit (IC) that steps through ten independent outputs on receiving a pulse on another pin.
We’ll show you how to build the electronics first, then explain how it works, before progressing to the art to go with it. As usual for kids basics, you can complete this with no soldering or prior electronics knowledge.
FIBRE OPTIC MATERIALS
Fibre Optics look like simple lengths of plastic, a bit like fishing line. However, they are actually made very differently, and feature two layers; an inner core with a cladding around it, both transparent. You can rarely see the layers, but on larger, cheaper fibres, they are visible. The light fed in one end bounces off the internal cladding and thus stays within the core, something called ‘Total Internal Reflection’. Serious optical fibres for communication are made of a pure form of glass, or very precise plastic formulation, and usually have an outer plastic cover.
We are not using that expensive cable, however. Plenty of optic fibres are made for decorative use, and are far cheaper. They are still made from a higher-quality plastic meant for light transmission, called PMMA, but at a less pure level. They rarely have a plastic outer, and can range in size from 0.5mm to 5mm.
When purchasing for this project, we found no retailers selling the raw material. We had to buy from an eBay seller instead. We found that by searching PMMA, we got reasonable results and were able to buy from an Australian-warehoused seller. We bought 50 metres of 1mm fibre for less than fifteen dollars, and it arrived in four business days. We found we used most of the 50 metres for our sized artwork. The length needed depends on the number of stars you choose, and the distance from each to the circuit board, plus some slack for corners.
|CRAFT MATERIALS & TOOLS REQUIRED:|
|Framed Canvas, Size of your Choice|
|Small Paint Brushes|
|Dark Blue or Violet Paint for Sky|
|Black Paint For Darkening Colours|
|Paint Of Chosen Colours for Background Scene|
|Flush-Cut Side Cutters|
|Hair Dryer or Heat Gun|
|5 × 100mm Cable Ties|
|Hot Melt Glue Gun, Glue, and Responsible Adult|
|Thick Cardboard for Back of Canvas, Size Varies|
CRAFT MATERIALS & TOOLS REQUIRED:
|ELECTRONICS Parts Required:||Jaycar||Altronics||Core Electronics|
|50m × 1mm PMMA Optic Fibre†||-||-||-|
|2 × Small Breadboards (or one long one if you have it)||PB8820||P1002||CE05102|
|1 × Wire Link Kit||PB8850||P1014A||CE05631|
|5 × Plug to Plug Jumper Wires*||WC6024||P1022||PRT-12795|
|1 × 4017 Decade Counter IC||ZC4017||Z4017||-|
|1 × 555 Timer IC||ZL3555||Z2755||002-512-LM555CN|
|5 × BC549 NPN Transistors (or similar)||ZT2156||Z1044||-|
|5 × White High-Brightness LEDs||ZD0290||Z0876D||-|
|5 × 150Ω Resistors*||RR0552||R7538||COM-05092|
|5 × 1kΩ Resistors*||RR0572||R7558||COM-05093|
|1 × 1.2kΩ Resistor*||RR0572||R7560||COM-05094|
|2 × 2.2kΩ Resistors*||RR0580||R7565||COM-05095|
|1 × 3.3kΩ Resistor*||RR0584||R7570||COM-05096|
|1 × 4.7kΩ Resistor*||RR0588||R7574||COM-05097|
|5 × 10kΩ Resistors*||RR0596||R7582||COM-05098|
|6 × 100kΩ Resistors*||RR0620||R7606||COM-05099|
|1 × 100nF MKT or Greencap Capacitor*||RM7125||R3025B||FIT0118|
|1 × 2.2μF Electrolytic Capacitor*||RE6042||R5028||CE05130|
|5 × 10μF Electrolytic Capacitors*||RE6066||R5065||CE05130|
|1 × 4AA Battery Holder||PH9200||S5031 + P0455||ADA830|
|4 × AA Batteries||SB2425||S4955B||CE04629|
|10cm × 5mm Heatshrink*||WH5533||W0913A||PRT-09353|
* Quantity shown, may be sold in packs.
† You may need to purchase the fibre optic cable from online retailers or wholesalers. Minimum lengths may apply.
The electronics for this build are based on two separate breadboards. One mounts the clock and counter, the other mounts the LEDs and drive circuits. You won’t need any special tools, there is no soldering, and the only electronics knowledge you will need is how to identify components. Even then, we will guide you.
If this is your first project, you may also like to read Breadboard Basics in Issue 15, to familiarise yourself with the breadboard before getting started.
Place a breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Insert the 555 and 4017 as shown, counting rows from each end to place them correctly. Make sure these go in with the notch cut-out facing the same way as our photo.
Insert wire links from the upper red (+) rail, to pin 8 of the 555 and pin 16 of the 4017. Also insert a wire link between the upper blue (-) rail and pin 13 of the 4017.
Insert wire links from the lower blue (-) rail to pin 1 of the 555 and pin 8 of the 4017. Also insert a wire link from the lower red (+) rail to pin 4 of the 555.
Place the five wire links around the 555, counting rows to place them correctly.
Insert the 100kΩ resistor ( brown-black-black-orange, or brown-black-yellow) between pin 3 of the 555 and the wire link as shown.
Insert the 100nF (0.1 or 104) capacitor between pin 5 of the 555 and the upper blue (-) rail. Insert the 2.2μF capacitor between the lower blue (-) rail and pin 2 of the 555, noting its negative stripe to the blue (-) rail.
Insert the six wire links shown here around the 4017, being careful of their start and end points.
Insert wire links to join the upper and lower blue (-) rails and red (+) rails. We have cut ours to length.
Place the second breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Place the five wire links shown, all of which start in a blue (-) rail. Count their end points and use the grid numbers to help.
Place the five 150Ω resistors (brown-green-black-black, or brown-green-brown), again counting the rows to place them correctly. One end of each goes to the blue (-) rails.
Insert the five 10kΩ resistors (brown-black-black-red, or brown-black-orange), counting to place them, with one end of each going to the blue (-) rails.
Place the five 100kΩ resistors (brown-black-black-orange, or brown-black-yellow), counting carefully.
Place the five 1kΩ resistors (brown-black-black-brown, or brown-black-red), noting that one end always meets one end of a 100k resistor.
Place the wire link and 4.7kΩ resistor (yellow-purple-black-brown, or yellow-purple-red), shown at the top left of the board.
Insert the wire link and 2.2kΩ resistor (red-red-black-brown, or red-red-red), in the upper middle of the board.
Place the wire link and 3.3kΩ resistor (orange-orange-black-brown, or orange-orange-red), at the upper right of the board.
Insert the 2.2kΩ (red-red-black-brown, or red-red-red), and 1.2kΩ (brown-red-black-brown, or brown-red-red), resistors in the lower half of the board.
Insert the five BC549 NPN transistors in the locations shown. Note that the flat faces all face the same direction, that the legs all sit in rows side by side without gaps, and that base (middle leg) lines up with the end of the 1kΩ resistor in each case.
Place the five 10μF capacitors, with the negative (striped) side to the blue (-) rails.
Insert the five LEDs, with the anodes (long leg) to the red (+) rails and the cathode (short leg) to the collector (left hand leg) of the transistors.
Connect length of five pin-to-pin jumper wires to connect the outputs of the 4017, pins 2, 3, 4, and 7, plus the wire link to the right.
Plug the other end of these wires into the driver circuits, at one end of each 100kΩ resistor.
Place the breadboards end to end, and use four wire links to join the power rails.
Install four AA batteries into their holder and plug the red wire into a red (+) rail and the black wire into a blue (-) rail. Your LEDs should light up, and twinkle in turn. If not, disconnect the battery pack and check connections. ›› There are three sections to this circuit: An oscillator to produce a clock pulse, a decade counter to switch between LEDs, and an LED drive section that makes the LEDs ‘twinkle’.
How Does This Circuit Work?
There are three sections to this circuit: An oscillator to produce a clock pulse, a decade counter to switch between LEDs, and an LED drive section that makes the LEDs ‘twinkle’.
A NOTE ABOUT CONSTRUCTION: Kids Basics is always designed to use breadboards as a way of avoiding soldering. We do this because soldering requires certain skills and some practice, and involves a significant burn risk. However, some people will have the skills required, and the responsible adult around to supervise. If this is you, then you may wish to make this project permanent. To do this, you can use one of the prototyping boards that are a row-for-row, column-for-column copy of the solderless version. All the connections and locations stay the same, but the connection is permanent, so your artwork will be more reliable in the future.
The oscillator is based around a 555 timer IC, but with fewer components than in any previous Kids’ Basics. It uses one resistor and one capacitor to set the timing. When power is first applied, the output is high (on, supplying current). Current flows through the resistor to pins 6 and 2, and the capacitor, which charges. When pin 6 senses that the capacitor has charged to two thirds the supply voltage, the output at pin 3 switches low (off, sinking current). The capacitor now discharges via the same resistor, to ground via the output pin. When the capacitor discharges to one third the supply voltage, pin 2 senses this and the output swings high, restarting the cycle. We take the output from pin 3 to the ‘clock’ input of the decade counter. With these component values, this results in a clock pulse of around 2.8Hz, or 2.8 switches per second.
Changing values here will alter the timing. Values for the resistor could be as high as 1Mohm, or as low as 10kohm. The capacitor could be as high as 100µF, and as low as 470nF. At the two extremes, these would make the flash either very fast, almost a blur, or very slow, almost slow enough to not notice at a glance.
THE 4017 IC
The 16-pin, DIL (Dual in line) packaged 4017 decade counter provides the sequential switching on and off that we need to make the stars ‘twinkle’. The decade counter is shown in the pin-out diagram. Notice that the outputs only go to 9. The first output is labelled 0, which gives us ten in total.
|PINS 1 - 7, 9 - 11:||These are the output pins, in no particular order.|
|PIN 8:||Ground power connection.|
|PIN 12:||Carry out. This pin goes high for the first five counts, and low for the remaining five counts. This is used to control any following stages, but we are not using it.|
|PIN 13:||Clock enable. This pin controls whether the clock input is active. Held to ground, the counter works. If the Enable pin is held high, the counter stops.|
|PIN 14:||The clock input. The decade counter advances one output every time the signal at the input rises (leading edge) far enough.|
|PIN 15:||The reset pin. When this pin is tied to ground, the counter counts all the way to 9, then starts again from 0. If the reset pin is taken high, the counter immediately starts again from 0.|
|PIN 16:||V+ or Vcc. The positive power supply connection.|
The clock pulse from our 555 is fed to pin 15. Every time it goes high, the counter steps from one output to the next. We are using outputs ‘0’ to ‘4’. However, we have tied output ‘5’ (which, because we started at 0 instead of 1, is actually the sixth output) to the ‘Reset’ pin. Whenever output ‘5’ turns on (goes high), the counter is immediately reset and counts from output ‘0’ again instead of proceeding all the way to output ‘9’. By doing so, we have turned a ten count into a five count.
Each output from the decade counters are fed to a transistor-based drive circuit shown in the circuit diagram, which enables two things. Firstly, the output from the 4017 has a maximum current of 10mA, while most high-brightness white LEDs we want to use draw 30mA. The transistors enable us to boost this. Secondly, the addition of some resistors and a capacitor enables us to make the LEDs switch slowly, rather than a sharp on/off.
The drivers are almost identical for each output, so we will have a look at the driver for output ‘0’. The output from the 4017 is fed to two resistors in parallel, 10kΩ R2 and 100kΩ R3. The other end of R3 is connected to 10μF capacitor C3 and 1kΩ resistor R4. When the output goes high, some current flows through R2 to ground (not ideal, but needed later), and some flows through R3 to the junction of R3, R4, and C3. As C3 charges, the voltage at this junction slowly rises. Current flows through R4, which limits the current to the base of the transistor when the capacitor is fully charged. The base of NPN transistor Q1 slowly becomes ‘saturated’, turning on gradually as the capacitor charges. This allows current to flow from the supply, through LED1, the transistor, and R5, a 150Ω resistor which limits the current to the LED to just under maximum allowable.
When the output goes low, capacitor C3 discharges via R3 and R2 to ground, gradually turning off the transistor as it does. The capacitor must discharge to ground, because its self-discharge is too slow to be useful and there is no other discharge path without R2 present.
You may have noticed that the junction of the LED cathode and the collector of Q1 also connects to 2.2kΩ resistor R6. When the transistor is not conducting, this resistor allows a small current path through the LED, setting a low brightness that exists all the time. When the output goes high and Q1 turns on, the current path through Q1 and R5 has a much lower resistance, and the LED is able to operate at full brightness. In this way, the stars are all visible, all the time, and just get brighter to ‘twinkle’ in their turn. The value of this resistor changes for each output, so stars of different brightnesses are always visible, and is the only difference between the output drivers.
WHERE TO FROM HERE?
You can alter the timing of the clock oscillator by changing the values of C1 and R1. This will change how fast or slow the twinkle appears. You may also want to experiment with tinting one or more of the LEDs. Real stars vary in colour, with tinges from blue, through white, to yellow, and some reds. You may use a permanent marker to colour the lens of an LED, or just the ends of the optic fibres. You can also alter the values of R2, R3, C3, and R6, or their equivalents in the other driver circuits.
Creating A Scene
The craft for this project is either a painting, or a print-out. I am no artist, but the techniques here are accessible to most people, albeit with a little sketch-on-paper practice first. A painting makes sense because you can make it whatever you want. We chose a camping scene in the Australian bush, but you could do an urban silhouette (ignoring the fact that light pollution makes it hard to see the stars in the city), a country house, a beach, anything. If you don’t feel confident, you could forego the scene altogether and just paint the background colour as if you’re looking straight up into the sky.
On the subject of drawing, we looked up a couple of images of gum trees online, printed one in black and white, and drew lines along the major branches until we were happy. We drew similar lines on the canvas and painted over them. Looking at the main structure of anything and ignoring the smaller details will help you gain a good rendition in paint.
The artwork is painted (or glued) onto a dollar shop canvas, with scrap cardboard glued behind to support the optic fibres. The only specialised tool you’ll need is a tailor’s awl, but a thick darning needle or thin metal barbeque skewer will work as well.
ALTERNATIVE ARTWORK: In case painting isn’t your strong point, or you want this project now, without waiting for the paint to dry, we have produced artwork that you can download from our website and print out. Instead of a night sky, however, we have made a forest full of fireflies. Glue the print-out to MDF sheet first. Skip to step 30 for the rest of the process.
Colours don’t disappear at night, but our night vision uses part of our eyes that does not see colour well. As such, for your artwork, choose colours that you would normally see, and darken them with black. For example. We chose greens and browns for our trees and grass, and red for our tent. The result is what you see.
Mix dark blue or violet paint with a very small amount of black and stir well. Add more black in drops at a time until you’re happy. Cover the canvas with this backing colour. Our image shows a whole tube of violet under that black paint on top.
When dry, add your background scene in pencil.
Darken your chosen colours with black, but less than before - they are going onto a dark background which will help darken them.
Paint your background scene from lightest to darkest colours.
Place sheets of thick cardboard (a cut-up box works well) behind the canvas and glue in place with hot melt glue. Use your adult for help here.
Use the tailor’s awl, darning needle, or skewer to poke holes in the sky. Make sure you go through the cardboard too, and do this with your adult. Be sure that the tool is only just wider than the optic fibre, and keep your fingers clear of the sharp end.
Cut lengths of optic fibre material, long enough to reach from each star to the base of the canvas. Poke one end of each fibre through a hole. It is usually easier to work from the front, as the canvas closes over.
Glue the fibre in place with a dab of hot melt glue on the back of the cardboard.
With the glue properly set, trim the ends flush with the canvas, taking care not to scratch the paint.
Divide the fibres at the other end into five bundles. Let the arrangement be random, don’t try to trace them back to the holes. Cable tie the bundles tightly at a point where they can reach the base of the canvas.
Trim the ends of each bundle with side cutters so they are flush.
Mount the breadboards on the back of the canvas. You can use loops of masking tape for this, or Blue Tac®.
Use heatshrink to attach the bundles of fibres to the LED. A hairdryer is usually hot enough for this, but not always. You may find it easier to pull the LEDs out one at a time for this.
Connect the battery pack and test it out!
WHERE TO FROM HERE?
You could add small blobs of glow in the dark fabric paint to the ends of the fibres. Keep the blobs small to avoid obscuring all the light. This way, the twinkle is softened out and the light continues after power is off. You could also add glow in the dark planets and galaxies, such as the self-adhesive vinyl ones you find in toy shops. These will need to be lit with a torch first.
If you used the firefly print-out, you could also try the glow-in-the-dark paint, or cellophane over the white LEDs to give a yellow or green tint.
You could also adapt this kind of display for another artwork. Lights in an urban cityscape would look amazing, although in this case, you would choose where the fibre optics go. Place the fibres in building windows, car headlights, aircraft in the sky, and connect them so that the LEDs light the fibres in a side to side or up and down way. This will lead the viewer's eye around the artwork.