Tea Cooling System With Pinoo
by pinoorobotics in Circuits > Arduino
193 Views, 0 Favorites, 0 Comments
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.
Benefits: Learns to code Pinoo control cardLearns to code the distance sensor.Dc engine learns to code.Improves the skill of setting up algorithms.Improves coding skill.
Supplies
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
Design
- 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.
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.
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.
Coding
- 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.
- Since we want it to do the reading process continuously, not once, we take all our codes from the control tab into the continuous repeat block.
- 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.