Water Wheel With Speedometer DIY

by rickyneunen in Workshop > Science

540 Views, 0 Favorites, 0 Comments

Water Wheel With Speedometer DIY

IMG_5123.jpg

In this instructable we are going to build a water wheel which can measure the speed of water. At the end of the instructable you will have a water wheel with speedometer which can measure:

  • The RPM-value of the wheel
  • The velocity of the water

Wiring

What do we need:

  • Arduino Uno
  • 16x2 LCD Screen
  • Potentiometer
  • Hall effect meter
  • bunch of male-male wires
  • Male-female jumper wires
  • breadboard
  • Battery pack

Since we used tutorials ourselves to wire the LCD and Hall effect meter, we will redirect you to the YouTube tutorials we used.

Arduino LCD Tutorial | How to Control an LCD:

You can change which Arduino Pins your LCDs connect to, like we did. Just make sure that you change an PWM pin to another PWM pin, an ANALOG pin to another ANALOG pin and regular Digital pins to another digital pin (Including PWM pins). Also don’t forget to change the pins in your Arduino code.

Arduino Uno Tachometer RPM using 3144 Hall Effect Sensor

Because in our design the Hall effect sensor is on the floatation device but the Arduino, LCD and breadboard are not, it is necessary to use a pretty long wire from the Hall effect sensor to the Arduino. We solved this problem by stacking a bunch of male-female jumper Cables in series.

At the places where the cables connect to each other you can cover the connection with some ducttape to hold them together better and to protect against splashing water.

Also make sure that the Hall Effect sensor is made waterproof. You can do this by placing it in a small plastic bag and sealing it with duct tape.

It is important to have the Hall effect sensor in Pin 2 or 3 on the Arduino UNO (Or Arduino Nano, Mini and other 328-based Arduinos). This is because you will use the function attachInterupt() and detachInterrupt() in the Arduino code. These functions only work with these two pins.

https://www.arduino.cc/reference/en/language/funct...

Code

For the Arduino code we used the same tutorial for wiring the Hall effect meter.

The only thing we added is the calculations for the velocity. Here we calculate the circumference 2*pi*r multiply this with the RPM rounds per minute and divide by 60 so the velocity is in m/s. This value we multiply with a scaling factor. This factor consists of the radius of the magnet and the radius of the paddles. We do this because the hall effect sensor measures the magnet which is at another radius from the rotation axis than the paddles are. For more explanation about the code you can watch the tutorial video we used or maybe the comments I added are enough.

//#include

#define DISPLAY_W 16

#include

LiquidCrystal lcd(13, 10, 5, 7, 3, 4);

//LiquidCrystal_I2C lcd(0x27,DISPLAY_W,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

//SDA is Analog pin 4 on UNO

//SCL is Analog pin 5 on UNO

float revolutions=0; // create variables which have starting value 0

long rpm=0;

long startTime=0;

long elapsedTime;

float velocity = 0;

void setup()

{

pinMode(2, INPUT_PULLUP); // set pin to input PIN 2 (this is the Hall effect sensor)

lcd.begin(16,2);

//lcd.init();

//lcd.backlight();

lcd.display(); // turn display on

lcd.setCursor(0,0); //se the place where you want to print

lcd.print("RPM :");

lcd.setCursor(0,1);

lcd.print("Velocity:");

Serial.begin(9600);

}

void loop() {

revolutions=0; rpm=0;

//velocity = 0;

startTime=millis();

attachInterrupt(digitalPinToInterrupt(2),interruptFunction,RISING); //when the interrupt on pin 2 receives a RISING signal(from OFF going to ON) (magnet passes) the code jumps to interruptFunction

delay(5000); //don't make this delay too short

detachInterrupt(2); //stop the interruptFunction and start executing the lines of code beneath this.

//now let's see how many counts we've had from the hall effect sensor and calc the RPM

elapsedTime=millis()-startTime; //finds the time that has passed

if(revolutions>0)

{

rpm=(max(1, revolutions) * 60000) / elapsedTime; //calculates rpm the max(1,revolutions) is so you wont get an error by dividing by 0

}

lcd.setCursor(0,0);

String outMsg = String("RPM :") + rpm;

fillMessage2DisplayWidth(outMsg);

lcd.print(outMsg); // print the values of rpm onto the LCD

Serial.println(outMsg);

///calculate and print the velocity

velocity = ((2*3.14*(0.035*rpm)/60)*(0.09/0.035)); ////radius magnet = 3,5 cm = 0,035 m & radius paddles = 9 cm = 0,09m

lcd.setCursor(0,1);

String outMsg2 = String("Velocity:") + velocity; //String("Test");

fillMessage2DisplayWidth(outMsg2);

lcd.print(outMsg2);

Serial.println(outMsg2); /// print the values of the calculated velocity onto the LCD

Serial.println(revolutions);

}

void interruptFunction() //interrupt service routine

{

revolutions++; //increment the number of revolutions by 1

}

void fillMessage2DisplayWidth(String & message) //this is to neatly fill the prints onto the display

{

if(message.length()

{

while(message.length()

{

message+=" ";

}

return;

}

//message is too wide for 1 line of the display, truncate it

message = message.substring(0, DISPLAY_W-1);

}

Building the Water Wheel

IMG_5121.JPG

What do we need:

  • Floating materials (like water bottles, about 4 pieces)
  • 2 pvc pipes of different diameter (for example: 16 and 19 mm)
  • Ducktape
  • 7 or 8 Plastic/wooden spoons
  • Styrofoam
  • Small rope

Building the water wheel requires some creativity but we will try to explain it as precisely as possible.

  1. First you have to connect the bottles 2 by 2. You could do this with ducktape and a piece of pvc. After that you have to attach the 2 by 2 , so that it will look like a square. You have to make sure that this part is stable as this will be the foundation of your waterwheel.
  2. Now you are going to build the rotational axis of the water wheel. Therefore you have to cut off a small piece of both pvc pipes. The small pipe must be attached to the bottles, and the large pipe should be freely to move around the small pipe.
  3. In the third step you have to invent the water wheel. You could do this by making a round circle out of styrofoam. After that you put 7 or 8 spoons in the water wheel which should act as blades of the wheel. Make sure that half of the blades are in the water.

After the third step you are done with building the water wheel. You only have to make sure that when you test the water wheel it does not float away. To prevent this you can tie it with ropes.