Object Counter with PC817 Opto-coupler

7,450 views

In this tutorial, we are making a very useful and interesting project of an Object counter. This circuit is simple and uses an LDR, a laser light, a PC817 photocoupler, an 8-digit inexpensive calculator, and a few other components.

The main component of this circuit is an LDR, the whole project is working on its principle. LDR is a light-dependent resistor whose resistance is inversely proportional to the light sensed by it.

pc817-optocoupler-opto-isolator

Hardware Components

The following components are required to make Object Counter Circuit

S.noComponentValueQty
1.Input Supply DC4.5-12V1
2.Transistor2N39061
3.LDR1
4.Resistor470RΩ , 1KΩ1, 1, 1
5.PhotocouplerPC8171
6.Calculator1
7.Laser light1
8.Variable Resistor100K1

PC817 Pinout

pc817-optocoupler-pinout

For a detailed description of pinout, dimension features, and specifications download the datasheet of PC817

Object Counter Circuit

Working Explanation

The operating voltage of this circuit is 4.5 to 12 volts. When any person or object comes between the laser beam from the laser light and the LDR the light will stop falling onto the LDR and its resistance is increased due to which a signal is passed to the transistor. The transistor will now activate and activates the Photocoupler which switches the = key of the calculator. So now whenever any object or person passes through and breaks the contact of the laser beam and the LDR the calculator will add 1 to the count.

After building this circuit you have to do some adjustments for the counting before using the circuit. The counting mode is activated by simply pressing 0+1 on the calculator and the calculator will show 1,2,3,4 counting. The circuit with the LDR should be enclosed in a suitable case and there should be a small hole for the LDR to receive only the laser beam. The circuit will not work properly if any other lights are sensed by the LDR.

If you want to operate this circuit at low voltage like 4.5 to 6 volts then change the 470R resistor to 180R.

Applications and Uses

It can be used for counting the following,

  • People on the entry of a gate
  • A large number of objects
  • The number of rotations of a motor or a wheel etc.