top of page

Jewellery box

Project Purpose: To create an alarm system in the box with a light sensor and buzzer module to protect valuables of people by using the 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 light sensor module.

  • Learns to code the Buzzer module.

  • Develops algorithmic skills.

  • Coding skills develop.

 

Materials to be used:  Mblock 3 program, Pinoo control card, light sensor (LDR), buzzer module, connection cables.

 

 

 

Materials Needed for Design: An empty box, craft paper.

 

 

Project Construction:

 

Let's connect the light sensor and buzzer module to our Pinoo board. We plugged the light sensor into the 7th input and the buzzer module into the 1st input. We can also connect it to different inputs on our Pinoo control card in accordance with the colors on the sensors.

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 log in to 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 COM4. (The number may differ depending on the computer and port.)

 

After making the serial port connection, let's choose the card we will use from the cards tab. We are working with the Nano model of Arduino.

 

 

 

After selecting our card, we click on the Pinoo option from the Extensions tab. We will write our codes with the Pinoo extension.

 

In the coding section, we get the code when the Green Flag is clicked on the Events menu to start the application. To see the value of the light sensor on the screen, we get the "Hello" code from the View menu. We get the code that will read the value of the Light sensor from the Robots menu. We select the port number to which we have connected our sensor. In order to constantly see the value read by our sensor, we take the repeat code from the control menu and insert other codes into it. We see our puppet show value.

After completing our codes about the Light Sensor, let's move on to the codes of our Buzzer module, which we use to give a warning when the lid of the box is opened. First of all, let's get the code necessary for the Buzzer to make a sound from the Robots menu and select the port number it is connected to. We can choose it randomly by listening to the note part and the interval part. When the lid of the box is open, the buzzer will give an audible warning, if the lid of the box is closed, it will not give a warning. We need conditional expressions to make this system. From the control menu, we include the code, if not, repeat the code continuously. If the value read by our light sensor is greater than 500, that is, the amount of light received by the sensor increases, the buzzer will give an audible warning if the lid of the box is open. If it is less than 500, the buzzer should not give any warning. For this, we insert the size operation from the operations menu, if not, into the code. Then we enter the code that reads the value of the light sensor on the left side of the process and add the number 500 to the right.

If the value of the light sensor is greater than 500, we add the code to silence the buzzer to the relevant places so that the buzzer will warn, otherwise it will not give a warning.

 

 

After completing our codes, we check the operation of our project by clicking the green flag. When we covered the light sensor with our hands, our dummy showed a value less than 500 and the buzzer did not give any warning. When we move our hand away from the sensor, the buzzer gives a warning.

 

 

 

If there is no problem in the operation of our project, we load the codes we have written into our card to run our project with a power supply independently from 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.)

 

We are waiting for the codes to be uploaded to the card. After the installation is complete, we close the window and disconnect the Pinoo Control Card connection 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.

 

We place our circuit inside the box.

 

Finally, we hide our circuit with craft paper to make our box look more elegant. We place the light sensor on our craft paper.

ARDUINO IDE CODES:

 

int ldr = A0; // assign ldry to pin A0

int ldr_value; // We assign variable named ldr value

int buzzer = 2; // assign the buzzer to pin 2

void setup()

{

  pinMode(buzzer, OUTPUT); // is the buzzer output pin

}

void loop()

{

  ldr_value = analogRead(ldr); // we have read the value from ldr

  if (ldr_value > 500)

{

// if ldr value is greater than 500 

  // buzzer beeps at 1 second intervals  

digitalWrite(buzzer, HIGH); 

  delay(1000);  

digitalWrite(buzzer, LOW);  

delay(1000); 

}

else

{

// otherwise 

  // make the buzzer go off 

  digitalWrite(buzzer, LOW); 

}

}

1_e8202fd1-0f05-4a1f-a3e3-2b808f6440db_large.jpg
2_072be571-24a6-4ce2-9393-caf4088f279a_large.png
3_5155d083-e0d7-42ee-ab5c-4bcb1ab9db1b_large.jpg
seri_port_480x480.jpg
KART_480x480.jpg
pinooo_480x480 (2).jpg
isiksensoru_480x480.jpg
Screenshot_4_4c64813c-79ef-42ca-bf4f-885003c0095e_480x480.jpg
Screenshot_5_52851ed9-dda9-4b2e-a814-856c54b9a159_480x480.jpg
17_8ec9fc73-7549-4c28-ac3c-fe1199229187_large.png
Screenshot_6_1a609831-8e6b-4131-acc7-b4ca5656ff37_480x480.jpg
Screenshot_7_60c50ed2-35c9-4055-b0b5-b7010ae66b3f_480x480.jpg
Screenshot_8_59bbada0-b7c1-45e4-ae01-561e3a0c442d_480x480.jpg
21_a15942ea-89dc-46b4-8232-34b9f85278d5_large.jpg
22_433adfec-35bf-45dd-b908-06337f872748_large.jpg
23_large.jpg
bottom of page