Abstract :
This study aimed to design an automatic trash based microcontroller that
automatically can open and close, and it is able to detect the capacity of the trash
automatically. This study was experiment study. The parameters observed in this study were
the distance and the period. This system consisted of hardware and software. The hardware
consisted of Arduino Uno, HC-SR04 sensor, Servo Motor, LED (Light Emitting Diode),
Buzzer, and LCD (Liquid Crystal Display). The software of this system was made from the
Arduino IDE program. If the HC-SR04 Sensor detects the presence of an object at a distance
of 20 cm, the servo motor would open the lid of the trash. Conversely, if the distance was
more than 20 cm, the servo motor would close the trash automatically. Then if the trash was
empty and the HC-SR04 sensor detects an object> 5 cm then the green LED (Light Emitting
Diode) indicator would lights up, conversely if the HC-SR04 sensor (2) detects an object at a
distance of 5 cm the LED indicator light (Light Emitting Diode) the red color would light up
and the buzzer would sound indicating the trash was in full condition. Furthermore, the LCD
(Liquid Crystal Display) would display a character in the form of writing. The results of a
simple linear regression analysis showed that the sensor's travel time was affected by the
sensor's measurement distance to the object.
Keywords:Automatic trash, Microcontroller, Ultrasonic sensor.