Jump to content

Welcome to TheMalibuCrew!

As a guest, you are welcome to poke around and view the majority of the content that we have to offer, but in order to post, search, contact members, and get full use out of the website you will need to Register for an Account. It's free and it's easy, so don't hesitate to join the TheMalibuCrew Family today!

Rear Ballast Bag Monitor


Recommended Posts

Who has done a water level monitor for their rear bags?  I thought this might be a good winter project for this year so have been doing a little research into some ideas.  I am thinking of doing a simple Arduino setup to monitor resistance from a hydrostatic water level sensor.  The Arduino setup is super easy and basically a 10 minute program to write.  I envision placing a LCD display of some type enclosed in a nice looking box and place it inside the recessed radio box or whatever they call the box with the lid under the dash/throttle on the right side.   It would only require running a couple wires.  The worst part and the part I am still deciding on is the sensor and plumbing it in.  The one I currently have would work great, but I will have to create a T connection on a bag hose that would allow water to rise inside a clear tube outside of the bag containing the sensor.  This is not really a problem, just trying to decide if there is a cleaner way to do it and finding the needed fittings to 'T' into the rear PNP fittings with ease.

Once in the boat and all hooked up, you would take two voltage readings from the Arduino ADC when the bag is empty and when completely full for initial setup.  Use those two voltages to create a linear scale for a 0-100% display reading in the Arduino program.  No more opening the rear hatch to see how full/empty the rear bags are.  When you are filling your rear bags and want to hit a desired fill level of say 25% or 50%, just flip open the box containing the LCD and stop filling when the LCD shows 25%, 50%.  If you want to run with rear tanks full, but 0% in the rear bags, just stop the filling once you see anything on the rear bag monitor.

I have a feeling somebody has messed with this before, but not really coming up with much in my searches so throwing it out there if anybody else is interested as I get time to work on it this winter and wants to join in.  Or let me know where to buy a cheap ready made setup.

Attached is the Arduino with a simple 2x16 LCD.  I would probably go to a 4x16 or 20 that way you have basically what you see now, but with 2 more rows for a Left and Right text.



Edited by D_Turner
  • Like 2
Link to comment

Interesting.  I don't ballast my boat, so I have no applied interest, but I do love to mess with microcontrollers and sensors of all kinds.

If you use a vertical tube, why does it have to be clear?  Are you using an optical sensor? 

And does the tube have to be vented to allow the water to rise properly, or are you just letting the water pressurize inside the tube?  Venting has obvious problems if something goes wrong, but pressure in the tube could be wrong while the pump is running.  I think I'd rather deal with the pressure issue than the venting issue, especially since your pump probably isn't that strong...

Ideally, the sensor itself would never get wet, and any wet part would be completely sealed (a magnet inside a float, with hall effect sensors outside the tube, for example).

Link to comment

I tried this once with both a turbine flow meter and a mag meter.  Both weren't cheap and I borrowed them from a client to do some firmware development on a PIC for them.  Worked pretty well except for errors due to overflow out the vent line.  But a little code to catch a change in the PID to detect a lack of water flow would handle that.

I like your idea of a float level.  I think with a good few hours and prototypes you could work something out that'd be nice.  The hydrostatic level is a good start.   My first pass if it were me would be skipping bleed and pressure issues, and loop a little bleed line back into the bag's vent line near the exit thru-hull.  

Keep a log.  I've always wanted to put something like this together and will follow this with interest.

Link to comment

The first sensor I came across was this 'etape' which is why I was mentioning clear tubes and external plumbing.  https://milonetech.com/    Very accurate, but you have to do that pesky external plumbing.  The water in the tube actually presses on the tape inside the tube and changes the resistance as more of the tape is compressed.  This sensor does have a vent at the top.  As mentioned above by JustGary, the venting has me concerned with this setup.  It would never be a large issue if you placed the sensor where the top of the tube is high up in the boat, but still there is that potential for leakage.

