Introduction: Colorful Clock
Do you want to make a special clock? If your answer is yes, here we show you how to make a colorful clock. It is a clock with RGB LED display, and can show time with different color that represents your power !
In our design, the time will be shown with green color in the morning which shows you have full of energy and is powerful. As time passes slowly, the color will gradually turns to red at night which shows you are lack of power and need to have a good rest. Very cute, right ?
Besides these, the Colorful LED can also monitor your action. If you come up to it, the colorful clock will say hello to you, and if you are away from it, the colorful clock will say bye to you. Amazing?
OK, let's have a look at how to implement it.
Step 1: Preparing Stuff
To finish the colorful clock, we may need some materials as follow：
Arduino MainBoard is used for controlling, and RGB LED Matrix is used for showing the time. we use RTC to get the current time and sliding potentiometer can be used to control the brightness of LED Matrix. The Ultrasonic Ranger is used to check whether there is someone around, thus to show something special on LED Matrix. you can choose other modules to achieve this such as PIR Motion Sensor. If you want more Interaction with the clock, you can also add some buttons or a joystick. Then it will be more funny.
Step 2: Module Combination
If you are familiar with arduino, it will be very easy to connect these modules together.
1. RGB LED Matrix
The RGB LED Matrix is consist of WS2812B RGB LED. There are four pins for connection. they are:
- +5V - 5V power supply
- DIN - Input the control signal
- GND - Ground
- DOUT - Output the control signal, and connect to next panel's DIN
We only need the +5V/GND/DIN pin, you can connect the DIN pin to any digital Pin on Arduino. In my case, I choose the D5 pin.
I chose the Seeed's Grove - RTC, which is based on the clock chip DS1307 and support I2C protocol. Connect it directly to the I2C interface of Arduino.
3. Sliding Potentiometer
Connect the Sliding potentiometer to ADC pin of Arduino, A0 for example. When you slide the potentiometer, the output voltage will change with your operation.
4. Ultrasonic Ranger
The Ultrasonic Ranger is a non-contact distance measurement module. It is controlled by single pin.
The whole circuit diagram is shown in the picture,
Step 3: Download Software and Upload to the Arduino
All the software has been uploaded to the gitHub, you can download it from here, put the library to the library path of your Arduino IDE(e.g. D:\Arduino\libraries) and then open the ColorfulClock.ino file, connect the arduino to your computer and compile( maybe you need to modify the code due to the connection of modules) & upload.
Step 4: Test & Play
Now you can have a test with your colorful clock, put your LED Matrix to a right place for you, the corner of your table for example, and fix the ultrasonic ranger, you can even to DIY a box for your arduino if you like.