Create Compact Wi-Fi-based Camera Capable of Live Video Streaming

Check out our latest products

Added to wishlistRemoved from wishlist 0
Add to compare
(2-Way Audio & PIR Detection) Dual Antennas Outdoor Wireless Security Camera System 5.5MP Wi-Fi Video Surveillance
Added to wishlistRemoved from wishlist 0
Add to compare
$399.99
Added to wishlistRemoved from wishlist 0
Add to compare
2 | FPV Goggles for All Camera Drones | Unibody Lens | HD FPV Goggles | Compatible Versatile Skyview FPV Drone Goggles | Clear Immersive View | All GPS Camera Drone
Added to wishlistRemoved from wishlist 0
Add to compare
$179.00

The IndusBoard Coin V2, a compact ESP32-S2-based development board measuring just 3.3 cm, is an excellent platform for building ultra-small embedded projects. Combined with the OV2640 camera module, this project showcases how to create a compact, Wi-Fi-based spy camera capable of live video streaming. This makes it suitable for home security, baby monitoring, or discreet surveillance applications.

Wi-Fi-based spy camera Project
Fig 1. Smallest SPY Camera

Uses and Applications

  • Security & Surveillance: Deploy in small spaces for remote monitoring.
  • Home Automation: Monitor rooms, doorways, or restricted areas.
  • Wearable Technology: Can be used for body-worn spy cameras.
  • IoT & Embedded Vision: Useful for AI-based visual processing projects.

The project utilizes the IndusBoard Coin V2’s onboard Wi-Fi capabilities to host a web server that streams real-time video. The OV2640 camera captures images and transmits them via Wi-Fi in multiple pixel formats, which can be viewed on any device connected to the same network.

The camera operates in AP mode, meaning it creates its own Wi-Fi network, making it highly portable and independent of existing networks.

Bill of Materials

Components required for Wi-Fi-based spy camera project

Circuit

Coin V2 uses specific GPIO pins to interface with the OV2640 camera module. Below is a breakdown of the key pin connections:

  • XCLK (GPIO 44) → Provides an external clock signal to the camera (20 MHz).
  • PCLK (GPIO 39) → Pixel clock, synchronizing data transfer from the camera to the ESP32.
  • VSYNC (GPIO 21) → Vertical synchronization signal, marking the start of a new frame.
  • HREF (GPIO 1) → Horizontal synchronization signal, marking the start of a new line in a frame.
  • SDA (GPIO 8) & SCL (GPIO 9) → I2C communication pins used for camera configuration.
  • RESET (GPIO 2) → Used to reset the camera module if needed.
  • PWDN (GPIO -1) → Power-down control (not used, so set to -1).
  • Camera Data Pins (D0-D7)

The camera captures images as raw pixel data, which is transmitted over an 8-bit parallel interface:

– Advertisement –

OV2640 camera module and IndusBoard Coin Connection
Fig 2. OV2640 camera module and IndusBoard Coin Connection
IndusBoard Coin and OV2640 camera module Connection
Fig 3. IndusBoard Coin ESP Chip and OV2640 camera connected

Code

Code starts by including the necessary libraries: esp_camera.h for camera control, WiFi.h for wireless connectivity, and WebServer.h for hosting a web interface.

The pin configuration is defined using GPIO assignments for clock, sync, and data signals to correctly initialize the OV2640 camera. The initCamera() function sets up the camera parameters such as frame size, pixel format, and clock frequency before initializing it with esp_camera_init().

The webpage HTML is embedded within the code, designed with a simple layout to display the live camera feed inside a resizable frame. It includes a dropdown menu to switch between different pixel formats (JPEG, YUV422, RGB565, or Grayscale) and dynamically updates the stream.

– Advertisement –

The Coin V2 camera operates in WiFi Access Point (AP) mode, allowing users to connect directly to the device, however, the STA mode can also be used.

When the server receives a request at /stream, the handle_jpg_stream() function captures frames from the camera buffer using esp_camera_fb_get() and transmits them as multipart images, enabling live streaming. The loop() continuously handles client requests, ensuring a smooth video feed

Ov2640 Camera module pin configuration
Fig 4. Ov2640 Camera pin configuration

Testing

Now, power the device and then either with a 3.3V DC adapter or a 3.3V DC battery using the 3.3V and GND pins on the board.

Then open your wifi settings, search for Indusbaord CAM wifi SISD, and connect to it using the password you have set in the code. And then after connection, open any web browser and search 191.168.4.1, and then you can see the live-streamed video.

Indusboard Camera
Fig 5. Testing Indusboard Camera


Added to wishlistRemoved from wishlist 0
Add to compare
’47 MLB Mens Men’s Brand Clean Up Cap One-Size
Added to wishlistRemoved from wishlist 0
Add to compare
$29.95
Added to wishlistRemoved from wishlist 0
Add to compare
(2-Way Audio & PIR Detection) Dual Antennas Outdoor Wireless Security Camera System 5.5MP Wi-Fi Video Surveillance
Added to wishlistRemoved from wishlist 0
Add to compare
$399.99
Added to wishlistRemoved from wishlist 0
Add to compare
[3 Pack] Sport Bands Compatible with Fitbit Charge 5 Bands Women Men, Adjustable Soft Silicone Charge 5 Wristband Strap for Fitbit Charge 5, Large
Added to wishlistRemoved from wishlist 0
Add to compare
$9.99
Added to wishlistRemoved from wishlist 0
Add to compare
[3 Pack] Sport Bands Compatible with Fitbit Charge 5 Bands Women Men, Adjustable Soft Silicone Charge 5 Wristband Strap for Fitbit Charge 5, Small
Added to wishlistRemoved from wishlist 0
Add to compare
$9.99

We will be happy to hear your thoughts

Leave a reply

Best Deals for all new
Logo
Compare items
  • Total (0)
Compare
0
Shopping cart