🔌 Wiring Diagram

Detailed connection diagrams for DIY Foot Pedal Water Tap

📋 Before You Start: Read through the entire wiring diagram before making any connections. Test each section as you go and use the checklists to verify your work.

Full Circuit Diagram

This shows all connections between components. Follow this diagram when building your circuit on the breadboard.

                        12V DC POWER SUPPLY (2A minimum)
                                    |
                                   (+)
                                    |
            +-----------------------+-----------------------+
            |                       |                       |
            |                       |                       |
       [SOLENOID 1]            [SOLENOID 2]           [ARDUINO VIN]
        (Hot Water)             (Cold Water)
            |                       |                       |
            |                       |                       |
        [1N4001 DIODE]          [1N4001 DIODE]             |
         Cathode (^)             Cathode (^)               |
            |                       |                       |
            |                       |                       |
        Collector               Collector                  |
      +---[C]---+              +---[C]---+                 |
      |         |              |         |                 |
    [TIP120 #1] |            [TIP120 #2] |                 |
      |         |              |         |                 |
      +---[E]---+              +---[E]---+                 |
        Emitter                 Emitter                    |
            |                       |                       |
            +----------+------------+-----------+-----------+
                       |                        |
                      GND                  [ARDUINO GND]


    ARDUINO CONNECTIONS:
    ====================

    Arduino Pin 9 ----[2.2kΩ Resistor]---- Base of TIP120 #1

    Arduino Pin 10 ---[2.2kΩ Resistor]---- Base of TIP120 #2

    Arduino Pin 2 ------------------------- Foot Pedal Terminal 1

    GND ------------------------------------- Foot Pedal Terminal 2

    Arduino Pin 13 ---[220Ω Resistor]------ LED Anode (+, long leg)

    GND ------------------------------------- LED Cathode (-, short leg)

Component Pin Identification

TIP120 Transistor Pinout

   Flat side facing you:

      +---+
      |   |
    B |   | C
    A |   | O
    S |   | L
    E |   | L
      |   | E
      |   | C
      |   | T
      |   | O
      |   | R
    E +---+
    M
    I
    T
    T
    E
    R
Pin Name Function Connects To
Base Control signal input Arduino (via 2.2kΩ resistor)
Collector High current output Solenoid valve (load)
Emitter Ground reference GND

1N4001 Diode Identification

    +----------------+
    |                |
    |   1N4001       |  ← Stripe on one end = CATHODE
    |                |
    +----------------+

    Anode (-)      Cathode (+)
Installation: Place across solenoid valve terminals
Cathode (stripe end) → +12V side of solenoid
Anode (plain end) → GND side of solenoid

Purpose: Protects transistor from voltage spikes when solenoid switches off (called a "flyback diode")

Breadboard Layout

This shows the physical arrangement of components on the breadboard. Use this as a reference when placing parts.

Top View of Breadboard Setup

    POWER RAILS          COMPONENT AREA                  GND RAILS
    ===========          ==============                  =========

     + + + + +           Arduino Uno                      - - - - -
     + + + + +      (Positioned to left side)             - - - - -
     + + + + +                                            - - - - -
     + + + + +           TIP120 #1                        - - - - -
     + + + + +          (Hot Water)                       - - - - -
     + + + + +        B   C   E                           - - - - -
     + + + + +        |   |   |                           - - - - -
     + + + + +        R   |   +---> GND                   - - - - -
     + + + + +        |   |                               - - - - -
     + + + + +     Pin 9  |                               - - - - -
     + + + + +           To Solenoid #1                   - - - - -
     + + + + +                                            - - - - -
     + + + + +           TIP120 #2                        - - - - -
     + + + + +          (Cold Water)                      - - - - -
     + + + + +        B   C   E                           - - - - -
     + + + + +        |   |   |                           - - - - -
     + + + + +        R   |   +---> GND                   - - - - -
     + + + + +        |   |                               - - - - -
     + + + + +    Pin 10  |                               - - - - -
     + + + + +           To Solenoid #2                   - - - - -
     + + + + +                                            - - - - -

Legend:
R = 2.2kΩ Resistor
B = Base, C = Collector, E = Emitter

Step-by-Step Wiring Instructions

Step 1: Power Distribution

  1. Connect 12V power supply (+) to breadboard positive rail (red)
  2. Connect 12V power supply (-) to breadboard negative rail (blue/black)
  3. Connect breadboard positive rail to Arduino VIN
  4. Connect breadboard negative rail to Arduino GND

Step 2: Solenoid Valve #1 (Hot Water)

  1. Insert TIP120 into breadboard
    • Base (left pin) in row A
    • Collector (middle) in row B
    • Emitter (right) in row C
  2. Connect 2.2kΩ resistor:
    • One end to Arduino Pin 9
    • Other end to TIP120 Base (row A)
  3. Connect Emitter to GND:
    • Wire from TIP120 Emitter (row C) to GND rail
  4. Connect Collector to Solenoid:
    • Wire from TIP120 Collector (row B) to Solenoid Terminal 1
  5. Connect Solenoid to Power:
    • Wire from Solenoid Terminal 2 to +12V rail
  6. Add Flyback Diode:
    • Cathode (stripe end) to +12V side of solenoid
    • Anode (plain end) to GND side of solenoid
    • Can solder directly to solenoid terminals or use nearby breadboard rows

Step 3: Solenoid Valve #2 (Cold Water)

Repeat Step 2, but use:

  • Arduino Pin 10 (instead of Pin 9)
  • Different breadboard rows (to avoid shorts)
  • Second solenoid valve

Step 4: Foot Pedal Switch

  1. Connect one foot pedal terminal to Arduino Pin 2
  2. Connect other foot pedal terminal to GND
Note: Pin 2 uses internal pull-up resistor (enabled in code), so no external resistor needed

Step 5: Status LED

  1. Connect 220Ω resistor:
    • One end to Arduino Pin 13
    • Other end to LED anode (positive, longer leg)
  2. Connect LED cathode (negative, shorter leg) to GND

Connection Checklist

Before powering on, verify each section:

Power Connections

  • 12V power supply (+) to breadboard (+) rail
  • 12V power supply (-) to breadboard (-) rail
  • Breadboard (+) rail to Arduino VIN
  • Breadboard (-) rail to Arduino GND
  • All GND points are connected together

Solenoid #1 (Hot Water)

  • Arduino Pin 9 → 2.2kΩ resistor → TIP120 Base
  • TIP120 Collector → Solenoid Terminal 1
  • Solenoid Terminal 2 → +12V
  • TIP120 Emitter → GND
  • 1N4001 diode across solenoid (stripe to +12V side)

Solenoid #2 (Cold Water)

  • Arduino Pin 10 → 2.2kΩ resistor → TIP120 Base
  • TIP120 Collector → Solenoid Terminal 1
  • Solenoid Terminal 2 → +12V
  • TIP120 Emitter → GND
  • 1N4001 diode across solenoid (stripe to +12V side)

Foot Pedal

  • One terminal → Arduino Pin 2
  • Other terminal → GND

Status LED

  • Arduino Pin 13 → 220Ω resistor → LED anode (+, long leg)
  • LED cathode (-, short leg) → GND

Common Wiring Mistakes

Avoid these common errors that can damage components or prevent the circuit from working.

WRONG: Diode Backwards

+12V ----[====]---- Solenoid ----[====]---- GND
              ^                        ^
          No stripe               Stripe here
            (WRONG - will not protect transistor!)

Problem: Transistor will be damaged by voltage spikes

CORRECT: Diode Orientation

+12V ----[====]---- Solenoid ----[====]---- GND
           Stripe                   No stripe
            (Cathode to +12V side - CORRECT!)

Result: Transistor protected from voltage spikes

WRONG: No Base Resistor

Arduino Pin 9 ---- TIP120 Base
                   (WRONG - can damage Arduino!)

Problem: Too much current drawn from Arduino pin

CORRECT: Base Resistor

Arduino Pin 9 ---[2.2kΩ]--- TIP120 Base
                            (CORRECT - limits current)

Result: Safe current level for Arduino

Other Common Mistakes:

  • Swapping transistor pins - Always verify flat side facing you, pins are Base-Collector-Emitter from left to right
  • LED polarity reversed - Long leg is anode (+), short leg is cathode (-)
  • Missing ground connections - All GND points must be connected together (Arduino GND, power supply -, breadboard GND rail)
  • Wrong resistor values - 2.2kΩ for transistor bases, 220Ω for LED
  • Loose connections - Ensure all wires are firmly inserted into breadboard holes

Testing Connections

Multimeter Tests (Power OFF)

1. Continuity Test

  • Set multimeter to continuity mode (beep symbol)
  • Test Arduino GND to breadboard GND rail (should beep)
  • Test each solenoid terminal to its TIP120 collector (should beep)

2. Resistance Test

  • Measure resistor values:
    • 2.2kΩ resistors should read ~2200Ω
    • 220Ω resistor should read ~220Ω

Voltage Tests (Power ON - no water)

1. Power Rail Voltage

  • Black probe to GND
  • Red probe to +12V rail
  • Should read 11.5-12.5V

2. Arduino Power

  • Black probe to Arduino GND
  • Red probe to Arduino 5V pin
  • Should read 4.8-5.2V

3. Solenoid Voltage (when activated)

  • Press foot pedal
  • Measure across solenoid terminals
  • Should read ~12V when valve is open, ~0V when circuit is off

Wire Management Tips

For Breadboard Testing

Use different colours for different functions:

  • Red: +12V connections
  • Black: GND connections
  • Yellow: Arduino signal pins
  • Blue: Sensor/input connections

For Permanent Installation

  • Use heat shrink tubing on all solder joints
  • Label wires with tape and marker:
    • "HOT VALVE", "COLD VALVE"
    • "PEDAL", "LED", etc.
  • Keep water and electrical separate - route wires away from plumbing
  • Use cable ties to bundle wires neatly
  • Leave some slack for adjustments

Safety Reminders

⚠️ ALWAYS:

  • Double-check diode polarity before powering on
  • Verify all GND connections are common
  • Keep water away from electronics during testing
  • Use waterproof enclosure for final installation
  • Turn off power before making any changes to the circuit
  • Test without water first

⚠️ NEVER:

  • Connect/disconnect components with power on
  • Touch bare wires or connections with wet hands
  • Skip the flyback diodes (transistors will fail)
  • Leave exposed wires near water sources
  • Use incorrect voltage power supply (must be 12V, not 5V or 24V)
  • Exceed the current rating of components

Next Steps

Once wiring is complete, follow this testing sequence:

  1. Visual inspection of all connections against checklist
  2. Multimeter testing (power off) - continuity and resistance
  3. Power on and test without water - verify solenoids click
  4. Proceed to bucket water test (see main guide)
  5. Install in sink after successful bucket test
📖 View Complete Guide 🛒 Shopping List 🏠 Back to Home

Quick Reference Summary

Component Quantity Key Connections
TIP120 Transistor 2 Base → Arduino pin (via 2.2kΩ)
Collector → Solenoid
Emitter → GND
1N4001 Diode 2 Across solenoid terminals
Stripe to +12V side
2.2kΩ Resistor 2 Between Arduino pins 9/10 and TIP120 bases
220Ω Resistor 1 Between Arduino pin 13 and LED anode
Solenoid Valves 2 Terminal 1 → TIP120 collector
Terminal 2 → +12V
Foot Pedal 1 Terminal 1 → Arduino Pin 2
Terminal 2 → GND
LED 1 Anode → 220Ω → Pin 13
Cathode → GND

Need Help?

If something isn't working, check the troubleshooting section in the complete guide.

🔧 Troubleshooting Guide