Pan Tilt Wifi Camera Controlled by Smartphone With ESP32

by BidCZI in Circuits > Cameras

2689 Views, 15 Favorites, 0 Comments

Pan Tilt Wifi Camera Controlled by Smartphone With ESP32

PTZ  Camera S.jpg
SpyCam.jpg

I am going to make a Pan & Tilt Camera with ESP32 Cam. This can be viewed & controlled via Phone or any web browser from Tablet , PC etc. This project can done in 30 minutes. Just connect the wire & upload the code to ESP32 quite easy. You just need to supply 5 volt from battery & can be installed anywhere as its very small.Total cost of the project is less than $15.

Supplies

PTZ Components.jpg
  1. ESP32 Cam
  2. 2 Axis Pan Tilt Servo Bracket
  3. 3.7 18650 Battery.
  4. MT3608 Power Booster Module
  5. FT232RL USB TO UART TTL
  6. Jumper Wire.

Powering ESP32 Camera

Power Bank2.jpg
Power Bank.jpg

To run this camera you need 5 volt. Either you can use a power bank to supply or make your own Power Bank easily. Connect 18650 Battery with MT3608 Power Booster Module and adjust the voltage to 5 volt. I used the same with a charger module TP4056 to charge the battery also.You can also use any 5 volt charger Module like 134N3P which default output is 5 volt.

Uploading Code

Esp-32 FTDI.jpg
Esp-32 Arduino Conn .jpg
Upload2.jpg
Upload1.jpg
Testing.jpg

To upload the code you need FT232RL USB TO UART TTL Module or Arduino. Connect the ESP32 Cam as per diagram. Make sure IO0 & Ground pin of ESP32 cam are connected while uploading the code.Next choose the board as AI thinker ESP32 Cam in Arduino IDE. Hit the upload button. Check the video for complete details.

3D Printing Case

3D print1.jpg
3D print2.jpg

You can download the .stl file & 3D print the case for camera & Power Bank. Without the case it will work no issue but looks good.

Connecting Servos & Camera

Esp32 PTZ Circuit.jpg
Complete1.jpg
Complete2.jpg

Now connect the servos & ESP32 Camera with the Power module as per circuit Diagram. I have used jumper wire to connect but you can solder it make more robust. Now open browser from smartphone, Tab or PC & type the IP address you got when you uploaded the code. Check video for details instructions. Now if you move the joystick on browser you could see the camera moving i.e. Pan & Tilt function.

Video in Details & Download Code

ESP32 PTZ Camera Control with Phone IoT

Check the video for step by step guide in Details.

Download Code below for controlling ESP32 Camera.