» Electronics »Item counter with optical sensor

Object counter with optical sensor


The author of Instructables under the nickname Nawielectron proposes to build an existing model a counter of objects similar to those used on conveyors, conveyors. It contains all the nodes of real object counters with optical sensors: an emitter, a photodetector, a comparator, and an actual counter, which is made two-digit in the model for simplicity.

The device’s sensor is an optocoupler with an open optical channel. Such optocouplers can work on reflection and beam overlap. The second option is selected here:

Object counter with optical sensor


Scheme homemade shown below:



The IR diode is connected to the power source through a 220 Ohm resistor. Photodiode - through a 10 kΩ resistor. Together with this resistor, the photodiode forms a voltage divider. When the photodiode is lit, it “drags” it, when it is darkened, as shown in the following figure, it “drags” the resistor.



Since the photodiode is located in the upper arm of the divider, when it is darkened, the voltage at the midpoint decreases. Therefore, before applying to the comparator, this voltage is passed through an inverting amplifier on a transistor marked with the letter N. It can be any NPN transistor with parameters and a pinout like 2n2222, BC547, etc. The signal from the output of the divider goes to the base of the transistor, its emitter is connected directly to the minus of the power source, and the collector is connected to the plus via a 220 Ohm load resistor. From the junction of the resistor with the collector of the transistor, the inverted signal is fed to the non-inverting input of the comparator. The inverting input of the same comparator receives voltage from the moving contact of a variable resistor of 10 kOhm. This allows you to adjust the threshold of the comparator.

At the output of the comparator, the signal is no longer analog, but discrete. It is fed to the input of the low-order counter. From the overflow output of this counter, the signal goes to the input of the high-order counter. The reset button is pulled 10 kΩ down by the resistor. When it is depressed, a logic zero is applied to the reset inputs of both counters.When pressed - one, which leads to their reset. Also, the counter is reset without pressing a button when overflowing both digits.

The indicators were used with a common cathode, to simplify the circuit, the master included one 680 Ohm resistor in the cathode circuit of each of the indicators. This made it possible to reduce the number of resistors by 7 times, but the brightness depends on the number of simultaneously connected segments.

The wizard collects the circuit:



Includes:



Checks its response to the overlap of the optical channel of the optocoupler:




And at the press of a reset button:



Making sure that electronics works as expected, the master cuts out the details for the inclined plane, on which the counted objects will roll:





Glues the inclined plane with PVA glue, during the hardening of which it additionally fixes everything with masking tape:







After that, remove the masking tape and glue the breadboard to the shelf provided for it:



Solder the conductors connecting them to the IR diode and photodiode:



Installs them in the places intended for them:



Conductors displays so that the counted objects do not touch them:



And so that these objects do not touch the IR diode and photodiode, it makes guides:



Which places on an inclined plane as follows:



If even when the optical channel of the optocoupler is blocked, a little reflected radiation is incident on the photodiode, black paper can be glued around the IR diode. View of the finished meter:



He is in action:

6
1.5
2

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
6 comments
For those who are interested in the use of infrared rays, I inform you, there is a good book translated into Russian. Schreiber. The use of infrared rays in electronics. Just as yesterday, I looked into it.
In general, the development is sensible. As sensors, you can use ready-made from old printers, they are full of them. By the way, counting objects is not particularly difficult, more complicated than people. I did a system of counting visitors toll toilets. Imagine this is in demand. There I had to put two sensors on the front door at once to prevent false triggering, say, from flies. And to divide the pulse frequency into two, because a person went in and went out, pays - he only for the entrance.
Skybark
Once again, I agree with Ivan.
And, although it is true, probably read such "schemes", it is NEVER easier than a circuit diagram. Oa for that and PRINCIPAL, which shows the PHYSICS of the device.
Well guys .... Well, don’t you learn bad from the bourgeois, huh ?? - Well, do not stupidly repeat, not DESIGN! And "schemes" are only taught to repeat. Let's all educate intellectual designers, not parrots .....
Firstly, the article does not provide a diagram, but a drawing slightly resembling a wiring diagram.
Secondly, this picture is only suitable for blunt reproduction of the product.
Thirdly, even knowing all the pinouts, which, in fact, is simply impossible, it is much more difficult to understand something from such a drawing than even from a sketch of a diagram drawn with a pen on a piece of paper.
Author
The popularity of Fritzing has led to the widespread adoption of such schemes. But to read them is easier than it seems at first glance, it is enough to know all the pinouts and the internal structure of the breadboard.
Of course, it would be necessary to bring the scheme, without it there is nothing much to discuss. ((

We advise you to read:

Hand it for the smartphone ...