loading

This is a very simple project that I have done as I don't even have time because of my exams, but after my exams I will be posting many projects where all the ideas have already been explored and they are on paper as a draft.

So this project is about a water overflow detector as before on my pond I didn't have an overflow pipe and thus when there was heavy rain my pond over flooded and then fishes and tortoise just made their way out and since I was next to a ditch they just went in there and straight to the river.

For this project the following parts list will be required.

- Intel Edison

- Water sensor

- Water pump + Hose

- Container to hold water

- Leds

Note: depending on your application you might need to have more components, in my example I will use it outdoor and control other things as well that will be included in another project so for e.g. I will need an enclosure for the intel edison to protect it from the environments elements.

Step 1: Have Your Idea and Sketch It

For me it was more of having a problem that I needed to find a solution to and I really wanted to solve it. So my idea was to have a way where when water reaches a certain level there would be some way to just control the water so that it doesn't overflow. from the sketches that you can find below are two figures 1 and 2 which show two different scenarios.

Figure one shows water level is below the sensor thus everything is okay and no action needs to be taken.

Figure two shows when the water level has reached the sensor, the light will light up and the pump will turn on to remove the excess water.

Once the idea and sketching part is done, you know where to go next.

Step 2: Gather the Parts and Assemble

Since I have already done the prototyping and programming part, I know exactly to which pins i need my components to be connected to where you can also copy the same if you intend to do it as I did.

From the picture you can see that I have already attached the parts together meaning the intel edison and the components. Since my sensor wire end came with a connector, I had to slice it in order to be able to connect them to other wires, but instead I found out that my jumper connectors would easily fit in the connector and onto the breadboard and thus no need to splice. From the picture above you will see the jumper wires connected to the sensor connector easily.

Step 3: Coding Part

This part is easy as I have used arduino to program the board and then uploaded the sketch. for those who don't know about arduino and use the intel edison as an arduino, I would advise that you do a little research on instructables.com itself as well as on arduino.cc to familiarise yourself.

Below is the complete coding with the comments so that you don't get lost and at the same time understand and also know where each components goes.

// Water overflow detector
// When water in a tank reaches a level, a light will turn on as well as a water pump. // Then when the water has decreased below the detection area the light and water pump will shut down.

// Author: Chamburn Radha 09-Nov-2015

int ledPin = 10; // Led on pin 10

int sensorPin = A0; // Sensor pin to detect water on pin A0

int pumpPin = 11; // Water pump on pin 11

int sensorValue = 0; // water sensor on Analogue pin A0

void setup() {

Serial.begin(9600); //setup serial

pinMode(ledPin, OUTPUT); //set the ledPin as output pinMode

(pumpPin, OUTPUT); //set the pumpPin as output pinMode

(sensorPin, ;;vINPUT); //set the sensorPin as input

}

void loop() {

sensorValue = analogRead(sensorPin); //read the analogue input on pin 0

Serial.println(sensorValue); // prints the sensor realtime value on serial monitor

if (sensorValue <= 100) // if the value from the sensor is less or equal to 100

{ digitalWrite(ledPin, HIGH); // turn ledPin on pin 10 to off

digitalWrite(pumpPin, HIGH); // turn pumpPin on pin 11 to off

} else (sensorValue >= 300); // if the value from the sensor is greater or equal to 300

{ digitalWrite(ledPin, LOW); // turn ledPin on pin 10 to on

digitalWrite(pumpPin, LOW); // turn pumpPin on pin 11 to on

}

}

That's it for the coding part just copy the whole thing and verify and then select your board and com and then upload.

This project was done within two hours as I am so busy with my exams but after my exams I will make a much better and bigger projects with videos and more details, hope that it can help someone who just needs something simple or even can use the coding part for some other projects.

About This Instructable

664views

14favorites

License:

Bio: I only got one life, so why choose the same path as most people . I'd rather venture into many things. tinker with to discover ... More »
More by Chamburn:Led Light Panel  Ramp/Bridge Ramp/Platform to Roll Wheel barrow 
Add instructable to: