Skip to content

Technik Blog

Programmieren | Arduino | ESP32 | MicroPython | Python | Raspberry Pi | Raspberry Pi Pico

Menu
  • About me
  • Contact
  • Deutsch
  • English
Menu

Setup of the ESP32-CAM and first operation

Posted on 4. September 202210. March 2024 by Stefan Draeger

In this tutorial, I want to show you how to set up and run the ESP32-CAM with a small example.

Setup of the ESP32-CAM and first operation
Setup of the ESP32-CAM and first operation

  • Buy an ESP32-CAM
  • Technical data
  • Pin assignment of the ESP32-CAM
  • Connection and circuit
  • Programming the ESP32
    • Setting up the board driver
    • Setting up the board in the Arduino IDE
    • Upload the example from the ESP32 package
    • Web page in browser
    • Streaming with VLC player
    • Taking a picture

Buy an ESP32-CAM

The ESP32-CAM for this tutorial I bought via ebay.de for just under €8 incl. shipping costs*.

Note from me: The links marked with an asterisk (*) are affiliate links. If you make a purchase through these links, I will receive a small commission to help support this blog. The price for you remains unchanged. Thank you for your support!

You can get this microcontroller at aliexpress.com or also banggood.com for a much cheaper price, but these portals are not the most reliable and my experience has shown that it is a big gamble whether the parts arrive at all or intact.

ESP32-CAM - front view
ESP32-CAM – front view
ESP32-CAM - back side
ESP32-CAM – back side

To load a sketch on this microcontroller, you also need a FTDI module, this module you can get at ebay.de for just under €4.

Technical data

Microchip32Bit Dual Core CPU with 240 MHz clock speed,
computing power up to 600 DMIPS
Memory520 KB SRAM
4 MB PSRAM
InterfacesBluetooth / Bluetooth Low Energy (BLE),
Wi-Fi (802.11 b/g/n/e/i),
UART,
SPI,
PWM,
ADC & DAC
available Camera modulesOV2640 / OV7670
othersSD-Card slot for up to 4 GB Micro SD-Cards
Dimensions (L x B x H)40 mm x 27 mm x 18 mm

Pin assignment of the ESP32-CAM

The microcontroller ESP32-CAM has 16 pins of an interface for the camera module and a SD card slot for Micro SD cards up to 4 GB.

Pin assignment of the ESP32-CAM
Pin assignment of the ESP32-CAM

Connection and circuit

As already mentioned, an FTDI module is required.

FTDI Modul
FTDI Modul

Since we want to operate the ESP32-CAM via 5V, we have to set the jumper on the FTDI module to 5V additionally.

FTDI module - jumper for voltage selection
FTDI module – jumper for voltage selection

So for the setup we need besides the FTDI module & the ESP32-CAM module 4 breadboard cables (20 cm, female – male) and 1 breadboard cable (10 cm, male – male), and a breadboard with min. 400 pins.

FTDI ModulESP32-CAM
RXUOT
TXUOR
GNDGND
VCC5V
Structure of the circuit ESP32 - CAM with FTDI module
Structure of the circuit ESP32 – CAM with FTDI module

However, this bridge is only needed for uploading the sketch, for operation it must be removed again.

Schematic structure of the circuit "ESP32-CAM with FTDI module
Schematic structure of the circuit “ESP32-CAM with FTDI module

Programming the ESP32

Setting up the board driver

In order to program the ESP32 with the Arduino IDE, a driver for the board must also be installed. This driver is added via the board manager. However, you have to add the address “https://dl.espressif.com/dl/package_esp32_index.json” to the “Board Manager URLs” under the preferences beforehand.

Arduino IDE - extend the "Board Manager URLs" in the preferences
Arduino IDE – extend the “Board Manager URLs” in the preferences

If this is done, the board manager can be opened via “Tools” > “Board: xyz” > “Board manager…”. In the window of the board manager is now searched for the term “esp32” (1), there should be exactly one hit, which we install with the button “Install” (2). After the driver has been installed (this can take some time depending on the internet & computer speed of the computer) we can close this window with the button “Close” (3).

Arduino IDE - board manager, install ESP32
Arduino IDE – board manager, install ESP32

Although I have a 50Mbit line, the download of the approx. 32 MB package took an unusually long time, so please allow a little more time for this process.

Setting up the board in the Arduino IDE

If you have installed the board driver now, you have to select it and change some default values.

Configuration of the microcontroller ESP32-CAM in the Arduino IDE
Configuration of the microcontroller ESP32-CAM in the Arduino IDE

Upload the example from the ESP32 package

The ESP32 package comes with an example for the ESP32 – CAM, if you don’t have it you can download it for free from the GitHub repository espressif/arduino-esp32. Alternatively I offer you a ready configured sketch at the end of this post.

