Light up your art in the dark with this darkness-activated illuminated art frame, and make some artwork to go in it.
BUILD TIME: 2 HOURS
DIFFICULTY RATING: BEGINNER
It’s been a little while since we got artistic in Kids’ Basics, and it’s well past due. With some places in Australia and around the world still affected by lockdowns to varying degrees, it’s also timely. This month, we’re going to use parts available in-store and online to make a backlit picture frame, a controller to turn it on or off in the dark, and some art to go with it.
The electronics this month are not new to DIYODE, although the combination is new, and most of it is new to Kids’ Basics. We are using an LM358 Op-amp (Operational amplifier) IC to compare the signal from a light dependent resistor (LDR) against a reference, and turn a strip of LEDs on or off at a given amount of light. The LED strip is an RGB USB version, because it works from 5V. The light and controller go inside a frame, and our artwork will go on the front.
Read through the article all the way before buying anything for this project. There are some decisions to make, or options depending on what you actually have available to you where you are. As is always the case in Kids’ Basics, there will be no soldering. You will need basic hand tools like pliers and cutters for the electronics, and scissors and glue for the art. You won’t need any particular electronics knowledge, but basic component identification skills will help lots. We’ll even tell you at each step what colours should be on the resistors.
We do provide a schematic or circuit diagram but this is just helpful if you already know how to read one. Don’t stress if you have never learned, but take the chance to compare the wiring diagram to the schematic and see if you can work some things out. You can make this project from the wiring diagram and photos alone. You might also like to check out our Breadboarding Basics from Issue 15.
|Tools & materials||We sourced from|
|Small Long-nose Pliers||Workbench|
|Small Flush Side Cutters||Workbench|
|Sharp Knife (and Adult to use it)||Workbench|
|Pencil for marking||Workbench|
|Framed Canvas approx 30 x 35 cm||Dollar Shop|
|Cardboard Sheet as big as canvas||Dollar Shop|
|Small Gift Box||Dollar Shop|
|Tracing Paper (loose or pad)||Dollar Shop|
|Oil Pastels||Big W|
|Painter's Masking Tape||Local Hardware|
|Double Sided Tape (flat, NOT foam core)||Local Hardware|
|Parts Required:||Jaycar||Altronics||Core Electronics|
|1 x Solderless Breadboard||PB8820||P1002||CE05102|
|1 x Pack of Breadboard Wire Links||PB8850||P1014A||CE05631|
|2 x Plug-to-socket Jumper Leads *||WC6027||P1017||PRT-12794|
|2 x Plug-to-plug Jumper Leads *||WC6027||P1017||PRT-12795|
|1 x 1kΩ Resistor *||RR0572||R7558||COM-05092|
|2 x 5.1kΩ Resistors *||RR0589||R7575||COM-05092|
|1 x 10kΩ 16mm Linear Potentiometer||RP7510||R2243||ADA562|
|1 x LDR||RD3485||Z1621||SEN-09088|
|1 x LM358||ZL3358||Z2540||CE05262|
|1 x BC337 or equivalent NPN 800mA transistor#||ZT2115||Z1035||AZ1035|
|1 x LED Light Strip %||ZD0571||-||CE07368|
|2m Twin Core Wire||WB1702||W2100||CE06933|
* Quantity required, may only be sold in packs. # BC337 used in project, but any other transistor with the same specifications and pin-out can be used.
% You may choose to use the battery pack from the LED strip. See text.
All the electronics go on a solderless breadboard, and are powered by a USB power source. This could be a power bank or a mains-connected source like a phone charger. The electronics go in a separate box and a cable runs to the picture frame to power the lights. One thing to note - plug in your USB LED strip before building, and select the colour and brightness. They will stay set after power is removed, but you cannot get to the controls once the frame is assembled. Additionally, the white colour is made up of red, green, and blue, so picking it out from some of the other colours may be hard.
When choosing components, if you're shopping elsewhere and can't source the ones we used, look carefully at the specifications. For example, our LDR choice has a dark resistance of 500kΩ and a light resistance of between 3kΩ and 9kΩ. Any LDR with these figures will do. Similarly, the BC337 NPN resistor can handle 800mA. Any NPN resistor that can handle 400mA or more would suit, but check the pin-out.
Place the breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Install the LM358 IC with its dot or notch facing your left. Also, add the wire links which join the matching supply rails.
Place the 1kΩ resistor ( brown-black-black-brown--brown ) and three wire links that go above the LM358. Look very closely at the picture, as the ends of all but one of these items don’t connect to anything yet.
Place the four wire links below and to the left of the LM3581. Place the two horizontal ones first. Count carefully to place the one from the lower blue (-) rail to nowhere, as it will be critical shortly.
Insert the legs of the light dependent resistor (LDR) into two plug-to-socket jumper leads. Plug the other ends into the breadboard. One goes to the red (+) rail, the other goes one row across from the end of the left-hand horizontal wire link.
Place two 5.1kΩ ( green-brown-black-brown--brown ) resistors. They both meet at pin 3 of the LM358. Insert the two wire links near these resistors, and a 10kΩ potentiometer so that its legs line up with the two wire links and the LDR jumper lead.
Cut the cable between the LED strip’s controller and the plug, close to the controller, and bare the wires. Cut a pair of plug to plug jumper leads in half, and bare all the ends.
Bare the ends of a length of twin core wire, and twist a jumper lead half to each core of one end. Tape the joins. Twist the other ends of the twin core to the wires from the LED strip and tape those joins too. Note which coloured wire goes to the trace (stripe) in the twin core.
Join the remaining two jumper lead halves to the wires from the USB cable that was attached to the LED strip. Tape the joins carefully but leave the wire colours visible to help make sure which wire is which. Plug the red wire into the upper red (+) rail and the black wire into the lower blue (-) rail.
Add the transistor to the breadboard circuit so that the middle leg lines up with the 1kΩ resistor, the right leg with the wire link, and the flat face is toward you. Install the jumper leads from the LED strip so that the red wire goes to the upper red (+) rail and the black wire goes to the left-hand leg of the transistor.
Lower the circuit carefully into a cardboard gift box or similar. Hang the LED strip and its twin core wire over the side, and the same with the LDR. This is where you choose whether to power your creation with a mains USB adapter or a power bank. If you use a power bank, place it in the box now.
When the light level in the room your artwork will be in is dark enough, turn the potentiometer until the LEDs turn on. Make sure the LDR is facing where it will face once the set-up is complete.
Once you’re happy with the turn-on point of darkness for your artwork, unplug your power supply, and gently remove the jumper leads for the LED strip from the board. Write down which colour went where, because they will need to go back after you make the frame.
What's Going On?
You don’t need to know any of this to make the circuit work but if you’re curious, read on. The LM358 is a fairly old operational amplifier (op-amp) that is still made because it is rugged, reliable, and cheap. It has been left behind by more modern designs but that does not matter to us. It’s easy to get and affordable to boot, and on top of that, there are two op-amps in one package! We’ll only use one for this circuit.
We have covered op-amps previously in DIYODE, but not in Kids’ Basics. In very, very basic terms an op-amp is a device with two inputs. One is called the inverting input, marked with a ‘-’ sign, and the other is the non-inverting input, marked with a ‘+’ sign. It has an output and connections for power supply. In many op-amps this is positive and negative power in a split rail system where ground or 0V is in the middle, but we’re using this in a regular single rail with one side to V+ and the other to ground.
The op-amp can have two different signals to its inputs, and will take the inverting signal away from the non-inverting signal. There are a variety of ways you can set up and use an op-amp, and for more detail you can try reading our previous articles on them, in issues 7, 13, and 25. These are more advanced articles, however. The condensed version is that a small difference between the inputs causes a very big difference at the output. So big that some of the output has to be sent back to the input so the change is lessened and the signal can be amplified properly.
In this circuit, the op-amp is set up as a comparator. That means it compares (hence the name) the signal of its two inputs, and has no feedback. Because of this, when the device takes the inverting signal away from the non-inverting signal (plus minus minus), the difference is amplified to the limits of the device, which is pretty much the supply rail value. So, if the signal at the inverting (-) input is less than the signal at the non-inverting (+) input, then the difference is still positive and is amplified to almost the full supply voltage.
When the signal at the inverting (-) input is greater than the signal at the non-inverting (+) input, the difference is negative (a bigger number taken away from a smaller number leaves a negative), and is amplified to be almost zero, or ground. In this way, the output of the comparator changes, as near as makes no difference to us, from fully on to fully off or vice versa.
We make the LM358 behave the way we want by connecting the middle of a voltage divider to the non-inverting (+) input. A voltage divider is just any two or more resistances connected in series across a voltage. The voltage across the total is divided based on the size of the resistances. If we had one resistor that was three times the value of the smaller one, the voltage at the junction would be a quarter of the supply voltage, because the bigger resistor is three quarters of the total and the smaller one is one quarter. In our case, we have two equal resistors connected from the supply rail to ground, so that the voltage where they meet is half the supply voltage. Have a close look at the schematic to see if that makes this clearer. This gives us a reference voltage at the non-inverting (+) input.
Connected to the inverting (-) input is the wiper of a potentiometer, VR1. This forms a variable voltage divider, changing the voltage sent to the inverting (-) input. However, between this potentiometer and the supply rail is a light dependent resistor. This device has a face made of materials that vary their resistance based on the amount of light on them. In darkness, the resistance is high. In bright light, the resistance is low, and the resistance is in between as light levels fall. VR1 allows us to control the sensitivity of this device, as such. Changing VR1 changes the point in the voltage divider which we take our signal from, and the LDR, as it responds to light, changes the total resistance.
Finally, the output of the LM358 connects via a current-limiting resistor to the base terminal of a BC337 transistor, which handles the load. On its own, the LM358 can source (which means output, or give) around 40mA. This is not enough to drive our LED strip, which draws around 300mA. Connecting the strip directly to the LM358 would cause it to overheat and fail at best, but it may "let out the smoke" that is jokingly said to be inside all electronic components to make them work.
While we have covered transistors before, it has been some time. A transistor is a device for amplifying current. They consist of pieces of semiconductor material, which is a substance that conducts electricity in the right conditions but not in other conditions. In most transistors that makers encounter, that material is silicon.
To make the silicon behave the way we want, it is 'doped' by adding certain materials to it in little bits. This creates pieces of silicon which behave differently depending on the chemical additives. In the transistors we use, these are divided into 'N' types and 'P' types.
Without getting into things like depleted regions and holes, regular maker-bench variety transistors, called bipolar transistors, are constructed with either an NPN or PNP arrangement. That's a slice of N type material, bonded to a slice of P type material, then a slice of N type bonded on the other side. Or, for PNP, a slice of P type, a slice of N type, and another slice of P type. Whatever is in the middle is the 'base' of the transistor.
In a nutshell, if current flows through the base, the transistor turns on. In an NPN transistor, a small current flows from the base, through it and the emitter terminal, to ground. This allows the transistor to turn on, and a much greater current to flow from the collector, to the emitter. For this reason, NPN transistors are usually used between a load and ground, rather than the power supply and load, so nothing resists the current getting from base to ground. This is called a 'low side switch'.
For a PNP transistor, current flows from the emitter through the base to ground. That enables the transistor to turn on and allow current from the emitter to collector.
Note that this means that the switching circuit must ground the base to operate the transistor. PNP transistors are usually connected so they are between the power supply and the load, because current must be available to flow to the base when it is grounded. This is called a 'high side switch'.
Note that the base has a maximum current before it is damaged, which is why we use a resistor. Also, bipolar transistors are not only straight switches, but we used one as such here and amplification will have to wait.
Additionally, because it is the junctions of the P and N type materials which make the magic, you cannot make a transistor by wiring two diodes facing each other.
Making the frame is a mini build all on its own. You have a choice here. A shadow box is a type of frame with far more depth than a regular picture or photo frame. They are used for displaying 3D objects or as a more unique way of displaying photos. They are the ideal way to construct this project but we deliberately did not use one. Kmart has one in their range as at the time of print, but when we checked, the stock was low. Sometimes you can find them at dollar shops too, but if you have to buy one from a homewares store then you’ll probably be paying more than can be justified on a Kids’ Basics project.
It will be far easier to get hold of a stretched, framed canvas meant for painting on. This is what we based ours on and we bought ours at a local dollar shop. You can buy cheap ones online easily as well. Some are very thin, most are around 1.5cm to 2cm, and if you’re lucky, you can find some with frames of up to 5cm thick, which will work just the same as a shadow box. So, if you can get a shadow box, use it. However, most people will be using a canvas and it will work just fine, so long as you get one at least 1.5cm deep.
In the following steps, you’ll need everything on the parts and materials list, except for the tracing paper or drawing paper, oil pastels, paper towel, and 8B pencil. Those are used in the artwork section.
Cut a slot at the base of your frame at the inner edge. Push the wires on the end of the LED strip through. Peel the adhesive backing from the LED strip and stick it to the frame as close to the canvas as you can.
Measure and cut a piece of aluminium foil to the size of the inside of your canvas and place it on the canvas. A couple of tabs of double sided tape will help hold it in place.
Measure and cut a piece of cardboard to the same size as the outside of the canvas frame. Place a piece of A4 paper in one corner and measure the remaining cardboard on the side and end.
Halve the distances from step 4 and measure in from the edge on both sides and ends so the A4 paper sits in the middle. Mark the sides in pencil.
Measure 1.5cm in from each corner on all sides, then draw a line between the two points at each corner. Have your adult helper cut the line with a sharp knife, then cut along the pencil lines where the edge of the A4 paper sits.
Trim a piece of baking paper so that it is 2cm wider on all sides than the A4 paper. Use double sided tape to stick the baking paper firmly to the cardboard, leaving the triangles at the corners unstuck.
Use more double sided tape at the sides of the canvas frame to stick the cardboard/baking paper combination down to what would normally be the back of the frame, with the baking paper inside the cardboard.
Plug the wires for the LED strip into the breadboard and slip the corners of your artwork (which you will make in the next section) under the corners left in the cardboard frame. Your illuminated artwork is now ready to power up and place somewhere.
This is the most fun part of the project. Designs are up to you, and a quick internet search for ‘oil pastel art’ will bewilder you. We chose a sunset theme for ours, but there are many options. The author has used this system with a year 5 class to make an abandoned house night scene, which the students used in their persuasive writing task. They had to write a real estate advertisement to sell the house, and the artworks looked amazing on the wall with the advertisements attached. Moonrises also work well. You’ll need to think about what kind of scene would appeal to you, then search for inspiration from there. YouTube also holds many great demonstration videos. Our following instructions are a guide, but let your colours be shaped by your chosen scene.
We used tracing paper for this so the light shines through well. Oil pastels work best on thick, rough cartridge or art paper, but the light will not shine through. Tracing paper can be bought in pads like sketch books, and we bought ours from a dollar shop. Officeworks and independent office suppliers, as well as some newsagents, will have them too. Interestingly, Officeworks list individual pages on their website but we cannot see any stock in stores and it is not available for online purchase. The cheaper pad options are around $4.
We tried to use plain copy paper for our first draft, but the oil pastels don’t stick properly when it comes time to blend. The tracing paper actually holds them even better than copy paper, and passes light better too.
The higher the quality of your oil pastels, the better. But, high-quality artists’ pastels are expensive. So, just to make sure this project is accessible to many people, we did ours with Big W oil pastels, a set of 48 for $15. They still work just fine, even though a little more effort and care is needed. Because we’re using tracing paper, you’ll need to be careful when blending anyway, as the pastel rubs off too much if you get too excited.
Decide whether your sun or moon is half below the horizon or fully visible. Cut one or two semicircles from masking tape and stick them as relevant to your sun or moon’s location. Also decide where your ground is going to be.
If you’re having an ocean in your picture, place masking tape where the horizon will be. If not, there will be no hard horizon, and instead, your colour graduations are going to go all the way to the ground.
Choose your lightest colour, either a yellow for sunset/rise or a purple or blue for a moon, and make a circle or semicircle or circle around the tape.
Keep adding more rings in darker shades until your sky is full. Be sure to make sure no white patches exist.
Use paper towel over your finger to blend the surface of the pastel until it is smooth, and slightly into the next colour. Rub in very small circles, but not too hard or the pastel will rub off the tracing paper.
Peel away the masking tape if you used it, and press it down gently over the pastel sky so you can make the ocean.
If you are making an ocean, do the same thing as above with different shades of dark blue. The pattern is different here. Look up example pictures online or real sunset photos.
Blend your ocean in the same way you did the sky. Afterwards, remove the tape covering your sun or moon, leaving the tracing paper fully exposed to pass light.
Draw your land shapes in black or dark grey. These could be a beach or rocks for the sunset, or mountains. If you’re making the abandoned house, they will probably be hills, fences and trees.
Also remove, very gently, your horizon tape if used.
Use an 8B pencil, the darkest readily available, to draw finer details on your picture. For the abandoned house, it is best to find a silhouette online and print and cut it out. It can stick on with double sided tape, but rub back some pastel to make it stick. Details added can be birds or bats, boats on the ocean, spider webs in trees, anything you can think of.
WHERE TO FROM HERE?
If you want to make your build more permanent, and you have an adult around who can solder, then you might like to transfer your build to a solderable breadboard. Traditional prototyping boards have either been a series of doughnut pads that you have to connect yourself with solder to make tracks, or rows of copper with holes, which had to be cut and linked across to make circuits. The most known brand is Veroboard.
Thankfully, you can now buy solder protoboards which are hole-for-hole, row-for-row matches of the solderless ones we all use. If you get the right one, you can use the same photos and Fritzing from earlier to make the solder version.
If you want to power your circuit from USB, you’ll need to strip a USB cable (please ask for an old one no one wants anymore, don’t cut your adult’s phone charger cable) and join the wires the same way as we did with our battery pack earlier. Finding negative and positive is not always easy with USB cables because they are not always coloured inside. You might need a multimeter for this. Set it to DC voltage and use the probes to contact the wires in the USB cable until you see 5V or close to it in the display. If you see a ‘-’ sign, the probes are reversed, with positive on the negative wire and vice versa. If the display has no ‘-’ sign and just a voltage, the red probe is on the ‘+’ wire and the black on the ‘-’ wire.