Drink Mixing With Pinoo
Project Purpose: To make a drink mixing project by using distance sensor and servo motor with Pinoo control card.
Duration: 2 lessons
Age Group: 9 years and older
Pinoo Set: Basic , Invention,Maker,Full Set
• Learns to code Pinoo control card.
• Learns to use 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, 2 servo motors, distance sensor
Materials Required for Design: Wood pieces, acrylic paint, ice cream stick, stir bar, silicone gun and silicone.
1. For our project, let's start by making the mixing platform first.
We paint the wooden parts with acrylic paint.
We silicone the two parts side by side.
We silicon a small piece from the middle point.
We also silicon the distance sensor.
We cut the ice cream sticks and silicone them on the empty sides.
We also silicon a large piece of wood vertically behind the distance sensor.
We remove the end of the servo motor and silicon it as shown in the figure.
We cut small pieces from the ice cream sticks and silicone them in the middle of the upright piece.
We cut the ice cream stick into a small piece of wood and silicon it in shape. Then we silicon the end of the servo motor and form the second part.
To the second part, we remove the end of the other servo motor and silicon it as shown in the figure.
We silicon the end of the servo motor to the stir bar.
We connect the connection cables of the servo motors and connect the Pinoo card to the computer with a USB cable.
(We will adjust the angles of the servo motors and install the ends like that.)
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, we make the angle of both servons 90 degrees.
First, we attach the second part we created to the end of the servo motor. Then we attach the stir bar.
It will look like this.
We attach the distance sensor to the 5th door. The servo at the top, with the stir bar at the end, is attached to the 2nd door, and the lower, the servo with the second part, is attached to the 1st door.
We make the angle of the servo attached to door number 1 0 degrees.
It will be as in the figure.
When the green flag is clicked, we run it to see the distance value.
(Here the distance will detect the glass. You can also examine the value when you put a glass.)
We delete other codes. We start with the Pinoo Program code block and set the angles of the servo motors.
If the distance value is less than 10, we create our condition.
We wait 0.5 seconds for the second part to come down and make the servo motor joining the 1st door 90 degrees. We wait 0.3 seconds to mix.
To mix, we move the servo motor mounted on the 2nd door between 60-90 angles 5 times.
After the mixing process is finished, we adjust the angles of the servo motors.
If the distance value is greater than 10, we create the condition and adjust the angles of the servo motors.
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 on 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 loading is finished, the Pinoo card and sensors are placed in the hard hat.
5. Working Status of the Project:
We are installing the 9V battery.
We put the glass.
After putting the glass, the second part will go down and the mixing process will start.