Tea Dripping Machine With Pinoo
Purpose of the Project: To create a tea brewing machine with a servo motor module and distance sensor using the Pinoo control card.
Materials to be Used: Mblock 3 program, Pinoo control card, distance sensor, servo motor module, connection cable
Materials Required for Design: 2 tongue sticks, colored cardboard, ruler, pencil, knife, silicone gun, glass, tea bag, scissors
2. We draw a 22cm long and 14cm wide rectangle on a cardboard of another color. Then we draw another rectangle with a length of 20cm and a width of 12cm inside the rectangle we have drawn and then cut it with the help of a curved knife.
3. We glue the small rectangle into the larger rectangle with the aid of a silicone gun.
4. We glue 24cm long and 16cm wide cardboards to the right and left ends of the shape we created with the help of a silicone gun.
5. We mount the 16cm square cardboard below and above our design with the help of a silicon gun.
7. We cut the circles that we drew with the help of a cutter.
8. Then we mount the cardboard on the back of our design with the help of a silicone gun. So we create a box.
9. We pass the distance sensor through the circles.
12. With the help of a silicone gun, we attach the tea bag from the rope to the tip of the ice cream stick.
13. We connect the servo motor with the servo motor module in a way that corresponds to Brown cable-GND, Red cable-5V, Orange cable-D0.
14. We assemble the servo motor to the box with the help of a silicon gun.
15. We write PINOO on one 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.
18. 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.)
19. After making the serial port connection, we select the card we will use from the ‘’Cards’’ tab. We are working with Arduino Nano model.
21. We come to the Extensions tab again and click on the Pinoo option. We will write our codes with the Pinoo extension.
22. In the coding part; To start the application, we get the code when clicking the Green Flag from the Events menu.
24. Let's click on the green flag and observe the change of values by moving the glass closer to the sensor and away. Let's take note of the value read by the sensor when we move the glass closer to the sensor. Here, we will reference that you read a value of around 10.
25. When the Space key is pressed from the Events menu, we get two codes. Then we click on the small triangle next to the space text and change one of them to down arrow and the other to up arrow.
26. We get the code block about the servo motor from the Robots tab. We change the pin input to Pinoo3 that we connect. The servo motor will go up at 0 degrees, 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 works correctly.
29. We define a variable name. Let's be careful not to use Turkish characters when defining. Then we click the OK button.
30. When we click on the green flag button, we want the tea bag to be always up and down when we approach it to the glass. For this, we come to the data & block tab and take the code to get the angle 0 and place it under the green flag command.
31. Now, when we bring the cup closer to the front of the distance sensor, we will make the servo motor gradually enter the cup. For this, we take the repeat code until it is from the control tab and if it is less than 10, we place it under the command.
32. The servo motor will gradually decrease until its degree is 90, so we take the equals process from the transactions and we take the angle from the data & block and equal the angle to 90.
33. Now we will increase the angle one by one until the angle is 90. For this, we take "increase angle 1" from "data & block" and put it into "repeat until it is done".
34. Then we insert the angle in the angle portion of the servo motor code to indicate that the angle is the angle of the servo motor. We put the servo motor code under the "increase angle 1" code.
35. Now we want the tea bag to be shaken 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.
36. We get the "servo motor" code from the robots and make the angle 45. We get "wait 1 second" from the control tab so that it can shake fast, and change 1 to 0.1. Then we take the "90 degree servo motor" code that we put in the beginning and put it into the "wait for 0.1 second" code. And again we say "wait 0.1 second". Then we put these codes in the "repeat 10 times" command.
37. After the tea is brewed, that is, after shaking it 10 times, we want the tea bag to rise. For this, we take the ‘’wait 1 second’’ command from the control tab and change it to 5. Then we take the servo motor code and make its angle 0 degrees.
38. Now, when the distance sensor sees the glass, we want it to wait for a while and then increase the angle. We place the ‘’2-second wait’’ code on the ‘’repeat code’’ until it's done.
41. Right click on the code and click the ‘’Upload to Arduino’’ option. (We work with arduino as a card.)
42. In the window that opens, we click the ‘’Upload to Arduino’’ button again.
43. We are waiting while our codes are being loaded to the card. After saying the installation is finished, we click on the close button.
44. 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.
45.The Working State of the Project:
Since there is no cup in front of the distance sensor, the tea bag is in the upper position.
Since there is a cup in front of the distance sensor, the tea bag is in the down position.