IoT Project: Arduino Uno

A trash bin that knows when it needs emptying.

SmartBin opens its own lid when a hand approaches, then measures its remaining capacity in real time via an ultrasonic sensor, shown directly on an LCD screen and three LED indicators.

System Flow

Four steps, one Arduino Uno.

Two sensors read the bin's condition, the Arduino Uno processes it, then three outputs inform the user.

01 · Detect

Infrared Sensor

Detects a hand or object at the bin's opening as a signal to open the lid.

pin D2
02 · Measure

HC-SR04 Ultrasonic Sensor

Measures the distance to the trash surface, converted into a capacity percentage.

trig D3 · echo D4
03 · Process

Arduino Uno

Calculates the capacity status (empty / nearly full / full) and controls all outputs.

system brain
04 · Respond

Servo, LCD, LED & Buzzer

The lid opens for 2 seconds via the SG90 servo, status shown on the LCD and LED, buzzer marks the action.

pin D5–D9
Specifications

Built from easy-to-find components.

All 18 components are available at local electronics stores, with the Arduino Uno as the sole controller.

Bin capacity20 liters
Bin height± 40 cm
Power source9V adapter
Main controllerArduino Uno R3
SensorsHC-SR04 + Infrared
Output16x2 LCD, LED×3, Buzzer, Servo
LCD I2C address0x20
Arduino Uno R31 pc
SG90 Servo Motor2 pcs
HC-SR04 Ultrasonic Sensor1 pc
Infrared Sensor2 pcs
16x2 I2C LCD1 pc
LED (Red, Yellow, Green)3 pcs
Passive Buzzer2 pcs
220 / 330 Ohm Resistor6 pcs
20-liter Trash Bin1 pc
NYAF Stranded Wire 5m1 roll
Safety & Maintenance

Low maintenance, but still needs attention.

Before Powering On Make sure the 9V adapter matches the Arduino Uno's requirements, do not use a higher-voltage adapter.
During Operation Do not forcibly hold the lid while the servo is working, to avoid damaging the mechanism.
Routine Maintenance Clean the ultrasonic and infrared sensors regularly to keep capacity readings accurate.
Open Source

All source code and documentation are free to download.

Circuit schematic, firmware code, and the complete manual book are available to anyone, free and open.