Friday 24 April 2020

SEVEN SEGMENT CLOCK

in this tutorial, I am showing how to build a seven-segment display clock


Things needed
  1. 4* common anode seven segment displays https://amzn.to/3aDfwtP
  2. Arduino UNOhttps://amzn.to/2VXJOlO
  3. 3 push buttons https://amzn.to/2KxexB8
  4. Ds1307 rtc module https://amzn.to/2zmkG0p
  5. Common PCB https://amzn.to/3cPaNXP
  6. 2*leds https://amzn.to/2VSgkWB
As the name indicates seven segment displays has 7 segments. each segment is a single led and all the 7 LEDs connected together with a common pin that may be a common positive or a common negative and arranged in a specific style.
A typical 7 segment display has 10 pins  arranged in top and bottom each of middle pins are common pins 
 And others are to control  corresponding seven segments
 Circuit diagram
we have 4 displays that is totals of 4*8=32 pins to control this our Arduino doesn't have 32 pins so how to do this. yes, multiplexing...
so we connect all segments together that is segment A of 4 displays together, segment B of all displays together and soo on ...
now we have 7 common segment pins and 4 common anode pins that is total 11 pins
 yes our Arduino has 11  pins .by using multiplexing lets control 4 displays with 11 pins instead of 32

connections

 I connected everything according to the circuit
 connect  one end of  3 push buttons together  and connect  to A0, A1, A2
RTCmodule works on i2c communication so connect 
SDA TO A4 
SCL TO A5
GND TO GND
VCC TO 5V

REPLACING THE ARDUINO UNO WITH HOMEMADE ARDUINO

to save some space I replaced Arduino with my diy Arduino



4 comments:

  1. Hi,
    Great tutorial, thank you. The link for the code is broken, any chance you could fix this please

    ReplyDelete
  2. it works thanks, also please suggest changes to make it a 12 hr clock i.e am/pm.

    ReplyDelete

  3. CODE NOT EXECUTING PLZ TELL SOLUTION

    Arduino: 1.6.9 (Windows 8), Board: "Arduino/Genuino Uno"

    In file included from C:\Users\sys9\Documents\Arduino\X6\X6.ino:15:0:

    C:\Users\sys9\Documents\Arduino\libraries\RTClib\src/RTClib.h:25:32: fatal error: Adafruit_I2CDevice.h: No such file or directory

    #include

    ^

    compilation terminated.

    exit status 1
    Error compiling for board Arduino/Genuino Uno.

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    ReplyDelete