A custom-built ESP32-based dual joystick wireless controller designed from scratch for gaming, robotics control, and wireless input experimentation. This project showcases advanced hardware prototyping with careful consideration for power management, signal integrity, and ergonomic design.
- Dual analog joysticks with push-button functionality
- 8 individual digital buttons with simultaneous input capability
- Wireless NRF24L01+ communication for reliable data transmission
- OLED display for real-time status and feedback
- Smart power management with boot-safe button isolation
- Ergonomic perfboard design optimized for comfortable gameplay
- Robust power filtering for stable RF operation
- ๐ Boot Protection: IRF740 MOSFET gating prevents GPIO conflicts during ESP32 startup
- โก Power Conditioning: Multi-stage filtering (2200ยตF + 100nF) for clean RF operation
- ๐ Voltage Scaling: Proper 5Vโ3.3V dividers for joystick analog inputs
- ๐ฏ Individual GPIO Mapping: Every button gets its own pin for simultaneous inputs
- Eliminated resistor ladders in favor of direct GPIO mapping
- Strategic pin selection avoiding ESP32 boot-strapping conflicts
- Optimized ergonomics with joysticks positioned above buttons
- Linear button layout for natural thumb movement patterns
Component | Purpose | Key Specs |
---|---|---|
ESP32 MINI Kit | Main MCU | 240MHz dual-core, WiFi/BLE |
2ร KY-023 Joysticks | Analog input | Dual-axis + push-button |
8ร Push Buttons | Digital inputs | Individual GPIO mapping |
IRF740 MOSFET | Boot protection | VCC gating for safe startup |
NRF24L01+PA/LNA | Wireless comm | Long-range RF transceiver |
0.66" OLED Display | Status feedback | IยฒC interface |
Passive Buzzer | Audio alerts | PWM-driven |
Dual 18650 + Shield | Power system | 5V/3.3V regulated output |
- Multi-stage filtering: 2200ยตF electrolytic + 100nF ceramic capacitors
- ESD protection: 1N4148 diodes on sensitive inputs
- Voltage dividers: 10kฮฉ/20kฮฉ for 5Vโ3.3V joystick scaling
- Pull-up networks: Proper input conditioning for all digital pins
Function | ESP32 GPIO | Type | Notes |
---|---|---|---|
Left Joystick | |||
โโ VRX | GPIO36 (SVP) | ADC1 | Via voltage divider |
โโ VRY | GPIO39 (SVN) | ADC1 | Via voltage divider |
โโ SW | GPIO27 | Digital | Pull-up enabled |
Right Joystick | |||
โโ VRX | GPIO34 | ADC1 | Via voltage divider |
โโ VRY | GPIO35 | ADC1 | Via voltage divider |
โโ SW | GPIO26 | Digital | Pull-up enabled |
Push Buttons | |||
โโ Button 1-2 | GPIO32, 33 | Digital | Former ladder inputs |
โโ Button 3-4 | GPIO0, 2 | Digital | Boot-safe via MOSFET |
โโ Button 5-8 | GPIO4,5,15,13 | Digital | Standard inputs |
Peripherals | |||
โโ OLED (SDA/SCL) | GPIO21, 22 | IยฒC | Status display |
โโ NRF24 (CE/CSN) | GPIO16, 17 | Digital | RF control |
โโ NRF24 (SPI) | GPIO18,19,23 | SPI | Data interface |
โโ Buzzer | GPIO25 | PWM | Audio feedback |
โโ Button Gate | GPIO14 | Output | MOSFET control |
Problem: ESP32 GPIOs like GPIO0 and GPIO2 are boot-strapping pins - pulling them LOW during startup can prevent normal boot.
Solution: Hardware-gated button power using IRF740 MOSFET:
#define BTN_POWER_GATE 14
void setup() {
pinMode(BTN_POWER_GATE, OUTPUT);
digitalWrite(BTN_POWER_GATE, LOW); // Buttons OFF during boot
delay(500); // Allow clean startup
digitalWrite(BTN_POWER_GATE, HIGH); // Enable all buttons
}
This ensures zero interference with ESP32 boot sequence while maintaining full button functionality during operation.
KY-023 Output (0-5V) โโ[10kฮฉ]โโ GPIO โโ[20kฮฉ]โโ GND
โ
(0-3.3V safe)
VCC โโโฌโโ[2200ยตF]โโโฌโโ NRF24L01+
โโโ[100nF]โโโโ
โ โ
Bulk storage Noise filter
3.3V โโ[IRF740]โโ Button VCC
โ
GPIO14 control
Phase | Status | Details |
---|---|---|
โ Design & Planning | Complete | Component selection, pin mapping |
โ Hardware Prototyping | Complete | Perfboard layout, component placement |
โ Power System Design | Complete | Voltage regulation, filtering, protection |
โ Boot Protection | Complete | MOSFET gating, safe startup sequence |
โ Physical Assembly | Complete | Soldering, wiring, mechanical assembly |
๐ Firmware Development | In Progress | NRF communication, input handling |
๐ UI Implementation | Upcoming | OLED display, status indicators |
๐ Wireless Testing | Upcoming | Range testing, latency optimization |
- Joysticks positioned above buttons for natural thumb reach
- Linear button arrangement instead of cramped D-pad layouts
- Comfortable grip tested with real-world usage scenarios
- No triggers - simplified design for better handling
- Individual button GPIOs eliminate input conflicts
- Proper voltage scaling protects ESP32 from 5V joystick signals
- Multi-stage filtering ensures clean power for sensitive RF circuits
- Boot-safe design prevents startup issues from user inputs
- Clear pin documentation for easy modifications
- Modular power domains for safe testing and debugging
- Standard components for easy sourcing and replacement
โโโ README.md # This overview
โโโ progress-log.md # Detailed development journal
โโโ plan/
โ โโโ PinPlanning.md # Complete GPIO assignments
โ โโโ JoyStickPlan.ino # Initial firmware framework
โโโ logs/
โโโ LOG-7.md # Physical assembly photos
โโโ LOG-8.md # Final wiring and testing
This project demonstrates:
- Advanced ESP32 GPIO management with boot-strapping considerations
- Mixed-signal design combining analog joysticks with digital controls
- RF circuit design with proper power conditioning and filtering
- Mechanical prototyping with ergonomic considerations
- Power domain isolation using MOSFET switching circuits
stndnt-c1 | GitHub Profile
"Why buy a controller when you can engineer a better one?"
This project is licensed under the MIT License - see the LICENSE
file for details.
Hardware designs, circuit schematics, and documentation are freely available for educational and personal use.