Conveyor System With Pinoo
Purpose of the Project: To create a conveyor system with distance sensor, servo motor and dc motor using the Pinoo control card.
Duration: 2 lessons
Age Group: 7 years and older
Benefits:
• Learns to code Pinoo control card
• Learns to code the distance sensor.
• Learns to code the servo motor module.
• 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, servo motor and module, 2 dc motors and wheels, connection cable
Materials Required for Design: Cardboard, colored cardboard, forex, scissors, silicon gun, paint, any material you want to decorate
Project Preparation:
- Cut a rectangular piece of 30x10 cm from forex.
- We mark and drill the areas where we will fix the motor in the right and left areas of the rectangle. (Let's forget to drill a hole in the motor cable.)
-
Based on the holes we have drilled, we fix the motors with a silicone gun.
-
We cut a 32 x 24 cm rectangular piece from forex. This piece will be our ground.
-
We paint the floor with paint and color it. We fix the rectangular part where the motors are attached to the middle part of the floor.
-
We create strips with a silicon gun to increase the friction force on the tire. Then we attach the wheels to the motors.
- We cut a 65 x 9 cm rectangular strip from the cardboard. The cut strip will be the belt of the conveyor. (The measurement we give here is based on the distance of the motors to each other. You can create a different size according to your own layout.)
- We glue the two ends of the strip together and pass through the tires.
- Cut a piece of forex measuring 7.5 x 6.5 cm. We open a distance sensor-sized window in the middle and place the sensor.
- We create a wall around the part that we fixed the sensor. We cut a 13 x 6 cm rectangle from forex to ensure the height of the band and fix it under the part where the sensor is.
- We fix the distance sensor stand we created to the motor wall.
-
12. Cut a 13.5 x 1 cm rectangular strip from forex. We fix this part to the propeller of the servo motor.
-
We cut two rectangles of 13 x 1 cm from cardboard so that the servo motor can push the product to the front of the servo motor more powerfully. We fix this part vertically to the right and left of the strip that we fix to the propeller of the servo motor.
- We fix the servo motor distance sensor 10 cm away from the place where we fixed it. You can change these dimensions according to your own location.
- We form 4x4 and 2x2 cm cubes from cardboard. These cubes will be our products.
- We decorate the conveyor as we wish.
- Let's make our connections. We fix our Pinoo board behind the motor wall. We connect the motor cable to the white inputs suitable for the motor, the distance sensor to the purple / green input number 6, and the servo motor to the 1 (purple) input with a connection 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 a 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 according to 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 type "Pinoo" in the search engine and click download to the result. It has been installed on our computer.
- We come to the Extensions tab again and click on 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.
- After clicking the green flag, we want the conveyor belt to run continuously. For this, we take the ‘’Pinoo Bot: Direction: Forward Speed: 0’’ code block from the Robots tab and change the Speed section to 150.
- In order to run the band and all other operations that we will add later, we take the code block from the Control tab continuously and insert the block related to the Pinoo Bot.
- At the beginning, we need to set the angle of the servo motor as 0 in order to allow the small products to move without obstacles along the belt. From the Robots tab, we get the ‘’Pinoo Servo Motor Run: Pin Pinoo1 Pain 0’’ code block.
- We will use the values measured by the distance sensor in order to separate the large products on the belt. 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 the values. Then, let's place the bigger box under the sensor and take note of the value read by the sensor. We will reference that it reads a value of around 6 here.
If the value read by the distance sensor is less than 6, that is, if a large product passes over the band, let the servo motor work at an angle of 70 degrees. Now let's put this into a code.
Here we will use the if block in the Control tab and the small comparison operator from the Operations tab.
- If the condition is met, we want the servo motor to make a 70 degree angle. From the Robots tab, we get the ‘’Pinoo Servo Motor Run: Pin Pinoo1 Pain 0’’ code block. We change the angle value to 75.
- After the servo motor angle value is 75, we receive the wait 1 second command from the Control tab so that the motor can stay in this position for 2 seconds. We change the 1 second expression to 2 seconds.
- We place our condition statement inside the continuous repeat block.
-
After completing our codes, we check the operation of our project by clicking the green flag. We leave the products one by one on the belt. After the product passes under the distance sensor, if the rod of the servo motor is large, it should come on the belt and throw the product from the band. Even if the product is small, the product should complete the band without hindrance.
(If you have problems at the point where the servo motor's propeller comes on the belt, you can remove the propeller and install it in the appropriate position.)
-
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 on Upload to Arduino. (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 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 on the on / off button next to the battery input.