Smart Trash Can With Pinoo

 

Purpose of the Project: To make a hygienic garbage bin project using an ultrasonic distance sensor and servo motor with a Pinoo control card. 

 

Duration: 2 lessons 

Age Group: 9 years and above  

Pinoo Set: Basic,Invention,Maker,Full Set

Gains: 

• Learns to code Pinoo control card. 

• Learns to use ultrasonic distance sensor. 

• Learns to use servo motor. 

• Improves the skill of setting up algorithms. 

• Improves coding skill. 

 

Materials to be used: Mblock 3  program, Pinoo control card, ultrasonic  distance sensor, servo motor, connection cables. 

  

 

Materials Required for Design: Dustbin, ice cream stick, silicone gun and  silicone. 


 

 

Project Preparation: 

 

1. For our project, we first start by gluing the ice cream stick to the servo motor. 

 

We stick the ice cream stick to the servo motor. 

 

 

We fix our servo motor  inside the garbage can with the help of   a silicone gun so that the lid of the garbage can open and close smoothly. 

 

 

 

We drill a hole in the front of the garbage can for our distance sensor. 

 

 

We fix our distance sensor with the help of  a silicon gun and complete our  design part. 

  

2.Adding Pinoo extension: 

 

 

 

 

From the Extensions tab, we click on the "Manage Extensions" option. 

 

 

 

 

In the window that opens, we type "Pinoo" into the search engine and simply  say ‘download’ to the result. 

It was installed on our computer. 

  

3.Connecting the Pinoo sensor board to the computer: 

 

 

 

 

 

In Mblock 3, we click on the "Connect" tab on the upper left. 

 

 

 

We click on the "Serial Port" section from the window that opens and select the "COM6" option from the page that opens. 

 

NOTE: Since the port entries of each computer are different, the numbers next to the COM text may change. 

 

We click on the ‘Cards’ tab. 

 

 

We select the "Arduino Nano" card option used by the Pinoo sensor card from the window that opens. 

 

 

We click on the ‘Extensions’ tab. 

 

 

In the window that opens, we select the extension "Pinoo" of the sensor card we use. 

 

 

We click on the ‘Connect’ tab. 

 

 

We click on "Firmware Update" from the window that opens. 

  

4. Coding part: 

 

 

 

First, to check whether our ultrasonic distance sensor is working or not, we check the working status of the distance sensor with  our 'Say Hello' code under the 'When Clicked' code on our panda puppet. 

 

 

 

We run the servo motor under the "key is pressed" command to start it. Since the servo motor works between 0 and 180 degrees, we are trying both  angles. 

 

 

 

 

Under our green flag event code, we place the continuous repeat loop and into it the code indicating the value of our distance sensor. If the value of our  distance sensor is smaller than 10 cm, our servo motor will reach 30 degrees, that is, the lid of the garbage can will be opened. If not, that is, if it is larger than 10cm, our servo motor will move down and the waste bin lid will close. 

 

IMPORTANT: Be  sure to try your angles, each example may have different  angles. The reason for this is the servo motor fit. 

 

 

We right click on the "Pinoo Program" command and select the "Upload to Arduino" option in the window that opens. 

  

 

 

On the page that opens, we click the "Upload to Arduino" button selected in  red. 

Our codes are uploaded to our Pinoo control card. 

 

 

 

We click on the "Close" button after the "Download Finished" text appears.  After the installation is finished, the battery compartment is inserted and the  project is run. 

  

5. Working Status of the Project: 

 

 

 

When there is any object in front of the ultrasonic distance sensor, the  dustbin  lid will open, if there is no object, the dustbin lid will close. 

 

WITH PINOO SETS, CHILDREN CAN MAKE HUNDREDS OF PROJECTS WITH MATERIALS THEY CAN EASILY FIND IN THEIR HOMES.