So I looked around some more, and found a 0-1.5 psi submersible pressure transducer.  My Sumo bags have multiple 1" NPT ports on the top.  So I will get a 1" NPT cable gland to pass the wire through.  If the wire size is to small for that big of a fitting, I can reduce the 1" NPT down to 1/2" or 3/4" NPT and get a cable gland for that.   Then I can just drop the pressure transducer in, screw in the plug and be done with that part.  Just hook up wiring.  The transducers are 4mA-20mA sensors so I will be adding a 4mA-20mA current to 0-5V voltage converter for each sensor.  Feed that signal into the Arduino and write the program based off that.   I have a sensor on the way to do some testing.  I hope to have it Saturday.  The only problem with these sensors is it adds some cost.  You can do the exact same sensor that is not submersible and would require a T fitting at the base of the bag fitting to screw the sensor into.  Saves you about $75 per sensor, but adds some hassle.

My bags are only about 20" in height so the internal water pressure at the base of the bag should be roughly 0.71 psi when completely full.  I think this sensor setup will create enough resolution and accuracy to work with that.  You really probably only need 0%, 25%, 50%, 75%, 100%.  100% is pretty obvious when the water starts dumping out of the boat.

So once I get the circuitry hooked up for some testing, I will drop that sensor in some water and see what kind of readings I get and how accurate they are.  I think somewhere I read they claim 4% accuracy on the 0-1.5 psi sensor.

Datasheet on the sensor I bought to test.  https://www.maretron.com/support/manuals/Submersible Pressure Transducers Installation Instructions-T 2.2.pdf

The sensor cable also has a very small vent inside the cable, so I got to see how that works and make sure I seal it through the NPT plug without kinking it. 

Edited by D_Turner
Link to comment

A flow meter is definitely doable.  My problem with that setup I see is you would only be able to monitor how much flows into the bag.  If I am going thru the trouble to rig all this up, I want to be able to go from 0-100% then back to 50% if I want to.   If you ever hit the drain button, you will never know how much is in the bag unless you start back from an empty bag.  There will also have to be some sort of reset whether manual or whatever to tell your system you are back to zero so the display starts its gallon count over.

Link to comment
1 hour ago, D_Turner said:

A flow meter is definitely doable.  My problem with that setup I see is you would only be able to monitor how much flows into the bag.  If I am going thru the trouble to rig all this up, I want to be able to go from 0-100% then back to 50% if I want to.   If you ever hit the drain button, you will never know how much is in the bag unless you start back from an empty bag.  There will also have to be some sort of reset whether manual or whatever to tell your system you are back to zero so the display starts its gallon count over.

When you figure it out, build 2. I will buy one.


Link to comment

I've thought about a project like this for some time. I was looking at flow meter sensors that counted gallons but I like the fluid pressure idea. My plan was to not only know how much water was in each bag but also automatically shut off the pump(s) when full or empty. I plumbed my bagged ballast (2 550's in the rear and a 600 triangle upfront) using Johnson reversible pumps. Those can't be run dry so knowing when the bag is empty is especially important. It would be interesting to add logic to the Arduino to be able to shut off at a specified fill or empty level (say 0%, 25%, 50%, 75%, 100%). I'll keep a watch on how you progress.

Link to comment

@21lsvskierControlling a pump would not be very hard.  I don't forsee myself diving into that for mine as my bags are Malibu PNP bags so they fill automatically from the touchscreen control once the hard tank is full.

