Pekobot - Your Portable and Smart Waste-Segregation
by wijdanmkh_insk in Circuits > Electronics
33 Views, 0 Favorites, 0 Comments
Pekobot - Your Portable and Smart Waste-Segregation
Everyday, recyclable waste are always mixed up with general waste because proper waste sorting requires knowledge and not everyone have privilege to have access to. This reduces recycling efficiency and increases the amount of waste sent to landfills.
In many cases, waste is disposed of incorrectly either by accident or because the appropriate waste bin is unavailable or already full. These small actions can impact waste management and environmental sustainability.
To address this issue, I developed Pekobot, an intelligent waste-sorting system designed to automatically identify and separate waste into the correct categories by reducing human error and making waste disposal more convenient due to IoT integration and its notification. Also, this device would give you great points of accomplishment to put the waste in the proper place!
This waste-sorting system consists of 4 separate compartments, including organic waste, inorganic waste, paper waste, and hazardous waste. This helps the janitor to take the appropriate waste and emptying the bin without taking the whole bin to the campus waste management. By improving waste segregation and collection efficiency, the system supports recycling effort and promotes a cleaner and sustainable environment.
Supplies
There are few components to create your own Pekobot. The electronics part consisting of :
- M996R x 2 (Use the 180 degrees)
- HC-SR04 x 4
- Raspberry Pi (Any series, as long it can handle computer vision) x 1
- ESP32 x 1
- Webcam x 1
- Step Down Circuit x 1
- USB Cable x 1
- Breadboard x 2
- Single-Core Cable x 2
- Male-Female Jumper Cables x 22
- Male-Male Jumper Cables x 2
And the casing are consisting of :
- 60 x 40 cm and 5mm PVC Board x 8, but you can you the 3mm PVC Board to separate between bins
- Cyanoacrylate glue
- Cutter
- Metal Ruler
- 4-DOF chassis based on metal
Sketch Your Desired Bin Body
The recommended size for the functional bin is 30-40 inches (72.6 cm to 101.6 cm). But because it's a prototype, we can shrink the size up to your desired size, as long as it can handle the waste volume. Here's the recommended size, so you're not going to waste your time to cut unecessary PVC board.
Recommended size :
- External Case (60 cm x 40 cm)
- Bottom Case (40 cm x 40 cm)
- Compartment (20 cm x 40 cm)
- Camera Holder (Camera leg : 20 cm x 8 cm x 0.6 cm, Top Camera Holder : 40 cm x 8 cm x 0.3 cm)
- Servo Holder (40 cm x 1.5 cm x 8 cm)
- Waste Holder (10 cm 10 cm)
Start Making the Bin Body
- Make a measurements for your PVC boards before cutting them. Make a mark with a pen to make it easy to mark where the are that should be cut or not.
- Tip : Make sure your PVC board's edge are equal. Some of PVC boards I found have unequal height, causing it to be harder at sticking it together in between the edge, and might be causing a gap. To check whether your PVC board is in equal height on the edge, put your edge and point tip of your ruler (Figure 1), and make sure the gap between the board and the ruler is quite small (Figure 2). Mark the unequal board edge with pen and cut it with your cutter (Figure 3).
- Cut the PVC board according to your desired size with a cutter and an iron cutter.
- Tip : It's not recommended to use a plastic ruler when cutting your PVC board. The cutter can shave your ruler edge off, making it uneven. It might cause your next cuts on other PVC boards won't be straight.
- Make holes for the servo motor and camera. Make sure the size is suitable to prevent loose gripping. In this case I don't use any bolts and nuts, and relying on the hole fit.
- Stick them all with the cyanoacrylate glue. Be careful not to touch the glue directly. If your skin exposed to the glue, give it a warm water and rub it gently.
Place the Servo Motor and Its Waste Container and Place the Camera on the Site
Place your waste container made of PVC board on the top of the servo pan. Stick it with double tape or stronger tape that can hold the container better.
Place the Ultrasonic Sensors Altogether
Since we're creating 4 bins, we got to set the compartments whether it's an Organic, Anorganic, Paper, and Hazard and making sure our ultrasonic sensors are on the right place, so you're not going to get a headache while debugging it :D if you want to make your life a lot easier, you can mark your ultrasonic sensors with numbers from 1-4 with anything. And don't forget to mark the cables for each sensors with labels.
Here's my tip :
- Make your VCC, GND, TRIG, and ECHO cables are on the same color. If you're running out of required cable colors, just mark or make a note for each cables, take an example of VCC. If you're running out of the red color, then use the bright color or GND, just use the dark color. My TRIG cable is yellow, and my ECHO cable is green.
Connect to Your ESP32
Let's connect your sensors and actuators to the ESP32. You can power the HC-SR04 with ESP32 5V power output, but don't directly connect your M996R servos into your ESP32 5V. It will either won't turn on or fried your ESP32. To power it safely, make sure that you had connected the ground between the ESP32 and the step down module to prevent potential difference between ESP32, step down module, and Raspberry Pi soon. This potential difference can damage your computer or Raspberry Pi when the ESP32 is connected in serial connection.
Here's the recommendation pins for ESP32 :
- MG996R
- Pan -> PWM -> D13
- Tilt -> PWM -> D14
- HC-SR04
- Ultrasonic 1 -> Trig : D18, Echo : D19
- Ultrasonic 2 -> Trig : D25, Echo : D26
- Ultrasonic 3 -> Trig : D22, Echo : D23
- Ultrasonic 4 -> Trig : D22, Echo : D23
Keep in mind that you have to separate each power for the sensors and actuators to prevent magic smoke or burning :(
To make your cable look neat, use a spiral cable tie, or use the straw and cut it to make a spiral-like shape. So it's going to be so good and have a lot easier to debug
Power on the ESP32 and Check for Sensors and Actuators
I added the file for complete integrations, so you're no longer need to do some debugs. But if you want to change those layouts (swapping between Organic and Anorganic and so on), you can use these files to do some debugs. There are few troubleshooting you can try.
Servo :
- Jittery -> Make sure there's no loose cables on all connections
- Not moving -> Connect to the external power supply
Ultrasonic :
- Wrong value -> Make sure there's no loose cables, especially VCC
- No value at all / -1 value return -> Make sure the TRIG and ECHO cables are connected or no wrong connections or pin
Make a note of your servo rotation changes and start integrate the value on the program inside Complete-Integrate.ino
How to connect to dashboard? Since my program included with Firebase integration, you can use the structure to integrate into the website. Don't forget to add the SECRET.H file to add your Wi-Fi SSID, Password, Firebase API, and Firebase RTDB
Connect the ESP32 With Raspberry Pi
If you don't have a Raspberry Pi yet, it's fine! We can use our computer, and because I don't like Raspberry Pi that much, I prefer using my laptop instead. Connect your ESP32 and your webcam into your laptop/Raspberry Pi and prepaer your waste model. You got a smart Pekobot waste segregation system. And there you go! Your system now can segregate waste automatically. What about the models? You can use pretrained model so your waste can works as intended!