ESP 32 Camera Streaming Video Over WiFi |Getting Started With ESP 32 CAM Board

by electronicGURU in Circuits > Microcontrollers

148596 Views, 85 Favorites, 0 Comments

ESP 32 Camera Streaming Video Over WiFi |Getting Started With ESP 32 CAM Board

Installing ESP 32 Boards in 1 Minute in Arduino IDE | Getting Started with ESP 32
ESP 32 Camera Streaming video over WiFi |Getting Started with ESP 32 CAM board

The ESP32-CAM is a very small camera module with the ESP32-S chip that costs approximately $10. Besides the OV2640 camera, and several GPIOs to connect peripherals, it also features a microSD card slot that can be useful to store images taken with the camera or to store files to serve to clients.

Components Required :

72fb76d9-d3ad-45a4-9323-e9924a3d7805.jpg
ce798ebf-4fc6-42f8-9386-c8823e54f943.jpg

Pin Configuration & Features

ESP32-CAM-pinout-1.png

The smallest 802.11b/g/n Wi-Fi BT SoC moduleLow

power 32-bit CPU,can also serve the application processor

Up to 160MHz clock speed, summary computing power up to 600 DMIPS

Built-in 520 KB SRAM, external 4MPSRAM

Supports UART/SPI/I2C/PWM/ADC/DAC

Support OV2640 and OV7670 cameras, built-in flash lamp

Support image WiFI upload

Support TF cardSupports multiple sleep modes

Embedded Lwip and FreeRTOSSupports STA/AP/STA+AP operation mode

Support Smart Config/AirKiss technology

Support for serial port local and remote firmware upgrades (FOTA)

Pins used for microSD card reader:
GPIO 14: CLKGPIO 15: CMDGPIO 2: Data 0GPIO 4: Data 1 (also connected to the on-board LED)GPIO 12: Data 2GPIO 13: Data 3

Install ESP 32 Boards in Arduino IDE

Installing ESP 32 Boards in 1 Minute in Arduino IDE | Getting Started with ESP 32

Please refer this video to add ESP32 Boards in Arduino IDE

ESP 32 Boards Link : https://dl.espressif.com/dl/package_esp32_index.json

Code

esp32-cam-open-camerawebserver.png

In your Arduino IDE, go to File > Examples > ESP32 > Camera and open the CameraWebServer example.

OR Download the code from here :

https://electronicguru.in/wp-content/uploads/2019/...

Schematics for Programming the Board

ESP32-CAM-wiring-FTDI1.png

The ESP32-CAM doesn’t have a USB connector, so you need to use FTDI to upload code through the U0R and U0T pins (serial pins) in ESP32 CAM Board.

Please refer the schematics below

Uploading of the Code

Before uploading the code, you need to input your wifi credentials in the following part of code:

const char* ssid = "REPLACE_WITH_YOUR_SSID";

const char* password = "REPLACE_WITH_YOUR_PASSWORD";

and make sure you select the right camera module.

As here we’re using the AI-THINKER Model so select the following So, comment all the other models and uncomment this one:

#define CAMERA_MODEL_AI_THINKER

follow these steps to upload the code : Go to Tools > Board and select ESP32 Wrover ModuleGo to Tools > Port and select the COM port the ESP32 is connected toIn Tools > Partition Scheme, select “Huge APP (3MB No OTA)“Then, click the upload button to upload the code.

Getting IP From Serial Monitor

esp32-cam-ip-address.png

Remove the jumper connected between GPIO0 & GND then,

Open the Serial Monitor with the baud rate : 115200. Press the ESP32-CAM on-board Reset button and wait for the IP to appear and wait for few seconds and then hit reset again.

Its Time to Check the Video Stream

esp cam.png
ESP 32 Camera Streaming video over WiFi |Getting Started with ESP 32 CAM board

Open your browser and make sure your PC is connected to same network as ESP32 CAM and then type the IP and click on stream button and you’ll get similar video stream.

For Detailed Info Please watch the video.