Escolar Documentos
Profissional Documentos
Cultura Documentos
Declaration
This report has been prepared on the basis of our own work and designs developed under Design
Lab Course.Where other published and unpublished source materials have been used, these have
been acknowledged.
Students Name:
2
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Table of Contents
Abstract 3
Background 4
Chapter 1: Theory...........................................................................................................6
1.1 Timer...........................................................................................................................6
1.4 IR Sensors................................................................................................................10
1.7 7447..........................................................................................................................13
Chapter 2: Implementation............................................................................................14
2.2.1 IR Pair…………………………………………………………………………….17
2.2.2 Code………………………………………………………………………………18
Chapter 3: Design........................................................................................................24
Conclusion........................................................................................................................27
Bibilography......................................................................................................................28
3
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Abstract
In this report, the design and implementation processes of a digital timer circuit based on the 555
timer are documented. Our aim is to display count till two digit using seven segment display. To
have a two digit output, count will increase from 0 to 99. To include either an op-amp or 555 timer,
research was conducted into similar analogue electronic circuits and a suitable starting point of a
digital die was identified. Using this starting point, a digital timer circuit was designed using a 555
timer, binary counters and 7 segment display outputs. The circuit was tested using multisim and
tinkercad. The circuit was then implemented and tested on breadboard before an arduino UNO
board implementation was prepared.
As automation is the next leading step in changing the traditional techniques, the means of making
these changes possible is currently in trend. Automating the whole system not only reduces time,
but it also saves a lot of resources and man-power. Just assume if a company has a worker
employed only for counting the finished products and if this worker is replaced by a digital
automatic system, then the chances of false counting, errors, etc. factors are reduced. The digital
system can be made with precision and high accuracy along with a high efficiency. It thus replaces
the man-power used for the simple task and thereby reduces the problems the normal employee
may create.The techniques of developing such a system which replaces the old traditional method
of counting objects, are vivid. The developer has to take care of the nature and the environment for
which he will be creating such system. One such system which has been designed or forecasted has
been introduced in quite a few areas.The Digital Object Counter using LDR (Light Dependent
Resistor) is a simple system which can be made into use for counting objects in the product
manufacturing area of an industry,etc. Two IC555 are used in Monostable and Astable mode for
respective pulse generation.The counter IC7490 is a decade counter which is used for generating
the 0-9 BCD code. TheIC7447 is used for driving the 7 Segment Display as it is a BCD to 7
Segment Display.As the light is blocked, a pulse is generated and given to the decade counter. It
increments and generates the code and the number is displayed on the 7 segment display.This
constitutes the whole Digital Object Counter system and is a very low cost and effective product.
4
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Background
Timers were originally designed to fulfill a need in industry for a means of keeping time on
certain devices. Originally, these timers were mechanical devices and used clockwork
mechanisms as a means of keeping a regular time . The invention of two electromechanical
timer designs allowed for more precise time measurement. The first uses the principle of heat
expansion to increase the temperature of a metal finger made of two different metals with
differing rates of thermal expansion . As electric current flows through the metal, it begins to
heat and one side expands more quickly than the other which, in turn, moves the electrical
contact away from an electrical switch contact. The second uses a small AC motor which turns
at a predetermined rate due to the application of an alternating current .
Finally, digital timers were invented. Digital logic circuits are now so cheap that it has become
a better investment to buy a digital timer than a mechanical or electromechanical timer.
Individual timers are implemented with single chip circuits, similar to a watch . The 555 timer
used in this project is a combination of a digital logic circuit and analogue components.
5
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Project Specification
The main principle of this circuit is to increment the values on seven segment displays by using
infrared sensors (transmitter and receiver). When an object is passed through ir sensors , value on
the display is incremented by one value .The value on the display can be incremented and
decremented from 0-99 as it uses only 2 displays. Also , the circuit uses comparator (IC LM358) ,
LM7805 Voltage regulator. If one wants to display 3 digits, three displays should be used .There
are many circuits available for 2 digit up/down counter but using a microcontroller reduces
components and space on the board but simple programming is required.
6
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Chapter 1: Theory
Electronics designers use 555 timers in timing circuits and the binary counter decimal (BCD)
integrated counting circuits in order to implement a timer. Though programmable micro-
controllers are more commonly used, a simpler solution for three or more digit timers. BCDs
are also valid in this application.
555 timers are integrated timing circuits which are used commonly as a source of clock pulses
to drive subsequent timer circuits. They are analogue devices which can produce an oscillating
and digital output. The IC can be configured to give an astable, period output or a monostable,
single triggered output.
The 555 Timer which gets its name from the three 5kΩ resistors it uses to generate the two
comparators reference voltage, is a very cheap, popular and useful precision timing device that can
act as either a simple timer to generate single pulses or long time delays, or as a relaxation
oscillator producing stabilized waveforms of varying duty cycles from 50 to 100%.
The 555 timer chip is extremely robust and stable 8-pin device that can be operated either as a very
accurate monostable, bistable or astable . Multivibrator to produce a variety of applications such as
one-shot or delay timers, pulse generation, LED and lamp flashers, alarms and tone generation,
logic clocks, frequency division, power supplies and converters etc, in fact any circuit that requires
some form of time control as the list is endless.
In the project circuit, the monostable configuration is implemented. The Monostable 555
Timer circuit triggers on a negative-going pulse applied to pin 2 and this trigger pulse must be
much shorter than the output pulse width allowing time for the timing capacitor to charge and then
discharge fully. Once triggered, the 555 Monostable will remain in this “HIGH” unstable output
state until the time period set up by the R x C network has elapsed. The amount of time that the
1 1
output voltage remains “HIGH” or at a logic “1” level, is given by the following time constant
equation.
T=1.1R1C1
7
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
6 The pulse ends when the voltage is greater than Control Threshold
8
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
9
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
a 7
b 6
c 4
d 2
e 1
f 9
g 10
VCC 3,8
Decimal Point(DP) 5
1.3 LM358 IC
The LM358 IC is a great, low power and easy to use dual channel op-amp IC. It is designed and
introduced by national semiconductor. It consists of two internally frequency compensated, high
gain, independent op-amps. This IC is designed for specially to operate from a single power supply
over a wide range of voltages. The LM358 IC is available in a chip sized package and applications
of this op amp include conventional op-amp circuits, DC gain blocks and transducer amplifiers.
LM358 IC is a good, standard operational amplifier and it is suitable for your needs. It can handle
3-32V DC supply & source up to 20mA per channel. This op-amp is apt, if you want to operate two
separate op-amps for a single power supply. It’s available in an 8-pin DIP package.
10
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Figure 4. LM358 IC
It consists of two op-amps internally and frequency compensated for unity gain
The large voltage gain is 100 dB
Wide bandwidth is 1MHz
Range of wide power supplies includes single and dual power supplies
Range of Single power supply is from 3V to 32V
Range of dual power supplies is from + or -1.5V to + or -16V
The supply current drain is very low, i.e., 500 μA
2mV low i/p offset voltage
Common mode i/p voltage range comprises ground
The power supply voltage and differential i/p voltages are similar
o/p voltage swing is large.
An infrared sensor is an electronic device, that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.These
types of sensors measures only infrared radiation, rather than emitting it that is called as a passive
IR sensor. Usually in the infrared spectrum, all the objects radiate some form of thermal radiations.
These types of radiations are invisible to our eyes, that can be detected by an infrared sensor.The
emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR photodiode
which is sensitive to IR light of the same wavelength as that emitted by the IR LED. When IR light
falls on the photodiode, The resistances and these output voltages, change in proportion to the
magnitude of the IR light received.
IR sensors are classified into different types depending on the applications. Some of the typical
applications of different types of sensors are the speed sensor is used for synchronizing the speed of
11
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
multiple motors. The temperature sensor is used for industrial temperature control. PIR sensor is
used for automatic door opening system and Ultrasonic sensor are used for distance measurement.
Figure 5. IR Sensor
Arduino is an open source computer hardware and software company, project, and user community
that designs and manufactures single-board microcontrollers and microcontroller kits for building
digital devices and interactive objects that can sense and control objects in the physical world. The
project's products are distributed as open-source hardware and software, which are licensed under
the GNU Lesser General Public License (LGPL) or the GNU General Public
License(GPL),[1] permitting the manufacture of Arduino boards and software distribution by
anyone. Arduino boards are available commercially in preassembled form, or as do-it-
yourself (DIY) kits.
Arduino board designs use a variety of microprocessors and controllers. The boards are equipped
with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion
boards (shields) and other circuits. The boards feature serial communications interfaces,
including Universal Serial Bus (USB) on some models, which are also used for loading programs
from personal computers. The microcontrollers are typically programmed using a dialect of
features from the programming languages C and C++. In addition to using traditional compiler
toolchains, the Arduino project provides an integrated development environment (IDE) based on
the Processing language project.
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal
oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started. The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the
Atmega8U2 programmed as a USB-to-serial converter.
12
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
The 74LS192 is an UP/DOWN BCD Decade counter. Separate Count UP and Count Down clocks
are used and in either counting mode the circuits operate synchronously. The outputs change state
synchronous with the LOW to High transitions on the clock inputs.
Features
Synchronous Up/Down BCD Decade Counter, Count is Updated with Low-to-High Clock
Transition
Synchronous Counting
High Speed up to 25MHz
Individual Preset Inputs
Standard TTL Switching Voltages
Figure 7. 74LS192 IC
13
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
1.7 7447
74LS47 is a BCD to 7-segment decoder/driver IC. It accepts a binary coded decimal as input and
converts it into a pattern to drive a seven-segment for displaying digits 0 to 9. Binary coded
decimal (BCD) is an encoding in which each digit of a number is represented by its own binary
sequence.
The 7447 feature active-LOW outputs designed for driving common-anode LEDs or incandescent
indicators directly. All of the circuits have full ripple-blanking input/output controls and a lamp test
input. Display patterns for BCD input counts above nine are unique symbols to authenticate input
conditions. All of the circuits incorporate automatic leading and/or trailing-edge, zero-blanking
control (RBI and RBO). Lamp test (LT) of these devices may be performed at any time when the
BI/RBO node is at a HIGH logic level. All types contain an overriding blanking input (BI) which
can be used to control the lamp intensity (by pulsing) or to inhibit the outputs.
Features
1. All circuit types feature lamp intensity modulation capability
2. Open-collector outputs drive indicators directly
3. Lamp-test provision
4. Leading/trailing zero suppression
Figure 8. 7447 IC
14
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Chapter 2: Implementation
This circuit can be split into several discrete, individually testable blocks . In order to expedite the
implementation of the circuit, circuit blocks were built and tested individually on breadboard and
integrated together to make the complete counter so as to build up to the full two digit
implementation.
1. IR pair
2. 555 Timer
The implementation process followed a logical progression, integrating separate blocks into the
growing circuit once normal operation of existing components was established. The most
challenging task in implementing this circuit was properly connecting the four ICs.
In this project, the transmitter section includes an IR sensor, which transmits continuous IR rays to
be received by an IR receiver module. An IR output terminal of the receiver varies depending upon
its receiving of IR rays. Since this variation cannot be analyzed as such, therefore this output can be
fed to a comparator circuit. Here an operational amplifier of LM 358 is used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes higher than
that non-inverting input of the comparator IC (LM358). Thus the output of the comparator goes
low, but the LED does not glow. When the IR receiver module receives signal to the potential at
the inverting input goes low. Thus the output of the comparator goes high and the LED starts
glowing. Resistor R1 (100 ), R2 (10k ) and are used to ensure that minimum 10 mA current passes
through the IR LED Devices like Photodiode and normal LEDs respectively.
15
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Usually , LM358 is used in designing the circuit of ir pair . The use of IR pair is to increase the
sensitivity of the circuit. But we have not used LM358 , instead we just used transmitter , receiver ,
100 ohm and 10k ohm resistors .
When a negative ( 0V ) pulse is applied to the trigger input i.e pin 2 of the Monostable configured
555 Timer oscillator, the internal comparator detects this input and sets the state of the flip-flop,
changing the output from a “LOW” state to a “HIGH” state. This action in turn turns “OFF” the
discharge transistor connected to pin 7, thereby removing the short circuit across the external
timing capacitor, C1.
This action allows the timing capacitor to start to charge up through resistor, R1 until the voltage
across the capacitor reaches the threshold (pin 6) voltage of 2/3Vcc set up by the internal voltage
divider network. At this point the comparators output goes “HIGH” and “resets” the flip-flop back
to its original state which in turn turns “ON” the transistor and discharges the capacitor to ground
through pin 7. This causes the output to change its state back to the original stable “LOW” value
awaiting another trigger pulse to start the timing process over again. Then as before, the
Monostable Multivibrator has only “ONE” stable state.
The Monostable 555 Timer circuit triggers on a negative-going pulse applied to pin 2 and this
trigger pulse must be much shorter than the output pulse width allowing time for the timing
capacitor to charge and then discharge fully. Once triggered, the 555 Monostable will remain in
this “HIGH” unstable output state until the time period set up by the R1 x C1 network has elapsed.
“Presetting the counter to the number of the preset data inputs (Input A - Input D) is accomplished
by a LOW asynchronous parallel load input (Load). The counter is incremented on the low-to-high
transition of the UP input (and a high level on the Clock- DOWN) which is done by 555 timer and
decremented on the low to high transition of the DOWN input (and a high level on the UP input),
16
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
but in this case, the counter is used only as UP counter and a high-level is always kept on the
Clock-DOWN. A high level on the CLR input overrides any other input to clear the counter to its
zero state.”
BCD (Binary Coded Decimal ) is an encoding scheme which represents each of the decimal
numbers by its equivalent 4-bit binary pattern. Seven segment Displays comprise of seven
individual segments formed by either Light emitting diodes (LEDs) or Liquid Crystal Displays
(LCDs) arranged in a definite pattern. For the display to work, these segments are to be driven by
the certain logic level at their input. Depending on this, seven segment displays are found to be of
two types viz., common cathode type and common anode type.
A common cathode display has all the cathode terminals of its LED segments tied together.
Further, this is grounded and hence is considered to be at logic 0 state. This means that in order to
light up an LED, one needs to drive it high. On the other hand, a common anode display has all its
anode terminals connected together which is further driven high by connecting it to a positive
supply voltage . Hence for this kind of display to work, one has to drive low on the cathode
terminals of the individual LED segments.BCD to seven segment decoder is a circuit used to
convert the input BCD into a form suitable for the display. It has four input lines (A, B, C and D)
and 7 output lines (a, b, c, d, e, f and g). Considering common cathode type of arrangement ,
the truth table or the decoder can be given as :
17
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Figure 11. Truth table for common cathode type BCD to seven segment
decoder
This table indicates the segments which are to be driven high to obtain certain decimal digit at the
output of the seven segment display. However, it is to be noted that in the case of common anode
type, the only change will be to interchange ones and zeros on the table. This means that from the
truth table so obtained one can get to know where low has to be driven so as to obtain the required
digit at the output.
1. IR Pair
2. Code
2.2.1 IR Pair
18
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
In the circuit the Photodiode is operated in Reverse bias condition i.e., the long leg of photodiode
goes to ground and the short leg is connected to 5 Volts supply through 10 K ohms resistor. When
the photodiode detects IR rays from the IR LED which is reflected by an obstacle the photodiode
conducts then, the current goes to the ground through the photodiode so, the current to the analog
pin A0 of Arduino is low so that, we will get low values from the analog pin A0 of arduino. In case
of no IR rays falls on the photodiode the photodiode doesn't conduct so the current from the digital
pin 12 goes to analog pin A0 through the 10 K ohms resister so, the readings from the analog pin
A0 of Arduino will be high.
1. We connect the OUT pin of the sensor to digital pin 12 of Arduino called IR.
2. The setup() function is performed only once before the main loop.
3. loop() is the main function and is cyclically repeated until you turn off the Arduino
board. We convert in C language the operation of the electronic circuit analyzed
before.
2.2.2 Code
#define inputpin A0
#define outputpin 12
int A = 0;
int B = 1;
int C = 2;
int D = 3;
int DP = 7;
int E = 4;
int F = 5;
int G = 6;
int p2 = 10;
int p1 = 11;
//Initialize the push buttons pins, push buttons states, and the counter
int switchUpPin = A0;
//int switchDownPin = 12;
int counter = 0;
19
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
void setup()
{
pinMode(A, OUTPUT);
pinMode(B, OUTPUT);
pinMode(C, OUTPUT);
pinMode(D, OUTPUT);
pinMode(E, OUTPUT);
pinMode(F, OUTPUT);
pinMode(G, OUTPUT);
pinMode(DP, OUTPUT);
pinMode(p1, OUTPUT);
pinMode(p2, OUTPUT);
pinMode(A0, INPUT);
pinMode(inputpin, INPUT);
pinMode(outputpin, OUTPUT);
//Start with the deceimal point off
digitalWrite(DP ,HIGH);
}
void loop()
{if(analogRead(inputpin) == 0)
{
digitalWrite(outputpin, LOW);
}
else
{
if(counter == 99)
{
counter = -1;
}
digitalWrite(outputpin, HIGH);
delay(60);
if(analogRead(inputpin) != 0)
{
counter++;
changeNumber(counter);
}
delay(70);
}
changeNumber(counter);
20
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
digitalWrite(F, LOW);
digitalWrite(G, HIGH);
break;
//number 1
case 1:
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, HIGH);
break;
//number 2
case 2:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, HIGH);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, HIGH);
digitalWrite(G, LOW);
break;
//number 3
case 3:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, LOW);
break;
//number 4
case 4:
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 5
case 5:
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 6
case 6:
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
21
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
//number 7
case 7:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, HIGH);
break;
//number 8
case 8:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 9
case 9:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
}
delay(10);
digitalWrite(p1, LOW);
digitalWrite(p2, HIGH);
switch (second)
{
//number 0
case 0:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, LOW);
digitalWrite(G, HIGH);
break;
//number 1
case 1:
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, HIGH);
break;
//number 2
case 2:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, HIGH);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
22
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
digitalWrite(F, HIGH);
digitalWrite(G, LOW);
break;
//number 3
case 3:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, LOW);
break;
//number 4
case 4:
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 5
case 5:
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 6
case 6:
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
//number 7
case 7:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, HIGH);
break;
//number 8
case 8:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
digitalWrite(E, LOW);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
23
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
//number 9
case 9:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, LOW);
digitalWrite(G, LOW);
break;
}
//digitalWrite(p1, HIGH);
delay(10);
}
24
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Chapter 3: Design
25
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
26
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
27
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
1. In Lift to count and display number of persons inside the lift at a particular given
time.
2. In any big super market or shopping malls as a visitor counter, to keep track of the
number of visitors who have visited the mall.
3. On the conveyor belt in the industry to count number of objects passed.
4. In vehicle parking place to count and display number of vehicles inside the parking
lot.
Conclusion
Digit counter has find its use in many spheres like in In LIFT to count and display number of
persons inside the lift at a particular given time , in any big super market or shopping malls as a
visitor counter, to keep track of the number of visitors who have visited the Mall , on the conveyor
belt in the industry to count number of objects passed , in vehicle parking place to count and
display number of vehicles inside the parking lot etc.
Analog electronics components were investigated and a 555 timer, a BCD counter, a BCD decoder
and a seven segment display were combined to form a digital timer circuit. Different methods were
analysed to determine the best technique for creating an efficient timer until one was chosen and
the circuit was designed. The chosen circuit was verified through simulation in multisim and
tinkercad. This design was then implemented and modified to suit the needs of the project.
Problems were analysed and repaired where necessary until it was concluded that the circuit had
met the design criteria of the project.
28
2 Digit Object Counter Ayush Agarwal
Ayushi Sharma
Bhavesh Acharya
Bibliography
1. http://startrobotics.blogspot.in/2013/05/how-to-use-ir-led-and-photodiode-with-
arduino.html
2. http://www.futurlec.com/74/IC7447.shtml
3. https://www.electrical4u.com/bcd-to-seven-segment-decoder/
4. http://www.electronics-tutorials.ws/counter/bcd-counter-circuit.html
5. http://www.playembedded.org/blog/en/2016/01/08/detecting-obstacle-with-ir-sensor-and-
arduino/
29