Once you have uploaded this example, you will need to restart it once. This restart can be done either by using the reset button or by removing the power supply and plugging it in again.

In the serial monitor of the Arduino IDE you can see the following output.

Output on the serial monitor of the Arduino IDE (after uploading the sample code)
Output on the serial monitor of the Arduino IDE (after uploading the sample code)

This issue stops a bit longer, which means you have to wait a bit until it continues.

When the process is complete, then the connection to the Wi-Fi network is established and the IP address of the ESP32-CAM module is displayed.

Establishing a WiFi connection
Establishing a WiFi connection

Web page in browser

When the WiFi connection is established, you can use the displayed IP address in the browser to display a page where you can start a stream, for example.

Web page in the browser of the ESP32-CAM
Web page in the browser of the ESP32-CAM

Streaming with VLC player

The free VLC player is a true all-rounder when it comes to playing multimedia files. It can also open and play network streams. I have already presented this for the Raspberry PI Camera B01 and now I would like to show it for this ESP32-CAM.

The address for the stream is http://:81/stream, you can either read the IP address from your router or from the serial monitor of the Arduino IDE.

In the VLC Player navigate to the main menu “Media” > “Open Network Stream…” to start the dialog “Open Media”. In this dialog you have to enter the address shown above (of course with your IP address), in my case it is “http://192.168.178.51:81/stream”.

start network stream in VLC player
start network stream in VLC player

But the network stream in the VLC player can only be started if no other is started (ebsp. via the web page in the browser).

Taking a picture

You can also get a single picture from the active ESP32-CAM, just end the address with “/capture” instead of “/stream”. A photo is now taken and displayed for 10 seconds.

VLC Player , ESP32-CAM capture Image
VLC Player, ESP32-CAM capture Image

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fragen oder Feedback?

Du hast eine Idee, brauchst Hilfe oder möchtest Feedback loswerden?
Support-Ticket erstellen

Newsletter abonnieren

Bleib auf dem Laufenden: Erhalte regelmäßig Updates zu neuen Projekten, Tutorials und Tipps rund um Arduino, ESP32 und mehr – direkt in dein Postfach.

Jetzt Newsletter abonnieren

Unterstütze meinen Blog

Wenn dir meine Inhalte gefallen, freue ich mich über deine Unterstützung auf Tipeee.
So hilfst du mit, den Blog am Leben zu halten und neue Beiträge zu ermöglichen.

draeger-it.blog auf Tipeee unterstützen

Vielen Dank für deinen Support!
– Stefan Draeger

Categories

Links

Blogverzeichnis Bloggerei.de TopBlogs.de das Original - Blogverzeichnis | Blog Top Liste Blogverzeichnis trusted-blogs.com

Stefan Draeger
Königsberger Str. 13
38364 Schöningen

Tel.: 01778501273
E-Mail: info@draeger-it.blog

Folge mir auf

  • Impressum
  • Datenschutzerklärung
  • Disclaimer
  • Cookie-Richtlinie (EU)
©2025 Technik Blog | Built using WordPress and Responsive Blogily theme by Superb
Cookie-Zustimmung verwalten
Wir verwenden Cookies, um unsere Website und unseren Service zu optimieren.
Funktional Always active
Die technische Speicherung oder der Zugang ist unbedingt erforderlich für den rechtmäßigen Zweck, die Nutzung eines bestimmten Dienstes zu ermöglichen, der vom Teilnehmer oder Nutzer ausdrücklich gewünscht wird, oder für den alleinigen Zweck, die Übertragung einer Nachricht über ein elektronisches Kommunikationsnetz durchzuführen.
Vorlieben
Die technische Speicherung oder der Zugriff ist für den rechtmäßigen Zweck der Speicherung von Präferenzen erforderlich, die nicht vom Abonnenten oder Benutzer angefordert wurden.
Statistiken
Die technische Speicherung oder der Zugriff, der ausschließlich zu statistischen Zwecken erfolgt. Die technische Speicherung oder der Zugriff, der ausschließlich zu anonymen statistischen Zwecken verwendet wird. Ohne eine Vorladung, die freiwillige Zustimmung deines Internetdienstanbieters oder zusätzliche Aufzeichnungen von Dritten können die zu diesem Zweck gespeicherten oder abgerufenen Informationen allein in der Regel nicht dazu verwendet werden, dich zu identifizieren.
Marketing
Die technische Speicherung oder der Zugriff ist erforderlich, um Nutzerprofile zu erstellen, um Werbung zu versenden oder um den Nutzer auf einer Website oder über mehrere Websites hinweg zu ähnlichen Marketingzwecken zu verfolgen.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Einstellungen anzeigen
{title} {title} {title}