top of page

Tea Brewing Machine

Project Purpose: To create a tea brewing machine with a servo motor module and a distance sensor using the Pinoo Control Card.


Duration:  2 lessons
Age group:  7 years and older
Pinoo Set:  Basic set, invention set, maker set and full set.
Achievements:

  • Learn to code Pinoo control board

  • Learns to code the distance sensor.

  • Learns to code Servo Motor module.

  • Develops algorithmic skills.

  • Coding skills develop.

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

 

 

 

 

 

 

 

 

 

 

 

 


Materials Required for the Design: 2 tongue sticks, colored cardboard, ruler, pencil, brush, glue gun, glass, tea bag, scissors.

 

 

 

 

 

 

 


  
         
Project Construction:


We draw a rectangle 24cm long and 16cm wide on the cardboard. Then, we draw another 22cm long and 14cm wide rectangle inside the rectangle we drew, and then we cut it with the help of a knife to be hollow.
 
 

 

 

 

 

 

 

 

 

 

 


On a cardboard of another color, we draw a rectangle 22cm long and 14cm wide. Then we draw another 20cm long and 12cm wide rectangle inside the rectangle we drew, and then cut it with the help of a fork knife so that it is empty.
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Glue the small rectangle into the large rectangle with the help of a glue gun.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With the help of a silicone gun, we stick 24cm long and 16cm wide cardboards on the right and left ends of the shape we have formed.
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


We mount the 16cm square cardboard on the bottom and top of our design with the help of a silicone gun.  

 

We form a rectangle 24cm long and 16cm wide from cardboard. We determine the location of the distance sensor so that when we put a glass, it sees the glass. Then we draw the eyes of the distance sensor with the help of a pencil wherever you will put the distance sensor.
NOTE: Servo motor will lower and lift the tea bag. Let's not draw the distance sensor too high so that the tea bag does not come in front of the distance sensor.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We cut the circles we drew with the help of a fork.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Then we mount the cardboard on the back of our design with the help of a glue gun. So we create a box.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 
We pass the distance sensor through the circles.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Servo motor will lower and lift the tea bag. We adjust the position of the servo motor so that it does not coincide with the distance sensor.
NOTE: An ice cream stick will be placed at the end of the servo motor. For this reason, when determining the location of the servo motor, it should be adjusted so that it does not hit the box and enters the water. For this, first of all, look at the positions of the servo motor at 0 and 90 degrees by coding.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We attach the single-end white propeller of the servo motor. Then we stick the ice cream stick on the propeller with the help of a silicone gun.
NOTE: Let's adjust the length of the ice cream stick so that it does not hit the box.

With the help of a silicone gun, we stick the tea bag from the thread to the tip of the ice cream stick.

 

We connect the servo motor with the servo motor module so that the Brown cable-GND, Red cable--5V, Orange cable-D0 coincide.
 

We mount the servo motor to the box with the help of a silicone gun.
 

We write PINOO on an ice cream stick. We write Tea Brewing Machine on the other ice cream stick and mount it on the top of the box with the help of a silicone gun.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


We make our connections. We connect the distance sensor to the purple/green input number 5 with the connecting cable. We connect the servo motor to the purple input number 3 with the help of the connecting cable.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

 

Click on the Connect tab.

Click "Firmware Update" from the window that opens.

In the coding part; We get the code when we click on the Green Flag from the Events menu to start the application.


 
 

 

 

 

 

 

 


We will get help from the dummy 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 Pinoo5, 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.
 
 

 

 

 

 

 

 

 

 

 

 

 


 
Let's click on the green flag and observe the change of values by moving the glass closer to the sensor. Let's take note of the value read by the sensor when we bring the glass closer to the sensor. Here we will take as reference that it reads a value of around 10.
 
 

 

 

 

 

 

 

 

 

 

 


 
When the Space key is pressed from the Events menu, we get two of the code. Then we click on the small triangle next to the space text and change one to a down arrow and the other to an up arrow.

 

 

 

 

 

 

 

 

 

 

 

 


We get the code block related to the servo motor from the Robots tab. We change the pin input to Pinoo3, which we connect. At 0 degrees, the servo motor will rise, so when the up arrow key is pressed, we make the angle 0 degrees under the command. When the down arrow key is pressed, we make the angle 90 degrees under the command. By pressing the keys, we check whether the servo motor is working correctly.

 

 

 

 

 

 

 

 

 

 

 

 

 


If the value read by the distance sensor is less than 10, that is, if the glass is close to the distance sensor, let the tea bag enter the glass (servo motor is 90 degrees). Let it be 0 degrees). Now let's turn this into code.
 
Here we will make use of the if-if-not block in the control tab and the small comparison operators in the operations tab. Then we click on the green flag and check if the project is working by bringing the glass closer to the distance sensor.

 

 

 

 

 

 

 

 

 

 

 

 


Now let's improve our coding to make our project work more precisely. Let's let the servo motor go down slowly when we bring the cup closer to the tea brewing machine. For this, we need to define a variable.
 
We click on the Data&Block tab and say create a variable.
 

 

 

 

 

 

 

 

 

 

 

 

 


 
We define a variable name. Let's be careful not to use Turkish characters when defining. Then we click the OK button.
 
 

 

 

 

 

 

 

 

 

 

 


 
When we click on the green flag button, we want the tea bag to always stay up, and when we bring the glass closer, we want it to go down. For this, we come to the data&block tab and take the code to get aci 0 and place it under the command when the green flag is clicked.
 

 

 

 

 

 

 

 

 

 

 

 

 


Now, when we bring the glass in front of the distance sensor, we will ensure that the servo motor enters the glass slowly. For this we take the repeat code until it is from the control tab and place it below the command if it is less than 10.

 

 

 

 

 

 

 

 

 

 

 


 
Until the servo motor enters the glass, that is, it will decrease gradually until its degree is 90. For this, we take the equals operation from the operations and we take the aci from the data&block and set the aci to 90.
 
 
 

 

 

 

 

 

 

 

 

 


Now we're going to increase the pain one by one until the angle is 90. For this, we take increase aci by 1 from data&block and throw it into the repeat until we get it.
 
 

 

 

 

 

 

 

 

 


Then we place aci in the angle part of the servo motor code to indicate that aci is the angle of the servo motor. We put the servo motor code aci under the increment 1 code.
 
 

 

 

 

 

 

 

 

 

 

 

 


Now we want the tea bag to shake while it is in the glass. For this, we take the repeat command 10 times from the control tab and place it under the repeat command until it happens.
We get the servo motor code from the robots and make the angle 45. We get 1 second wait from the control tab so that it shakes fast and we change one and make it 0.1. Then we take the 90-degree servo motor code that we put when coding at the beginning and put it into the 0.1 second wait code. And again we say wait 0.1 seconds. Then we throw these codes into the repeat command 10 times.
 
 

 

 

 

 

 

 

 

 

 


After the tea is brewed, that is, after shaking it 10 times, we want the tea bag to rise. For this, we get the 1 second wait command from the control tab and change it to 5. Then we take the servo motor code and make the angle 0 degrees.
 
 

 

 

 

 

 

 

 

 

 

 

 

 


Now, when the distance sensor sees the glass, we want it to wait for a while and then increase the angle. For this, we place the wait 2 seconds code on top of the repeat code until it happens.
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


After completing our codes, we check the operation of our project by clicking the green flag.
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 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:


Since there is no glass in front of the distance sensor, the tea bag is in the up position.

 

 

 

 

 

 

 

 

 

 
Since there is a glass in front of the distance sensor, the tea bag is in the down position.
 
 

1.JPG
2.JPG
3.JPG
4.JPG
5.JPG
6.JPG
7.JPG
9.JPG
10.JPG
10.JPG
12.JPG
13.JPG
14.JPG
15.JPG
16.JPG
17.JPG
18.JPG
19.JPG
20.JPG
21.png
22.png
23.png
24.png
25.png
26.png
27.png
28.JPG
29.png
30.JPG
31.JPG
32.JPG
33.JPG
34.JPG
35.JPG
36.JPG
37.JPG
38.JPG
39.JPG
40.JPG
41.JPG
42.JPG
44.JPG
45.JPG
46.JPG
47.png
48.PNG
49.PNG
bottom of page