Turn a Dustbin Into a Smart Dustbin With LinkitONE

by ssarthak598 in Circuits > Arduino

13236 Views, 57 Favorites, 0 Comments

Turn a Dustbin Into a Smart Dustbin With LinkitONE

vnnnu.gif
IMG_1027[1].JPG

Want to make a cool science project? Want your dustbin to open automatically when you are near to it so you can throw items easily? Then you are at the right place!

Here I’ll show you how to make a basic dustbin that automatically opens up when any kind of motion is detected.

What Do You Need?

IMG_1017[1].JPG

1 . LinkitONE board

2. Servo motor

3. Breadboard

5. PIR motion sensor

6. Battery pack

Looking Into the Dustbin

IMG_1023[1].JPG
IMG_1024[1].JPG
IMG_1022[1].JPG

Look into the dustbin and see that where can you fix a motor that opens the head of the dustbin. I found a foot-opener and I’ll attach the servo motor there.

Assembling Up the Servo Motor

IMG_1020[1].JPG
IMG_1018[1].JPG
IMG_1019[1].JPG
IMG_1021[1].JPG

Now assemble your servo motor as shown in the images.

Carefully do it so it is permanently tight enough.

Attaching Motor to the Dustbin

IMG_1026[1].JPG
IMG_1025[1].JPG

Now attach a servo motor to the foot-opener of the dustbin using a servo motor. When the servo motor will rotate, the dustbin will automatically open its cap.

Attaching Motion Sensor

IMG_1029[1].JPG
IMG_1028[1].JPG
IMG_0856.JPG

Now attach the PIR motion sensor to the dustbin just as shown in the image.

Pin connections: PIR to LinkitONE

VCC – 5V

DATA – D8

GND – GND

After this we’ll write some code for the sensor that activates the motor when motion is detected!

Writing Some Code

The code is really simple here!

We just need to read the motion sensor, if the motion is detected, the servo motor will start.

CODE:

---------------------

#include

Servo myservo;

void setup() {

myservo.attach(9);

pinMode(8, INPUT);

myservo.write(90);

}

void loop() {

if(digitalRead(8) == 1)

{

myservo.write(90);

}

else

{

myservo.write(0);

}

delay(250);

}

-------------------

Finalizing It!

IMG_1030[1].JPG

Now attach the board to the dustbin tightly and finalize the project!

Check for all the connections that they are correct.

Once done, you are ready for testing!

Now Test It Out!

IMG_1027[1].JPG

Take a balled-paper near dustbin and see it open up automatically!

Congrats! you've made your own smart dustbin!