ESP32-CAM
In addition to a 2 MP camera, this high-performance microcontroller features integrated WIFI and Bluetooth connections. In addition to an OV2640 camera, the module is equipped with a micro-SD card reader that can be used to store images or video sequences. This makes it particularly suitable for use in IoT (Internet of Things) applications.
As the camera takes up a certain number of the microcontroller's inputs/outputs, there are far fewer GPIO pins available than on a conventional ESP-32 module (there are only 8, and 6 of these are already connected to the SD card reader).
Features
- Power supply : 3.3 or 5 Vdc;
- Consumption : 2 A max;
- Microcontroller : ESP32 at 240 MHz;
- RAM memory : 520 KB;
- PSRAM : 4MB;
- Compatibility : OV2640 and OV7670 sensors;
- Wireless interfaces :
- Bluetooth : 4.2, EDR and BLE compatible;
- WiFi : 802.11b/g/n/e/i (compatible WPA, WPA2, WPA2-Enterprise and WPS).
- Interfaces available : UART, SPI, I2C, PWM, ADC and DAC;
- Video formats supported : JPEG (OV2640);
- Serial rate : 115200 bps;
- Micro-SD card reader (4 GB maximum);
- Outputs 3.3 Vdc;
- GPIO pins : UART, SPI and I2C;
- Reset button;
- Operating temperature : -20 to 85°C;
- Dimensions : 27 x 40 x 4.5mm;
- Weight : 10g.
ESP32-CAM Pinout
Here are a few constraints on the use of the ESP32-CAM that should be respected to ensure proper operation of the module:
- 5V supply voltage (avoid 3.3V, as this voltage level only generates problems: limited power, wavy image, impossible programming...);
- do not use the GPIO0 port while the camera is in use;
- GPIO32 must be in the low state while the camera is in use, to ensure maximum power.
Antenna Selection
The ESP32-CAM is fitted with a strap for selecting the antenna to be used. At the time of purchase, the selection resistor is positioned on the internal antenna.
To use the socket (i.e. an external antenna), you need to change the position of this jumper.
As this resistor is very small and fragile, it can be replaced by a simple wire connection.
Programming
As the ESP32-CAM does not have a native USB connector, an additional module is required to program it.
Several solutions currently exist, with varying degrees of complexity. My preference is for the latest generation, which is very simple to use and comes in the form of a module equipped with a USB connector and pins to accommodate the microcontroller (also known as a "development board").
When purchasing an ESP32-CAM, please check that a programming module is included, as it is possible to buy it on its own.
Software programming for the ESP32-CAM is carried out using the Arduino IDE, which simply needs to be configured to communicate with the microcontroller. Once compiled, the C++ software is downloaded to the microcontroller via the USB port.
Possible uses in model railroading
- Camera on board a wagon ;
- Surveillance camera of a hidden station ;
- Surveillance camera of a high-risk location (tunnel, ramp, etc.) ;
- Obtain the view of the network from a strategic location (signpost, station, etc.) ;
- etc...