Smart dustbin projects for kids

Smart dustbin projects for kids

Overview

This project deals with a very common problem faced by our society daily. The problem with opening the dustbins, with the help of these Automatic Dustbins you don’t have to touch the dustbins you just have to go near the dustbins the dustbins will get open by themselves after sensing you near them.

In this project we have used a PIR Sensor and a Servo Motor here the sensor senses the person near it and tells the motor to rotate and open the dustbin so that the user can throw the waste in the dustbin without touching it.

Hardware required 

  1. Arduino Uno R3
  2. PIR Sensor
  3. Micro Servo Motor
  4. BreadBoard
  5. Jumper Wires

Schematic Diagram

Fig 1.  Circuit Diagram

Arduino Code :

#include <Servo.h>
Servo myservo;                                       // create servo object to control a servo
int pos = 0;                                                   // variable to store the servo position
int inputPin = 12;                                   // choose the input pin (for PIR sensor)
int pirState = LOW;                           // we start, assuming no motion detected
int val = 0;                                                    // variable for reading the pin status
 
void setup() {
  myservo.attach(4);          // attaches the servo on pin 4 to the servo object
  pinMode(inputPin, INPUT);  
  Serial.begin(9600);
}

void loop() {
  val = digitalRead(inputPin);                                                  // read input value
  if (val == HIGH) {                                                      // check if the input is HIGH
    if (pirState == LOW) {
      myservo.write(0);                    // tell servo to go to position in variable '0'
      delay(1500);              // waits 1500ms for the servo to reach the position
      pirState = HIGH;
    }
  } 
  
else {
    if (pirState == HIGH){
        myservo.write(180);         // tell servo to go to position in variable '180'
      delay(1500);                       
        pirState = LOW;
    }
  }
}

Precautions

  1. Connections should be done properly.
  2. Arduino is case Sensitive so code accordingly.
  3. Give different colors to the wires.

Leave a Reply

Coding For kids

Coding Courses for Kids Online

Our courses which are tailored for grades 1 to 12, and our hands-on curriculum seamlessly integrates, preparing students for challenges and inspiring the next generation.

STEM Labs

STEM LAB for Schools

Looking for a cutting-edge makerspace that goes beyond traditional education? Partner with Makers’ Muse to unlock innovation and transformative learning for your students.

Coding Toys

STEM LAB for Schools

Discover a revolutionary coding journey for students with our cutting-edge educational toys. Partner with us to unlock innovative learning experiences that transcend traditional education.

Do you have questions regarding our STEM program?

Send Us A Message

var timeInMillis =10000; setTimeout(function() { window.fcWidget.open(); },timeInMillis);
×
×

Cart