Skip to main content

How to build and Arduino based Clock prototype with a mini OLED display

A simple DIY project to create a Digital Clock prototype.

See my video below for how the final result looks and works.


What you need

  • Arduino Uno R3 or equivalent (link)
  • Real Time Clock Module (DS3231) or equivalent 6pin/I2C version (link)
  • OLED 0.96 inch display module SPI/7pin version (link)
  • Breadboard with male jumper cables
  • Power supply - 2400mAh power bank for roughly 3 days running)
Note: once the time is set on the RTC chip, the onboard battery will ensure that the time keeps updating when there is no more power to the breadboard.

Arduino Libraries required


Wiring Reference

Connect the RTC Module to Arduino Board

  • 32K - no connection
  • SQW - no connection
  • SCL - Pin A5
  • SDA - Pin A4
  • VCC - 5V
  • GND - Ground
(Note: the A/Analogue pins are on the side that the POWER connector lies on the board)

Connect the OLED Module to Arduino board

  • GND - Ground
  • VCC - 5V
  • D0 - Digital Pin 13
  • D1 - Digital Pin 11
  • RES - Digital Pin 8
  • DC - Digital Pin 9
  • CS - Digital Pin 10
(Note: the Digital pins are on the USB connector side of the board)

Code Snippet:

Important: there is a commented line of code in the 'setup' function that sets the time on the clock. This code must be run once to set the time. Then you must comment that line again and upload the code again as you wont need to set the time again.

Comments

Popular posts from this blog

DIY M8 LC Digital Inductance Capacitance Meter Kit

DIY M8 LC Digital Inductance Capacitance Meter Kit Product page: http://www.banggood.com/DIY-M8-LC-Digital-Inductance-Capacitance-Meter-Kit-p-976437.html?p=0Y18033039072201511A IMPORTANT INFO!! Check the height of the Display Pin Headers BEFORE you solder it on. Ensure the 10uF Capacitors on the bottom right of the Board are the correct way around. (the Line on the PCB must match with the NEGATIVE of the Capacitor) The device needs calibration, use a multimeter with the 3.16V pins and adjust the POT until you read 3.16V on the multimeter.

8x8 LED Matrix Review

Video Overview: Product Page: 2Pcs MAX7219 Dot Matrix MCU LED Display Control Module Kit For Arduino With Dupont Cable Arduino Code used in this Review: