Wireless video streaming system based on ESP32-CAM that creates an autonomous WiFi hotspot. Allows real-time streaming visualization through web browser and controls the flash LED with PWM intensity adjustment. Includes OLED display to show connection information without needing PC connection.
This project was created to provide a simple home security camera for monitoring young children from other rooms in the house. The system is designed to be accessible from any mobile device or PC connected to the same WiFi network, making it perfect for:
- Baby monitoring from another room
- Child surveillance while working from home
- Quick setup without complex network configurations
- No cloud dependency - everything works locally
The OLED display shows connection information in clear text (WiFi name, password, and IP address) intentionally, as anyone with physical access to the camera should be able to connect. This makes it easy for family members or caregivers to access the video stream without needing technical knowledge.
Key advantages:
- β No internet connection required
- β No monthly subscription fees
- β No cloud storage or privacy concerns
- β Portable and battery-powered capable
- β Easy to move between rooms
- Hardware Components
- Technical Specifications
- Wiring Diagram
- Features
- Installation
- Usage
- Troubleshooting
- Customization
- Changelog
- ESP32-CAM (AI-Thinker) with OV2640 camera
- OLED Display SSD1306 128x64 pixels (5V)
- 5V Power supply (or USB powerbank)
- USB-to-Serial module (only for programming, removable after)
| Parameter | Value |
|---|---|
| Video Resolution | VGA (640x480) default, switchable to SVGA/XGA |
| Frame Rate | Adjustable 3.3-10 fps (100-300ms refresh) |
| Image Format | JPEG |
| LED Control | PWM 256 levels (0-255) |
| Protocol | HTTP |
| Web Server Port | 80 |
| WiFi Mode | Access Point (Hotspot) |
| IP Address | 192.168.4.1 (fixed) |
For detailed wiring instructions, pin connections, and assembly steps, see the Wiring Guide.
Quick reference:
VCC β 5V
GND β GND
SDA β GPIO 14
SCL β GPIO 15
5V Power β ESP32-CAM 5V Pin
GND β ESP32-CAM GND Pin
- Automatic image refresh with adjustable speed
- Responsive full-screen display
- Compatible with all modern browsers
- Real-time FPS adjustment slider (3.3-10 fps)
- Brightness slider: Fine adjustment 0-255 with gradual control (step=1)
- FLASH ON button: Turns on at maximum (255)
- FLASH OFF button: Turns off completely (0)
- PWM control for smooth transitions
- TAKE PHOTO button: Captures high quality image
- Automatic download to device
- Filename with unique timestamp (
photo_XXXXX.jpg) - No limit on number of photos
- NORMAL: Default orientation
- ROTATE 180: 180 degrees rotation
- VGA (640x480): Default, balanced quality/speed
- SVGA (800x600): Higher quality, slightly slower
- XGA (1024x768): High quality, slower streaming
- Real-time resolution switching without restart
- Adjustable refresh rate slider: 100ms to 300ms (10 fps to 3.3 fps)
- Real-time adjustment without page reload
- Find optimal balance between smoothness and stability
- Useful for weak WiFi connections or multiple clients
- Shows SSID, password and IP address
- Information always visible without PC
- Useful for field configuration
- Current resolution indicator
- Current FPS (frames per second) display
- Real-time updates when settings change
- Easy monitoring of streaming parameters
Install these libraries via Tools β Manage Libraries in Arduino IDE:
- ESP32 Board Support (version 2.0.17 or later)
- Install via "Boards Manager"
- URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Adafruit SSD1306 (for OLED display)
- Adafruit GFX Library (display dependency)
- Wire (included in ESP32 core)
Board: "AI Thinker ESP32-CAM"
Upload Speed: 115200
CPU Frequency: 240MHz
Flash Frequency: 80MHz
Flash Mode: QIO
Partition Scheme: Huge APP (3MB No OTA/1MB SPIFFS)
Core Debug Level: None
Erase Flash: Disabled
- Connect ESP32-CAM to USB-to-Serial module
- Connect GPIO 0 to GND during upload
β οΈ - Upload sketch via Arduino IDE
- Disconnect GPIO 0 from GND
- Restart ESP32-CAM
- Connect OLED display to indicated pins
- Power with 5V
WiFi Name (SSID): ESP32-CAM
Password: 12345678
IP Address: 192.168.4.1
Port: 80
Note: These parameters can be modified in lines 9-10 of the code.
- Power the ESP32-CAM with 5V
- Wait for startup (2-3 seconds)
- Read IP on OLED display (192.168.4.1)
- Connect mobile/PC to "ESP32-CAM" WiFi
- Enter password: 12345678
- Open browser and navigate to:
http://192.168.4.1 - Use controls on web page
- Adjust stream speed slider if experiencing disconnections
β οΈ Note: When connected to ESP32-CAM hotspot you will not have Internet access.
If you experience lag or disconnections:
- Start with 150ms (6.7 fps) - good balance
- For weak signals, increase to 200ms (5 fps) or higher
- For smoother video on good connections, try 100ms (10 fps)
- The slider allows real-time adjustment without restart
Having issues? Check the Troubleshooting Guide for:
- Code upload problems (Debian/Linux specific)
- Board version compatibility issues
- Common errors and solutions
- Display and connectivity problems
// Lines 9-10
const char* ssid = "YourName";
const char* password = "YourPassword";// Line 472
config.frame_size = FRAMESIZE_VGA; // 640x480 (default)
config.frame_size = FRAMESIZE_SVGA; // 800x600
config.frame_size = FRAMESIZE_XGA; // 1024x768The default refresh rate is now 150ms (6.7 fps). To change it, modify the JavaScript in the HTML section:
// Default value
let currentRefreshRate = 150; // Change to 100, 200, 250, etc.Users can adjust this in real-time using the Stream Speed slider on the web interface.
// Line 473
config.jpeg_quality = 12; // Default quality
config.jpeg_quality = 8; // High quality (larger files)
config.jpeg_quality = 15; // Lower quality (smaller files, faster)In resolution_handler() function, add:
FRAMESIZE_QVGA // 320x240
FRAMESIZE_SXGA // 1280x1024
FRAMESIZE_UXGA // 1600x1200- Average current: ~180-250mA at 5V
- Peaks during transmission: ~300mA
- Higher resolution: Increases power consumption
- Battery life with 10000mAh powerbank: ~40-50 hours theoretical
β οΈ Important: Use a power supply capable of at least 2A. Insufficient power is the most common cause of disconnections and instability.
- Cannot record video, only live streaming or single photos
- MicroSD slot shares pins with camera (either SD or streaming)
- WiFi range limited to ~10-20 meters in open spaces
- Maximum 4 concurrent clients connected to hotspot
- Streaming latency: 100-200ms typical
- High resolutions (XGA) may cause frame drops on weak connections
- ESP32 Core version tested: 2.0.17
- Development OS: Linux (Arduino IDE 1.8.19)
- Last update: December 2024
- Test environment: Ubuntu/Debian based
The project uses an image refresh system instead of continuous MJPEG streaming to avoid HTTP request blocking and allow simultaneous LED flash control.
- Add motion detection with automatic capture
- Implement photo saving to microSD (disabling streaming)
- Add authentication with username/password
- Implement programmable time-lapse
- Add pan/tilt controls with servo motors
- Send photos via HTTP POST to external server
- Add date/time overlay on photos
- Implement brightness/contrast/saturation controls
Open source project based on Espressif and Adafruit examples. Libraries used under respective licenses (MIT/Apache).
For questions, issues or suggestions, refer to:
- ποΈ Removed flip vertical and flip horizontal buttons for cleaner interface
- π Added live status display showing current resolution and FPS
- π― Status display updates in real-time when settings change
- β¨ Improved visual feedback for active settings
- π¨ Cleaner, more focused control panel
- β¨ Added real-time FPS adjustment slider (100-300ms range)
- π― Default refresh rate changed to 150ms (6.7 fps) for better stability
- π Live FPS display shows current streaming speed
- β‘ Improved performance optimization options
- π± Better mobile device compatibility with adjustable stream speed
- β¨ Improved LED brightness slider with gradual control (step=1)
- π¨ Reorganized web interface layout (brightness first, then buttons)
- π― Limited resolution options to VGA, SVGA, XGA for better usability
- π§ Enhanced slider visual appearance (larger cursor, thicker bar)
- π Optimized button sizes (reduced by ~40% for cleaner interface)
- β¨ Added image orientation controls (normal, 180Β°, vertical flip, horizontal flip)
- πΈ Added real-time resolution switching (VGA, SVGA, XGA)
- π¨ Improved web interface with modern gradient design
- β¨ Enhanced UI/UX with glassmorphism effects
- π All comments translated to English for GitHub publication
- π Basic streaming implementation with autonomous hotspot
- π‘ Added LED control with PWM and slider
- πΊ Added OLED display for connection info
- π· Added photo capture function with download
- β‘ Optimized refresh rate for mobile compatibility
Made with β€οΈ for the ESP32 community





