"Rainbow LampClock": Wake Up With Style | DIY | 3D Printed | Tinkercad
by Mech3D in Circuits > Arduino
512 Views, 7 Favorites, 0 Comments
"Rainbow LampClock": Wake Up With Style | DIY | 3D Printed | Tinkercad
Brighten Your Mornings with the Rainbow LampClock
-Ditch the radiation from your mobile phone near your heads during sleep
Hello, fellow DIY enthusiasts and dreamers! Have you ever wondered what time is it when you wake up in the middle of the night? Very frequently, right? Then we trying to find the phone, see the bright screen which disrupts sleep. What if your night lamp changed colors based upon the time of night! It transitions from a soothing blue at night to a vibrant orange-red at dawn. So you know how many hours are left till sunrise. And It also includes a convenient alarm function the duration and volumes are also adjustable. At peak volume, you can easily hear it from a room away. So elevate your bedtime sleep and morning routine with a touch of a useful elegant gadget.
I'm thrilled to share this journey with you. Whether you're a seasoned maker or just starting out, I hope this project inspires your creativity and brings a little more color into your world.
Function showcase:
First Video: Sped up clock system to show full transition of color with alarm.
Second Video: Setting up the alarm timer with three buttons, representing: Increase time, Decrease time and Reset button.
Features: What Makes It Unique
- Color Transition Alarm: Watch as the lamp shifts through a spectrum of colors, providing a visual cue to wake up gently.
- Digital Alarm Settings: Easily set your alarm using three intuitive buttons: Increase, Decrease, and Reset.
- USB Powered: Use any standard USB phone charger for power, making it convenient and portable.
- Phone-Free Nights: With minimized phone radiation which emits microwave frequencies near our head, you can enjoy a healthier sleep environment.
Inspired by the "Colors of the Rainbow" Challenge, this project utilizes rainbow colors for practical use. The 3D model and slicing G-code were created entirely on mobile device, showcasing the potential of mobile software in model making. The alarm sound is set at a default 50% volume and 2 seconds for testing but is fully adjustable respectively by a potentiometer inside and changing time value in the code.
Supplies
[The links I have included below are for giving helpful examples only; they are not affiliated. And you can choose similar items bought from anywhere.]
Primary Resources:
- Android Basic Mobile Phone: The CAD files are made from mobile phone as shown. So You’ll need any Android phone for various tasks, such as making stl and slicing it for 3d printer.
- 3D Print Setup:This category includes items related to 3D printing:
- TinkerCAD Website: A great platform for creating 3D models even in mobile phone FOR FREE. https://www.tinkercad.com/
- AstroPrint Website: Useful for managing and monitoring your 3D printer remotely, https://www.astroprint.com/
- MIcro SD Card to Mobile Adapter: To transfer files between your mobile phone and an SD card and then to 3d printer. https://www.amazon.com/Technology-Supports-MicroSDXC-MicroSDHC-Midnight/dp/B07YGXR8N3 If you have SD card slot, its not necessary
- USB to USB-C Adapter : Handy for connecting arduino to phone for uploading codes. https://www.amazon.com/Adapter-Anker-High-Speed-Transfer-Notebook/dp/B08HZ6PS61
Materials :
- Transparent Acrylic Sheet (1/4 to 1/2 inch thick) https://www.amazon.com/SimbaLux-Plexiglass-Transparent-Protective-Projects/dp/B07TXRB1ZF
- Paper Print Out: For reference or templates. Check attachment below in the relevant step.
- Tracing Paper: Great for sketching or transferring designs. https://www.amazon.com/Tracing-Artists-Translucent-Sketching-Animation/dp/B09PDCJKTJ
- Screws and Nuts: Assorted sizes for assembling parts.
- 4nos M2x20mm screw and nut
- Bits of Cardboard: Useful for making a 2nd tier support for the arduino board.
Tools for Fabrication:
- Electric Saw: Essential for cutting materials like wood or acrylic. https://www.amazon.com/Metabo-603623420-W11-125-11-Amp-Grinder/dp/B08C5D7MPB
- Wood Blade: Specifically for cutting wood/acrylic. https://www.amazon.com/Circular-Carbide-General-Purpose-Cutting/dp/B08XMR82YD
- Drill: For making holes in materials. https://www.amazon.com/CRAFTSMAN-CMED731-7A-Drill-Driver/dp/B07KK7DWGH
- Pliers: Essential for gripping and bending wires. https://www.amazon.com/CRAFTSMAN-CMHT81645-Long-Nose-Pliers/dp/B08PFK8YWQ
- Knife, wirecutter etc
Adhesives and Paper Supplies:
- Two-Sided Glue Tapes: Useful for sticking materials together. https://www.amazon.com/Urethane-Adhesion-Polyurethane-Attaching-Nameplates/dp/B0D128W9B1
- Super Glue : quick setting adhesive. https://www.amazon.com/Loctite-Control-Superglue-Cyanoacrylate-Adhesive/dp/B0778LB4RX
- Transparent Tape: For securing paper or other lightweight materials. https://www.amazon.com/DHOOZ-Wrapping-Transparent-Refills-Supplies/dp/B0BLSFNTFM
- Permanent Marker: Handy for marking measurements or design outlines. https://www.amazon.com/Sharpie-Permanent-Markers-Assorted-30074/dp/B00006IFHH
Electronics Components:
- Arduino Uno and Connector. https://www.amazon.com/Arduino-A000066-ARDUINO-UNO-R3/dp/B008GRTSV6 and https://www.amazon.com/Arduino-Data-Sync-Cable-Microcontroller/dp/B08RCJXY1Z
- SS7735 1.8"TFT screen. https://www.amazon.com/HiLetgo-ST7735R-128160-Display-Arduino/dp/B00LSG51MM
- Buzzer: An electronic sound device. https://www.amazon.com/QMseller-Active-Industrial-Electric-Alarmer/dp/B08G518BHN
- Servo Motor: Used for precise control in robotics or other projects. https://www.amazon.com/Dorhea-Arduino-Helicopter-Airplane-Walking/dp/B07Q6JGWNV
- Rainbow Wires https://www.amazon.com/Eowpower-16-5Ft-20Pin-Rainbow-Ribbon/dp/B01NC2L2WB
- Arduino pin connectors https://www.amazon.com/Elegoo-EL-CP-004-Multicolored-Breadboard-arduino/dp/B01EV70C78
- Push Switches x 3 https://www.amazon.com/DAOKI-100Pcs-6x6x5mm-Momentary-Tactile/dp/B07X8T9D2Q
- Resistors: Depending on the specific components you need different value. https://www.amazon.com/BOJACK-Values-Resistor-Resistors-Assortment/dp/B08FD1XVL6
- 100 ohm x 2
- 220 ohm x 3
- 1k ohm x 5
- Potentiometer: 10k, written as 103 (=3 zeros after 10) https://www.amazon.com/uxcell-Potentiometer-Adjustment-Horizontal-Resistors/dp/B07SNHYDBQ
- Soldering Iron and tin https://www.amazon.com/YIHUA-Adjustable-Temperature-Soldering-194-896%C2%B0F/dp/B07RQQFGFY
- Soldering helping hand (Optional, but highly recommended.) https://www.amazon.com/Neiko-01902-Adjustable-Magnifying-Alligator/dp/B000P42O3C
Design the Case
[I will just show here the basic steps. If you are new to tinkercad and need to learn, you can refer to this Instructables tutorial.]
Let's start by creating the beautiful shell that will house our components. Using Tinkercad on a mobile device, I designed the case to be both functional and aesthetically pleasing. This sleek design ensures the lamp complements any room while highlighting its unique functionality.
Using Tinkercad on a Mobile Phone:
Accessing the Website:
- Open the Tinkercad website on your mobile phone.
- If prompted that it is not advisable to use on a mobile phone, enable "Desktop Mode" in your browser to emulate a desktop experience.
Adjusting Dimensions:
- Due to the small screen size, avoid dragging to change dimensions. Instead, click on the dimensions and modify the numbers directly. This approach makes adjustments much easier, as shown in the first image.
Building Your Model:
- Add cylinders, boxes, and solid bodies within Tinkercad to form the basic shape of your model.
- Once your design is complete, export it as an STL file for 3D printing.
Downloads
Slice and Print
With our 3D model ready, we'll use AstroPrint to generate the G-code for our 3D printer. Watching your design come to life on a 3D printer is truly an exciting experience. This step demonstrates how technology can bring our ideas into reality right from our homes.
After exploring various software and apps, I found that the website AstroPrint.com works best for gcode production needs for free. Here's how you get the g-code:
Upload Your STL Files: Go to AstroPrint.com and upload your STL files.
Enter Printer Properties: Provide your printer properties to ensure compatibility. Make sure to double-check the printer speeds, nozzle dia, filament properties as per your printer. It can vary from printer to printer
Generate G-Code: Click "Print Now" to generate the G-code file.
Transfer to SD Card:
- Insert the SD card into your mobile phone to transfer the G-code.
- If your phone lacks an SD card slot, you may need to use multiple adapters, as demonstrated in the image.
3D Print the Outer Part: Once you have the G-code, print the outer part using your 3D printer.
For a detailed guide on building a 3D printer enclosure, check out my project here: Alina: The Best 3D Printing Enclosure - Cheap/Fireproof.
This enclosure keeps the printer free from dust when not in use and includes a thermostat-controlled exhaust.
Make the Back Side
To create the cap for your project, follow these steps:
Scale Down the Body:
- Copy the geometry of the main body and scale it down along the Z-axis to form the cap, as shown in the design.
Add Openings:
- Create square holes for the LCD screen and buttons. This allows for easy access and functionality.
Drill Screw Holes:
- I have not pre-made the holes for screws which will fix the LCD, as maintaining drawing accuracy on a mobile phone can be challenging. Instead, use a drill machine to add screw holes. And keep a basic minimalist but good looking shape.. This approach provides flexibility for adjusting hole locations later.
Generate G-Code:
- To slice the model and obtain the G-code, use the method described in the previous step with AstroPrint.com.
Downloads
Acrylic Sheet Cutting
To create a perfectly fitting acrylic display, follow these steps:
Position the Body:
- Place the body of your casing onto an acrylic sheet.
Mark the Outline:
- Use a permanent marker to trace the inner side of the body onto the acrylic sheet.
Cut the Acrylic:
- Carefully cut the acrylic sheet along the marked outline using an electric saw. A standard wood-cutting disc worked well for cutting acrylic.
- Safety First: Be cautious when using the electric saw, as it can be very dangerous for inexperienced users. Wear appropriate hand and eye protection as necessary.
Refine the Edges:
- Run the saw along the edges of the acrylic until the marker lines are no longer visible. This ensures a perfect fit inside the body.
Color Choosing
To create a diffuse and colorful light effect for your project, follow these steps:
Print the Color Pattern:
- Take a printout of the image featuring the required colors: purple, blue, green, yellow, orange, and red.
- The colors are divided into six 30-degree segments to cover a 180-degree arc.
Prepare the Tracing Paper:
- I wanted to have a diffused light for it to look good. Sanding the side of acrylic was not good. So instead, use a hazy tracing paper for an uniform diffuse effect.
- Cut a piece of tracing paper to match the 180-degree arc of the color pattern.
Assemble the Layers:
- Place the printed color paper on one side of the acrylic sheet.
- Attach the tracing paper to the opposite side of the acrylic sheet. This will create a hazy look and diffuse the light, giving a pleasing visual effect from a distance.
- Use glue or tape to fix the papers on acrylic sheet.
Install Inside the Cap:
- Insert the acrylic sheet with the color paper and tracing paper into the cap.
Secure with Tape:
- Use double-sided adhesive tape to fix the position of the papers securely within the cap.
The Connections
Using the circuit diagram provided, connect your components. This step is where the magic happens, and our lamp begins to glow with life. I know wiring can be tricky, but with patience and a steady hand, you'll soon see your project take shape.
Source references are given below for each sub-part of the circuit for further studies if required.
>Tft screen https://simple-circuit.com/arduino-st7735-tft-display-example/
>Buttons https://www.projecthub.in/how-to-use-a-push-button-with-arduino/
>Fix the screen and the buttons by making holes with drill or sharp objects and secure by thin screws and nuts.
>Pack the items with cardboard and transparent tape as shown.
>Make hole in the backside by drilling machine for the charging wire of 5 volt with is connected to arduino uno voltage source.
Bonus: Read the Rainbow Colors in Resistors
Ever wonder why resistors have color rings around them? They have a color code to denote their values. Why? Since the resistors are so small, a number written on them would not be legible. So, a color code system is used to represent resistor values.
The colors with values are: brown, red, orange, yellow, green, blue, purple (violet), grey, and white. These colors form a rainbow-like sequence, with additional colors like black and gold to represent multipliers and tolerance.
Steps to Read Resistor Color Code
Step 1: Identify the Bands
- Find the Color Bands: Most resistors have four color bands. Hold the resistor so that the gold or silver band (if present) is on the right side. The gold/silver band is the tolerance band.
- Read from Left to Right: The bands should be read from left to right. The first two bands represent significant digits, the third band is a multiplier, and the fourth band (if present) indicates tolerance.
Step 2: Understand the Color Code
- Number Mapping for first three digits:
- Black: 0
- Brown: 1
- Red: 2
- Orange: 3
- Yellow: 4
- Green: 5
- Blue: 6
- Violet (Purple): 7
- Gray: 8
- White: 9
So rings of yellow, brown, black will be 470
- Multiplier Colors: (just add the number as zeros)
- Black: ×1
- Brown: ×10
- Red: ×100
- Orange: ×1,000
- Yellow: ×10,000
- Green: ×100,000
- Blue: ×1,000,000
- Gold: ×0.1
- Silver: ×0.01
So orange ring will be 1000.
Overall, if you see yellow, brown, black, orange, it means the resistor is of 470,000 ohm or 470kohm.
- Tolerance Colors:
- Brown: ±1%
- Red: ±2%
- Green: ±0.5%
- Blue: ±0.25%
- Violet (Purple): ±0.1%
- Gray: ±0.05%
- Gold: ±5%
- Silver: ±10%
- No Color: ±20%
Generally Gold color is common, denoting +-5%
Using this method, you can easily identify resistor values and ensure the correct components are used in your electronic circuits.
Connections2
>Buzzer: Break the plastic cover of the piezo buzzer with a handy plier so it fits into small space. Then connect is with a resistor to limit current https://www.instructables.com/Interfacing-Buzzer-to-Arduino/
>Led: the led is attached to the servo head. when the servo rotates, the light rotates and fall on different colours.Connection: https://roboticsbackend.com/arduino-led-complete-tutorial/
Connections3
I wanted to fix the arduino in a position so it is easy to assemble and disassemble. So i made a platform by folding short pieces of cardboards and gluing them as shown.
Put the servo at the center of the display as shown in image 3 with help of double sided glue tape.
Coding
Finally, it's time to upload the code to your Arduino. I used the Arduinodroid app on my phone to program it for initial stages, but finally I had to use a PC for more convenience as the code got longer. Once uploaded, test your lamp to ensure it functions as expected, making adjustments as needed.
The code is attached below.
Downloads
Finished Product
Put the Cap part in the main body carefully without hurting any connections.
Plugin and see your beautiful alarm-lamp at work!
Pay attention to how the servo motor moves the LED, casting different colors on the diffuser—it's like watching a piece of art in motion.
Conclusion: Illuminate Your Life
Thats it! You can ideally put it on a study table, connect the power and use as a decorative night lamp.
Congratulations on building your very own Rainbow LampClock! Not only have you crafted a unique and beautiful piece of technology, but you've also joined a community of creators who dare to innovate and share. I hope this project brings as much joy and color to your mornings as it has to mine. Remember, the sky's the limit when it comes to your creativity. Keep experimenting, keep building, and most importantly, keep sharing your ideas with the world.
Feel free to share your experiences and any modifications you've made. Let's continue to inspire each other and make the world a little brighter, one project at a time.
Happy making!