Can we have a more normal toilet?

Ok so each time we get guests over we have to explain how the head works. That the hose through which “All” flushes is quite small, so don’t use a lot of paper each time, or flush a few times. But we also have to explain, fill and flush by pushing buttons. So I set out to make a one button action.

We have a fill pump and an evacuate pump. so the easiest is to program an Arduino driving 2 relais, turning the pumps on and off.

First off the Arduino runs on 5V, so we need a stepdown DC-DC converter, 24-12 -> 5V. Luckily I had one laying around, otherwise I would have used a USB converter, like we have everywhere in the barge.

Then we needed a 2 relais board.

Each will control one Pump. You have the connections Gnd, Vcc ( 5V) and digital 1 and digital 2

And here we have the arduino.

The wiring was quite simple, we made digital 3 and 5 the control wires for the relais, we connected the 5V and the Ground on the Arduino to the Vcc and the Ground on the relais board, then we used digital 7 with a Ground for the button.

So when the button is momentary pressed, the Arduino opens Relais 1 ( flush pump) and let it run for a bit.
Then the Arduino opens Relais 2 ( fill pump) and let both pumps run for a bit.
Then the Arduino closes Relais 1 ( flush pump) while keeping Realis 2 open ( fill pump).
Then the Arduino closes Relais 2 ( fill pump).

I assembled all in a little sealed plastic bock and hooked it up, played with the times for each pump and got it working. A note to the ‘purist’ under the Arduino coders, YES pressing a momentary switch can cause several pulses, but the code only needs one and it runs for a few seconds until it looks to the button again, so why bother.

The button Deb selected to control the head 🙂

Here is the code which I uploaded to the Arduino.

const int BUTTON_PIN = 7; // Arduino pin connected to button’s pin
const int RELAY_PIN = 3; // Arduino pin connected to relay’s pin
const int RELAY_PIN2 = 5; // Arduino pin connected to relay’s pin

void setup() {
Serial.begin(9600); // initialize serial
pinMode(BUTTON_PIN, INPUT_PULLUP); // set arduino pin to input pull-up mode
pinMode(RELAY_PIN, OUTPUT); // set arduino pin to output mode
pinMode(RELAY_PIN2, OUTPUT); // set arduino pin to output mode

void loop() {
int buttonState = digitalRead(BUTTON_PIN); // read new state

if (buttonState == LOW) {
//Serial.println(“The button is being pressed”);
digitalWrite(RELAY_PIN, HIGH); // turn on flush
digitalWrite(RELAY_PIN2, HIGH); // turn on fill Both are on for 3 seconds
digitalWrite(RELAY_PIN, LOW); // turn off flush
digitalWrite(RELAY_PIN2, LOW); // turn off fill
if (buttonState == HIGH) {
// Serial.println(“The button is unpressed”);
digitalWrite(RELAY_PIN, LOW); // turn off
digitalWrite(RELAY_PIN2, LOW); // turn off

Now for the ones who do not want to play with an Arduino, or feel it is to complicated, the same can also be achieved ( for about the same price) with 2 time relais ( din mount)
One turns on the flush pump for an interval, the other relais waits a bit and then turns on, here is one who is 220V

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s