"Rainbow LampClock": Wake Up With Style | DIY | 3D Printed | Tinkercad

by Do-Or-Diy in Circuits > Arduino

409 Views, 6 Favorites, 0 Comments

"Rainbow LampClock": Wake Up With Style | DIY | 3D Printed | Tinkercad

Night Watch
TIMER SETTING FOR ALARM CLOCK

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:

Materials :

Tools for Fabrication:

Adhesives and Paper Supplies:

Electronics Components:

Design the Case

Screenshot_20240728_210754_Chrome~2.jpg
Screenshot_20240728_212026_Chrome~2.jpg
Screenshot_20240728_212236_Chrome~2.jpg
Screenshot_20240728_212559_Chrome~2.jpg
Screenshot_20240728_212913_Chrome~2.jpg

[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

1000008499.jpg
1000008489.jpg
1000008515.jpg
1000007028.jpg
1000007082.jpg

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

1000008505.jpg
1000007063.jpg
1000008520.jpg
1000008523.jpg

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

20240729_145723.jpg
20240729_171138.jpg
1000008078.jpg
1000007157.jpg

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

111.jpg
1000007195.jpg
1000007196.jpg
20240729_195805.jpg
20240729_211840.jpg
20240729_212724.jpg
20240729_212445.jpg

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

Schematic_New-Project_2024-08-01.png
20240729_194649.jpg
20240729_195258.jpg
20240729_195315.jpg

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

22.png
20240729_191026.jpg

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

  1. 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.
  2. 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

20240729_161803.jpg
20240729_232422.jpg
20240729_193107.jpg

>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/

>Servo: https://howtomechatronics.com/how-it-works/how-servo-motors-work-how-to-control-servos-using-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

20240729_221120.jpg
20240729_235729.jpg
12.jpg

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

44.png

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

Screenshot 2024-07-31 114748.png

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

111.png
234.png

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!