New project ultrasonic sensor - distance and results LCD

Hello, I'm working on a new arduino project related to measure distances with the ultrasonic sensor and, depending on this distance, the LCD must display a name accompanied by the number.

For example, I want to count how many products are on my warehouse, the products measure 5 cm x 5 cm, that is, every 5 centimeters there is a product. Depending on the distance, the LCD will tell me: There are (X) products

I have few questions about it,

  • For every store shelf, do I need an arduino board? Or can use the same arduino board to show different measurements on different LCDs

  • Where could i get this code to make it posible?

Thank you very much

Basic “Arduino based ultrasonic distance meter”(hint: search term) are popular beginners projects and can be modified to fit your requirements.

Using a distance meter at every location would be the easiest to program but the most expensive hardware solution.

You could use one meter and move it from location to location but you would need some way to tell it what location/product it was measuring. You could enter this manually or use rfid tags at each location for this. More programming but the cheapest hardware solution.

Another option would be to have one Arduino controlling several ultrasonic sensors. Using port expanders etc. you could control dozens with one Arduino.

I would likely put as many sensors as would fit on one Arduino then use as many Arduino’s as necessary.

Basic "Arduino ba..................

Hello Hutkikz, thank you. I'm afraid, we have to simplify things. This project needs to be done in the simplest possible way. For her, I will not use product readers, or anything like that to be able to identify products. Manually, every 3 shelves will go a different product, and I will put it on the LCD, it will be a fixed text accompanied by the numerical value, the only thing that will change therefore is the numerical value.

1 LCD must be connected to 3 ultrasonic sensors per product group. Each sensor will be inside a shelf, maximum 3 shelves per product. They must act as summation the 3 sensors and give the final result in the LCD.

One Arduino can handle 3 sensors no problem.

I would start by building one of the Arduino distance meters (there’s that search term again) found online. Learn how it works. Mount it on one of your shelves and then you can figure out the distances.

A simple if, if/else structure can be added to determine how many products are present. If you had say a 30cm deep shelf with 5cm products it might look like this:

if (distance <2)
productCount =6;
else if(distance <7)
pruductCount =5;

After you get that sorted then you can work on setting it up for more sensors.