Introduction: Flow Meter
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
My project is The Flow Meter. This device allows a user to measure water flow through a turbine, while opening and closing the valve by pressing certain buttons on an Infrared (IR) remote control. The project was designed to be a demonstration piece which could be used later date to help explain the concept of flow meters and magnetic induction to k-12 grade students.
Step 1: Overview
Overview of Instructions:
2. Gather Materials
3. Print 3D Parts
4. Construct Bread-boarded Circuit
5. Enter the code
6. Assemble the turbine
7. Mount turbine, valve, and servo
8. Construct Upper Reservoir
9. Construct Base
10. Attach Control Box
11. Position the Hall Effect Sensor (HES)
12. Test the servo and IR control circuit
1. Check the Plumbing
10. Test the HES and determine Flow Constant
Step 2: Gather Materials
There is quite a shopping list for this project, but you probably already own some of it. Most cities have a "Maker" club or organization, where you can get access to tools like the 3-D printer without having to buy one yourself.
Tools you need:
1. Screw drivers, 1 large and 1 small Phillips head
2. Power drill, with #2 & #4 Phillips bits and 1/8" drill bit for wood
3. Hole Saw, additional attachment for power drill
4. Jig Saw or Table Saw with wood cutting blade
5. 3-D Printer, capable of printing 2color ABS/PLA w/ dissolvable supports
6. Junky wood-handled kitchen and/or hobby knife set
7. Laptop computer with Arduino code-editing software installed
Optional Tools: Angle grinder, Sandpaper
2 gallon, sturdy plastic jug (I used the kind that cat litter comes in.)
Plastic footstool, approx. 12"x9"x9" (LWH)
Thru-hull/ flange, 3/4"
Hose adapter for thru-hull, male/male 3/4" ID, 1"OD
10' or shorter standard garden hose
Hose repair kit (if shortening)
1/2"x3/8" Hose bib
1" 2-hole L-brackets, 2ct
Pipe strap: 3/4" metal, 2 hole (10pk) + 3/4" plastic, hanger strap (roll)
3/4" #8 Phillips head screws, (50pk, you will use these throughout)
4"-6" lengths of 1"x2" PTP or other wood, 2ct
Plywood/other board, 18"x18"
1"x3", ~0.1" thick foam padding
Plywood/other Boards, 24"x30", and 24"x18"
XL metal L-brackets, 2ct
1 1/4" #8 Phillips head screws, dozen or so
1 gallon, graduated/ clear jug
6"x8"x2" black plastic box with tight fitting lid
Standard Servo, Radio-Shack
I2C LCD display (comes with Arduino kit)
US 1881 Melexis Latching Hall Effect Sensor
IRM-3638 IR receiver and YK-001 IR remote (comes with Arduino kit)
USB cable, 2' to 6' length (the longer the better!)
Small solder-less breadboards with adhesive backing, 2 ct
10k Ohm resistor
22 AWG plastic coated wires and wire connectors, assortment
1 & 1/4" ID Clear PVC Pipe, 3" length
XS Neodymium Ring Magnets, 3 ct
Small metal springs, 2"-3" length, 2ct
1/8" diameter metal pin (I took mine off the wire rack of a toaster oven)
Small metal bead with a wide enough hole to fit onto the metal pin
Exterior grade silicon
Additional screws for mounting Arduino/LCD to box (1/2" #4 machine screws)
2" Clear Packing tape for sealing LCD mount
1oz plastic bag
1-2 small rubber bands
Step 3: Print 3-D Parts
Please see attached for the files you need to 3-D print the helical turbine and the tubes it is mounted between. The turbine (given in a .stl file) should be 34mm in diameter and 70mm in height. You will need to print the tubes (given in a .x3g file) on a MakerBot Replicator 2. Look up your local "Maker's" club or organization to get access to a 3-D printer. Because the helical turbine has fine detail and hanging structure, it is best printed with dissolvable support structure. If this is not available, you will need to be very careful removing support structures to avoid damaging the part! I used the Stratasys - uPrint SE Plus for the final print on the turbine and it came out great!
Step 4: Construct Breadboarded Circuit
Checkout the uploaded image (Fritzing Diagram) for the detailed wiring of parts. Use the wiring diagram for the Melexis US1881 Hall Effect Sensor listed here: http://bildr.org/2011/04/various-hall-effect-sens...
The IR receiver I used is the IRM-3638. See the data sheet listed here for its pin diagram:
The YwRobot Arduino IIC LCD (aka: I2C LCD) has the pin layout listed on the back of the part. It is quite easy to just plug it into the bread board where the wires connect, but you will have to unplug it later for mounting purposes.
Make sure you get the standard servo and not the micro servo. The micro did not have enough power to turn even the smallest valve I could find. If you step up in size to a larger servo you will need to look into external power supplies.
Arduino input/output pins: HES Output to digital pin 2, Servo Input to digital pin 9, IR receiver Output to digital pin 11, and LED 13 (built-in to the Arduino - nothing to wire).
Step 5: Enter the Code...
Arduino Code is attached: hes_FRANKENCODE_REBORN.ino
You will also need to download the attached IRremote.zip and LiquidCrystal_i2c.zip libraries and add them to your folder and to your list of libraries in the Arduino software. For more information on libraries please visit:
Step 6: Assemble Turbine
The turbine assembly is constructed by attaching 2 pairs of hose clamps to each of the 3D printed tubes: the first just inside the set of ridges and the second on top of the ridges hanging off the edge by about 1/8". Tighten just until snug. Connect one end of each spring to the first set of hose clamps, on opposite sides of the tube. Connect the other end of each spring to the other tube in the same fashion.
Double check the length of the pin against the 1&1/4" clear pvc pipe. The pin should be just a bit longer, no more than 2mm. Sand down the edge of the pvc to specs if needed. Attach the magnets to the turbine and glue in place.
Insert the pin into the small hole at the end of the Y-shaped end to one of the 3D printed tubes. If the pin is a little too big use the power drill and a very small bit to widen the hole. Do not drill it all the way through. Slide the metal bead and then the turbine, magnets first, onto the pin. Slide the clear pvc pipe around the turbine. Firmly holding this arrangement in place, stretch the other 3D printed tube up and over the end of the clear pvc. Line up the the pin and insert into the hole in the Y bracket of the second tube. Using plumber's putty, position the clear pvc in the exact middle of either end of the tube.
Step 7: Mount the Servo/valve/turbine Combo
Attach both 1"x2"x4" wood piece as shown in image. Mount servo and hose bib using brackets and pipe strap fitting snug together. If they are not mounted close enough, the servo will slip off the handle of the hose bib and not turn correctly. Mounted to tightly together you might damage the servo, or it could have too much friction to turn properly. You'll probably have to adjust it a few times.
Attach assembled turbine next to outflow of hose bib using large pipe straps as shown in image. Add foam shims as needed to keep turbine firmly in place without compression on the tubes.
Screw threaded hose barb onto outflow end of the hose bib. Slide on 1/2" clear tubing and attach with a small hose clamp. Use small pipe strap to direct clear tubing into turbine assembly as shown in image. Be careful mounting the small tube. A little extra water flow never hurts, but if you drop a metal screw down the turbine you will have to entirely disassemble it to get the screw back. These neodynium magnets are wicked strong!
Step 8: Construct Base
Using L-brackets, attach 14"x20" board (back plate) perpendicular to 18"x18" board (bottom). Screw mounting board to assembly.
Step 9: Construct Upper Resevoir
Cut hole in bottom of 2 gal jug using hole saw and mount thru-hull. Attach to hose. Cut hole in Footstool using largest size hole saw. Route hose through hole in footstool, screw on, and position jug for right-side-up operation.
Step 10: Attach Control Box
Cut a 1"x2.75" hole in the top of the control box using a hot knife, a drill and jigsaw combo, or.a roto saw Clean up the corners and edges of the hole with hobby knife set. The LCD screen should just fit through the hole with enough room to mount it in place.
Using large drill bit and hobby knife, cut 2 holes in the long side of the box. Each hole should be about 1/2" diameter. Square the bottom corners of the right-hand side (RHS) hole, making it just the right size for the Arduino's usb port. Drill pilot holes and screw box onto board with turbine and servo/valve combo. Mount Arduino to the inside of the box, using machine screws, with usb port sticking out of RHS hole. Route wires for servo and hall effect sensor out of left-hand side hole. Peel off sticky back and attach main breadboard on the bottom of the box next to the Arduino. Bend the IR sensor around backward so that it sticks out (rounded face up) of the same hole as the lcd with the mini breadboard attached to the backside of the box top. Screw down lid to box using additional machine screws and place clear tape over all openings.
Step 11: Position the Hall Effect Sensor
Place hall effect sensor (HES) inside a small plastic bag and close tightly with a rubber band. Using another small rubber band attach HES to the front of the turbine, with open end of bag facing down. Position the sensor as close as possible to the magnets on the turbine.
Step 12: Test the Servo and IR Circuit.
Plug Arduino into laptop and re-upload code. Test IR remote function: make sure servo lines up correctly with hose bib. Both should start in the "off" position. If they are not lined up correctly the valve will not open/close all the way or the motor will stall, likely resetting the Arduino due to excessive power drain on the system. If this happens, unplug the Arduino from the laptop and remove the motor from the L-bracket set up. Now plug the Arduino back in. With no tension on it the motor should revert to a "starting" position. Test IR function to determine smooth open/close operation, and closing to the same "starting" position. Repositioning the star-shaped top as needed without spinning the center shaft, and re-install the motor in the same mounts as before with both valves off. Retest the IR remote function. Valve should open when "volume up" button pressed, close when "volume down" button pressed, and "open for 8 seconds" when number 8 is pressed. Open the serial monitor (9600) inside of the arduino coding software to see the actual numeric codes sent for each remote button. If your remote has different numeric codes you will have to change the values listed in Part II of the main Arduino sketch to match the values for your remote. For more info on the IR remote:
Step 13: Check the Plumbing
UNPLUG THE ARDUINO AND MOVE LAPTOP TO A SAFE LOCATION BEFORE RUNNING WATER THROUGH THE PIPES!
I recommend doing this in the bath tub or outside for the first time. Start with the valve in the OPEN position (it should stay there if you unplug the Arduino while the valve is open.) Screw the hose onto the hose bib and double check the rest of the pipe fittings. Make sure the lower reservoir (1 gal jug) is securely in place below the turbine. Attach a short section of 1.5" diameter hose to extend bottom of pipe if needed. Pour water into upper reservoir and lift or set at least 1 foot above the hose bib. Water should flow through the pipe and out the bottom of the turbine assembly. Some water will remain in the hose assembly after water stops flowing, so be careful not to make a mess when moving it around. Check all hose /pipe connections for leaks and reposition small tube for best turbine action.
Step 14: Test the HES and Determine Flow Constant
Once you have determined that your plumbing is sound, with no water leaks near or above control circuitry, place the upper reservoir on the floor and plug the Arduino back in. The valve should immediately close. Test the function of the hall effect sensor and modify the Arduino code flow constant, k, to equal a precise value for revolutions to gal per minute conversion constant. Use the measurement lines on the lower reservoir and a stopwatch to test new values.
Step 15: And You're Done!
Now you should have a fully functional flow meter. You can play with the IR remote and Arduino code to create new functions, such as dispense 1 pint, when different buttons are pressed. Use silicon to caulking up the butt-joined pipes once you are certain the system is spinning along nicely. Alternately, you can create your own version of the turbine and holding pipes using Autodesk Inventer. My next update to the project will probably include a pipe structure that is PVC compatible and a 3D-printable control box with a built-in LCD frame.
The final product should make a nice demonstration piece as a flow meter and while discussing the general principles behind magnetic induction.
We have a be nice policy.
Please be positive and constructive.