top of page

Dancing Robot

Project Purpose: Creating a dancing pinoo project with servo motor module and distance sensor using Pinoo Control Card.

Duration:  2 lessons

Age group:  7 years and older

Pinoo Set:  Basic set, invention set, full set, maker set.

Achievements:

  • Learns to code Pinoo control board.

  • Learns to code the distance sensor.

  • Learns to code Servo Motor module.

  • Develops algorithmic skills.

  • Coding skills develop.

  • Develops design skills.

 

Materials to be used:  Mblock 3 program, pinoo control card, distance sensor, 4 servo motor modules, connection cables

 

Materials Required for Design:  Printed output from 3D printer (files available in folder), caulking gun and caulk.

 

To access the .stl file of 3D Design:

https://drive.google.com/drive/folders/1oDHzYkPM2Ixq27_7zqERTvYsVpfqCRw2

       

Project Construction:

We attach the connecting cable to the distance sensor. We place the distance sensor in the eyes of the printout printed from the 3D printer.

  We place the servo motor modules at the bottom of the 3D printed output.

 

 

We combine the top and bottom of the printout with the help of a silicone gun as shown in the figure.

      

 

 

We mount the servo motor modules on the feet of the printout printed from the 3D printer, with the help of a silicone gun, as in the figure.

   

We mount the propellers of the servo motor modules to the legs of the 3D output with the help of a silicone gun as shown in the figure.

NOTE: In order for the project to be solid, you can fix it to the servo motor using the screws of the propellers. Then you can mount the legs with the help of a glue gun. Before screwing the propellers, make sure to encode the servo motor modules and bring them to 90 degrees!

 

 

We mount the servo motor modules on the upper part of the legs of the 3D printout with the help of a silicone gun as shown in the figure.

We combine the legs of the 3D output with the servo motor modules as in the figure.

NOTE: Before assembling the parts with the servo motor modules, make sure to bring the servo motors to the 90 degree position by looking at the coding part.

 

We combine the feet of the 3D output with the servo motor modules as shown in the figure. NOTE: Before assembling the parts with the servo motor modules, make sure to bring the servo motors to the 90 degree position by looking at the coding part.

 

We make the connections of the servo motor modules with the modules so that the Brown cables-GND, Red cables-5V, Orange cables-D0 coincide.

 

We connect the connection cables of the servo motor modules to the pinoo control card in accordance with the numbers in the photo.

We connect the connection cable of the distance sensor to the purple/green input number 6 and mount the pinoo control card on the dancing pinoo with the help of a silicon gun.

NOTE: You can mount the Pinoo control board on the dancing Pinoo after you finish coding.

 

Let's mount the servo motor modules on the dancing Pinoo with the help of a glue gun.

We have completed our connections, now we are going to the coding part. We will use the mblock-3 application for this.

We connect our Pinoo Control Card to the computer with the help of the connection cable and log in to the Mblock3 application. Then we introduce our Pinoo Control Card to the computer. To do this, we first click on the serial port option from the Connect tab. Then we select COM4. (The number may differ depending on the computer and port.)

 

After connecting the serial port, we select the card we will use from the Cards tab. We are working with the Nano model of Arduino.

 

 

In order to add the Pinoo extension to our computer, we click on the Manage extensions option from the Extensions tab. 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.

Go to the Extensions tab again and click Pinoo. We will write our codes with the Pinoo extension.

 

 

 

Go to the Reconnect tab and click on the Firmware Update option. After we say the download is finished, we press the Close button.

In the coding part; We get the code when we click on the Green Flag from the Events menu to start the application. We get help from the dummy in order to learn the value read by the distance sensor. For this, we get the "say hello" command from the view tab. Instead of hello, we get the code block related to the distance sensor from the robots tab. We change the pin input to Pinoo6, which we connect to.

Since we want the reading process to be done continuously, not once, we take all our codes into the repeat block from the control tab.

 

We click on the green flag and zoom in and out on the distance sensor. Here, we will take as reference that it reads less than 10 when we bring our hand closer.

 

 

 

Again, we get the command when the green flag is clicked from the Events menu and bring all the servo motor modules to 90 degrees.

We get the repeat command from the control menu and we take the if command and throw it into the repeat command. Then, if the value measured by the distance sensor is less than 10 and greater than 0, we perform the operations.

 

Then we say keep a number between 1 and 3 if the value measured by the distance sensor is less than 10 and greater than 0. And if the number it holds is equal to 1, we make our robot dance by randomly moving the servo motor modules.

 

Then we score the numbers again and if the number is equal to 2, we write the codes that will move the servo motor modules for different dance movements.

We count again and write the codes that will move the servo motor modules if the number is equal to 3. Thus, each time we show our hand, the robot will hold different numbers between 1 and 3 and make different dance figures for each value it holds.

We get the if command from the control menu. If the value measured by the distance sensor is greater than or equal to 0, we move the servo motor modules in the 90 degree direction.

 

 

We click on the Green Flag button and check our project. If there is no problem in the operation of our project, we need to load the codes we have written into our card in order to run our project with a power supply independent of the computer. For this, we get the Pinoo Program code from the Robots menu by throwing the code we used at the beginning to click on the green flag and the code that we made the dummy say the sensor value.

Right click on the code and click Upload to Arduino. (We work with arduino as a board.

In the window that opens, we click the Upload to Arduino button again. We are waiting while our codes are loaded on the card. After we say the download is finished, we click on the close button.

​​

 

​​

If there is no problem, we unplug our power cable from the computer. We power our Pinoo Control board with the help of 9v battery and battery cap. We also bring the on-off button, which is right next to the battery input, to the on position.

 

Working Status of the Project:

If the value measured by the distance sensor is greater than 10, our robot will remain fixed in its 90 degree position.

 

 

When we put our hand in front of the distance sensor, that is, when the value measured by the distance sensor is less than 10, it will keep 1 to 3 numbers and move with different dance figures each time.

1.JPG
2.JPG
4.JPG
5.JPG
7.JPG
8.JPG
9.JPG
10.JPG
11.JPG
12.JPG
13.JPG
14.JPG
15.JPG
16.JPG
17.JPG
18.JPG
seri_port_480x480.jpg
KART_480x480.jpg
1_a8314da2-edff-4525-979d-b2d3ff93364b_large.png
pinoo_uzanti_480x480.jpg
pinooo_480x480 (2).jpg
aygit_yazilim_480x480.jpg
27.JPG
28.png
29.JPG
30.JPG
31.JPG
32.JPG
33.JPG
34.JPG
35.JPG
36.JPG
37.JPG
38.png
39.jpg
40.jpg
bottom of page