Smart dustbin

Problem statement:

  • When our hands are full, we cannot open the dustbin.
  • It is not hygienic to touch the dustbin as it is dirty.

Solution

  1. The dustbin lid will automatically open.
  2. It can detect the amount of rubbish in the dust bin

List

  • 2 ultrasonic sensors
  • 5 LEDs
  • 1 buzzer
  • Resistors
  • Jumper wires
  • 1 Arduino Uno

This is the inside of the dustbin.

This is the circuit of the dustbin.

https://drive.google.com/file/d/1fCEdZ9imYr3e1loip-FXG08Iy9e61aV9/view?usp=drivesdk

The smart dustbin’s lid will open when you go close or put your hand above the lid for a few seconds. If you put a lot of rubbish in it, all the red lights will light up. The red lights will light up based on the amount of trash in it. The green lights indicate the empty space.

Car speedometer

This project is about the car’s speedometer. If you press the accelerator button, the km/h will increase and the distance will increase too. The brake button will decrease your km/h and when the km/h hits 0, the distance will stop decreasing. Just imagine that you are driving in your own car!

Include Wire library

Include LiquidCrystal I2C library

Include servo library
LiquidCrystal_I2C lcd(0x27, 16, 2);

Servo myservo;
int angle = 0;
int servoPin = 6;
int brake = 9;
int accel = 8;
int spd = 0;
int distance;

void setup() {
pinMode(brake, INPUT_PULLUP);
pinMode(accel, INPUT_PULLUP);
lcd.init();
lcd.backlight();
myservo.attach(servoPin);
Serial.begin(9600);

}

void loop() {
if (digitalRead(accel) == 0) {
spd += 20;
}
else if (digitalRead(accel) == 1 && digitalRead(brake) == 0) {
spd -= 40;
} else if (digitalRead(accel) == 1 && digitalRead(brake) == 1) {
spd -= 5;
}
angle = map(spd, 0, 240, 180, 0);
spd = constrain(spd, 0, 240);
distance += (spd * 5 / 36);
lcd.setCursor(0, 0);
lcd.print(“km/h:”);
lcd.print(spd);
lcd.setCursor(0,1);
lcd.print(“Distance:”);
lcd.print(distance);
delay(250);
lcd.clear();
myservo.write(angle);
Serial.print(spd);
Serial.println();
delay(250);
}

Create your website at WordPress.com
Get started