The Ebb-And-Flood-Meter measures if the difference in flow direction during ebb and flood. At the turning point between ebb and flood, so when there is no flow, the device will also indicate this. So in total there are three possibilities: no flow, ebbflow (flow directed to the sea), floodflow (flow directed to the land).

## Step 1: Measurement:

Determines the turning point between ebb and flood by measuring the flow direction.

## Step 2: How to Use:

- Make sure the styrofoam fin is pointing upwards(by holding it).

- The leds have to point to your face.

- Put the device with the fin below into the water.

- The fin must be fully under water.

- Now you can let go the fin.

Situations:

· Led 1 glows (green): there is no flow of water

· Led 2 glows(red): the water flows to the left

· Led 3 glows(red): the water flows to the right

## Step 3: Needed Components:

- 1x Arduino kit (UNO)

- 2x green led

- 1x red led

- 3x 120 ohm resistance (led resistances)

- 2x magnetic sensor(if a magnet is nearby, the sensor gives ‘1’, if no magnet is nearby, the sensor gives ‘0’, also called a REED sensor )

- 2x (at least) 5 k ohm resistance (resistances needed for the magnetic sensor)

- 20x short wire (to conduct electricity)

- 5x long wire (to conduct electricity)

- duct tape

- 1x wooden beam (80x7x2cm)

- 2x wooden beam (40x7x2cm)

- 2x wooden beam (20x1x1cm)

- 1x wooden beam (30x5x2cm)

- 1x Styrofoam fin (homemade)

- 1x steel axis (20cm long, 1mm Diameter)

- enough screws

- tie raps

- 1x magnet

- glue

## Step 4: How to Build:

- Construct the wooden frame (see pictures)

- drill two holes in each of the wooden beams and place the steel axis in between

- Attach magnet to styrofoam fin

- Put styrofoam fin on steel axis

- Connect the magnetic sensors to long wires

- Make sure these sensors are not in contact with water, using the waterproof tubes (think about the end of the tube, put glue in it)

- Connect the sensors to the Arduino Device at Digital Pin 2 and 3

- Connect the leds(use resistances!):

· Red: Digital Pin 8

· Green: Digital Pin 9

· Red: Digital Pin 10

## Step 5: Code + Pictures

Code:

/*

**************This code can be used for the Ebb and Flood meter**************

- measurement can be -1, 0 or 1.

*/

float measurement =0.0;

int flow = 0;

boolean passingLinks=false;

boolean passingRechts=false;

void setup(){

Serial.begin(9600);

pinMode(2,INPUT);

pinMode(3,INPUT);

pinMode(10, OUTPUT);

pinMode(9, OUTPUT);

pinMode(8, OUTPUT);

}

void loop(){

int sensorLinks=digitalRead(2);

int sensorRechts=digitalRead(3);

if ((sensorLinks==1) && (passingLinks==false)){

switch (flow){

case 0:

flow = -1;

break;

case -1:

flow = 0;

break;

}

passingLinks=true;

delay(200);

} else if((sensorLinks==0) && (passingLinks==true)){

passingLinks=false;

}

if ((sensorRechts==1) && (passingRechts==false)){

switch (flow){

case 0:

flow = 1;

break;

case 1:

flow = 0;

break;

}

passingRechts=true;

delay(200);

} else if((sensorRechts==0) && (passingRechts==true)){

passingRechts=false;

}

if ((millis()%1000)<10){

Serial.print("flow: ");

Serial.println(flow);

if (flow==1){

digitalWrite(8,LOW);

digitalWrite(9,LOW);

digitalWrite(10, HIGH);

}

else if (flow==0){

digitalWrite(8,LOW);

digitalWrite(9,HIGH);

digitalWrite(10,LOW);

}

else if (flow==-1){

digitalWrite(8,HIGH);

digitalWrite(9,LOW);

digitalWrite(10,LOW);

}

delay(10);

}

measurement=(float)flow;

}

Images:

## Step 6:

<p>Very impressive work!</p>

### About This Instructable

415views

3favorites

License:

More by BartFlowMeter:
Add instructable to: