Cool Desktop Clock

by MolayK in Circuits > Clocks

658 Views, 7 Favorites, 0 Comments

Cool Desktop Clock

IMG_3305.jpg
IMG_3299.png
My Timekeeper | Desktop clock | Tiny85

Introducing the coolest desktop clock you'll ever see, made by yours truly using Attiny85, RTC DS1307, and an OLED display!

This clock not only tells time and Date with precision accuracy, but it also displays the current weather, making it a functional and practical addition to any desk or workstation.

Supplies

  • Attiny85
  • RTC DS1307
  • DHT11
  • Oled Display(0.96)
  • Veroboard
  • Coin Battery
  • Few Capacitor and resistor(10UF, 1k Ohm)
  • Arduino Uno(For Programming)
  • Sticks (for creating Frame)

Planning the Circuit

thinker.png
FTNPICFIVA53486.png

I have used Attiny85 microcontroller. It has vey few pin to connect with multiple devices and I had three devices(Temp sensor, Oled, RTC).

So I have used Tinkercad to first design the circuits in circuit simulation. At end I have finalized following connection:

PIN 0 as data pin for RTC and Oled Display.

PIN 2 as clock pin for RTC and Oled Display.

PIN 4 as input for DHT11

Setup All Component on Breadboard

IMG_33.jpg
IMG_3244.png

Setup DS1307

To get real time 'Time' I have used DS1307 RTC module. It is connected through 12C protocol

Pin 0 for data,

Pin 2 for CLK

VCC and Gnd

First you need to setup the current time date in the RTC module.Use the examples script of the library to setup these things. Here I have used TinyRTClib library.


Setup Oled Display

Testing Display is always a fun eg trying different font,style. It also connected through I2C protocol, all device has there own id so you can connect it together.

Pin 0 for data,

Pin 2 for CLK

VCC and Gnd

I have used biggest font for displaying Time, medium for Date and smallest font for weather.

I would recommend your own style to display/place the content. I have used Tiny4kOLED library.


Setup Temp Sensor

I have used DHT11 for temp and humidity sensor. DHT11 require only single pin

I have used pin 4 for that other then that you need to pull up that pin with any 1k ohm register


If you are new to these component I would suggest please go through the tutorial of individual component first.

Connect All Component on Veroboard

IMG_3254.png
IMG_3258.png

When all component works on breadboard then move those things in veroboard.

First do soldering of microcontroller base.

Then plan to provide vcc and gnd to all the component (RTC,Oled,DHT11).

Finally connect the data and clock pin to RTC, Oled and pin 4 to DHT11 with microcontroller.

Programming

Here come to programming part

Coding for this clock is very straight forward if you have right set of library for Attiy85.

First need to Initialized oled,RTC and Dht sensor.

Then read the data from RTC and DHT and save in some variables.

Finally print the time date and weather data from above variables in serial manner in oled display .

Please find the attachments of my code here.

I would suggest design it your own way , I believe you can do it better way 😊

Downloads

Creating Frame

61zaagPhvOL._SL1500_.jpg

I have created the frame using simple colored sticks and fevicol.

You can create your own using some sticks or creating any frame through 3D printed.

Conclusion

IMG_3264.jpg
IMG_3267.png

Give it a try , If you have any doubt feel free to contact with me in instagram.

If you like my work please support me by simply liking my post.

For such amazing content follow me here

Youtube: https://www.youtube.com/@MolayKumar

Instagram: https://www.instagram.com/lets.make_it_

Happy making !!