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.
Project Preparation:
1. For our project, let's start by covering our plastic box with black cardboard.
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.
2.Adding Pinoo extension:
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.
- 3.Connecting the Pinoo sensor board to the computer:
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 "Firmware Update" from the window that opens.
4. Coding part:
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.
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);
}
}