Arduino with 7 segment display | Embedded System | New Topic [2023]

In this note, we are discuss about a circuit “Arduino With 7 Segment Display“. In this topic we are learn that how we can interface 7 segment display with Arduino. Welcome to Poly Notes Hub, a one stop solution for Diploma Engineering Notes in PDF format.

Author Name: Arun Paul.

What is Arduino ?

An open-source platform called Arduino is used to create electronic projects. It is made up of hardware and software parts that allow experts, hobbyists, and enthusiasts to construct a variety of interactive systems and devices.

A basic microcontroller board with input and output pins is usually part of the hardware, and it can be coupled to a variety of sensors, lights, motors, and other parts. An Integrated Development Environment (IDE) is used in the software, which enables users to develop and upload code to the Arduino board.

Features of Arduino

  1. Microcontroller: Controls inputs and outputs.
  2. Input/Output Pins: Connect sensors and components.
  3. Power Options: USB, battery, or external supply.
  4. Clock Speed: Determines processing speed.
  5. Memory: Stores code and variables.
  6. IDE: Software for coding and uploading.
  7. Compatibility: Works with various components.
  8. Community Support: Extensive resources available.
  9. Open-Source: Allows modification and sharing.

Applications of Arduino

  1. Electronics Prototyping
  2. Home Automation
  3. Robotics
  4. IoT (Internet of Things)
  5. Interactive Art
  6. Education
  7. Wearable Technology
  8. Environmental Monitoring
  9. DIY Projects

About 7 Segment

A 7-segment display is a visual device composed of seven individual segments arranged in a pattern that can display numerals (0-9) and some alphabetic characters. These segments are arranged in a specific pattern resembling the number “8” and are controlled by providing power to different combinations of segments to form different numbers or characters. Each segment can be individually illuminated to display the desired symbol.

7 segment display with arduino

Types of 7 Segment Display

  1. Common Anode
  2. Common Cathode

Applications of 7 Segment Display

These displays are commonly used in digital clocks, electronic meters, and other devices where numerical or limited alphanumeric information needs to be shown.

Pin Details of 7 Segment Display

circuit diagram of 7 segment

There are two types of 7 segment display –

Common Cathode

In a common cathode display, all the cathodes of the LED segments are connected together and tied to a common connection, while each segment’s anode is connected separately. Cathodes are the terminals used to control the flow of current in a diode or LED. When a particular segment’s anode is provided with a positive voltage (relative to the common cathode), and the cathode is connected to ground (or a lower potential), current flows through the segment, causing it to light up. The common cathode connection of 7 Segment Display is shown in the above picture.

Common Anode

In a common anode 7-segment display, all the anodes of the LED segments are connected together and tied to a common connection, while each segment’s cathode is connected separately. Anodes are the terminals through which current flows into a diode or LED when a voltage is applied. The common anode connection of 7 Segment Display is shown in the above picture.

Arduino with 7 segment display

Used Equipments

  1. Arduino Uno – One
  2. 100 ohm resistors – Seven
  3. 7 Segment – One ( Common Cathode )

Circuit Details

  • Seven Segments terminals (a, b, c, d, e, f, and g) are connected to Arduino Uno’s From D12 terminal to D7
  • Here we are using the Common Cathode Seven Segment. So, the COM terminal of the Seven Segment ( 3 and 8 ) should be connected with the GND of the Arduino.
  • All terminals of the Seven Segment should be connected through the 100 ohm resistor with the Arduino. Otherwise, the display may be burned out.
  • Follow the below circuit to make it and then upload the code which is written below.
Arduino with 7 segment display

Code

In this code, we want to print from No 0 to No 3. If you want to print other nos then just you have to add some more lines like the previous lines.

void setup()
{
  pinMode(12, OUTPUT); //Connected to a
  pinMode(11, OUTPUT); //Connected to b
  pinMode(10, OUTPUT); //Connected to c
  pinMode(9, OUTPUT); //Connected to d
  pinMode(8, OUTPUT); //Connected to e
  pinMode(7, OUTPUT); //Connected to f
  pinMode(6, OUTPUT); //Connected to g
}

void loop()
{
  digitalWrite(12,HIGH); // For Print 0
  digitalWrite(11,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(9,HIGH);
  digitalWrite(8,HIGH);
  digitalWrite(7,HIGH);
  digitalWrite(6,LOW);
  delay(1000);

  digitalWrite(12,LOW); // For Print 1
  digitalWrite(11,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(9,LOW);
  digitalWrite(8,LOW);
  digitalWrite(7,LOW);
  digitalWrite(6,LOW);
  delay(1000);

  digitalWrite(12,HIGH); // For Print 2
  digitalWrite(11,HIGH);
  digitalWrite(10,LOW);
  digitalWrite(9,HIGH);
  digitalWrite(8,HIGH);
  digitalWrite(7,LOW);
  digitalWrite(6,HIGH);
  delay(1000);

  digitalWrite(12,HIGH); // For Print 3
  digitalWrite(11,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(9,HIGH);
  digitalWrite(8,LOW);
  digitalWrite(7,LOW);
  digitalWrite(6,HIGH);
  delay(1000);
}
Share To:

One thought on “Arduino with 7 segment display | Embedded System | New Topic [2023]

Leave a Reply

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