top of page

Havlumatik

Purpose of the Project: To make a towel matic that opens automatically when any object is seen by using ultrasonic distance sensor and DC motor with Pinoo control card.

Duration:  2 lessons

Age group:  7 years and older

Pinoo Set:  Tool kit and full set.

Achievements:

  • Learns to code Pinoo control board.

  • Learns to use ultrasonic distance sensor.

  • Learns to use DC motor.

  • Develops algorithmic skills.

  • Coding skills develop.

  

Materials to be used:  Mblock 3 program, pinoo control card, ultrasonic distance sensor, DC motor,  connecting cables.  

 

 

 

Materials Needed for Design: Utility knife, scissors, tongue stick, popsicle stick, cardboard box, glue gun and silicone.  

 

 

 

Project Construction:

  For our project, we first covered our box with yellow cardboard.

 

  We drill holes in our box for the distance sensor and the DC motor.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We cut the middle of our DC motor so that the tongue stick enters the white part to rotate, and then we cut a small piece from the ice cream stick and stick it on the tongue stick so that the paper roll does not slip.

 

 

 

 

 

 

 

 

 

 

 

 

 

We place the tongue bar on the DC motor in this way and fix it with a glue gun.

 

 

We fix the DC motor with a silicone gun to the place where we made a hole on the side before. Then we don't forget to fix the distance sensor as well.

  

 

This is the final version of our box after placing the materials.  

 

 

To decorate, we fix the mouth-shaped black cardboard with a silicone gun to give a face image.

 

We also put our paper towel and we have completed the design part of our project.

 

  Adding Pinoo extension:

 

 

From the Extensions tab, click "Manage Extensions".

In the window that opens, we write “Pinoo” in the search engine and it is enough to say download to the result. Installed on our computer.  

 

  Connecting the Pinoo control board to the computer:

 

 

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

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

NOTE: As each computer has different port entries, the numbers next to COM may change.

 

 

Click on the Cards tab.

From the window that opens, we select the "Arduino Nano" card option used by the Pinoo control card.

 

 

Click on the Extensions tab.

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

 

 

Click on the Connect tab. Click "Firmware Update" from the window that opens.

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.  

  

 

To start the DC motor, we run it under the command "when the key is pressed". We checked the DC motor by running it at 150 speed in the forward direction.

  

If the value of our distance sensor is less than 5 cm, that is, when we see any object, our DC motor will go forward at 150 speed for 1 second and our DC motor will stop. If the value of our distance sensor is greater than 5 cm, that is, there is no object, our DC motor will not move.

  

 

 

 

 

 

 

 

 

 

 

 

 

In order to upload our codes to the pinoo control card, we start our event with the "Pinoo Program" command.  

 

 

 

 

 

 

 

 

 

 

 

 

Right-click on the “Pinoo Program” command and select the “Install to Arduino” option in the window that opens.

 

 

 

 

 

 

 

 

 

 

 

On the page that opens, we click on the "Upload to Arduino" button, which is selected in red. Our codes are uploaded to our pinoo control card. After the “Installation Finished” message comes, click the “Close” button. After the installation is finished, the battery holder is inserted and the project is run.

 

  Working Status of the Project:

 

 

 

 

 

 

 

 

 

 

 

 

When any object passes in front of the ultrasonic distance sensor, our DC motor will run for 1 second and our paper towel will be opened.

 

  ARDUINO IDE CODES:

// assign motor driver pins to pins 5 and 6

int motora1 = 5;

int motora2 = 6;

// We assigned the trig and echo pins to pins 9 and 8.

int echoPin = 8;

int trigPin = 9;

long time, distance;

// variable assigned for time and distance measurement

void setup()

// motors output pin. 

pinMode(to motor1, OUTPUT); 

pinMode(motor2, OUTPUT);  /

/ We set the input and output pins of the trig and echo pins 

pinMode(echoPin, INPUT); 

pinMode(trigPin, OUTPUT);

}

void loop()

// we activate the distance sensor 

digitalWrite(trigPin, LOW); 

delayMicroseconds(5); 

digitalWrite(trigPin, HIGH); 

delayMicroseconds(10); 

digitalWrite(trigPin, LOW); 

sure = pulseIn(echoPin, HIGH); 

distance = time / 29.1 / 2; /

/ measured the distance 

if (distance < 5)

{

// if the distance is less than 5  

// let the engine run for 1 second  

digitalWrite(motora1, HIGH);  

digitalWrite(motora2, LOW);  

delay(1000);  

// let the engine stop  

digitalWrite(motora1, LOW);  

digitalWrite(motora2, LOW); 

}

else

{

// otherwise the motors stop  

digitalWrite(motora1, LOW);  

digitalWrite(motora2, LOW); 

}

}

IMG_3844.JPEG
IMG_3927.JPEG
IMG_3928.JPEG
IMG_3929.JPEG
IMG_3930.JPEG
IMG_3934.JPEG
IMG_3933.JPEG
IMG_3935.JPEG
IMG_3940.JPEG
1_a8314da2-edff-4525-979d-b2d3ff93364b_large.png
pinoo_uzanti_480x480.jpg
seri_port_480x480.jpg
KART_480x480.jpg
aygit_yazilim_480x480.jpg
pinooo_480x480 (2).jpg
11.png
1.JPG
2.JPG
5.JPG
3.jpg
4.jpg
IMG_3938.JPEG
bottom of page