Hi guys, Today we are going to make a SPY camera using ESP32-CAM. I have some ideas to install that camera in a Led bulb cover or phone charger. Because some of the products related to this is also available on amazon. But I want to see the data over Wi-Fi or Internet. And that make sense, If we are using a non-Wi-Fi camera in this century without IOT, then our generation is way behind.

So, In this tutorial We will discuss the ESP32 cam boards in brief. Then, how to program them and how to make connection between camera module and wi-fi, some sort of coding knowledge. And finally, we will install whole setup into a Led BULB. And then we order the PCB prototypes of power supply from JLCPCB (5pcs in just $2).


This camera module mostly available in two different products, one is from AI thinker and one is generic product. AI thinker is $2 costlier than generic, but both works fine. I am using generic one here. And both of them have same features, given below.



  • - Ultra-small 802.11b/g/n Wi-Fi + BT/BLE SoC module
  • - Low-power dual-core 32-bit CPU for application processors
  • - Up to 240MHz, up to 600 DMIPS
  • - Built-in 520 KB SRAM, external 4M PSRAM
  • - Supports interfaces such as UART/SPI/I2C/PWM/ADC/DAC
  • - Support OV2640 and OV7670 cameras with built-in flash
  • - Support for images WiFI upload
  • - Support TF card
  • - Support multiple sleep modes
  • - Support STA/AP/STA+AP working mode
  • - Support Smart Config
  • - Support for serial local upgrade and remote firmware upgrade (FOTA)

Programming and setup:


ESP32 board does not have usb port or onboard programmer chip, so we need an external programmer. Some cheap programmer boards are available like, ch340g and FTDI232RL which can do the job perfectly. For programming, Install Arduino IDE and download the Esp32 boards from board manger under the tools section.


Paste this code in the preference section under files menu. If there is any already then add a comma and paste the code: https://dl.espressif.com/dl/package_esp32_index.json

Circuit diagram:


Here I am using FTDI programmer and configure this with esp32 using the wires, as shown in the diagram below.

If you wan to build our Own programmer board then check our tutorial: To get all the details about CH340 and FTDI programmer boards. Gerber files for this can be downloaded from here.


To build a professional one JLCPCB is the best option, They are providing 2 to 6 layer PCB's just in $2. And If you Sign-up using my link(https://jlcpcb.com/SSRF), you will get 4 coupons worth $27. Which can be used to place the order on JLCPCB.

About Cirkit Designer Software:

Cirkit Designer Is a one-stop-shop desktop application for designing and documenting circuits and electronics projects. With Cirkit Designer, you can lay out realistic circuit diagrams that are linked to a bill-of-materials so that you can seamlessly order the parts to your circuit.


Download cirkit designer from Here

In the next release, Cirkit Designer is adding a code IDE with full support for compiling and programming Arduino boards, as well as a library of reference circuit designs (circuit templates including documentation, components and wiring, and code). Cirkit Designer will become the one-stop-shop to help you progress from concept to fully working breadboard prototypes. Simulation will also be added in the future, so that you can test your circuit before buying parts and building anything.

Settings of board and ports:

Choose ESP32 Wrover module match these same settings:


Partition scheme to: Huge APP (3MB No OTA), Flash mode, upload speed and frequency to same as shown in above image. Then upload the code and open the serial monitor.


1) This code is also available in EXAMPLES> ESP32> CAMERA> CameraWebServer.

Initalize this code and then select the proper camera module, If you are using Generic module, then wrover is okay.
// WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
Read more »