Dancing Robot with Pinoo
Project Purpose: To create a dancing Pinoo project with the servo motor module and distance sensor using the Pinoo Control Card.
Duration: 2 lessons
Age Group: 7 years and older
Benefits:
• Learns to code Pinoo control card.
• Learns to code the distance sensor.
• Learns to code the Servo Motor module.
• Improves the skill of setting up algorithms.
• Improves coding skill.
• Design skill develops.
Materials to be Used: Mblock 3 program, Pinoo control card, Distance sensor, 4 Servo motor modules, Connection cables.
Materials Required for Design: 3D printed output (files available in folder), silicone gun and silicone.
To access the .stl file of 3D Design:
https://drive.google.com/drive/folders/1oDHzYkPM2Ixq27_7zqERTvYsVpfqCRw2
Project Preparation:
1. We attach the connection cable to the distance sensor.
2. We place the distance sensor in the eyes of the output printed from the 3D printer.
3. We place the servo motor modules at the bottom of the printed output from the 3D printer.
4. We connect the head part and the bottom part of the printout with the help of a silicone gun as shown in the figure.
5. We assemble the servo motor modules with the help of a silicon gun on the legs of the printout printed from the 3D printer as shown in the figure.
-
We assemble 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: You can fix the project to the servo motor by using the screws of the propellers to make the project stable. You can then assemble the legs with the help of a silicone gun. Before screwing the propellers, be sure to code the servo motor modules to 90 degrees!
- With the help of a silicon gun, we assemble the servo motor modules on the upper part of the legs of the 3D printout as shown in the figure.
-
We connect the legs of the 3D output with the servo motor modules as shown in the figure.
NOTE: Before combining the parts with servo motor modules, be sure to turn the servo motors to 90 degree position by looking at the coding section.
- We connect the legs of the 3D output with the servo motor modules as shown in the figure.
NOTE: Before combining the parts with the servo motor modules, be sure to turn the servo motors to 90 degree position by looking at the coding part.
- We connect the servo motor modules with the modules in a way that corresponds to Brown cables-GND, Red cables-5V, Orange cables-D0.
- We connect the connection cables of the servo motor modules to the Pinoo control card in accordance with the figures in the photo.
-
We plug the connection cable of the distance sensor into the purple / green input number 6 and mount the Pinoo control board 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 to the dancing Pinoo with the help of a silicon gun.
- We have completed our connections, now we go to the coding part. We will use mblock-3 application for this.
- We connect our Pinoo Control Card to the computer with the help of a connection cable and enter the Mblock3 application. Then we introduce our Pinoo Control Card to the computer. For this, we first click on the serial port option from the Connect tab. Then we choose COM3. (The number may differ depending on the computer and the port.)
- After making the serial port connection, we select the card to be used from the Cards tab. We are working with Arduino Nano model.
- 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 type "Pinoo" into the search engine and simply say download to the result. It was installed on our computer.
19. We come to the Extensions tab again and click on the Pinoo option. We will write our codes with the Pinoo extension.
- Come to the Connect Again tab and click on the Firmware Update option. After saying that the installation is finished, we press the Close button.
21. In the coding part; To start the application, we get the code when the Green Flag is clicked from the Events menu.
-
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 the word Hello, we get the code block for the distance sensor from the robots tab. We change the pin input to Pinoo 6 that we connect.
Since we want it to do the reading process continuously, not once, we take all our codes into the continuous repeat block from the control tab.
- We click on the green flag and zoom in and out of the distance sensor. Here, when we get our hand closer, we will take as a reference that it reads less than 10.
- When the Green flag is clicked from the Events menu, we take the command and turn all servo motor modules to 90 degrees. .
.
- We get the continuous repeat command from the control menu and if we take the command and put it into the continuous repeat command. Then, if the value measured by the distance sensor is less than 10 and greater than 0, we have the operations done.
- Then, if the value measured by the distance sensor is smaller than 10 and greater than 0, we say keep a number between 1 and 3. And if the number it holds is equal to 1, we make our robot dance by moving the servo motor modules randomly.
- Then we fasten the number 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 attach a number again and if the held number is equal to 3, we write the codes that will move the servo motor modules. Thus, the robot will make different dance figures with each of our hands holding between 1 and 3 numbers that we show.
- We get the if command from the control menu. If the value measured by the distance sensor is greater than 10 or equal to 0, we move the servo motor modules in the direction of 90 degrees.
-
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 source independent of the computer.
For this, we throw away the "Click on the green flag" code we used at the beginning and the code that we made the puppet tell the sensor value, and get the Pinoo Program code from the Robots menu.
- Right click on the code and click the Upload to Arduino option. (We work with arduino as a card.)
- In the window that opens, we click the Upload to Arduino button again.
- We are waiting while our codes are being loaded to the card. After saying the installation is finished, we click on the close button.
- If there is no problem, we disconnect our power cable from the computer. We power our Pinoo Control board with the help of a 9v battery and a battery cap. We also turn the on / off button 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 stable at 90 degrees
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 between 1 and 3 numbers and move with different dance figures each time.