Shop OBEX P1 Docs P2 Docs Learn Events
Propeller based boat flow meter — Parallax Forums

Propeller based boat flow meter

HughHugh Posts: 362
edited 2012-06-22 08:05 in Robotics
This is what I have been trying to achieve with a Propeller protoboard, a Parallax Micro SD card interface, Parallax GPS and a bunch of LED's and switches.

The aim was to have a means of monitoring the fuel remaining in my boat and to gain an understanding of how fuel burn changes with speed and load. It is not supposed to be highly accurate, but to help planning and economy whilst giving an idea of when I need to change tanks.

Proprietary fuel monitoring systems are expensive and I wanted something to log data so that I could characterise the boat and engine given the number of passengers, etc., It doesn't however, take trim position or loading into account, so it won't be perfect. I have a 11 yr old son who likes to tootle along at no more than 10 mph (at which speed the boat is mushing through the water in a very inefficient way) and his 9 yr old sister who goes everywhere at 40kts (both under supervision, I hasten to add!) - there must be a 'best range' speed between these two extremes.

What it does:
  • It taps into the boat wiring and provides an LCD display of the state of various switches, together with an LED telltale.
  • The user can set the initial contents of the fuel tank in 1 litre increments.
  • The user can set the number of passengers pressent.
  • The user can move between the various screens at will, or the code will bring up the relevant screen in the event of an alert.
  • One of the Propeller cogs sits there and only waits for the pulses from the flow sensor. When a pulse occurs it increments the 'fuel consumed' data and decrements the 'fuel remaining' data.
  • Using the Propeller counter as a time reference, the rate of fuel consumption is calculated and displayed.
  • GPS position and other data can be shown to the user.
  • GPS position, fuel quantity and GPS speed are logged to the SD card at 1Hz, for subsequent analysis in slow time.
The LCD is a transflective type that is visible in bright daylight. Its all crudely stuffed into a crudely waterproofed box.

The code and a calibration constant are installed on the SD card, making it possible to update the code without taking a laptop to the boat. The calibration constant matches the sensor to the software. With the flow sensor I am using one pulse is nominally created for every 0.4 ml of fluid - a calibration constant of '394' (i.e., 0.394 ml) has been found to match displayed used volume with actual volume for 25l of water.

Using three digits for the constant allows for quite a bit of fine tuning.

006.jpg

Screen 1: Usage data

010.jpg

Screen 2: Switch status

015.jpg

Screen 3: Overheat warning

016.jpg

Screen 4: GPS position data

017.jpg

Screen 5: GPS data

018.jpg

Screen 6: Passenger data

019.jpg

Screen 7: Fuel-proof flow sensor

Plot.jpg

Screen 8: Data from a test over low and high flow rates.

Once it matures, future changes might include automatic control of a pump to transfer between tanks. I think I have four free pins!

Its been an interesting project and being able to dedicate a cog just to counting pulses makes it much more straightforward than using interrupts, etc.
1024 x 685 - 75K
1024 x 685 - 68K
1024 x 685 - 51K
1024 x 685 - 47K
1024 x 685 - 52K
1024 x 685 - 50K
1024 x 685 - 25K
481 x 289 - 32K

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-13 07:57
    This is super cool!

    What a great and practical project. This seems like a perfect fit for the Propeller.

    Thank you for documenting it. I hope you share what you learn from it with us.
  • bsnutbsnut Posts: 521
    edited 2012-01-13 23:25
    I agree. It's a cool and very practical project.

    Can you post a link for this Fuel-proof flow sensor and the code that you used? I have been with a group that has been restoring the Perfect Storm ship Zuni/Tamaroa and a project like yours is perfect for our group in monitoring our fuel usage of our generators.
  • HughHugh Posts: 362
    edited 2012-01-14 02:27
    I've just been looking at the pages of the Zuni Tamaroa Foundation. Zuni/Tamaroa had quite a full life! It must be very rewarding to be working on a vessel like her.

    This one specifically states petrol (gas). There are some black plastic ones being touted on eBay but I found they caused too much of a pressure drop.

    Hope this helps,

    Hugh
  • shimniokshimniok Posts: 177
    edited 2012-01-15 00:51
    Nice! It's nice to see a solution to a real world problem realized with a Propeller.
  • HughHugh Posts: 362
    edited 2012-01-24 05:54
    I've just added an auto-scaling scrolling display of flow rate. The rate of scrolling is user-selectable, from 'fairly rapid but flickery' (showing the detail of immediate trends) to 'very slow', smoothing trends out over several minutes. Not difficult, but it uses the custom characters of the LCD display to draw the top-most part of each column in the chart - the parts that are not solid blocks. It autoscales so that the Y-axis is shown as a proportion of the greatest flow rate ever seen (a parameter that is stored in EEPROM for consistency over power interrupts)

    003.jpg


    Because one is cog dedicated to measuring the pulses from the flow sensor and another cog is dedicated to writing data to the SD card they are completely unaffected by all the faffing about involved in drawing this chart. Thank goodness for the Propeller!

    BOAT16 - Archive [Date 2012.01.24 Time 13.39].zip
  • dmagnusdmagnus Posts: 271
    edited 2012-06-22 06:11
    This looks great! I am on the verge of buying a boat with two 5.7 liter inboard engines. With fuel (gasoline) prices the way they are, I am thinking it would be nice to have something like this to enable some fairly accurate analysis of what rpm gives me the best cruising speed at various trim settings, etc. The boat is a 32' cruiser with direct drive engines and trim tabs. It is a semi-displacement hull and has a top speed capability of something like 25 knots, but I will mostly be cruisig in the 7-10 knot range, depending on boat attitude and fuel consumption.
    I think this project will be modifiable to accomodate two sensors. I won't need the switch display, but I will probably include the GPS module to have the ability to do time/speed/distance/fuel calcs. This will definitely give me a good start, anyway. Thank you for publishing it.
  • HughHugh Posts: 362
    edited 2012-06-22 08:05
    dmagnus wrote: »
    This looks great! I am on the verge of buying a boat with two 5.7 liter inboard engines. With fuel (gasoline) prices the way they are, I am thinking it would be nice to have something like this to enable some fairly accurate analysis of what rpm gives me the best cruising speed at various trim settings, etc. The boat is a 32' cruiser with direct drive engines and trim tabs. It is a semi-displacement hull and has a top speed capability of something like 25 knots, but I will mostly be cruisig in the 7-10 knot range, depending on boat attitude and fuel consumption.
    I think this project will be modifiable to accomodate two sensors. I won't need the switch display, but I will probably include the GPS module to have the ability to do time/speed/distance/fuel calcs. This will definitely give me a good start, anyway. Thank you for publishing it.

    Blimey, that sounds a nice boat - I am glad I'm not paying for the fuel though! 55 litres in my boat costs 79 GBP or about $125.

    Some tweaked code is attached.

    It took me a while to come up with a calibration factor so that the 'measured' values tied in with how much fuel it took to brim the tank.

    I've got a fair amount of coverage, but I will have to statistically weight the data based upon the number of data points at each speed / burn combination because there is a lots of spread due to trim, etc.,

    (Vertical axis is burn rate in a non-specific unit, horizontal axis is speed in kts)

    burn rate vs speed.png


    Taken as the difference in 'burn' between two points in time, the rate is quite 'noisy'

    (Blue plot is total burn (rightmost axis), red is 'rate' (leftmost axis))


    burn vs time.png

    I pick up the GPS data from the NMEA0183 output of my nav GPS.

    BOAT22 - Archive [Date 2012.06.22 Time 16.01].zip
Sign In or Register to comment.