Introduction: Arduino Desk Clock

Picture of Arduino Desk Clock

Welcome to my Arduino Desk Clock tutorial!

This project was heavily inspired by the Arduino Watch Sport by Alexis Ospitia. Here's the link to his project:

https://www.instructables.com/id/Arduino-Watch-Spo...

This clock can be powered by the internal battery, or by usb through the FTDI breakout board located in the casing.

Step 1: Gather the Materials

Picture of Gather the Materials

You will need a few things for this project:

  1. Arduino Pro Mini 5v - 16MHz
  2. Nokia 5110 LCD
  3. DHT 11 Sensor
  4. FTDI Breakout Board
  5. 3.7v 400 MAh li Battery
  6. Real Time Clock - PCF8523
  7. 330 Ohm Resistors
  8. Switch for the battery
  9. Piece of perfboard to act as a sort of breadboard
  10. Aluminum Sheet
  11. Electrical Tape
  12. Wires

Step 2: Soldering Header Pins Into Arduino

Picture of Soldering Header Pins Into Arduino

You will need these pins to push code to the Arduino, since the pro mini doesn't have a direct USB connection.

Step 3: Installing the Proper Libraries

For this project, I used to following libraries:

  1. DHT Sensor Library by Adafruit: https://github.com/adafruit/DHT-sensor-library
  2. LCD_5110_Graph: https://github.com/MisaZhu/Arduino/tree/master/li...
  3. RTClib: https://github.com/adafruit/RTClib

The rest of the libraries needed for this project are already built into the Arduino IDE.

Step 4: Pushing Code to the Arduino

Picture of Pushing Code to the Arduino

First we must connect the FTDI breakout board to the Arduino. I did this with female to female jumper cables, but different breakout boards have different headers so use whatever works.

  1. FTDI 3.3v goes to Arduino Vcc.
  2. FTDI ground goes to Arduino BLK.
  3. FTDI TXO goes to Arduino RXI.
  4. FTDI RXD goes to Arduino TXD.
  5. Finally, FTDI DTR goes to Arduino GRN.

After you make these connections, connect the FTDI breakout board to a USB port. Make sure to change the board in the Arduino IDE. Also, if it doesn't recognize the breakout board, you might need to install FTDI drivers.

I've attached the code for this project below.

Step 5: Connecting the Battery to the Perfboard

Picture of Connecting the Battery to the Perfboard
  1. Solder switch into positive wire to be able to turn the battery on and off.
  2. Solder negative wire from battery into a channel on your perfboard.
  3. Solder positive wire from battery into the other channel on your perfboard.

We need two separate channels in the perfboard in order to power and ground all the other components of this project.

Step 6: Wiring Up the LCD

Picture of Wiring Up the LCD

This is where you connect ground and power to the LCD. There are 2 parts of the LCD that need to be powered. One is the Vcc, which is voltage in. The other is LED, which needs a resistor in order to not blow out the LED backlights. To do this I soldered a resistor into the wire. The LED part is technically optional, but I suggest using them because I think it looks better. Finally, I soldered a wire to Ground. I also soldered wires into the rest of the spots on the LCD.

Step 7: Soldering the DHT11 Sensor

Picture of Soldering the DHT11 Sensor

I used red wire for power, and black for ground. All other pins were green. This was the same for all components.

  1. Solder red wire to 1st pin of DHT sensor. This is the power for the sensor. Solder the other end of the red wire into the positive perfboard channel.
  2. Solder green wire to 2nd pin of DHT sensor. This is the data pin. I soldered the other end into D6. You could solder it into another digital pin, but you would need to change 1 line in the code.
  3. The 3rd pin of the sensor doesn't do anything.
  4. The 4th pin is ground, so solder a black wire to it and solder the other end into the ground perfboard channel.

Step 8: Soldering the RTC Module

Same wires as the other components: red for power, green for data, and black for ground.

  1. The first pin is ground, so solder in a black wire, and solder the other end into the ground channel of the perfboard.
  2. The second pin is power, so solder in a red wire, and solder the other end into the positive channel of the perfboard.

These next two pins must be connected like in this tutorial, or else the project won't work. A4 and A5 of the Arduino are special I2C pins.

3. Solder in a green wire into the SDA pin of the RTC. Solder the other end into A4 of the Arduino.

4. Solder a green wire into the SCL pin of the RTC. Solder the other end into A5 of the Arduino.

Step 9: Soldering LCD Wires Into Arduino

Picture of Soldering LCD Wires Into Arduino

The LCD has the most wires to solder in. Let's go in order as seen on the diagram above. You should have wires soldered into the LCD from an earlier step.

  1. 1st is VCC, which is power. Solder red wire into the positive perfboard channel.
  2. 2nd is GND, which is ground. Solder black wire into the ground perfboard channel.
  3. Next is SCE. Solder green wire from SCE to D12.
  4. 4th is RST. Solder green wire from RST to D11.
  5. 5th is D/C. Solder green wire from D/C to D10.
  6. 6th is DN. Solder green wire from DN to D9.
  7. 7th is SCLK. Solder green wire from SCLK to D8.
  8. Finally, is LED. This is the one with the resistor integrated into the wire. Solder this red wire into the positive channel of the perfboard.

Step 10: Soldering Power and Ground Into the Arduino

Picture of Soldering Power and Ground Into the Arduino
  1. Solder a red wire from the positive channel of your perfboard into VCC on the Arduino.
  2. Solder a black wire from the ground channel of your perfboard into GND on the Arduino.

Step 11: Solder Power and Ground Into Perfboard

Picture of Solder Power and Ground Into Perfboard

I soldered power and ground for each component into the perfboard. I then soldered the channels together so that each component would be getting power and be grounded. Make sure you don't solder the 2 separate channels together or else you will have problems.

Step 12: Creating the Enlcosure

Picture of Creating the Enlcosure
  1. I started by creating a 3.25 inch cube net on the front of it, but with one side missing.
  2. Use a Dremel to cut the net out and score the net alone the lines.
  3. I folded the net in along the lines to create a box with an open top.
  4. Measure out a piece of the cube to fit the screen into it. Cut the piece out.
  5. Next I created the back piece that would close off the box.
  6. Fold over tabs in the main cube to be able to drill holes into them later.
  7. Drill the holes into the back piece and the tabs to connect them together later.
  8. Cut hole for the DHT Sensor, as well as holes for the Arduino pins that could be used to power the clock through USB.

Step 13: Putting It All Together

Picture of Putting It All Together
  1. Insulate the inside of the box with electrical tape. This will prevent any electrical problems.
  2. Stick all the electronics into the box. Have the LCD face out.
  3. Use the holes you cut for the LCD screws to secure the LCD to the front of the box. My holes were too small for my screws so I used some wire like people use when shopping for groceries when they put their vegetables in a bag.
  4. I used some velcro to stick the Arduino in the spot I needed.
  5. I did the same thing for the back of the enclosure like I did for the LCD.
  6. Finally, I connected the wires to have it powered on and on my desk.

Comments

JoburgJim (author)2017-04-30

Does the 5V ProMini work ok with the 3.7V battery?

th3bearsfan (author)JoburgJim2017-04-30

I had no problems so it seems to work just fine.

DIY Hacks and How Tos (author)2017-02-26

Nice design. I really would love to have an Arduino clock setup on my desk because an Arduino gives you so many options on things that you can do and activate at different times.

About This Instructable

2,708views

55favorites

License:

More by th3bearsfan:Arduino Desk Clock
Add instructable to: