Introduction:

A counter is a device that counts the number of times when a particular event occurs. In this project , we can learn how to make a counter from 0-9 using a 7-segment display, made using 7 LEDs, and Push buttons, how to program arduino on desktop IDE and how to connect the components with a circuit diagram.

Requirements:

  • Arduino Nano
  • 7 LEDs
  • 1 Button
  • 8 Resistors (7 100ohm , 1 220ohm )
  • 1 4xAA Battery Holder

Working:

The working of this project is quite simple. First connect the components as shown in the circuit. Upload the code into the Arduino Nano using the USB connector. The 7 segment display works with 7 different LEDs, which turn on at different combinations. Each combination represents a digit , thus having a total of 10 combinations. With the press of the button, the state of the pin is changed , indicating the button has been pressed. A variable counter is used in the code to count the number of times the button is pressed. The value of this variable represents the value to be displayed on the LED segment. After it reaches the 9 , it starts again from 0. This button acts as an up counter.


Schematic:

schematic

Upgrade:

This counter project can have different upgrades. 

  • Instead of using 7 different LEDs to make a single LED segment, a single 7-Segment LED can be used. 
  • More than one segment can be added to increase the maximum count value.
  • Another button can be added to act as a down counter as well.

Code:

https://github.com/soumya-shome/Digital_Counter


Working Video