For doing your setup, I would imagine finding a good low threshold pressure reading when the water level starts to go below the actual sensor laying on the floor of the bag that seems to be consistent.  Say a current reading of 4mA or 5mA is your 'empty' level for the sensor, just have the Arduino run the pump for an additional timed value once the sensor reads 'empty'(4mA) as there may be some residual water still in the bag just due to the thickness of the sensor(maybe another 3/4" of water is still in the bag once the sensor shows zero value of 4mA).  This extra run time of the pump would ensure the 3/4" is dumped and the bag is really empty.  Maybe run the pump for 15-30 seconds once the sensor reads 4mA?     The Arduino controlling the pump itself would just be a matter of integrating some relays into the design.

Link to comment

I got the pressure sensor today that I was wanting to try out.  It seems to be VERY sensitive as predicted.  You can tell these are industrial grade top of the line sensors.  I wired up the sensor into a current to voltage converter and dropped the sensor into a sport water bottle which was only 8" deep of water and it created good results.  You could move the sensor up and down in the water and the ever slightest movement increased or lowered the voltage which provides very high resolution.  0 volts at the bottom every time and like 1.3 Volts at 8"(the voltage scale is fully adjustable with the converter I have).  I will set the voltage scale from 0V empty to 5V full.   I didn't have time to rig up something 20"+ deep like a ballast bag yet, but I may at some point and try to put a ruler on it and check for repeatability/accuracy and also set my 0V-5V scale closer.  The sensitivity of the pressure sensor is so good, it will probably be best to write the Arduino program to show the bag level in like 10% increments or something to dampen the effects of waves on the lake and the non-rigid aspect of the bag allowing water to move slightly upon fill.  I will just have to test that once out on the water come spring time and see how much boat movement while floating effects readings and how much dampening/filtering is needed to keep it from displaying RAPIDLY changing numbers.

This is the sensor.  Very heavy unit.  It has a plastic screw-on cap at the bottom with holes to protect the pressure sensor.



This is the end of the sensor with the cap removed.



This is the end of the cable coming out of the sensor.  Two wires and a tiny vent tube exit the cable.  I haven't had a chance to determine if water is ever in that tube, but I wouldn't think so.  I would imagine it is all sealed and the vent is just used to allow the internals of the pressure sensor to move when the water pressure pushes on it.  If I am wrong on that and water does actually go in the vent tube, the cable will be coiled with a couple extra feet of length and end almost at the top under the gunnels so I think you would have to sink your boat to ever get water out of it.


So what I think I am going for is a circuit board box containing the Arduino and 2 current to voltage converters mounted in the same box hidden somewhere under the right side of the boat.  Out of this box will be a connector that allows a 3 wire cable to run to the rear.  Two sensor wires(1 to each pressure transducer) and one 12V wire split to each transducer.   A power(fused) and ground wire out of the circuit board box to 12V power and ground bus under dash.  A wire/cable to a box containing a LCD inside the plastic box to the right of the driver for display.  Should all be very clean.

The red is the rear of the boat.  3 wires go back there.  The grey area would be inside a circuit board box.  Blue/Purple would be the LCD inside the side compartment.  I did not spend time drawing up the LCD wires yet since I am still thinking on that one.


My next step is to figure out exactly how I want to do a LCD and mount it cleanly in a box that looks good.

Edited by D_Turner
Link to comment

An idea for a low cost sensor might be one used in laundry washing machine.  Probably not as sensitive but could be very cheap.

I have an Arduino  project on my boat, I used one of the smaller Arduino clone versions,  A couple of issues I had were needing to add some filtering to the power (mine was on the engine run battery, not the house battery) and shielding the display so it could be read in the sunlight.

Edited by MadMan
  • Like 2
Link to comment

@MadManInteresting.  To be honest, I never realized a washing machine used an air pressure switch to monitor water level.  I just assumed switches or floats or something. This setup would require a T fitting on your water line hose at the base of the bag externally to attach the air pressure pipe.

I think you could definitely do that sensor setup cheaper than my current submersible one.  I will look around at some options on those. 

Edited by D_Turner
Link to comment

Would this pressure transducer work? It has a 5v input and outputs voltage directly in proportion to the sensed pressure, eliminating the mA to V conversion. Also the cost is respectable. It could also be power ed by the arduino. My bags (see pic) have two ports on the fill end. One port is used for my Johnson reversible fill/drain. So the other port could be adapted to the sensor.



8.3 550 bag.jpg

Link to comment

Placing an external sensor at the bottom on a bag like that would work great.  My Sumo bags have a bottom port on each end and both are used in the factory PNP setup so I would have to tap into that plumbing.  If you could find a version of that sensor that was a 0.0-1.5 psi or at least a 0.0-3.0 psi sensor you would have a lot more resolution.  With a 3ft tall bag which very few are, you are looking at max pressure still under 1.5psi so with a 0-10.0 psi sensor you are only using less than 15% of the scale of the sensor from empty to full.  Would it cause any problems in a system where you are monitoring 0/25%/50%/75%/100%?  Probably never be noticed but I typically over engineer so I like getting a fully usable range.  :)

Maretron makes some that are external sensors and cheaper than the submersible one I got, but they are much more expensive than that Amazon one.


