garage_door/WIRING.txt
2026-05-30 20:16:43 -05:00

216 lines
No EOL
8.3 KiB
Text

================================================================================
GARAGE DOOR CONTROLLER - WIRING DIAGRAM
Raspberry Pi Pico 2
================================================================================
HARDWARE REQUIRED
-----------------
- Raspberry Pi Pico 2
- SunFounder 2-Channel 5V Relay Module (Amazon: B00E0NTPP4)
- 2x Door position sensors (optional, for status detection)
- Jumper wires (female-to-male recommended)
- Power supply (5V, 1A minimum)
================================================================================
PIN CONFIGURATION
================================================================================
Pico 2 Pin Layout (Top View)
=============================
| 3V3(1) (2) VBUS |
| GND (3) (4) 3V3_EN|
| GP28 (5) (6) ADC2 |
| GP27 (7) (8) ADC1 |
| GP26 (9) (10) ADC0 |
| RUN (11) (12) GP22 |
| GP21 (13) (14) GP20 |
| GP19 (15) (16) GP18 |
| GP17 (17) (18) GP16 |
| GP15 (19) (20) GP14 |
| GP13 (21) (22) GP12 |
| GND (23) (24) GP11 |
| VSYS (25) (26) GP10 |
| GND (27) (28) GP9 |
| 3V3 (29) (30) GP8 |
| 3V3 (31) (32) GP7 |
| ADC3 (33) (34) GP6 |
| GP4 (35) (36) GP5 |
| GP3 (37) (38) GP2 |
| GP1 (39) (40) GP0 |
|_____(41) (42)________|
================================================================================
RELAY MODULE WIRING
================================================================================
Relay Module Pins (Top View)
=============================
+--------+ +--------+
| IN1 | | IN2 |
| VCC | | GND |
| GND | | COM2 |
| COM1 | | NO2 |
| NO1 | | NC2 |
| NC1 | | |
+--------+ +--------+
Connect Relay Module to Pico 2:
-------------------------------
Relay Module Pico 2
----------- -------
VCC ----> 5V (Pin 39)
GND ----> GND (Pin 38)
IN1 ----> GP15 (Pin 20) - Door 1
IN2 ----> GP16 (Pin 21) - Door 2
================================================================================
GARAGE DOOR OPENER WIRING
================================================================================
OVERHEAD DOOR ODYSSEY 1000 TERMINALS
------------------------------------
Locate the wall control terminals on your garage door opener motor unit.
These are typically labeled "WALL CONTROL" or have two screw terminals
(usually red and white wires).
WIRING DIAGRAM FOR EACH DOOR:
-----------------------------
+-------------------+ +-------------------+
| Garage Door | | Garage Door |
| Opener #1 | | Opener #2 |
| | | |
| Red Wire ----+--+---------+--+--> Relay 1 COM |
| | | | | |
| White Wire --+--+---------+--+--> Relay 1 NO |
| (parallel w/ | |
| wall button) | |
+-------------------+ +-------------------+
|
v
+-------------------+ +-------------------+
| | | |
| Red Wire ----+--+---------+--+--> Relay 2 COM |
| | | | | |
| White Wire --+--+---------+--+--> Relay 2 NO |
| (parallel w/ | |
| wall button) | |
+-------------------+ +-------------------+
IMPORTANT NOTES:
- Wire in PARALLEL with existing wall buttons (keep them functional)
- Use NO (Normally Open) terminals, NOT NC
- Garage door button circuit is low voltage (~12-24V), safe to work with
- Always disconnect power before working with opener wiring
================================================================================
DOOR SENSOR WIRING (OPTIONAL)
================================================================================
If using door position sensors to detect open/closed status:
Sensor 1 (Door 1) Pico 2
--------------- -------
VCC (if powered) --> 3V3 (Pin 36)
GND --> GND (Pin 38)
Signal --> GP14 (Pin 19) - Configured in config.py
Sensor 2 (Door 2) Pico 2
--------------- -------
VCC (if powered) --> 3V3 (Pin 36)
GND --> GND (Pin 38)
Signal --> GP13 (Pin 18) - Configured in config.py
Note: Config uses internal pull-up resistors, so sensors should be
configured as normally-open (closed = door open).
================================================================================
COMPLETE WIRING SUMMARY
================================================================================
+------------------+
| Pico 2 W |
+------------------+
| |
5V (Pin 39) ----+--> VCC (Relay) |
| |
GND (Pin 38) ---+--> GND (Relay) |
| |
GP15 (Pin 20)-->--> IN1 (Relay) |---- Door 1 Control
| |
GP16 (Pin 21)-->--> IN2 (Relay) |---- Door 2 Control
| |
GP14 (Pin 19)-->--> Door Sensor 1 |---- (Optional)
| |
GP13 (Pin 18)-->--> Door Sensor 2 |---- (Optional)
| |
+------------------+
================================================================================
CONFIGURATION
================================================================================
Edit config.py to customize:
WIFI_SSID - Your WiFi network name
WIFI_PASSWORD - Your WiFi password
STATIC_IP - Fixed IP address for the Pico
SUBNET - Subnet mask
GATEWAY - Router IP address
DNS - DNS server IP
RELAY1_PIN - GPIO pin for door 1 relay (default: 15)
RELAY2_PIN - GPIO pin for door 2 relay (default: 16)
DOOR1_SENSOR_PIN - GPIO pin for door 1 sensor (default: 14)
DOOR2_SENSOR_PIN - GPIO pin for door 2 sensor (default: 13)
PRESS_COOLDOWN - Seconds between button presses (default: 2)
================================================================================
SAFETY FEATURES
================================================================================
1. PRESS COOLDOWN
- Prevents rapid repeated presses
- 2-second cooldown between toggles
- Displays warning message if pressed too quickly
2. PARALLEL WIRING
- Original wall buttons remain functional
- No loss of manual control
3. LOW-VOLTAGE OPERATION
- Relay contacts handle the garage door opener's low-voltage circuit
- No mains voltage involved in control circuit
================================================================================
TESTING PROCEDURE
================================================================================
1. Upload config.py and main.py to Pico 2
2. Wire relay module to Pico (5V, GND, GP15, GP16)
3. Connect relay to one garage door opener (test with door 1 first)
4. Power on Pico and check serial output for IP address
5. Navigate to http://<STATIC_IP> in browser
6. Test toggle button - door should respond
7. Verify wall button still works
8. Repeat for door 2
================================================================================
FAQ
================================================================================
Q: The relay clicks but the door doesn't respond
A: Check wiring - ensure COM and NO terminals are used, not NC
Q: Door status shows wrong
A: Check sensor wiring or disable sensors in code (remove sensor pins)
Q: Can't connect to web interface
A: Verify STATIC_IP is in your network's subnet and not conflicting
Q: Button press has no effect
A: Verify RELAY_ON/RELAY_OFF values match your relay (try swapping 0/1)
================================================================================