Digital Clock With Automatic Rotation of LED Display




Introduction: Digital Clock With Automatic Rotation of LED Display

This project is about a digital clock with automatic rotation of 7-Seg LED display.

This clock can be rotated in any position keeping the digits readable even upside down or in a mirror image!!

It is controlled by an Arduino and driven by accelerometers to find out the correct position in 3D coordinates.

Additionaly there is a feature to show the indoor ambient temperature in Celsius or in Fahrenheit degrees.

The assemble is very simple and I hope you have fun using it !!



Step 1: Material List

    1. Arduino Uno R3
    2. MPU-6050 breakout
    3. Multi Funtion Shield for Arduino
    4. Female jumper wires

    - MPU-6050 breakout:

    The MPU-6050 breakout consists in a triple axis accelerometer and gyroscope plus a temperature sensor with following specifications:

    • Chip: MPU-6050
    • Input Voltage: 3-5V
    • ADC: 16 bits
    • I/O: standard I2C
    • Gyroscope full-scale range: ±250, 500, 1000, 2000°/s
    • Accelerometer full-scale range: ±2, ±4, ±8, ±16g
    • Temperature sensor range: -40 to +85 ºC

    - Multi Function Shield (MFD):

    The MFD can simplify and speed up the prototype development.

    Main features:

    • 4 digit 7-segment LED display module driven by two serial 74HC595's
    • 4 x surface mount LED's in a parallel configuration
    • 10K adjustable precision potentiometer
    • 3 x independent push buttons
    • Piezo buzzer
    • DS18B20 temperature sensor interface
    • LM35 temperature sensor interface
    • Infrared receiver interface
    • Serial interface header for convenient connection to serial modules such as Bluetooth, wireless interface, voice module, a voice recognition module, etc.

    Step 2: Assembly

    The assembly is very simple and does not need any schematics:

    1. Insert the Multi Shield into the Arduino.
    2. Fasten the MPU-6050 breakout on the Arduino board using a tiny screw.

    There only 04 jumper wires to be connected:

    • Red wire: Vcc (+5V)
    • Black wire: Gnd
    • Green wire: SCL of MPU-6050 breakout to port #6 in the Multi Shield.
    • Yellow wire: SDA of MPU-6050 breakout to port #5 in the Multi Shield.

    Step 3: Setup

    There are 3 buttons to setup the clock:

    1. Left button: Press to adjust the hours. Quickly press to set up step by step. Continuous press to advance the hours quickly.
    2. Center button: Set the minutes. Continuous press to advance the hours quickly.
    3. Right button: a quick press to move for temperature mode.

    Note: In Temperature Mode is possible to change the status to Fahrenheit or Celsius pressing the Left button.

    Step 4: Code

    The main functions of the code are:

    • Reading of accelerometers inclination angles.
    • Calculation of the transfer function for the 7-seg LED display (see pictures).

    With the angles is possible to detect the spacial position of the clock and decide what routine will be released:

    1. Front View - Clock Stand Up
    2. Front View - Clock Upside Down
    3. Mirror View - Clock Stand Up
    4. Mirror View - Clock Upside Down
    Clocks Contest

    Participated in the
    Clocks Contest

    Be the First to Share


      • Game Design: Student Design Challenge

        Game Design: Student Design Challenge
      • For the Home Contest

        For the Home Contest
      • Big and Small Contest

        Big and Small Contest



      Question 3 years ago on Step 3

      Hello Lagsilva,
      Nice project, congratulation! But how can I download the Arduino program?
      Thank you and best regards!