So, I wouldn't see no reason that Amazon sensor wouldn't be worth trying out.  Just maybe find a lower PSI range if you can.  And since you have a free port at the bottom, just buy a nylon 1" NPT male to 1/8" NPT female adapter or whatever that sensor is and screw it in.  Get you a couple relays to shut the pumps off when the sensor measures a dropping PSI that goes to 0PSI after a few seconds.  Done. :thumbup:

I am still looking for a good fit for the LCD display.  The box on my VLX on the right  under throttle will accept about a 2 3/8" tall box.  Most 4x20 line LCDs that are easy to mount or just slightly too tall to make that work if I put it in a box that slides into that covered box.  The LCD box would have to be about 2 1/2" and I don't think it will fit.  It will be tight as it is lined with foam so there is a chance it would go though. I need to measure more accurately soon.  I might just do either one 2 line LCD or two 2 line LCDs(two mounted side by side, one for left and one for right).    Anybody know if that factory Malibu box is some sort of standard size?  Any size specs on it?  I have some measurements I wrote down on a picture I took back in November, but would be cool to know exactly what that box is with a datasheet full of dimensions.  I don't even know if that boat is in all Malibu boats?

I have a few more parts ordered and on the way to start assembling a final first prototype over the next couple weeks(minus a final LCD setup, hope to wrap up that layout by the end of the week).


Edit:  Also after researching, I guess a G1/4 thread is a British pipe thread.  So you will need to convert that into your 1" NPT bag thread.  Somebody probably makes a way to convert it over.

Edited by D_Turner
Link to comment

You should post this to Wakegarage also. 
I have though of doing this but never found any cost effective pressure sensors. But I was looking through my normal sources ( power industry).
These are the ones I was thinking of using. https://www.instrumart.com/products/30745/noshok-100-series-pressure-transmitters

For most bags I would figure a 3-5psi range would be best. Considering you don't want to over pressure your sensing element. 
Never though of trying automotive or appliance industry transducers. 

I would fill the ballast all the way up, set your ranging on your arduino to have that as your span counts and then just do the math for the 25%, 50% and 75%. 

I would have the pressure transducer on a separate tap so the pumps output pressure doesn't change your readings. 

Link to comment

The Maretron sensor I have been messing with is 0 - 1.5psi which gives you measurement up to 41" of depth.  I am not sure I have ever seen a ballast bag anywhere close to that in height, but I haven't really searched.  My bags are only 20" tall.  The sensor I have has an over pressure rating of 15 psi(34ft depth).   It has a burst pressure of 30 psi(69ft).  So you would have to sink your boat 69ft deep before the sensor bursts and water comes up the vent/cable.  I think I would have other issues by that point.  :)

On the LCD decisions.........I think I have decided to try to make a 20x4 LCD work in the factory side box.  I have to draw it all up in CAD, but I think I really need to mount the LCD tilted up slightly so it is easier to see from the drivers seat.  If I mounted the LCD vertical, I think you would have to tilt your head or move your head to get a good angle on the screen.  If I tilt it up a few degrees so it is actually pointed a little more at the line of sight of of the driver looking down at it, the overall height of the box might just be able to be made to slide right into the factory housing.  I will just have to check things out in CAD to see what works and what doesn't.

Link to comment
  • 2 weeks later...

Latest update over the past week.  I think I have my plans worked out for layout of the 'brains' of the operation.  I will mount in a good water tight box.  You could probably squeeze it all in a smaller box, but decided to go a little larger so I can have a removable mounting plate and also have room for future additions if ever needed.......more on that later.

This is the layout in CAD.  Red and black are two little cheap bus bars I bought to distribute 12V and GND since there are numerous connections.  It should help to keep wiring clean.  Green is the two Current to Voltage converters(one each for the bag pressure sensors).  The Blue is the Arduino.  Grey is an Arduino shield for allowing screw type terminals for very secure connections to the Arduino.1162778229_ElectronicsBoxAssemblyv82.thumb.png.a1d728051accac6fb2fe130e4137239c.png  1797275886_ElectronicsBoxAssemblyv8.thumb.png.22f534deaf1af5420c77221f0cf1ec3e.png

I will take the above layout and drill some holes in the enclosure mounting plate next week when I get some time at work so I can start mounting parts to the plate and laying wires.


