WELL SYSTEM WITH PINOO

Purpose of the Project: Using the Pinoo Control Card, a water sensor and a DC motor, if the water level in the well is at a certain level, the DC motor will operate and our bucket will take water and bring it up.

Duration: 2 lessons

Age Group: 9 years and above

Gains:

• Learns to code Pinoo control card.

• Learns to use a water sensor.

• Learns to use DC motor.

• Improves the skill of setting up algorithms.

• Improves coding skill.

Materials to be used: Mblock 3 program, pinoo control card, water sensor, DC motor, RJ-11 connection cables.
 
 
Materials Required for Design: Black cardboard, utility knife, scissors, tongue stick, cologne cap, wooden skewer stick, plastic box, brown felt (may not be used), silicone gun and silicone.
 
 

Project Preparation:

1. For our project, let's start by covering our plastic box with black cardboard.

We cut the black cardboard according to the dimensions of our box.
 
 
We cut the black cardboards to the same size as the surfaces of our box.
 
 
We drill a hole on the side of our box with the help of a utility knife so that our water sensor passes.
 
 

We will use tongue sticks to support our cover, which will act as a bucket, from the top. We make mutual incisions for the tongue sticks with the help of a utility knife as in the picture.

 

 
 
We cut the ends of the tongue sticks to keep them more secure.
 
 
We stick white electrical tape and stone-shaped tapes to our box to give the appearance of a well.
 
 
We fix the tongue sticks with the help of a silicone gun as in the picture.
 
We cut our wooden skewers for the handle of our bucket as in the picture..
 
 
Tahta şiş çubuklarımızı kovamıza şekildeki gibi sabitliyoruz.
 
 
We fix our wooden skewers to our bucket as shown in the figure.
 
 
We fix our DC motor so that the rope we will shake is in the middle of the bucket.
 
 
We attach a rope to our bucket as in the picture and tie the end.
 
 
We place the water sensor in the incision we made.
 
 
In order to give weight to our bucket, we stick the tongue stick on the bottom of the bucket and put the stones close to each other.
 
 
We use a tape to fix the stones.
 
 
We fill our bucket up to the water sensor. Then we connect our water sensor and DC motor to the Pinoo control card and after connecting the Pinoo control card and the USB cable to the computer, we finish our design part.
 
 
 

2.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.

 

 
 
 
  1. 3.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.

 

4. Coding part:

First, to check whether our water sensor is working or not, we check the working status of the water sensor with our 'Say Hello' code under the 'When Clicked' code on our panda puppet.
 
First, we read the value of our water level sensor with the help of a dummy. If the value of our water level sensor is greater than 250, our DC motor will lower our bucket for 3 seconds, then wait 5 seconds, and our bucket will go up for 3.5 seconds and wait for 5 seconds. If our value is below 250, our DC motor will not work.
 
 

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 on 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.

 

5. Working Status of the Project:

 
 
ARDUINO IDE KODLARI:
// motor pinlerini tanımladık
int motora1 = 5;
int motora2 = 6;

int su_sensor = A0; // su sensorunu A0 pinene atadık
int su_sensor_deger; // değişken atadık

void setup() {
  // motor pinleri çıkış pinidir
  pinMode(motora1, OUTPUT);
  pinMode(motora2, OUTPUT);

}

void loop() {
  su_sensor_deger = analogRead(su_sensor); // su sensorundan deger okuma yaptık

  if (su_sensor_deger > 250) { // eger deger 250den büyükse
    // motor aşağı insin ve  beklesin
    digitalWrite(motora1, LOW);
    digitalWrite(motora2, HIGH);
    delay(3500);
    digitalWrite(motora1, LOW);
    digitalWrite(motora2, LOW);
    delay(5000);
  } else { // aksi taktirde
    // yukarı çıksın
    digitalWrite(motora1, HIGH);
    digitalWrite(motora2, LOW);
    delay(3500);
    digitalWrite(motora1, LOW);
    digitalWrite(motora2, LOW);
    delay(5000);
  }

}