Tea Cooling System with Pinoo
Purpose of the Project: To create a tea cooling system with a distance sensor and dc motor using the Pinoo control card.
Duration: 2 lessons
Age Group: 9 years old and above
Pinoo Sets: Pinoobot Packet and full set.
- Learns to code Pinoo control card
- Learns to code the distance sensor.
- Dc engine learns to code.
- Improves the skill of setting up algorithms.
- Improves coding skill.
Materials to be Used: Mblock 3 program, Pinoo Control Card, distance sensor, dc engine, connection cables
Materials Required for Design: 8 small wooden pieces, 5 tongue sticks, paint, silicone gun, 5 small rectangular pieces of cardboard, colored cardboard
We glue four pieces of wood into a square with a silicone gun. We do this stage twice.
- We paint our squares and glue two L-shaped squares. (One of the squares will be the ground and the other will be the wall.
- We glue the three tongue sticks to the side. Then we stick the motor to the tongue bars so that the rod part of the motor that will rotate is outside.
- We fix the cardboards on the motor reel at regular intervals.
- We attach the pulley to the motor and fix the tongue bars to which the motor is attached to the square that we have determined as the wall.
- We fix the distance sensor to the right of the ground where it can see the bottom of the reel.
- We cover the tongue sticks on the engine with colored cardboard to make them look better.
- Let's make our connections. We fix our Pinoo board behind the wall. We connect the motor cable from the appropriate inputs for the motor to the B1 / B2 input (left), and our distance sensor to the purple / green input number 6 with RJ11 cable.
- We have completed our connections, now let's move on to the coding part. We will use the mblock-3 application for this.
- Let's connect our Pinoo control card to the computer with the help of the connection cable and enter the Mblock3 application. Then, let's 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 COM3. (The number may differ depending on the computer and the port.)
- After making the serial port connection, let's select the card we will use 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 write "Pinoo" in the search engine and click download to the result. It has been installed on our computer.
- We come to the Extension tab again and click the Pinoo option. We will write our codes with the Pinoo extension.
- In the coding part; To start the application, we get the code when clicking the Green Flag from the Events menu.
- We will get help from the dummy to learn the value read by the distance sensor. For this, we get the hello command from the View tab. Instead of the word Hello, we take the code block for the distance sensor in the Robots tab. We change the pin input to Pinoo6 that we connect.
- Let's click on the green flag and move our hand closer to the sensor and observe the change of values. Bring our hand under the propeller and take note of the value read by the sensor. We will take as a reference that it reads a value around 3 here.
If the value read by the distance sensor is less than 5, that is, if the glass is under the propeller, the engine will start (cooling) if it is greater than 5, the engine will stop working. Now let's put this into a code.
Here we will make use of the small and large comparison operators from the if block and operations tab in the control tab.
Use the propeller / engine start-stop codes according to the condition to be provided.
From the Robots tab, we take the PinooBot Wheel: Right Side: Forward Speed: 0 code block. For both cases, we change the Wheel to Left, for the case where the distance is less than 5, we change the Speed to 255.
Since we want this process to be constantly controlled, we place all the blocks in the repeat block.
- After completing our codes, we check the operation of our project by clicking the green flag. When we place our glass under the propeller, the propeller will start working (cooling). When we lift the glass, our propeller will stop.
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 had to tell the sensor value to the puppet, 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 board.)
- We are waiting for the codes to be uploaded to the card. After the installation is complete, we close the window.
If there is no problem, we remove 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.