As for the LCD decisions I was trying to make earlier, I think I have decided to just go all the way and display on a sunlight readable TFT LCD.  This looks 10000% better than a Character LCD setup.  I took the test LCD out in the sun today for a quick test and all seemed good.  The screen I am going to work with for now is a capactive touch screen so I can always add way more functionality if I need it.  For now, I am playing with UI layouts for displaying the bag levels so no need for touch functionality.  My first layouts are below which I think I really like(a couple things still need tweaking for alignment/centering).  Very clean and simple.  I could get fancier, but I am decent with Adobe Photoshop but can't claim to be an expert so if there are any super duper graphics people here who want to play with a very cool 480x272 layout that mimics the stock Malibu Command Center feel, contact me.



I am going to head to the boat storage tomorrow since it will be almost 70 degrees here tomorrow and measure a couple things.  I am not 100% positive I can get that LCD in the recess I want to mount it in.  I may have to step down about an 1" on screen size, but I am hoping  it works as the screen make I am testing now does not make one 1" smaller.  I would have to step a couple inches smaller.  The LCD only requires a handful of wires so remote mounting of the LCD a couple feet  from the electronics box will be simple.

As mentioned above, this system allows for endless expansion to control other stuff.  2019 Winter projects will probably be taken up with just getting the rear bag levels going, but a 2020 winter project might be to implement a fully integrated bow bag setup.  Move "Left" and "Right" levels lower and add a "Bow" level to the screen.  Since the screen has touch ability, I would add a fill/drain button to control that bow bag.  Inside electronics box, just add a relay and some control wiring.  Just don't know how I would integrate that cleanly in a 2017 21 VLX yet as I haven't spent much time looking into that(again, 2020 project probably).  I would have to have a quick connect water hose connection and water tight quick connect bulkhead electrical connector either through cup holder or fiberglass.  I have glanced at a few TMC threads on clean ballast plumbing setups you guys have done in the past, but I think the 21 VLX is solid fiberglass around the bow sides(I could be wrong...never really looked) so I would have to come up through a cupholder with everything or drill holes(eeeek!).  Again....2020 project...trying to not get sidetracked until this project is done.  :)

So next steps are:

#1 Complete the electronics layout and get all that mounted

#2 Verify 100% that the screen size will work where I want to put it

#3 Get a fully functional LCD UI layout going

#4 Make a LCD mounting box.....probably 3D print this due to what I have in mind.

Stay Tuned.................................

Edited by D_Turner
  • Like 3
Link to comment
  • 2 months later...

Couple updates:

Got some wiring done and electronics box about 80% done.




I drew up a LCD Enclosure and sent it off for 3D printing.  I got it back this week and only made a couple machining tweaks to get the LCD to fit(3D printing tolerance was slightly out of spec which is typical).  I pressed in some 4-40 brass thread inserts which seem to work really well.

Empty Box



The Cover for the box where the LCD will mount.




The box and lid.  There is a piece of clear acrylic that is sitting in the LCD opening that still has the protective paper on it.  That is why it is white.  I will glue/seal this clear acrylic in as a 'lense' that will provide the water tight seal.  Then the LCD will be held in with some tabs to this acrylic lense.  Slide the cover into the box and secure with 4 4-40 flat head socket head cap screws.  :thumbup:



Main step now is to try to get all the wiring wrapped up so I can hook everything up in its current state as it would go in the boat and test.



Edited by D_Turner
  • Like 3
Link to comment

Wow man, really amazing work!  Another useful readout would be a fuel flow gauge.  There is someone on wake garage that rigged one up. 


I thought about doing this for fun, but I’m not really digging the LCD screen. Yours would look really good though.  


Edited by SCMike
Link to comment

I have seen that before.  I haven't went through it in very great detail yet though.  It would be something to think about adding in the future as it would be cool data to monitor.  If I ever added it to my setup, I could just create a separate screen on my LCD to show that type of data since I am using a touchscreen LCD.  Maybe that gets on next winters project list.  :)

Link to comment
1 minute ago, D_Turner said:

I have seen that before.  I haven't went through it in very great detail yet though.  It would be something to think about adding in the future as it would be cool data to monitor.  If I ever added it to my setup, I could just create a separate screen on my LCD to show that type of data since I am using a touchscreen LCD.  Maybe that gets on next winters project list.  :)

🤙🏼 Nice!  Can’t wait to see what you come up with. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...