TinyML on the esp32-cam

Introduction

The esp32-cam is a very cheap esp32 board with 4MB PSRAM and an integrated OV2640 2 MPixel camera. Because of these features, it is particularly interesting for TinyML work. There is a C driver for this camera as well as its MicroPython language binding.

The disadvantage of this module is the limited number of GPIO pins that can be accessed for general use. https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout has a complete description of all GPIO lines available and how they are used.

The module has 16 external pins, of which already 6 are used for power and ground. There are 2 pins one of which can be used to power the esp32-cam marked 5V and 3V3. The pin labelled Vcc should not be used to power the board, it is in fact an output pin.

GPIO 1 and 3 are the serial Tx and Rx respectively. If you have a board with a USB connector, then these pins stay unused. In the other case, you must connect the board to your PC through these pins for serial communication and for flashing. When connecting GPIO-0 to ground and resetting the esp32-cam it enters into flash mode. For normal operation, this connection must be removed.

The esp32-cam features a SD-card interface using GPIO 14,15,2,4,12,13. GPIO 4 is also used for the flashlight. These pins are available as regular inputs/outputs if the SD card is not used.

Connecting the MPU6050 accelerometer and gyroscope

Here is the connection table:

MPU6050 ESP32-CAM
Vcc_In 5V
GND GND
SCL GPIO 14
SDA GPIO 15

-- Uli Raich - 2022-09-23

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf ESP32_CAM_V1.6.pdf r1 manage 26.2 K 2022-09-23 - 17:40 UliRaich  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2022-09-23 - UliRaich
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback