Features of the clock

  • Arduino micro-controller based
  • Hardware & enclosure procured from local stores
  • RTC controlled by battery
  • All functions controlled via IR remote control.
  • Multiple modes of Display: Dot mode, Seconds arc mode, Minutes arc mode, Hours Arc mode, All Arc mode, Night mode(Auto dim)
  • Hour alerts and auto mode change every 15 minutes
  • Senses low ambient light and dims the LEDs to very low light levels
  • Ambient light level adjustment to go to night mode

Step 1: Parts Needed


  • Arduino Mini/nano or clone
  • RTC module::DS3231 module
  • WS2812B controlled RBG flexible LED strip with 60 LEDs/metre (Neopixel strip or equivalent make)
  • IR Receiver:TSOP1738 38Khz
  • Any spare IR remote control to use for controlling functions
  • PCB header
  • LDR
  • 10K potentiometer/Variable resistor
  • 1000MF 16v electrolytic capacitor
  • General purpose PCB/Veroboard
  • 230V ac to 5V DC power adaptor (I used a mobile charger's circuitry.)


  • Hardboard
  • Flexible beading strip (used to line furniture edges):Should be bendable but should retain a clean circle when bent (Avaialble in general hardware stores in bangalore)
  • Hot glue gun
  • Quick fix/Adhesive-Fevicol
  • USB cable
  • AC cable with 2 pin plug
  • Single core wire to use as binding wire tags(i used strands of cat5 cable innards)
  • Photoframe nail holder for hanging the unit to on the wall

Step 2: Connectivity and Building the Hardware

Coding: Pls see details in last 2 steps and ensure you have updated your remote control hex codes into the code and that the code is burned onto your arduino.

Electrical: Using a general purpose PCB and wires, i soldered them all together as per the schematic (See picture of schematic). Make sure that the IR receiver is soldered with flexible wires rather than on to the PCB as it can be positioned in the convenient place to receive the IR signals

Mechanical: I needed a circular shape to wrap the RBG LED strip around, so that the light from the LEDs spread out in a radial fashion and give a diffused look onto the hanging wall. Looked around for simple solution and found that i could buy meters of beading strips from my local hardware store. These strips are an inch and a quarter wide and are quite firm when rolled into a circle. Just spread the RGB strip on the circle and adjust the needed size and giving slight overlap of the beading, cut off extra length. Using adhesive stick the overlap areas and allow to dry.
Using similiar process wind another circle of smaller diameter which is spacious enough to fit the electronics and the power supply inside this ring. Drill small holes at the bottom and top of the inner circle strip to allow wiring to pass thru between the circles (see picture). I got a square hardboard which is 1.5 inches bigger than the diameter of the outer circle and trimmed the square corners to make it a circular hardboard. This will be my base of the clock.Once this is done, i placed both the rings on the hardboard (size 1.5 inches bigger than the outer ring) and trace the outlines and mark the holes @ 90 degrees using small punch. I removed the rings and using small drill bit, made holes on both sides of the outlines. These holes are going to anchor the rings to the hardboard.

Now i place the outer ring on the board and using single strand wires (salvaged from an old CAT5 cable-you can use any strong single strand wire which has metal inside to support the weight and twisting, making a narrow u shaped piece of wire, inserted the wire into the guide holes drilled and twisted them from the backside to hold the ring in place. Repeated this for all the holes of the ring. I repeated this for the inner ring as well. Once i ensure that the rings are in their correct place, using hotglue, i seat the rings in their place. I am securing the rings and providing the physical support with both the wires and the hot glue so that the structure is rigid. I made a small hole in the center of the hardboard (will be used to cover the entire clock with the acrylic cut disc)

Making sure that the hot glue has cooled and ensuring that all the needed holes are there in the rings and aligned, i affix the circuitry inside the inner ring area and secure the same with wires and holes (same as i did to the rings but slightly apart) so that the circuitry holds it's place and doesn't move when the clock plate is mounted vertically. I ensure that the IR receiver is fixed to the board such that it's sensor window is clearly visible from the front of the clock.

I rolled the RGB LED strip carefully clockwise (noting the signalling direction on the LED strip) on to the outer circle and if everything fits fine , i remove the adhesive backing from the strip and stick the LED strip to the outer circle. i ensured that the strip end connector was ending up between the 2 circles (see picture).

Next step was the connect the USB cable to the circuitry and connect the LED strip to the circuit and finally power up the 5V supply via 230V AC mains. I used an old mobile charger's circuit after stripping it's outer shell. Pls be careful here as it will be lethal 230V AC on exposed terminals. Take care to put enough insulation once you solder the mains power cable to the circuit board.

I ensured that the entire thing is working fine(power supply, LED strip etc) and then fixed the the acrylic circular disc drilled with a middle hole (see pic). this acrylic cover helps two fold: Helps spread and diffuse the LED light very beautifully and also allows my remote signals to reach the IR receiver sitting behind this cover.

Step 3: Before the Code

Code for my clock is embedded in next step. Almost all the functions and variables are labeled in code comments. Feel free to experiment with your editions or customization.

Before burning the code into your Arduino, you need to do some important editions to some of the hardcodings done in my code for ensuring that your code works with your IR remote control. Basically i have used an IR remote control to manage the clock remotely since i did not want any buttons on the clock. I had a spare IR remote (used to control LED strips) which was not being used. You can choose any remote as long as it is working and is not used to control any other device in the same room where you are going to hang the clock (as it may erroneously switch multiple devices when used). Next steps is identify which keys will be used for these functions on your remote: You need to have an IR remote with minimum of 12 buttons to map the same to the functions we are going to assign to those keys.

Just to simplify, whenever you press an IR remote, an unique hex code is sent via IR waves to your equipment (TV/Set top box/Receiver etc). Here we want to identify 12 buttons on that remote that we are going to use for controlling our clock functions and learn the hex codes they generate when pressed. We need to edit our clock code to ensure that the function that reads the IR codes coming via the IR receiver on the clock has these hex codes mapped.

How to get the hex codes and write them down to edit our clock code:

Pls use the below instructable to read the hex codes from the IR remote that you have chosen for the clock control and write the codes down for the corresponding 12 buttons that you want to use to control the clock.Use the first program only to identify your remote buttons' hex values. Use only this piece "Arduino Code for Receiving IR as Hex code" inside the instructable.


Once you have found out the 12 hex codes for the corresponding 12 remote button presses, pls edit the clock code to change my hex codes with your respective hex-codes obtained from your remote

12 functions i have mapped to my remote control and their hexcodes are below and the naming convention is in the below template

MY REMOTE button::0X HEXCODE of 6 digits:: Function assigned to the button

  • UP BRIGHTNESS button ::0XF700FF:: For increasing LED brightness in regular mode
  • DOWN BRIGHTNESS button:0XF7807F:: For decreasing LED brightness in regular mode
  • R button::0XF720DF::All dots mode ( H M S are shown as moving dots)
  • G button::0XF7A05F:: Seconds Arc mode: All dot except seconds which will be in circle

  • B button::0XF7609F::Minutes Arc mode: All dot except minutes in circle mode
  • W button::0XF7E01F:: Hours Arc mode: All dot mode except hours in circle mode
  • Flash button::0XF7D02F:: All circles mode (H M S): All in circles
  • ON RED button::0XF7C03F::To toggle night mode on/off
  • Yellow button::0XF728D7:: Night value threshold increase to adjust the sensor to ambient light conditions to sense nightmode (advanced setting-you may not need to use)
  • Blue button::0XF7A857:: Night value threshold decrease to adjust the sensor to ambient light conditions to sense nightmode (advanced setting-you may not need to use)
  • FADE button::0XF7C837 :: Increase brightness setting of Night mode
  • SMOOTH button::0XF7E817::Decrease brightness setting of Night mode

Step 4: Here Is the Code

Attached is the arduino file for the code. Comments are self sufficient

Step 5: Evolution/Improvements/Enhancements

What started off as a simple circular LED clock evolved across few months with various ideas and changes coming into my mind as i sat down to code in my limited freetime and weekends. I started off with a push button for clock mode change and a potentiometer for adjusting LED brightness and later improvised functionality and started adding features. I removed the buttons and potentiometer and used a IR receiver and added code to allow all adjustments of brightness, mode and night sensitivity adjustments using IR remote keys. Added some auto features like auto mode change every 15th, 30th, 45th and 58th minute, night mode on low ambient brightness etc.

Other enhancements that can be done are : Time setting/changing using remote, syncing to any external timesource using additional circuitry (for US geo with time servers).

You can edit the code and make your customized clock!! Enjoy!

<p>you did a great job </p><p>I can't consider myself as a starter cause I'm beneath a starter and I don't have enough experience to judge your great work even I don't have enough experience to figure out what the problem with my own clock that I'm building </p><p>I'm hopefully asking to get the answer and the solution for my problem witch is : after uploading your code correctly without errors (that cost me a long time cause I faced errors with compiling but not anymore) when I connect the LEDs data wire to pin6 of the arduino pro mini nothing happen!! </p><p>there isn't any deference between connecting or disconnecting the data wire of the LEDs when I wire Vcc and GND to LEDs it works without programing</p><p>P.S: I didn't find LED strip sop I bought LED pixels </p><p>Thanks in advance</p>
<p>The code is good thanks . A lot easier to work with . I had to download the </p><p><a href="https://github.com/PaulStoffregen/Time" rel="nofollow">https://github.com/PaulStoffregen/Time</a></p><p>library and also the </p><p><a href="https://github.com/PaulStoffregen/DS1307RTC" rel="nofollow">https://github.com/PaulStoffregen/DS1307RTC</a></p><p>libray to make it compile on my mini pro board.</p><p>I see you might get problems with the infa red library and the arduino distribution has RobotRemote library that someone has fiddled on there and it has to be removed first see here</p><p><a href="https://github.com/z3t0/Arduino-IRremote/issues/98#issuecomment-290264416" rel="nofollow">https://github.com/z3t0/Arduino-IRremote/issues/98...</a></p><p>So mine is still messed up but by doing 3 changes like this </p><p>int RECV_PIN1 = 11; //connected to IR data pin<br>IRrecv irrecv1(RECV_PIN1); <br>decode_results results1;</p><p>and in all the places they are used I got it to run at least</p>
<p>Great! the libraries i used were installed on my comp almost 6 months back for some other sketches. If u still have issues, pls let me know, i can share an offline copy of my library if needed</p>
<p>Please remove this ugly code unreadable and incorrect, which compiler will accept five include statement without any library declared ?</p><p>Which phone charger is able to deliver 3.6A / 5V, let's say 18W ?</p><p>Where's the schematic ?</p>
<p>The code got corrupted when i did a copy paste into the instructables editor as it considered &lt; &gt; as special instructions and deleted them. Will be shortly giving a link to GitHub (just got an account created)</p><p>Phone charger i used was for a phone called micromax and since i don't switch on all LEDs at all times, i don't need the peak current to be drawn. it works fine with no heating issues. </p><p>Schematic is in pictures in step2. I presume you missed seeing the pictures.</p>
<p>Code attached as .ino</p>
<p>Thanxs. You well presumed. About Neopixel, they recommend putting a 470 <br>ohm resistor in series with the data input, and it works. Regarding <br>power, on one of your pictures, at least half of the leds are white, a <br>quarter red and another yellow which makes 30*60 + 15*15 + 15*30 = <br>2475mA MIN with full brightness, arround 12W, a lot for a phone supply.</p><p>I perfectly know this feeling of &quot;unaccomplished&quot; when new ideas come to upgrade a product. The problem is that if you don't say &quot;stop&quot; at one moment, you'll never finish your work. There's always higher features available !</p>
what an idea Sir ji.good one
<p>thanks for your comments!</p>
<p>I like the flexible bending strip idea, very neat and simple.</p>
<p>Mike, thanks for your comments! Yes i mulled over many options like laser cut acrylic strips, veneer strips etc for this ring structure and finally hit upon this simple &amp; cheap solution ;)</p>

About This Instructable




Bio: Working in a IT services based organization handling people weekdays and handling electronics and code on weekends
More by ravijag:Arduino Colorful Clock++ Using Neopixel Strip Pure Binary LED Wall Clock With Arduino 
Add instructable to: