top of page

Parking sensor

Project Purpose: Creating a parking sensor project with buzzer module, led module and distance sensor using Pinoo Control Card.

Duration:  2 lessons

Age group:  7 years and older

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

Achievements:

  • Learn to code Pinoo control board

  • Learns to code the distance sensor.

  • Learns to code the Buzzer module.

  • Learns to code the led module.

  • Develops algorithmic skills.

  • Coding skills develop.

  • Understands the working logic of parking sensors.  

 

Materials to be used:  Mblock 3 program, Pinoo control card, distance sensor, buzzer module, led module, connection cable.

 

 

Materials Required for Design:  Car and wall made of legos, scissors, glue gun and glue, grass, black cardboard, double-sided tape, box.

NOTE: Instead of Lego, you can make a car from consumables or use a toy car.

 

        

Project Construction:

 

 

We mount the distance sensor on the back of the car with the help of a silicone gun.

 

 

 

 

 

 

 

 

 

We stick double-sided tape on the back of the distance sensor.

 

Then we stick the buzzer module on the double-sided tape.

 

 

 

 

 

 

 

 

 

 

 

We stick double-sided tape on the cable entry part of the distance sensor.

 

Then we mount the led module on the double-sided tape.    

 

 

 

 

 

 

 

 

 

 

 

We cover the car and decorate it a little so that the design is beautiful. We are careful not to completely destroy the LED.  

 

 

 

 

 

 

 

 

 

 

 

We make our connections. We connect the distance sensor to the purple/green input number 5 with the connecting cable. We connect the buzzer module to port 3 and the led module to purple input number 4.

 

We take the box.

 

With the help of a silicone gun, we stick the black cardboard on the top of the box. Thus, we prepare the way.

 

We stick grass on both sides of the road with the help of a silicone gun.  

 

We mount the wall we made at the end of the road with the help of a silicone gun.  

 

We mount the Pinoo control board on the side of the box with the help of a silicone gun.

 

 

We have completed our connections and design, now we are going to the coding part. We will use the mblock-3 application for this.

 

 

We connect our Pinoo Control Card to the computer with the help of the connection cable and log in to the Mblock3 application. Then we 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 COM4. (The number may differ depending on the computer and port.)

 

 

After connecting the serial port, we select the card we will use from the Cards tab. We are working with the Nano model of Arduino.

 

 

 

 

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 it is enough to say download to the result. Installed on our computer.  

 

  In the coding part; We get the code when we click on the Green Flag from the Events menu to start the application.

 

We will get help from the dummy to learn the value read by the distance sensor. For this, we get the "say hello" command from the view tab. Instead of hello, we get the code block related to the distance sensor from the robots tab. We change the pin input to Pinoo5, which we connect to.

Since we want the reading process to be done continuously, not once, we take all our codes into the repeat block from the control tab.

 

 

We click on the green flag and observe the change of values by moving our hand closer to the sensor.  

 

  When the Space key is pressed from the Events menu, we get two of the code. Then we click on the small triangle next to the space text and change one to a down arrow and the other to an up arrow. We get the led module code from the Robots tab and change the pin part to pinoo 4. Up arrow key will light the led, down arrow key will turn the led off. We control the led module by pressing the keys.

 

We get the command when another space key is pressed. We get our buzzer module code from the Robots tab and change the pin part to pinoo 3. We choose the note part we want. We activate the buzzer module by pressing the spacebar. 

In order to make a parking sensor, we will code the different distances measured by the distance sensor. At each distance, the led module and the buzzer module will work differently. Now let's turn this into code.

 

First of all, we will code the cases where the value measured by the distance sensor is between 10 and 15. For this, we get the if command from the control menu. From the operations and, we take the less than, greater than comparison signs and nest them. Then we code it to be greater than 10 and less than 15.

 

If the value measured by the distance sensor is between 10 and 15, we code continuously with 0.4 second intervals so that the buzzer module is active and the led module is on, then the buzzer module is passive and the led module is off. To put a wait, we get the 1 second wait code from the control tab and change the number 1.

 

We continue by opening another condition statement under the codes we have written.  If the value measured by the distance sensor is between 5 and 10, we code the buzzer module and the led module as whether they are active or passive at 0.2 second intervals.

 

If the value measured by the distance sensor is between 0 and 5, we are coding so that the led module and the buzzer module are constantly active.

 

Then we encode the continuous passive state of the buzzer and led modules when the distance sensor is equal to 0 and greater than 15.

NOTE: The distance sensor can measure up to 4 meters. It cannot measure beyond 4 meters and shows 0. We also encode the case where it is equal to 0 so that there is no logic error in the encoding.

After completing our codes, we check the operation of our project by clicking the green flag.

 

 

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 supply independent of the computer.

For this, we get the Pinoo Program code from the Robots menu by throwing the code we used at the beginning to click on the green flag and the code that we made the dummy say the sensor value.

 

 

Right click on the code and click Upload to Arduino. (We work with arduino as a board.)

 

In the window that opens, we click the Upload to Arduino button again.  

 

We are waiting while our codes are loaded on the card. After we say the download is finished, we click the close button.

If there is no problem, we unplug our power cable from the computer. We power our Pinoo Control board with the help of 9v battery and battery cap. We also bring the on-off button, which is right next to the battery input, to the on position.  

 

Working Status of the Project:

 

 

When there is no obstacle in front of the distance sensor, the buzzer module and the led module are passive.

 

 

Buzzer module and led module are active when there is an obstacle in front of the distance sensor.

1.JPG
2.JPG
4.JPG
3.JPG
5.JPG
6.JPG
7.JPG
8.JPG
9.JPG
10.JPG
11.JPG
bottom of page