8000 GitHub - stdnt-c1/Personal-Project: A compilation of my personal projects
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stdnt-c1/Personal-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ESP32 Dual Joystick Wireless Controller

Version
Status
License
ESP32
DIY


๐ŸŽฎ Project Overview

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.

Key Features

  • 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

๐Ÿš€ What Makes This Special

Advanced Hardware Solutions

  • ๐Ÿ”’ 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

Smart Design Decisions

  • 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

โš™๏ธ Hardware Architecture

Core Components

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

Power & Signal Conditioning

  • 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

๐Ÿ”Œ GPIO Pin Mapping

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

๐Ÿ›ก๏ธ Boot Protection System

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.


๐Ÿ”ง Circuit Highlights

Joystick Voltage Scaling

KY-023 Output (0-5V) โ”€โ”€[10kฮฉ]โ”€โ”€ GPIO โ”€โ”€[20kฮฉ]โ”€โ”€ GND
                                  โ†‘
                              (0-3.3V safe)

RF Power Conditioning

VCC โ”€โ”€โ”ฌโ”€โ”€[2200ยตF]โ”€โ”€โ”ฌโ”€โ”€ NRF24L01+
      โ””โ”€โ”€[100nF]โ”€โ”€โ”€โ”˜
      โ†‘              โ†‘
   Bulk storage   Noise filter

Button Protection

3.3V โ”€โ”€[IRF740]โ”€โ”€ Button VCC
         โ†‘
    GPIO14 control

๐Ÿ“ˆ Development Timeline

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

๐ŸŽฏ Design Philosophy

Ergonomics First

  • 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

Electrical Integrity

  • 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

Maintainable Architecture

  • Clear pin documentation for easy modifications
  • Modular power domains for safe testing and debugging
  • Standard components for easy sourcing and replacement

๐Ÿ“š Documentation Structure

โ”œโ”€โ”€ 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

๐Ÿ” Key Learning Outcomes

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

๐Ÿ‘จโ€๐Ÿ’ป Author

stndnt-c1 | GitHub Profile

"Why buy a controller when you can engineer a better one?"


๐Ÿ“„ License

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.

About

A compilation of my personal projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0