Arduino Creative Light Puzzle

by clairechiu2006 in Circuits > Arduino

441 Views, 0 Favorites, 0 Comments

Arduino Creative Light Puzzle

S__15851524.jpg
Screen Shot 2021-05-10 at 10.15.34 PM.png
Screen Shot 2021-05-10 at 10.15.11 PM.png

Arduino is a great way for beginners to learn circuit concepts, and also for intermediate or advanced learners to get creative! I've been studying Arduino for one year, and this is my final project - a creative light puzzle. The circuit is simple, but the physical parts are harder to make, so it's suitable for anybody who likes making crafts. The light puzzle uses Arduino light sensor to detect when the puzzle is solved (when all three spinwheels are spun to the right position, forming a picture of a giraffe). Then, the light sensor triggers an LED light, which changes the color lighting up the wheels from behind from purple to blue. This project can have many extensions and improvements, so I encourage you to try it out and make some modifications! Let me know if you do~

Note: before purchasing resistors, read this helpful resource I used to help me decipher resistor color codes. I used this to find out the resistance values of the resistors in the circuit: https://www.electronics-tutorials.ws/resistor/res...

Supplies

1 Arduino board (any Arduino board is compatible, I used Arduino Leonardo for this project)

1 Arduino light sensor

2 white LED lights

5 orange LED lights (or any other color except white)

4 one-end alligator clip wires

14 wires

7 100Ω resistors (photo 1)

1 10kΩ resistor (photo 2)

USB wire to connect Arduino to a power source

shoe box

2 transparent A4 folders

either black acrylic paint or black paper

hole puncher

permanent markers

20 toothpicks

hot glue gun

extra cardboard

scissors

crafts blade

Connect the Circuit

circuit diagrams (2).jpg
F5CDA3D5-7CCD-4D14-9495-BE5722E9CBDD.jpg

Connect all 7 LED lights using the yellow 100 ohm resistors as shown in the diagram. Connect the lights in a line across the breadboard on digitalPins 4,5,6,9,10,11,13. One of the white lights must be on digitalPin 4. Connect the other white light (not on digitalPin 4) with two alligator clips instead of the normal wires, so that it can be extended away from the breadboard.

Connect the light sensor according to the diagram, using the blue 10k ohm resistor, and also two alligator clips, on analogPin A0.

The photo shows the LED lights connected to the breadboard without alligator clips.

Run the Code

Download Arduino IDE, then download this code published on the Arduino website: https://create.arduino.cc/editor/ccgiraffearduino/...

Connect Arduino to your computer using the USB wire, choose the type of Arduino board and port you are using, then upload the code. If the code uploads successfully, try using the alligator-wired white LED light to touch the light sensor. The white LED light on pin 4 should light up when the light sensor senses bright light.

Create the Spinwheel

S__15851533.jpg

Cut out three circles with 23cm diameters, each one sheet thick, from the transparent circles. Create a 3cm-wide outer band on each circle by painting black acrylic paint or pasting black paper, as shown in the photo.

Design the images you want to be shown in the puzzle. Divide all the strokes/shapes in your image into three parts, and draw only one part on each transparent circle with permanent marker. For extra precision, use a craft knife to make a stencil carved on cardboard/card paper. Draw the image smaller than the radius of the transparent circle, with its top pointing towards the center and its bottom pointing towards the circumference. When the three circles are layered on top of each other, they will form the complete image.

Use a toothpick or other sharp object to poke a hole in the center for all circles. Put a toothpick through the center of all circles, aligning them together.

Assemble the Shoebox Components

S__15851531.jpg
S__15851526.jpg
S__15851529.jpg
S__15851530.jpg

Cut 3cm deep rectangular holes on three sides of the shoebox, as shown in the photo. Make sure it is suitable for the transparent circles to fit in these three crevices. Then, use hot glue to position two toothpicks on each side of each hole, as shown in the photo. These will hold up the transparent circles. Finally, fix the three circles into your shoebox, with the bottom circle resting on the bottom edge of the crevice, the second circle resting on the second toothpick, and the top circle resting on the top toothpick. Now, the spinwheel is secured, and all three wheels can be turned independently.

Now comes the hard part! Place your Arduino into the shoebox, positioning the extended white LED light right below the bottom circle, close to its edge in the black area. Position the light sensor directly above the LED light, but above all three circles. Utilize toothpicks and tape to secure them! Turn the three wheels to the position which you want to set as the solution of the puzzle (the position when the complete image is formed). Punch a hole through the three wheels in the same location, directly opposite the image in the black part of the circle, as shown in the photo. Make sure the extended LED and light sensor are directly above and below these holes. See the photos for clear detail!

Final Touches

S__15851524.jpg
S__15851534.jpg
S__15851536.jpg

For improved aesthetics, construct a cover from extra cardboard to hide the messy circuitry. Then, connect Arduino to a power source and try out your creative light puzzle! When you turn all three wheels to the right position, the punched holes will intersect, allowing the LED light to shine through the holes, reaching the light sensor, which triggers the other white LED light inside the box. Because of more white light added to the original orange light in the box, the spinwheel changes color! Now you have a super cool self-verifying light puzzle with your own designed image! Congrats!

Check out the two videos of my completed product here:

The color change isn't very easy to distinguish because of the LED colors I chose. You can choose more high-contrast colors for a more obvious color change.

I am open to any feedback or comments! Thank you for reading~