In this tutorial, i will show you how to make a seven segment display from scratch. Seven segment display is a setup which consists of seven led in an arrangement that shows numerical values from zero to nine. It may be used from counting seconds or other purposes. By combining 4 “seven segment display” one can easily make a DIY wall clock .

“7-segment display” is basically two types. they are:

1. Common anode   2. Common cathode

when the positive leads a connected together , the display is common anode. And when negative leads are common, such one is common cathode.

In this tutorial, i will show you how to make the second one and that is common cathode “7-segment display”

Circuit of common cathode display

Step 1 : Draw a 7 segment display on paper

To make the segment  we  first have to draw it on a paper and glue it on a card board.

Step 2 : Cut the Hard paper

These segments are made of hard papers. So, we have to collect it and cut it into pieces.

Step 3 : Make the segments

For placing LEDs in a sequence, name the segments from A to G and make small holes to put LEDs in segments. Put the papers(hard) on the drawing as done below and glue them with master gum or super glue. Now the segments are ready.

Step 4: Place LED and Border

Step 5: Circuit

This is not a difficult circuit. Just make a common ground for LEDs. After that make seven separate positive points for each LEDs. Mark them from A to G. Connect them to the arduino pins from 2 to 8 as shown below.  If you can’t understand the circuit can take help from the video.

 

Step 6: Cover

place a cover on the segments and glue it. This cover can be just a simple white paper.

 

Arduino Code:

void setup() {
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);

}

void loop() {
    
   nine(); delay (1000);
   eight(); delay (1000);
   seven(); delay (1000);
   six(); delay (1000);
   five(); delay (1000);
   four(); delay (1000);
   three(); delay (1000);
   two(); delay (1000);
   one(); delay (1000);
   zero(); delay (6000);
}

void zero(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,LOW); // d off
  digitalWrite(6,HIGH); // e on
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); //g on
  
  }
  void one(){
  digitalWrite(2,LOW); // a off
  digitalWrite(3,LOW); // b off
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,LOW); // d off
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,LOW); //g off
  
  }
  void two(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,LOW); // b off
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,HIGH); // e on
  digitalWrite(7,LOW); // f off
  digitalWrite(8,HIGH); //g on
  
  }
  void three(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,LOW); // b off
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); //g on
  
  }
  void four(){
  digitalWrite(2,LOW); // a off
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,LOW); //g off
  
  }
  void five(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,LOW); // c off
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); //g on
  
  }
  void six(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,LOW); // c off 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,HIGH); // e on
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); // g on
  
  }
  void seven(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,LOW); // b off
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,LOW); // d off
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,LOW); // g off
  
  }
  void eight(){
 digitalWrite(2,HIGH); // a on
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,HIGH); // e on
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); // g on
  
  }
  void nine(){
  digitalWrite(2,HIGH); // a on
  digitalWrite(3,HIGH); // b on
  digitalWrite(4,HIGH); // c on 
  digitalWrite(5,HIGH); // d on
  digitalWrite(6,LOW); // e off
  digitalWrite(7,HIGH); // f on
  digitalWrite(8,HIGH); // g on
  
  }

 You don’t have to work hard to draw seven segment. Just may download the photo and print it. Happy DIY. Bye… See you soon..

 

Leave a Reply

Your email address will not be published. Required fields are marked *