Count Objects Using Arduino and Ultrasonic Sensor on a Production Conveyor

29K527

Intro: Count Objects Using Arduino and Ultrasonic Sensor on a Production Conveyor

Intro:

This instructable explains how to use an ULTRASONIC SENSOR with Arduino to count/ log different packages on a conveyor. The instrucable will cover the physical setup and the program in Arduino.

There will NOT be any information about how to build the lasercutted conveyor that is powered by a stepper motor.

The result will a log over the counted packages in the serial monitor.

STEP 1: Partlist

· Arduino UNO board

· SR04 Ultrasonic Sensor

· USB cable type A/B

· Universal 4 pin Grove Cable

STEP 2: Connecting the Ultrasonic Sensor to Your Arduino Board

Use the Universal 4 pin Grove Cable to connect the Ultrasonic Sensor to your Arduino board in pin D7. Use the USB A/B cable to connect the Arduino board to your computer. The distance between the sensor and the floor is 128 mm.

STEP 3: Write Your Code – or Download It From Here.

When you have uploaded the code to your Arduino you should see something similar to this when opening the serial monitor.

You can edit the intervals in the if-statement to match the objects you want to count. In the example the height of the packages is 40 mm, 53 mm and 72 mm.

Hope you enjoy!

/ Simon Larsson

4 Comments

Hello can simulate the project on sw before installing it?
if yes then can you please help me with simulation ckt diagram
Hello, do you have any pictures of how you wired the breadboard and the arduino? or any resources I could possibly look at?
Hello, can you tell me how you assembled the conveyor belt? what elements were used, as well as the program code.

can i use ir sensor ??