Smart Ramp with Pinoo

Project Purpose: To make a safe pedestrian crossing project by using ultrasonic distance sensor and servo motor with Pinoo control card.


Duration: 2 lessons


Age Group: 9 years old and over

Pinoo Set: Basic Set, invention set, maker set and full set.


  • Learns to code Pinoo control card.
  • Learns to use ultrasonic distance sensor.
  • Learns to use servo motor.
  • Algorithm building skill develops.
  • Coding skill improves.


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


Materials Required for Design: Black cardboard, black carton, utility knife, scissors, tongue stick, mirror cardboard, white electrical tape, plastic or cardboard cup, silicone gun and silicone.


Project Preparation:


1. For our project, let's start by designing the road first. We will use black cardboard when designing the road. Let's create the floor with black cardboard.



We cut a piece of black cardboard into a rectangle.



We make the road and pedestrian crossing with white tape on the piece of black cardboard we cut.


We cut the tongue bar according to the pedestrian crossing with scissors.



We cut out a piece of mirrored cardboard according to our tongue stick.


We bend the piece we cut to give the image of a ramp and stick it to the tongue stick.


Since the ramp pedestrian crossing will exit from the next side of the car, we make a cut from the next side with a utility knife.




We cut the part where the ramp will go as in the picture.



We stick the plastic cups to raise the bottom of our path where we will install the ramp system and put the materials.



We cut the tongue bar with scissors to maintain control between the servo motor and the ramp.



We stick the tongue stick we cut to the servo motor as in the picture. (The direction of the tongue stick is important)




We glue the servo motor to the glass in the middle with the tip of the tongue stick to the cut area and the curved part to the cut.



We stick our ramp to the tip of the tongue stick as in the picture.



In order to keep our road stable, we fix 4 glasses on black carton close to a pedestrian crossing with a silicone gun.



This is how we completed the bottom view of our ramp.





We fix the ultrasonic distance sensor with a silicone gun as in the picture. We place our Pinoo card at the bottom of our path. Then, we connect the servo motor and distance sensor to the Pinoo card with RJ-11 connection cable and we finish our design in this way.


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 opened window and select the "COM6" option from the page that opens.

NOTE: Since the port entries of each computer are different, the numbers next to COM text can vary.



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 part:


 First, to check whether our ultrasonic distance sensor is working or not, we check the working status of the distance sensor with our 'Say Hello' code under the 'When Clicked' code on our panda puppet.



 We run the servo motor under the "key is pressed" command to start it. Since the servo motor works between 0 and 180 degrees, we are trying both angles.




Yes, after we see that our sensor and motor are working, we define a variable named 'angle' from the Data & Block section to keep our servo motor moving slowly, that is, to keep our angle values.



If the value of our distance sensor is less than 10 cm, that is, when we see the car, our servo motor will come to 20 degrees and to ensure slow motion, our value will decrease by 1 in a second until our pain variable becomes 0, and each time our servo motor will come to the angle of our pain variable. When our last pain variable is 0, the barrier will wait 5 seconds for the pedestrian to cross and allow the vehicle to pass. If no vehicle is passing, the servo motor angle will remain at 20 degrees.


 IMPORTANT: Be sure to try your angles, each example may have different angles. The reason for this is the servo motor fit.




In order to upload our codes to the Pinoo sensor card, we make the "Pinoo Program" command at the beginning of the event.



We right click on the "Pinoo Program" command and select the "Upload to Arduino" option in the window that opens.




On the page that opens, we click the "Upload to Arduino" button selected in red.



Our codes are uploaded to our Pinoo sensor card.



We click on the "Close" button after the "Download Finished" text appears. After the installation is finished, the battery compartment is inserted and the project is run.


Working Status of the Project:



When any vehicle passes in front of the ultrasonic distance sensor, our ramp will slowly rise and the vehicle will slow down. See you in another project.



With Pinoo sets, children can make hundreds of projects with materials they can easily find in their homes.