IoT where you did not wait. Development and testing (part 1)

Using IoT in fitness trackers, speakers, vacuum cleaners will not surprise anyone. Did you think that various sensors can be installed in garbage containers and garbage trucks to control garbage collection? It sounds strange and raises the question: “Why?”

Anatoly Korovin happened to work on a project that they did from scratch. And in this article, the analysis of his report from the Heisenbug conference , where he described in detail why the Smart Garbage Truck needed to be done, and how the development and testing of this project were conducted.

The general structure of the report is shown in the picture below. In this article, we will only consider what is shaded in green on the diagram.




Industry challenges


The main characters:

  • garbage containers (well, everything is clear here, we see garbage bins every day);
  • tenants of apartment buildings;
  • regional operator (organization responsible for solid municipal waste (MSW) in the region);
  • companies carriers of garbage (transport companies, special equipment for the removal of MSW);
  • landfills (these are dump pits, incinerators, and garbage processing plants).

When we pay for garbage collection, it is easiest to assess the quality of the service based on the fact of garbage removal from the yard. But if you dive deeper into this issue and try to find out where the carrier is taking garbage (to the landfill or to the nearest ditch), then difficulties arise. Therefore, one of the tasks of our system was to control the integrity of performers.

Paper reporting


In most of the regions we worked with, regional operators collected paper reports from carriers. The report records the number of the carrier’s car, its route, tank loading time and the amount of garbage. And they submit these reports once (or twice) a year, so you can imagine how much data it is.



Hard to check


Given that there is no mechanism to verify the reliability of these data, in many respects the report is accepted “on faith”. To solve the problem, operators in some regions installed GPS trackers on the carrier’s cars and began to track the transport route.

Although the operators set the solution vector correctly, the whole problem was not solved - the reports all also represented a pile of papers on shelves in the operators office. It is difficult to imagine that someone will check everything with his hands. From this pile of paper you need to get some randomly, open the tracker program, compare the time in the report and on the tracker, the location of the machine. And too much data falls on the verifier.

In addition, there are unscrupulous carriers that exploit vulnerabilities in this system. They gradually realized what indicators they checked, and began to build a "gray" scheme.



For example, a carrier drives up to a garbage container in the yard, a driver gets out of the car, smokes for a couple of minutes and leaves without picking up the garbage. Then he arrives at the nearest construction site and loads himself with commercial garbage, the disposal of which must be paid separately, because this is a waste of production and other industrial enterprises. After that, the carrier gets to the landfill, where he confidently says that all this garbage was collected at the entrances of residential buildings.

In such a scenario, the route received from the GPS tracker will show the same points that appear in the carrier’s report, but no one has taken out the garbage.

And this is just one of many scenarios.

Solving problems with IoT


To cover the largest number of scenarios, an IoT system was built, including automation of garbage cans, carrier transport, and landfills.

Smart trash cans


To begin with, we equipped garbage containers with several types of sensors:

  • Conventional ultrasonic sensor - determines the level of container fullness. It made no sense to use expensive sophisticated systems, since such a device at the price of an iPhone cannot be put in the trash somewhere in a remote area, and someone will probably want to take it home.
  • Temperature sensor - telemetry from it makes it clear whether the garbage is on; accelerometer. It determines the angle of inclination of the container, and this is how we record in history when the carrier arrived and unloaded the garbage. And as a pleasant bonus, we can find out if the vandals turned the trash over.
  • RFID tag. With its help, you can clearly compare which car carrier unloads the container.

All data was transmitted via GSM / GPRS, so no wires were simply attached to the container wall, and the device measures the level of garbage in front of itself.

We follow the transport of the carrier


To control the transport, we used:

  • GPS trackers
  • crane lift sensor to track valve movement;
  • RFID reader to determine which container is attached to the machine;
  • camera in case of any proceedings.



What do you think was the most useless sensor?

Yes, camera shots did not bring any benefit. Of these, it’s not that you can’t put together a glamorous Instagram account, it’s not even clear what we’re looking at: It’s



quite difficult to install the camera on a carrier’s special transport so that the photographs are clear. As a result, the photo showed: a road, a barrier, puddles, etc., and occasionally container platforms from not the most successful angles. Expected to see various violations of the transport of garbage, but in fact the garbage - the photos themselves.


Controlling waste disposal


The containers and transport were connected, it remains to receive telemetry from the end point - the landfill. For this, a huge weight stand is installed at the entrance. When the car enters, we recognize the car number and record the data in the database. On the road, the transport goes through a similar procedure, and we work on the difference between these two values.

What did the introduction of the system give?


Carriers get quite a big profit from this system, because now every morning they know the optimal route. Cars can now go first to the points where the containers are full, and then move along the points in descending order of fullness.



Such tracks are very different from regular carrier routes, since without telemetry it is quite difficult to predict the best option.



This scenario also happens: most sites for garbage collection are arranged in a rather small area, but there is one point that is located at a considerable distance from others. Without telemetry, it is difficult to find out whether garbage should be collected from this site, and the driver will come to her, see that the containers are empty, and leave, spending time and fuel.

ATIn the continuation of this article we will tell you how the backend of this project is arranged and what specific features IoT brought to testing approaches.

Anatoly Korovin will speak at the upcoming Heisenbug 2020 Piter conference , which will be held online June 15-18.
This summer it is possible to gain knowledge not only in the field of testing, but also in distributed computing, front-end, back-end, DevOps, mobile projects, by ticket-subscription .

All Articles