Time Frame
This is the most simplest electronic clock that you can build. This design is based on the 7 segment clock from my book “Arduino Ventures”. The code for this adjustable RTC based clock is less than 90 lines in the Arduino IDE. The only library used that is not clearly described in the code is for the DS3231 and is the Rinky Dink DS3231 library. The OLED library is from ADAFRUIT. A white 0.91 OLED display was placed in a framed picture i got from my travels some years ago and measures 22cm wide and 17cm high. An Arduino Nano (non original) was used to control a DS3231 and the connections between the modules make effective use of the I2C bus as both DS3231 and OLED display are connected on pins A4 and A5 of the Arduino Nano.
Supplies
Parts List
1 x Arduino Nano (mini usb was used)
1x DS3231 (Real Time Clock)
1x 0.91 OLED display
7x 1k ohm Resistors (2%)
3x press to make switches
for a permanent build (fixing into a frame etc.) a 3cmx7cm veraboard was used along with several pieces of wire for soldering connections
The Circuit Diagram
The SDA of both the DS3231 and the 0.91 OLED display are connected to A4 of the Arduino Nano. SCK of the OLED display and SCL of the DS3231 are connected to A5 of the Arduino Nano. The Nano supplies power to both modules from the 5v and GND pins. 1k ohm resistors from D4;D5 and D6 are taken to each pole of the switches.Another three 1k ohm resistors are connected to each end of the resistors that come from the digital pins of the Arduino.These three resistors have their ends connected to Vcc while the other end of each switch is connected to GND.
Programming the Arduino Nano
The code is supplied on this instructable but if for some reason its not here follow this link https://github.com/BegMN/Instructables to download it. The code allows the user to adjust the RTC by making 3 or more presses onto the button connected to D4,the LED on D7 indicates when you have enter the "adjust" mode. Thereafter the user can adjust the hours and minutes of the clock the adjustment can be seen on the OLED in real time. More than 7 presses on the switch turns OFF the LED and shows the user that they have exited the "adjust" mode.
Downloads
Framing Your Time
This procedure is subject to whatever picture frame ; calendar or desktop adornment you want to modify for the purpose of adding functionality to it. This ends my very first instructable i hope you enjoyed it. I do have some content on youtube @Circuit3-MNB that might interest you as well..please check it out..Thanks