Introduction: Linkit One: Water Level Indicator

Picture of Linkit One: Water Level Indicator

In this project we will learn on making water level indikator using linkit one board. This project could help you save water more efficient.

There will be 3 led indicating different water level.

Step 1: Material

Picture of Material

For this project we will use:

  • linkit one board
  • 3 LED (Red, Yellow, Green)
  • 4 Male to Male Jumper wire
  • 3 Male to Female Jumper wire
  • 3 330 ohm resistor
  • Breadboard
  • Micro USB Cable
  • Water Level Sensor

Step 2: Hardware and Software Setup

Picture of Hardware and Software Setup

Setup the linkit one board using this link or this llink. If you done doing the setup then we will make the connection between the water sensor and other components with the linkit one board.

Make the connection just like in the picture.

Pin 8 ----->Green LED

Pin 9 -----> Yellow LED

Pin 10 ----->Red LED

For the water sensor.

Pin A0 ----->S

5v ----------->+

GND--------->-

when all the connection is set. we will proceed to the code

Step 3: The Code

the code consist of analog reading that trigger the led when the set to a certain level:

int red = 10;
int yellow = 9; int green = 8;

void setup() { Serial.begin(9600); pinMode(red, OUTPUT); pinMode(yellow, OUTPUT); pinMode(green, OUTPUT);

}

void loop() {

int sensorValue = analogRead(A0); if (sensorValue <=480){ digitalWrite(green, HIGH); digitalWrite(yellow, LOW); digitalWrite(red, LOW); } else if (sensorValue >=480 && sensorValue <=530){ digitalWrite(red, LOW); digitalWrite(yellow, HIGH); digitalWrite(green, LOW); } else if (sensorValue >=530){ digitalWrite(green, LOW); digitalWrite(yellow, LOW); digitalWrite(red, HIGH); } Serial.println(sensorValue); delay(1);

}

Upload the code above to your linkit one board and we will proceed to the final step

Step 4: Test It

Picture of Test It

to know the value from the sensor, you can open the serial monitor from Arduino IDE.

to test the sensor and see if the code working well. I grab a glass of water put water sensor in the glass and see the data is chaning.

When the value is below 480, the green LED turn on. that mean the sensor not reading so much water

When the value is above 480 and below 530, the yellow LED turn on. that mean the sensor reading normal water level

When the value is above 530, the red LED turn on. that mean the sensor reading too much water.

Hope this tutorial will make you understand about the water level sensor and could develop it into another project

Comments

About This Instructable

1,301views

11favorites

License:

More by chalei:Linkit One IoT: Sending SMS without SIM CardLinkit One: Blowing an LEDLinkit One: Debounce button
Add instructable to: