# Auto Trash Collector

> Vocational high school group project (team lead): an Arduino car that drives toward litter and gathers it under its body, using a 4-channel relay to switch the motors and an ultrasonic sensor to turn away from obstacles.

- Result: Team lead · obstacle avoidance + litter gathering, demoed on video
- Stack: Arduino, C, Relays, Ultrasonic Sensors

A project from the second semester of my second year in the IT program at Kaohsiung Municipal Chung-Cheng Industrial High School. I led a three-person group building a small cart that moves around a venue on its own and gathers rubbish from the ground — inspired by news of rubbish everywhere after big events like concerts.

## Problem

News stories showed rubbish everywhere before and after big outdoor events like concerts — a nuisance for everyone and bad for the environment. The goal was a small self-driving cart that can move through a crowd and gather rubbish from the ground, cutting the time it takes to clean up after an event.

My role: Team leader of a three-person group (project course, spring semester 2023).

## Key decisions

1. **Arduino drives the motors through a four-channel relay**: The signal wire controls the relay's electromagnet, which connects or breaks the motor circuit; the Arduino only has to output on/off signals.
2. **Turn by stopping one wheel and running the other**: No separate steering mechanism — switching the two motors independently is enough to turn.
3. **An ultrasonic sensor on the front**: When an obstacle ahead gets too close, it turns automatically instead of driving into it.
4. **Collect rubbish in the space under the chassis**: The cart drives toward the rubbish and gathers it underneath, with no arm or other complex mechanism.

## Trade-offs

- The budget was tight, so the materials couldn't all be bought at once
- Halfway through, a part in the middle of the wheels broke; we borrowed wheels to keep going and finished after replacing the original part
- A relay is only on or off, so the motors run at full speed or not at all — no speed control

## Results

- Built and demonstrated on video: turns automatically at obstacles, drives toward rubbish and gathers it under the chassis
- The chassis is small enough to move through a crowd
- The later Auto-Following Robot (national Excellence Award) kept the same "sensor → Arduino → motor" architecture and switched to a Jetson Nano for vision

## Hardware

- Chassis: the body of the machine, with rubbish collected underneath
- Arduino: controls the direction of travel and sends current to the relay
- Four-channel relay module: lets the Arduino's signal wires switch the motor circuits
- Two motors: drive the wheels on each side for moving forward and turning
- Ultrasonic sensor: measures the distance to obstacles ahead
- Battery box: powers the Arduino so the cart needs no cable

## How it works

- The battery box powers the Arduino, which controls the two motors through the relay
- When the ultrasonic sensor detects an obstacle it tells the Arduino, which stops one wheel and keeps the other turning, so the cart turns away
- Otherwise it drives toward the rubbish and gathers it into the space under the chassis
- Senior-year project: Auto-Following Robot: https://kbs0830.com/en/projects/auto-following-robot

> IT program, Kaohsiung Municipal Chung-Cheng Industrial High School; project course in the spring semester of 2023, three-person group. Details come from the project report.

---

Author: PINGWEI LI (李秉威, Li Ping-Wei)
Original page: https://kbs0830.com/en/projects/trash-collector
