Currently there is no support for bilge pumps on ardurover firmware, Ardusub has a leak alarm but its not in rover firmware. I have been trying to find a way of controlling the bilge pump with ardurover, in a way that will work both automatically and manually so this is my current solution.
cheap ebay rain sensor, its really the control board we need, the sensor part isnt great and corrodes away if left in the water too long but lasts much longer if you coat it all with solder., I just use a pair of stainless steel rods with it.
15A mosfet for driving the pump
12v pump that can suck water up and out the bilge, so no need to worry about the pump airlocking.
and finally, a filter to stop any debris getting sucked into the pump.
so first thing i done was Enable the button using the BTN_ENABLE set to 1 and reload parameters to get the rest of the button settings to appear.
Then i set BTN_PIN1 = 55 or AUX6 on a pixhawk, setting the pin the water sensor will connect to.
we then have to set BTN_OPTIONS1 =1 that will invert the input so a high signal from the sensor board will activate it rather than a low signal.
we then have to set the BTN_FUNC1 = 28 for Relay1
now we have a button setup controlled by the water sensor that activates relay 1.
The next step is to setup the relay, this is just setting RELAY_PIN:=53 (AUX4) , I tried AUX5 pin54 but it wouldnβt work possibly due to me also having dshot enabled.
So now with the sensor and mosfet connected and set up so if the conductivity goes above a set level the button will activate, triggering relay, running the pump, that should drain the water and the pump should turn off once its cleared.
Why run it through the relay and buttons instead of just connecting the sensor to the mosfet? simple, this way gives far more control of the system and gives me alerts that i can use to trigger other actions such as RTL if the leak doesnβt clear and I can manually trigger it from shore.
the next part of the plan is to now try and integrate this into a lua script to give alerts I tried using the Button test script but I havent got it working yet coding is not my strong suit.
first thing i done was set `BRD_PWM_COUNT to 2, freeing up 4 gpio pins, technically i only need 2 but I had an issue when trying to use AUX5 as relay and AUX6 as a button so i had to use AUX4 as the button and it worked. I also set the channels to -1 but im not sure if BRD_PWM_COUNT still needed with that. I will probably just move the sensor and mosfet to some rc pins so they dont interfere with dshot.