This is an old revision of the document!
Smart Trash Can
Name: Manciu Mihaela
Group: 1222A
Introduction
This project aims to solve a few problems related to the garbage management in a public area. Managing our waste in a smarter manner is a pioneer of innovative smart city solutions.
General Description
This automated trash can opens and closes its lid if it detects any rubbish in front of it. The sensor is located above the lid and, using a servomotor, the lid opens automatically. Under the lid there is another sensor that detects when the bin filled up and alerts the sanitation department to empty it before it is full. Additionally, if fire is detected inside the bin, the temperature sensor will send an immediate signal to notify those responsible for the bin.
Advantages:
In the future a more effective solution would be to activate a compressor to put the fire out and to implement a compaction system to maximise bin capacity.
Hardware Design
Software Design
#include <Servo.h>
#iclude “DHT.h”
#define DHTPIN 13
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
Servo servoMain1;
Define our Servo
Servo servoMain2;
int trigpin1 = 11;
int echopin1 = 10;
int trigpin2= 7;
int echopin2 = 6;
int distance1;
int distance2;
float duration;
float cm;
void setup(){
servoMain.attach(9); servo on digital pin 10
pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);
}
void loop(){
DHT.read11(dht_apin);
if(DHT.temperature>48)
Serial.print("Fire in the trash can!");
digitalWrite(trigpin1, LOW);
delay(2);
digitalWrite(trigpin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigpin1, LOW);
duration = pulseIn(echopin1, HIGH);
cm = (duration/58.82);
distance = cm;
if(distance1<30){
servoMain1.write(90);
delay(2000);
}
if(distance2<5)
Serial.print("The trash can is full!");
}
Firstly, the program verifies if there is fire in the trash can, then if the trash can is full. The loop makes the lid to open if the distance between the human and trash can is less than 30 cm.
Bibliography/Resources