ESP32-CAM Video Surveillance Smart Camera
by stgrys in Circuits > Microcontrollers
13290 Views, 55 Favorites, 0 Comments
ESP32-CAM Video Surveillance Smart Camera
Description
This project is a development of our ESP32-CAM Video Surveillance Robot project. Eventually we got a video surveillance pan & tilt camera that can be controlled with an iPhone through Internet
Parts List:
ESP32-CAM x1
FT232RL FTDI Mini USB x1 - for uploading a code to the ESP32-CAM
18650 Battery Holder x1 1
8650 Battery x2 (as an alternative four AA batteries and its holder can be used instead of 18650 batteries)
Mini Pan/Tilt Platform w/ 2 SG-90 Servos x1
MB102 Breadboard Power Supply Module x1
Connect wires as shown on the schematic. Make sure that the Tilt servo is connected to the pin #IO2 and the Pan servo to #IO14.
In order to attach the MB102 module to the 18650 Battery Holder, I removed the pins on the bottom of the MB102. Then, I attached it to the cover of the 18650 Battery Holder with double sided mounting tape.
Connect all parts using the schematic. Use a piece of foam and double sided mounting tape to attach the ESP32-CAM to the Pan/Tilt platform. Attach the Pan/Tilt platform to the cover of the 18650 Battery Holder with double sided mounting tape.
Install the ESP32 Add-on on Arduino IDE:
Follow one of the next tutorials to install the ESP32 add-on, if you haven’t already: Installing the ESP32 Board in Arduino IDE (Windows instructions) Installing the ESP32 Board in Arduino IDE (Mac and Linux instructions) Download the code from here Make sure that you have two tabs with code in the Arduino IDE: esp32_cam_cam1 and app_httpd.cpp as shown on the screenshot.
After uploading the code, disconnect GPIO 0 from GND.
Open the Serial Monitor at a baud rate of 115200. Press the ESP32-CAM on-board RST button. The ESP32-CAM IP address should be shown in the Serial Monitor.
Disconnect the ESP32-CAM from the FTDI programmer.
Connect the ESP32-CAM back to the Pan/Tilt platform, turn on power and press the ESP32-CAM on-board RST button. Download the App from here, run the App on your iPhone, enter the ESP32-CAM IP address and start playing with your video surveillance camera!
In order to be able to control the camera though the Internet outside your home network, you should open up your router settings. (google how to do this for your router). There you will find some settings, including something along the lines of Forwarding or Port Forwarding.
The important thing to note here is the "Port Range" and the "Device" or "IP address". In "Port Range" you should type 80-81. For "Device" you should select your ESP32-CAM device. In some routers you should put the IP address of your ESP32-CAM instead of a device name. Go to www.whatsmyip.org and copy your IP. Use this IP in the App when you are outside your home network.