Introduction: Conveyor Counter With an Ultrasonic Sensor (by Jeppe Andersen)

Have you ever wanted to count some going by for some statistics reason.

Then this is maybe the 'droid' your looking for.

With this guide you can only not count objects going by, but also timestamp the objects.

For the following guide you will need the this equipment.

  • 1 x Arduino Uno R3
  • 1 x Groove kit
    • Use the Groove shield and the ultrasonic sensor
  • USB cable (USB-A to USB-B - male & male) - you might know this as a standard printer cable.
  • Conveyor (instruction for this is NOT included in this guide).
  • Some objects to count - I use some 38x57mm wood in different lengths. (mine was about 40, 50 and 70mm)

Step 1: Assemble the Components

With the Groove kit you can easily assemble this kit.

Start by adding the Groove board to the Arduino UNO R3.

Next - insert the Groove cable into D7 (digital pin no. 7) and insert the other end to the Ultrasonic Sensor.

At last, connect the Adafruit SD shield to the Groove kit.

Watch this gif I made: Assemble displayed with a gif

Optional: Insert a CR1220 batteri in the battery slot for the RTC to function correctly.

Step 2: Insert the Code

Please note that the file is commentet a lot. This is generally not a bad thing, but the comments are in danish. I suggest that you simply delete all the text side the // or */ /*

I did not include day, month, year for my experiment. I have included the code in a comment section for the first if function.

Download the .ino file (arduino IDE software generate file).

I have made a small screen record of the serial monitor. Here you can see the code in use.

If you like to expand the project, you can add the SD logging function. Sadly I didn't get mine to work, but maybe you have more luck!

Comments

author
kathiravans (author)2015-10-11

awesome !!!! can i use it if the conveyer belt is moving at a high speed?

author
KEAprojects (author)kathiravans2015-10-12

I guess you could. The ping sensor send out a signal every 5 microsecond. Visually you wouldn't be able to read it from the Serial.monitor, as it's coming so fast.

About This Instructable

5,930views

115favorites

License:

Bio: KEA is located in the Danish capital of Copenhagen where we teach more than 9000 students in the disciplines within design and technology. These instructables ... More »
More by KEAprojects:Bosch Uneo Cordless Rotary Hammer project - Group 5 - 1.A - 2016the autopsied printerReverse Engineering Gruppe 5 IBM Monitor
Add instructable to: