Complete Build Guide

DIY Foot Pedal Water Tap - Step-by-step instructions

Project Goal

Build a hands-free foot pedal controlled water tap with three operating modes:

1. Hold Mode

Hold pedal down for water flow

2. Continuous Mode

Single tap for continuous flow (2-minute auto-shutoff)

3. Manual Mode

Double tap to return to hand control

Table of Contents

1. Parts List

Electronics Components

Core Components (from Core Electronics)

Item Product Code Supplier Est. Price (AUD) Qty Notes
Arduino Uno Various Core Electronics $40-50 1 Or Arduino Nano for compact build
12V Plastic Water Solenoid Valve (1/2") ADA997 Core Electronics (Adafruit) $15-20 2 For hot & cold water lines
TIP120 Darlington Transistor - Jaycar/Core Electronics $2-3 2 One per solenoid
1N4001 Diode (Flyback protection) - Jaycar/Core Electronics $0.50 2 One per solenoid
2.2kΩ Resistor - Jaycar/Core Electronics $0.20 2 Base resistor for transistors
220Ω Resistor - Jaycar/Core Electronics $0.20 1 For status LED
5mm LED - Jaycar/Core Electronics $0.50 1 Status indicator
Foot Pedal Switch (Momentary) SP0760 Jaycar $9-15 1 250V 10A momentary action
12V 2A Power Supply - Jaycar/Core Electronics $15-25 1 Must be at least 1.5A
Breadboard (for testing) - Core Electronics $5-10 1 Half-size adequate
Jumper Wires - Core Electronics $5-10 1 pack Male-to-male, male-to-female
Prototype PCB Board (optional) - Jaycar $3-5 1 For permanent installation
Project Enclosure - Jaycar $10-15 1 Waterproof if near sink
Heat Shrink Tubing - Jaycar/Bunnings $5-10 1 pack For insulation
Electronics Subtotal: ~$120-180 AUD

Plumbing Components (from Bunnings)

Item Product Code Supplier Est. Price (AUD) Qty Notes
Stainless Steel Braided Hose (450mm) - Bunnings (Kinetic) $8-12 4 1/2" BSP connections
PTFE Thread Seal Tape - Bunnings (FIX-A-TAP) $2-4 1 12mm x 8m
Brass Adapters/Fittings (1/2" BSP) - Bunnings $5-10 4-6 As needed for connections
Stainless Steel Hose Clamps (17-32mm) - Bunnings (Kinetic) $3-5 4 Backup/testing
Water Hammer Arrestor (15mm) - Bunnings (Sioux Chief) $15-25 2 CRITICAL for solenoids
Bucket (for testing) - Bunnings $5-10 1 Testing only
Garden Hose Adapter Kit - Bunnings $10-15 1 For bucket testing
Plumbing Subtotal: ~$60-100 AUD

Tools Required

2. Circuit Design

Circuit Diagram

                                    +12V Power Supply
                                           |
                      +--------------------+--------------------+
                      |                    |                    |
                  [Solenoid 1]         [Solenoid 2]        [Arduino VIN]
                      |                    |                    |
                   [Diode]              [Diode]                 |
                   (1N4001)             (1N4001)                |
                Cathode up           Cathode up                 |
                      |                    |                    |
                 Collector            Collector                 |
               [TIP120 #1]          [TIP120 #2]                 |
                      |                    |                    |
                   Emitter              Emitter                 |
                      |                    |                    |
                     GND                  GND                   GND

Arduino Pin 9 ---[2.2kΩ]--- Base (TIP120 #1)
Arduino Pin 10 --[2.2kΩ]--- Base (TIP120 #2)
Arduino Pin 2 ----------------- Foot Pedal Switch --- GND
Arduino Pin 13 --[220Ω]--- LED (+) --- GND
                

Key Circuit Notes

1. Flyback Diodes (1N4001) - CRITICAL

  • Place across solenoid terminals
  • Cathode (stripe) connects to +12V side
  • Protects transistor from voltage spikes when solenoid switches off
  • Without these, your transistors will fail

2. TIP120 Transistors

  • Can handle up to 5A at 60V
  • If current >0.5A, add heatsink
  • Base resistor (2.2kΩ) limits current from Arduino

3. Power Supply

  • 12V 2A minimum recommended
  • Powers both Arduino (via VIN) and solenoids
  • Common ground for all components

4. Foot Pedal

  • Connected to Digital Pin 2 (interrupt capable)
  • Internal pull-up resistor enabled in code
  • When pressed, connects pin to GND

3. Arduino Code

Complete Sketch

/*
 * DIY Foot Pedal Water Tap Controller
 * Three modes:
 * - Hold pedal: Water flows while pressed
 * - Single tap: Continuous flow for 2 minutes (auto-shutoff)
 * - Double tap: Switch to manual hand control
 */

// Pin definitions
const int FOOT_PEDAL_PIN = 2;     // Foot pedal switch (interrupt capable)
const int HOT_VALVE_PIN = 9;       // Hot water solenoid valve
const int COLD_VALVE_PIN = 10;     // Cold water solenoid valve
const int STATUS_LED_PIN = 13;     // Status indicator LED

// Timing constants
const unsigned long DEBOUNCE_DELAY = 50;      // Debounce time in ms
const unsigned long DOUBLE_TAP_WINDOW = 400;  // Time window for double tap (ms)
const unsigned long TAP_THRESHOLD = 200;      // Max press time for "tap" vs "hold" (ms)
const unsigned long CONTINUOUS_TIMEOUT = 120000; // 2 minutes in ms

// State variables
enum Mode { HOLD_MODE, CONTINUOUS_MODE, MANUAL_MODE };
Mode currentMode = HOLD_MODE;

unsigned long buttonPressTime = 0;
unsigned long buttonReleaseTime = 0;
unsigned long lastTapTime = 0;
unsigned long continuousStartTime = 0;

bool buttonState = HIGH;
bool lastButtonState = HIGH;
bool valvesOpen = false;
int tapCount = 0;

void setup() {
  // Initialize pins
  pinMode(FOOT_PEDAL_PIN, INPUT_PULLUP);
  pinMode(HOT_VALVE_PIN, OUTPUT);
  pinMode(COLD_VALVE_PIN, OUTPUT);
  pinMode(STATUS_LED_PIN, OUTPUT);

  // Ensure valves are closed on startup
  closeValves();

  // Initialize serial for debugging
  Serial.begin(9600);
  Serial.println("Foot Pedal Water Tap Controller Started");
  Serial.println("Mode: HOLD");
}

void loop() {
  // Read button with debounce
  int reading = digitalRead(FOOT_PEDAL_PIN);

  // Button state changed
  if (reading != lastButtonState) {
    delay(DEBOUNCE_DELAY); // Simple debounce
    reading = digitalRead(FOOT_PEDAL_PIN);

    if (reading != buttonState) {
      buttonState = reading;

      // Button pressed (goes LOW due to pull-up)
      if (buttonState == LOW) {
        buttonPressTime = millis();
      }
      // Button released
      else {
        buttonReleaseTime = millis();
        handleButtonRelease();
      }
    }
  }

  lastButtonState = reading;

  // Handle current mode
  switch (currentMode) {
    case HOLD_MODE:
      handleHoldMode();
      break;

    case CONTINUOUS_MODE:
      handleContinuousMode();
      break;

    case MANUAL_MODE:
      handleManualMode();
      break;
  }

  // Update status LED (blink pattern indicates mode)
  updateStatusLED();
}

void handleButtonRelease() {
  unsigned long pressDuration = buttonReleaseTime - buttonPressTime;
  unsigned long timeSinceLastTap = buttonReleaseTime - lastTapTime;

  // Detect tap (quick press/release)
  if (pressDuration < TAP_THRESHOLD) {
    // Check if this is a second tap within the double-tap window
    if (timeSinceLastTap < DOUBLE_TAP_WINDOW && tapCount == 1) {
      // Double tap detected
      handleDoubleTap();
      tapCount = 0;
    } else {
      // Single tap (might become double tap)
      tapCount = 1;
      lastTapTime = buttonReleaseTime;

      // Wait to see if there's a second tap
      delay(DOUBLE_TAP_WINDOW);

      // If still just one tap, treat as single tap
      if (tapCount == 1) {
        handleSingleTap();
        tapCount = 0;
      }
    }
  } else {
    // Long press (hold mode handled in real-time)
    tapCount = 0;
  }
}

void handleSingleTap() {
  Serial.println("Single Tap - Entering CONTINUOUS mode");
  currentMode = CONTINUOUS_MODE;
  continuousStartTime = millis();
  openValves();
}

void handleDoubleTap() {
  Serial.println("Double Tap - Entering MANUAL mode");
  currentMode = MANUAL_MODE;
  closeValves();

  // Flash LED twice to indicate manual mode
  for (int i = 0; i < 2; i++) {
    digitalWrite(STATUS_LED_PIN, HIGH);
    delay(100);
    digitalWrite(STATUS_LED_PIN, LOW);
    delay(100);
  }
}

void handleHoldMode() {
  // Water flows while button is held down
  if (buttonState == LOW) {
    if (!valvesOpen) {
      openValves();
    }
  } else {
    if (valvesOpen) {
      closeValves();
    }
  }
}

void handleContinuousMode() {
  // Check for timeout (2 minutes)
  if (millis() - continuousStartTime >= CONTINUOUS_TIMEOUT) {
    Serial.println("Continuous timeout - Returning to HOLD mode");
    currentMode = HOLD_MODE;
    closeValves();
    return;
  }

  // Check if button pressed to stop
  if (buttonState == LOW && valvesOpen) {
    Serial.println("Button pressed - Stopping continuous flow");
    currentMode = HOLD_MODE;
    closeValves();
  }
}

void handleManualMode() {
  // In manual mode, foot pedal returns control to faucet
  // Pressing pedal exits manual mode
  if (buttonState == LOW) {
    Serial.println("Exiting MANUAL mode - Returning to HOLD mode");
    currentMode = HOLD_MODE;
  }
}

void openValves() {
  digitalWrite(HOT_VALVE_PIN, HIGH);
  digitalWrite(COLD_VALVE_PIN, HIGH);
  valvesOpen = true;
  Serial.println("Valves OPEN");
}

void closeValves() {
  digitalWrite(HOT_VALVE_PIN, LOW);
  digitalWrite(COLD_VALVE_PIN, LOW);
  valvesOpen = false;
  Serial.println("Valves CLOSED");
}

void updateStatusLED() {
  static unsigned long lastBlinkTime = 0;
  static bool ledState = false;
  unsigned long currentMillis = millis();

  switch (currentMode) {
    case HOLD_MODE:
      // Solid on when valves open, off when closed
      digitalWrite(STATUS_LED_PIN, valvesOpen ? HIGH : LOW);
      break;

    case CONTINUOUS_MODE:
      // Fast blink (500ms interval)
      if (currentMillis - lastBlinkTime >= 500) {
        ledState = !ledState;
        digitalWrite(STATUS_LED_PIN, ledState);
        lastBlinkTime = currentMillis;
      }
      break;

    case MANUAL_MODE:
      // Slow blink (1000ms interval)
      if (currentMillis - lastBlinkTime >= 1000) {
        ledState = !ledState;
        digitalWrite(STATUS_LED_PIN, ledState);
        lastBlinkTime = currentMillis;
      }
      break;
  }
}

Code Features

4. Assembly Instructions

1 Stage 1: Breadboard Prototype

Set up Arduino

  • Connect Arduino to computer via USB
  • Upload the code above using Arduino IDE

Wire the foot pedal switch

  • Connect one terminal to Arduino Pin 2
  • Connect other terminal to GND
  • Test in Serial Monitor - should see button presses

Build solenoid control circuit (repeat for both solenoids)

  • Insert TIP120 transistor into breadboard
  • Connect 2.2kΩ resistor from Arduino Pin 9 (or 10) to TIP120 Base (middle pin)
  • Connect TIP120 Emitter (right pin, flat side facing you) to GND
  • Connect TIP120 Collector (left pin) to one solenoid terminal
  • Connect other solenoid terminal to +12V

CRITICAL: Install Flyback Diode

Connect 1N4001 diode across solenoid terminals:

  • Cathode (stripe end) to +12V side
  • Anode to GND side

Add status LED

  • Connect 220Ω resistor to Arduino Pin 13
  • Connect resistor to LED anode (+, longer leg)
  • Connect LED cathode (-, shorter leg) to GND

Connect power

  • Connect 12V power supply + to breadboard power rail
  • Connect 12V power supply - to breadboard ground rail
  • Connect Arduino VIN to breadboard power rail
  • Connect Arduino GND to breadboard ground rail

Test electronics (before connecting water)

  • Power on
  • Should hear solenoids "click" when pedal pressed
  • LED should light up
  • Verify all modes work (single tap, double tap, hold)

2 Stage 2: Bucket Water Test

IMPORTANT: Test with water BEFORE installing in sink!

Set up test rig

  • Fill bucket with water
  • Place garden hose in bucket
  • Connect hose → solenoid valve → short hose → back to bucket
  • Repeat for second solenoid (or test one at a time)

Test water flow

  • Power on system
  • Test hold mode (should flow while pressed)
  • Test single tap mode (should flow continuously)
  • Test double tap mode (should stop)
  • Check for leaks around solenoid connections

Verify no leaks

  • Run for 15-20 minutes
  • Check all connections
  • Tighten as needed with hose clamps

Measure performance

  • Check water flow rate (should be reasonable, not too slow)
  • Verify solenoids close fully (no dripping)
  • Listen for water hammer (loud bang when closing)

Water Hammer Detection

If you hear a loud bang when the solenoid closes, you MUST install water hammer arrestors before final installation!

3 Stage 3: Permanent Build (Optional)

If breadboard works well, consider transferring to permanent board:

Solder components to prototype PCB

  • Transfer circuit from breadboard to PCB
  • Use proper soldering technique
  • Add heat shrink to exposed connections

Mount in waterproof enclosure

  • Drill holes for wires to exit
  • Mount PCB inside with standoffs
  • Ensure no water can enter
  • Label connections clearly

Secure foot pedal

  • Mount to floor under sink cabinet
  • Use screws or heavy-duty double-sided tape
  • Position for comfortable foot reach

5. Testing Procedures

Pre-Installation Checklist

Before installing in sink:

Electrical Tests

Use multimeter to verify:

Test Expected Result
Power supply output Should read 12V DC
Arduino VIN pin Should read 11-12V when powered
Solenoid terminals Should read 12V when valve commanded open
Foot pedal continuity Should show continuity when pressed

6. Plumbing Installation

Required Tools

WARNING

Turn off main water supply before starting!

Installation Steps

1 Turn off water

  • Locate shutoff valves under sink
  • Turn clockwise to close
  • Turn on sink taps to relieve pressure

2 Disconnect existing supply lines

  • Place bucket under connections
  • Use wrench to disconnect hot and cold supply lines from faucet
  • Some water will spill - normal

3 Install solenoid valves inline

Configuration:
Shutoff Valve → Braided Hose → Water Hammer Arrestor →
Solenoid Valve → Braided Hose → Faucet

For each water line (hot and cold):

  1. Apply Teflon tape to threads (2-3 wraps, clockwise)
  2. Connect braided hose from shutoff valve to water hammer arrestor
  3. Connect water hammer arrestor to solenoid valve inlet
  4. Connect solenoid valve outlet to braided hose
  5. Connect braided hose to faucet connection
  6. Hand-tighten, then 1/4 turn with wrench (don't overtighten)

4 Secure solenoid valves

  • Mount to cabinet wall or floor using cable ties or brackets
  • Ensure they won't move when water flows
  • Keep away from moisture

5 Route electrical cables

  • Run wires from solenoids to control box
  • Keep away from water sources
  • Use cable clips to secure

6 Test for leaks

  • Slowly open shutoff valves
  • Check ALL connections for drips
  • Tighten if needed (don't overtighten)
  • Let run for 10 minutes, recheck

7 Test operation

  • Power on electronics
  • Test all three modes
  • Listen for water hammer (shouldn't happen with arrestors)
  • Verify good water flow and temperature control

Troubleshooting Water Issues

Problem Likely Cause Solution
Loud bang when closing Water hammer - needs arrestor Install water hammer arrestors
Water drips when closed Solenoid not closing fully Check power, replace solenoid if faulty
Low water pressure Solenoid partially obstructed Clean solenoid, check for debris
Leaks at connections Not tight enough or missing Teflon tape Tighten or reapply Teflon tape
No water flow Solenoid installed backwards Check arrow on solenoid body (flow direction)

7. Troubleshooting

Electronics Issues

Problem Likely Cause Solution
Solenoid doesn't click No power to solenoid Check TIP120 wiring, verify 12V at solenoid terminals
Solenoid clicks but no Arduino response Code not uploaded or wrong pins Re-upload code, verify pin numbers
Pedal doesn't register Loose connection Check foot pedal wiring, test continuity
Valves don't close Transistor shorted Check for flyback diode, replace TIP120
TIP120 gets very hot High current, needs heatsink Add heatsink to TIP120
Erratic behaviour Electrical interference Add capacitor (100nF) across solenoid terminals
LED doesn't light Wrong polarity or burnt out Check LED polarity, test with multimeter

Mode Issues

Problem Solution
Double tap not registering Increase DOUBLE_TAP_WINDOW in code (try 500-600ms)
Single tap triggers when holding Decrease TAP_THRESHOLD in code (try 150ms)
Continuous mode times out too fast Increase CONTINUOUS_TIMEOUT (currently 2 min)
Modes get stuck Press and release pedal several times to reset

8. Cost Summary

Electronics

Category Low End High End
Arduino & Components $60 $90
Solenoid Valves (×2) $30 $40
Transistors, Resistors, LEDs $5 $10
Foot Pedal Switch $10 $15
Power Supply $15 $25
Enclosure & Misc $10 $20
Electronics Total $130 $200

Plumbing

Category Low End High End
Braided Hoses (×4) $30 $50
Water Hammer Arrestors (×2) $30 $50
Fittings & Tape $10 $20
Plumbing Total $70 $120
Grand Total: $200 - $320 AUD

Compare to Commercial Options

  • Principle Faucets STEP: $400-600 USD (~$620-930 AUD) + international shipping
  • Wolfen (Reece): $388 AUD (timed flow only, no hold/double-tap modes)

DIY Savings: $80-600+ AUD

Next Steps

  1. Order components from Core Electronics and Jaycar
  2. Build breadboard prototype and test code
  3. Bucket test with water to verify operation
  4. Install in sink following plumbing instructions
  5. Fine-tune timing constants in code to your preference
View Shopping List View Wiring Diagram

Additional Resources

Arduino Libraries

No external libraries required - uses standard Arduino functions

Useful References

Australian Suppliers

Safety Notes

IMPORTANT SAFETY WARNINGS

1. Electrical Safety

  • Never work on electronics with wet hands
  • Keep all electronics away from water
  • Use waterproof enclosure for permanent installation
  • Disconnect power before making any changes

2. Plumbing Safety

  • Always turn off water at main shutoff before working on plumbing
  • Have towels and bucket ready for spills
  • Don't overtighten brass fittings (they can crack)
  • Check for leaks multiple times before leaving installation

3. Water Hammer

  • Water hammer arrestors are NOT optional - they prevent pipe damage
  • Solenoid valves close rapidly and WILL cause water hammer without arrestors
  • Water hammer can damage pipes, fittings, and appliances over time

4. Testing

  • ALWAYS test electronics without water first
  • ALWAYS do bucket test before installing in sink
  • Never leave running unattended during testing

Notes & Modifications

Use this space to document any changes you make: