ArduinoArduino Projects

Arduino objects product counting system designing and programming

Product counting

Description:

Product counting –In this tutorial, you’ll learn how to use Arduino,  16×2 LCD and an  IR infrared sensor to create your own Industrial level product counting system. It will also work with Arduino Mega on this venture.

Object counters and product counters are most widely used in industries around the world, the project we are going to be working on today can be used to count various types of items and goods. I’ll also clarify how you can count objects/products that actually touch each other in this tutorial. Through creating SolidWorks 3d, I’ll explain the whole premise.



The Amazon Purchase links are given below:

Arduino Uno: https://amzn.to/39aq6ZT
Mega 2560: https://amzn.to/2SszMsI
16×2 lcd: https://amzn.to/2Q9pblc
lm7805 Voltage Regulator: https://amzn.to/2ERYoTJ
330-ohm resistors pack: https://amzn.to/2Qj1Igg
female DC power jack socket: https://amzn.to/377Pg9M
470uf capacitors: https://amzn.to/2MrN3xR
5×7 cm Vero board: https://amzn.to/37b7KWO
female headers: https://amzn.to/350w6RE
connection wires: https://amzn.to/2MvOJXd
Super Starter kit for Beginners: https://amzn.to/398dliF
Jumper Wires: https://amzn.to/2SrnBwo
Bread Board: https://amzn.to/2MxV5FM
12v Adaptor: https://amzn.to/2MuOlZk
PCB plate: https://amzn.to/2MuwNMB
Variable Supply: https://amzn.to/39d0KdP
Digital Multimeter: https://amzn.to/34WbVoa
Vero Board / stripboard: https://amzn.to/39nL9Zg
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2PVwexF
Solder wire: https://amzn.to/2QlOvTS
Wire Stripper: https://amzn.to/353tYJa
wirecutter: https://amzn.to/2tV2lFj
PCB small portable drill machine: https://amzn.to/2MvQqnx

DISCLAIMER:

Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Product counting Circuit Diagram:

Product counting

This is the ball counting process simulation. As you can see

  • Pin number of 16×2 LCD is attached to the ground.
  • The number pin is linked to the 5volts.
  • Pin number which is the LCD’s contrast pin should be connected to variable resistor, and the variable resistor can then be used to control the contrast of the lcd. Because this is only simulation, variable resistor does not need to be attached.
  • The LCD’s rs pin is connected to Arduino’s pin number 9.
  • The LCD pin number is attached to the ground.
  • The LCD’s enable pin is connected to Arduino’s pin number 8.
  • The Arduino pins 4, 5,6 and are connected to the LCD data pins D4 to D7.

16×2 LCD essentially has 16 pins, but pin number 15 and pin number 16 are not shown as you can see. You need to connect pin number 15 with volts and pin number 16 to the ground during the actual hardware connections.

The two push buttons attached to pin number and pin number are the infrared sensors.  This  push  button  will  be used to count the balls when resetting this relay with this push button.


In this project 12v relay will be used; if you want, you can also use 5v relay. The 12v relay form use is SPDT. Each form of relay has pins, coil pins, common pin, normally open and normally close pin.The transistor leg of 2n2222 NPN is attached to the ground while the collector is linked to the relay coil. While the relay coil’s other side is connected to the 12v as it’s a 12-volt relay …

The base of the 2n2222 transistor is connected to a 10k resistor. This transistor is checked using Arduino’s pin number 13. The aim of this relay is to activate the other circuits, when the box is full, it can be used to turn on a buzzer, or it can be used to cause the pneumatic cylinder to move the box.

Download:  simulation

Download:  solidworks files


Product counting Programming:

This is the consumer counting system’s full software. The 16×2 LCD is used, as in this task, to show the number of counted products/objects.  And we’ll have to use the Liquid Crystal library to use this LCD. So began  by  adding  the header file for LiquidCrystal.h.# This is a preprocessor directive, whereas.h is a header file. I marked the LCD’s next buttons.

Use this relay to signal another device or turn light or buzzer on. This will signal that the box is complete to the operator or other machine. You can then remove the box manually or drive it through the pneumatic cylinder and so  on.

Then specified two form unsigned integer variable ballcount and tballs and initially set them to zero.   finally  defined two ballf and resetb variables. Such variables belong to the integer type.



First activated the lcd in the void setup function and entered the number of columns and rows. Since this is 16×2 lcd. 16 columns and rows. Then used the lcd to print “Tballs Current” message. Since this is LCD of 16×2. Sixteen columns and two rows. Then used the lcd to print message “Tballs Current.”Action printing. To print strings on the lcd, the lcd.print function is used. Instead, I turned on the Arduino’s pin number 2 interrupt. The Arduino pin number 2 will be used for counting items or objects. And finally using the function pinMode I told the controller which pins are being inputted and which pins are being outputted.

Watch Video Tutorial

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button