## Monday, June 27, 2011

### Object Counter Circuit

Presented here is the cheapest 8-digit programmable object or event counter. It is a fail-proof, fool-proof, power failure-proof, one evening project. A general-purpose (arithmetic) calculator has some inherent shortcomings which can, however, be used in many ways by proper programming sequences.
 click to enlarge

For example, there is no squaring key in a general-purpose calculator, but it can not only square it has even the inherent capability of a single touch successive multiplication, thus giving us a choice of making a geometric progression (G.P.) or successive addition or forming an arithmetic progression (A.P.). For example, operating the keys 5,x,=,=,... you obtain the G.P. 5,25,125,625,... or by operating keys 5,x,4,=,=,=,..., you get the G.P.: 4,20, 100,500,... Next, operate keys: 5,+, 2,=,=,... to get the A.P.: 5,7,9,11,13,... The latter facility (A.P.) has been used here to count the objects by programming the calculator keys 1,+,=,=,... When you open the calculator (such as ‘Casio’), you will find that the conductive silicon key pads bridge the two terminals of a key, when depressed. Locate the switch terminals for (=) key and check the polarity of the terminals with respect to the battery negative. The terminal which is found to be positive is to be connected to the junction of R2 and VR1, and the other terminal is to be connected to switch S1 as shown in the figure. The negative battery terminal is to be connected to emitters of photo-transistor and transistor T1. (There may be slight difference in the use of key terminals in different brands of calculators.) The optical sensor used here is BPX25, a very sensitive photo-transistor which has a built-in lens to focus the incident light on to the chip. Only two leads, emitter and collector, have been used. When light falls on the sensor, it conducts as if it had got forward biased. A variable resistor of 220k in series with another fixed resistor of 1 M (selected by trial) has been used at the base of transistor T1 (BC149C/BC 549C) to set the threshold level for its conduction, depending upon the intensity of light used. When light is obstructed, BPX goes to cut-off, transistor T1 conducts and the terminal of (=) key which is connected via switch S1 (assuming closed), goes low. This is equivalent to depression of the (=) key. When light again falls on the sensor, it conducts and the base of transistor T1 goes low, throwing it to cut-off, so that its collector and hence the (=) key gets connected to the positive bus via 1 M resistor R2. A pulse is passed on and the calculator advances by 1. Current drain from the battery is less than 50 µA, which a button cell can easily provide. The counter is slow but there is no switch debouncing effect present, which makes the counter highly reliable and ideal as a slow event counter in applications such as visitor counter. Further, the circuit is auto-locked, since any resetting is possible only when BPX is in the cut-off position, i.e., in darkness. To program, cover the phototran- sistor and operate keys : 1,+,=. In case of a deadlock in programming, miniature switch S1 may be used to enable isolation of the (=) key. Set the 220k preset according to the ambient and the incident light, so that the calculator counts when light is cut-off and again allowed to fall when obstruction is removed. If it is used to count visitors in a well day-lighted environment, only a white washed wall or a white paper pasted on the opposite door panel is sufficient. For indoor applications, a specific source of light is required. Both the source of light as well as the BPX should then be mounted in opaque (preferably black) tubes and a lens be fitted in the light-source tube to focus the light on to the photo-transistor. BC149C/549C is preferred due to its large current gain of the order of 300 at 10 µA, compared to 150 that of BC548B, so that the instrument becomes more sensitive.