Tempat sampah otomatis

14
By : Haris Panca Muhammad Efantama Kenanga Ayu Nirmala

Transcript of Tempat sampah otomatis

Page 1: Tempat sampah otomatis

By :

Haris Panca

Muhammad Efantama

Kenanga Ayu Nirmala

Page 2: Tempat sampah otomatis

This idea we got when we pay attention

to our surroundings clean, some people less

lazy throw away trash in its place amongst other

things because, if we have to throw away trash

pressing or touching the dumpster, therefore we

have an idea to make project of the

instrumentation, entitled "Trash" that can open

and close automatically so that people will dump

need not be touching or tapping the dumpster.

Page 3: Tempat sampah otomatis

To bring back the community will want to

dispose of the waste in place, some of the trash made

as attractive as possible so that the public are

interested to dump garbage at the venue. One of them,

namely the trash with an automated system where to

open the dumpster, users do not need to touch the

dumpster. Users only need to stand in front of the

Ultrasonic sensors on the front, then the bin will open

automatically. In addition the bin is equipped with LEDs

so that when the bin is open green light will turn on and

when the trash can close the light is red.

Page 4: Tempat sampah otomatis

SolderSciccorsCutterGlueLaptopRuler

Page 5: Tempat sampah otomatis

Arduino Uno

Sensor Ultrasonik

Servo TowerPro SG90

Buzzer

Resistor 220Ohm

LED (Red and Blue)

PCB

Acrylic

Cable (M to M, M to F, and F to F)

Trash Bin

Page 6: Tempat sampah otomatis

http://www.farnell.com/datasheets/1682209.pdf

Page 7: Tempat sampah otomatis

http://www.micropik.com/PDF/SG90Servo.pdf

Page 8: Tempat sampah otomatis

http://www.micropik.com/PDF/HCSR04.pdf

Page 9: Tempat sampah otomatis
Page 10: Tempat sampah otomatis
Page 11: Tempat sampah otomatis

http://www.tek.com/sites/tek.com/file

s/media/media/resources/Cables2.p

df

• Male to Male

• Male to Female

• Female to Female

Page 12: Tempat sampah otomatis
Page 13: Tempat sampah otomatis

#include <Servo.h>

Servo myservo;

#define buzzer 3

int sound;

#define trigPin 11

#define echoPin 10

#define led 6

#define led2 4

void setup() {

Serial.begin (9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

pinMode(buzzer, OUTPUT);

pinMode (led, OUTPUT);

pinMode(led2, OUTPUT);

myservo.attach(9);

}

void loop() {

long duration, distance;

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration/1) / 29.1;

if (distance >=0 && distance <= 20)

{

myservo.write(160);

tone(buzzer, 3000,150);

digitalWrite(led, LOW);

digitalWrite(led2, HIGH);

}

else if (distance > 20 || distance < 0){

myservo.write(0);

noTone(buzzer);

Serial.println("Jarak diluar jangkauan!");

digitalWrite(led, HIGH);

digitalWrite(led2, LOW);

}

else {

Serial.print(distance);

Serial.println(" cm");

}

delay(250);

}

Page 14: Tempat sampah otomatis