Init new documentation
259
README.md
|
|
@ -1,91 +1,53 @@
|
|||
# PrusaConnect ESP32-CAM
|
||||
|
||||
This repository includes source code and firmware releases for the ESP32-cam module programmed in the Arduino IDE
|
||||
This repository includes source code and firmware releases for the **ESP32-cam** module programmed in the **Arduino IDE**. Currently, several versions of boards built on **ESP32/ESP32S3** processors with a camera chip are supported. Below is the list supported boards. Additionally, for each supported board, there is a guide on how to upload the firmware, how to compile code for it, and a basic data informations/issues for the board.
|
||||
|
||||
This project uses other libraries. It is necessary to install them in the Arduino IDE.
|
||||
- App [Arduino IDE 2.3.2](https://www.arduino.cc/en/software)
|
||||
- MCU support [ESP32 2.0.16](https://github.com/espressif/arduino-esp32)
|
||||
- ~~Library [ESPAsyncWebSrv 1.2.7](https://github.com/dvarrel/ESPAsyncWebSrv)~~ To version **1.3.0-rc1**
|
||||
- Library [ESPAsyncWebServer 2.10.1](https://github.com/mathieucarbou/ESPAsyncWebServer)
|
||||
- Library [AsyncTCP 1.1.4](https://github.com/dvarrel/AsyncTCP)
|
||||
- Library [ArduinoJson 7.0.4](https://github.com/bblanchon/ArduinoJson)
|
||||
- MCU support [arduino-ESP32 3.0.2](https://github.com/espressif/arduino-esp32)
|
||||
- ~~Library [ESPAsyncWebSrv 1.2.7](https://github.com/dvarrel/ESPAsyncWebSrv)~~ To version **1.0.3-rc1**
|
||||
- ~~Library [AsyncTCP 1.1.4](https://github.com/dvarrel/AsyncTCP)~~ To version **1.0.3-rc1**
|
||||
- Library [AsyncTCP 3.1.4](https://github.com/mathieucarbou/AsyncTCP)
|
||||
- Library [ESPAsyncWebServer 2.10.8](https://github.com/mathieucarbou/ESPAsyncWebServer)
|
||||
- Library [ArduinoJson 7.1.0](https://github.com/bblanchon/ArduinoJson)
|
||||
- Library [UniqueID 1.3.0](https://github.com/ricaun/ArduinoUniqueID)
|
||||
|
||||
What we need for functionality
|
||||
- ESP32-CAM AI-thinker board with OV2640 camera module [ here ](#esp32)
|
||||
- Module board version [here](#different_mcu)
|
||||
- Install the necessary libraries in the Arduino IDE [ here ](#arduino_lib)
|
||||
- Arduino IDE configuration [ here ](#arduino_cfg)
|
||||
- Supported versions of boards built on **ESP32/ESP32-S3** processors with a camera [here](#supported_boards)
|
||||
- How to flash binary files to ESP32-cam board from Linux/MAC/Windows [ here ](#flash_fw)
|
||||
- How to connect ESP32-cam to Prusa Connect [here](#prusa_connect)
|
||||
- How to compile software in the Arduino IDE [here](#arduino_lib)
|
||||
- How to connect camera board to Prusa Connect [here](#prusa_connect)
|
||||
- Service AP [here](#service_ap)
|
||||
- How to reset the configuration to factory settings [here](#factory_cfg)
|
||||
- Status LED [ here ](#status_led)
|
||||
- Schematic main board is [here](#schematic)
|
||||
- Issue with FLASH LED on the main board [here](#led_issue)
|
||||
- External WiFi antenna [here](#ext_wifi)
|
||||
- Power supply [here](#power_supply)
|
||||
- Debug logs [here](#logs)
|
||||
- Serial console configuration [here](#serial_cfg)
|
||||
- Camera WEB API [here](#rest)
|
||||
- Video stream [here](#stream)
|
||||
- Manual camera focus [here](#man_focus)
|
||||
- Potential issue [here](#issue)
|
||||
|
||||
<a name="esp32"></a>
|
||||
## ESP32-CAM AI-thinker board
|
||||
It's a few dollars board with **ESP32** MCU and Camera. It's necessary to buy a board with **camera module OV2640**. The board is sold without a programmer by default. It is possible to program it using the FTDI USB to UART converter, or purchase an official programmer for the board. We recommend purchasing an official programmer. It can save a lot of trouble with connecting and programming the board. There are currently [2 different board versions](#different_mcu), but only one is compatible with the official programmer.
|
||||
<a name="supported_boards"></a>
|
||||
## Supported boards
|
||||
|
||||
<img src="doc/esp32-cam.jpg" width=30% height=30%>
|
||||
| Board name | Support status | Stream | Micro SD | FLASH LED | OTA FW update | Documentation |
|
||||
|---------------------------|----------------|--------|----------|-------------|---------------|----------------------------------------------|
|
||||
| Ai-Thinker ESP32-cam | Full | Yes | Yes | Board/Ext | Yes | [ here ](doc/AI_Thinker-ESP32-cam/README.md) |
|
||||
| ESP32-S3-EYE 2.2 | Full | Yes | Yes | External | Yes | [ here ](doc/ESP32-S3-EYE-22/README.md) |
|
||||
| Freenove ESP32-Wrover cam | Full | Yes | No | External | Yes | [ here ](doc/ESP32-Wrover-dev/README.md) |
|
||||
| ESP32-S3-DEV-CAM | in Progress | | | External | | [ here ](doc/ESP32-S3-DEV-CAM/README.md) |
|
||||
| Seeed Studio XIAO ESP32S3 | in Progress | | | External | | [ here ](doc/XIAO_ESP32S3/README.md) |
|
||||
| ESP32-S3-CAM | in Progress | | | Board/Ext | | [ here ](doc/ESP32-S3-CAM/README.md) |
|
||||
|
||||
In the following picture, we can see the **ESP32-CAM** board and the programator for the board.
|
||||
<a name="flash_fw"></a>
|
||||
## How to flash binary files to ESP32-cam board from Linux/MAC/Windows
|
||||
|
||||
<img src="doc/esp32_and_prog.jpg" width=30% height=30%>
|
||||
|
||||
It's necessary to use a camera version **OV2640**. If using a different camera, modification of the camera's pinout can be needed, or some camera settings may not work correctly. We recommend to use a camera module with a viewing angle of 120° or 160°.
|
||||
|
||||
These are currently known or tested camera modules:
|
||||
|
||||
| Camera chip | FOV | Resolution | Tested | Works | Description |
|
||||
|-------------|------|------------|--------|-------|------------------------------------------|
|
||||
| OV2640 | 30° | 2MP | No | N/A | |
|
||||
| OV2640 | 44° | 2MP | No | N/A | |
|
||||
| OV2640 | 66° | 2MP | Yes | Yes | Recommended. Standard camera module |
|
||||
| OV2640 | 120° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 160° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 200° | 2MP | No | N/A | |
|
||||
| OV2640 | 222° | 2MP | No | N/A | |
|
||||
| OV2640IR | 160° | 2MP | Yes | Yes | |
|
||||
| OV8225N | 66° | 2MP | Yes | Yes | |
|
||||
| OV3360 | 66° | 3MP | Yes | Yes | |
|
||||
| OV5640-AF | 72° | 5MP | Yes | Yes | Overheating, slow photo loading |
|
||||
|
||||
<a name="different_mcu"></a>
|
||||
## Different MCU version
|
||||
|
||||
There are currently 2 versions of the board, but only one version is possible programming via oficial **CH340** programmer. The blue rectangle shows the differences between the HW versions.
|
||||
|
||||
<img src="doc/cam_versions.jpg" width=50% height=50%>
|
||||
|
||||
The red arrow points to a pin that differs between these boards. In version 1, this pin is used for **MCU RESET (GND/R)**. In version 2, this pin serves as ground **(GND)**. Version 1 can be programmed via **CH340**, whereas version 2 cannot be programmed via **CH340**. For version 2, we tested programming via **FT232RL** or **CP2102**, and the programming process worked successfully.
|
||||
|
||||
If we want to program the MCU without the original programmer with **CH340**, or if we want to program the second version of the board, then we need to follow the following instructions. We will need a USB to UART converter, such as **FT232**, **CP2102** or **CH340**. I have tested firmware uploading to the **ESP32-cam** with these converters. Uploading FW to the **second** version using **CH340** did not work for me. Uploading FW using **CH340** only worked for me for the first version of **ESP32-cam** board. For the next steps, I will use the **FT232RL** converter. We connect the **ESP32-cam** to the **FT232** according to the following diagram, where we connect:
|
||||
|
||||
<img src="doc/ESP32-cam prog_bb.png" width=60% height=60%>
|
||||
|
||||
- **VCC** from **FT232** to **5V** on the **ESP32-CAM**. **CAUTION!** It is necessary to observe the maximum supply voltage of the **ESP32-CAM**, otherwise irreversible damage to the **ESP32-CAM** module may occur.
|
||||
- **GND** from **FT232** to **GND** on the **ESP32-CAM**
|
||||
- **TX** from **FT232** to **U0R** on the **ESP32-CAM**
|
||||
- **RX** from **FT232** to **U0T** on the **ESP32-CAM**
|
||||
- **IO0** from **ESP32-CAM** to **GND** on **ESP32-CAM**. By connecting the **IO0** pin to **GND**, we switch the board to the mode in which it expects firmware uploading.
|
||||
|
||||
Next step is connect the **FT232** converter to the PC and install the correct driver. Then we proceed with uploading the firmware to the **ESP32-cam**, which is described [here](https://github.com/prusa3d/Prusa-Firmware-ESP32-Cam?tab=readme-ov-file#how-to-flash-binary-files-to-esp32-cam-board-from-linuxmacwindows). After successfully uploading the firmware to the **ESP32-cam**, we disconnect **IO0** from **GND**, disconnect the **FT232** converter from the **ESP32-CAM**, and connect the **ESP32-CAM** to the power supply.
|
||||
|
||||
The recommended version includes the MCU ESP32 (ESP32-S) with 520 KB of SRAM and external 4M PSRAM
|
||||
Uploading a precompiled version of the firmware to the MCU is possible from either Linux or Windows OS. Since different boards use various processors and modules, it is not possible to create a single universal guide. Therefore, it is necessary to select the board you are using and then refer to the documentation on how to upload the firmware to it. Here is list with currently [supported boards](#supported_boards).
|
||||
|
||||
<a name="arduino_lib"></a>
|
||||
## Necessary libraries in the Arduino IDE
|
||||
## How to compile software in the Arduino IDE
|
||||
|
||||
Software compilation was done in Arduino IDE 2.3.2. To ensure proper functionality, it is necessary to install support for ESP32 boards into Arduino IDE, as well as several other libraries
|
||||
The software can be compiled and uploaded to the MCU. Software compilation was done in Arduino IDE. To ensure proper functionality, it is necessary to install support for ESP32 boards into Arduino IDE, as well as several other libraries
|
||||
|
||||
At the first step we need to install support for **ESP32 board**.
|
||||
|
||||
|
|
@ -95,88 +57,18 @@ At the first step we need to install support for **ESP32 board**.
|
|||
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||
```
|
||||
|
||||
then go to **Tools** -> **Board** -> **Boards Manager...** and install module **ESP32** by **Espressif Systems**, version **2.0.15**
|
||||
then go to **Tools** -> **Board** -> **Boards Manager...** and install module **ESP32** by **Espressif Systems**
|
||||
|
||||
The next step is to install the necessary libraries. Go to **Sketch** -> **Include Library** -> **Manage Libraries...** or you can use **Ctrl+Shift+I**. Then you can search for the necessary libraries and install them.
|
||||
The next step is to install the necessary libraries. Go to **Sketch** -> **Include Library** -> **Manage Libraries...** or you can use **Ctrl+Shift+I**. Then you can search for the necessary libraries and install them.
|
||||
|
||||
- Library [ESPAsyncWebSrv by dvarrel 1.2.7](https://github.com/dvarrel/ESPAsyncWebSrv)
|
||||
- Library [AsyncTCP by dvarrel 1.1.4](https://github.com/dvarrel/AsyncTCP)
|
||||
- Library [ArduinoJson by bblanchon 7.0.4](https://github.com/bblanchon/ArduinoJson)
|
||||
- Library [UniqueID by Luiz Henrique Cassettari1.3.0](https://github.com/ricaun/ArduinoUniqueID)
|
||||
For the installation of the **ESPAsyncWebServer** and **AsyncTCP** libraries, it is necessary to download the **ZIP** archive from the official **GIT** repository, and then import it using **Sketch** -> **Include Library** -> **Add .ZIP Library ...**
|
||||
|
||||
<a name="arduino_cfg"></a>
|
||||
## Arduino IDE configuration
|
||||
Then it is possible build and upload the firmware to the board. Each board requires a different Arduino IDE configuration. Therefore, it is necessary to select the board from the [supported boards](#supported_boards) and read the documentation on how to build and upload the firmware.
|
||||
|
||||
Board configuration in the Arduino IDE 2.3.2
|
||||
- Tools -> Board -> ESP32 Arduino -> AI Thinker ESP32
|
||||
- Tools -> Flash frequency -> 80MHz
|
||||
- Tools -> Core Debug Level -> None
|
||||
- Tools -> Erase all Flash Before Sketch Upload -> Disable **(first flash, new board = enable. otherwise = disable)**
|
||||
- Tools -> Flash Mode -> DIO
|
||||
- Tools -> Partition scheme -> Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
|
||||
|
||||
When flashing the firmware to a new, empty ESP32-CAM device for the first time, it is necessary to use the 'Erase' function.
|
||||
|
||||
This can be found under **Tools** -> **Erase all Flash Before Sketch Upload** -> **Enable**.
|
||||
|
||||
After the initial firmware upload to the MCU, it's necessary to disable this option. If you do not disable this option, your camera configuration will continue to be erased from the flash memory after uploading new firmware from the Arduino IDE.
|
||||
|
||||
<a name="flash_fw"></a>
|
||||
## How to flash binary files to ESP32-cam board from Linux/MAC/Windows
|
||||
|
||||
#### Linux/MAC
|
||||
|
||||
You must use the console to upload the firmware on the MAC or Linux platform. First, ensure you have installed esptool for Python. You can find it on the manufacturer's website, ESPRESSIF, [here](https://docs.espressif.com/projects/esp-at/en/latest/esp32/Get_Started/Downloading_guide.html#linux-or-macos).
|
||||
|
||||
And command for FLASH FW is here, where **/dev/ttya0** is your serial interface for communication with the ESP32-cam board. This is the command for the first flash FW to MCU.
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --erase-all --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
This command contains the parameter **--eras-all**, which erases the entire flash in the MCU. So, for just updating the firmware, it is necessary to remove the parameter **--eras-all**; otherwise, the MCU configuration will also be deleted. The basic command list can be found [here](https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/basic-commands.html)
|
||||
|
||||
Here is the command for updating the firmware in the MCU without erasing the MCU configuration
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
Launching the esptool application may be different in different operating systems
|
||||
|
||||
#### Windows
|
||||
|
||||
Here is the tool and configuration for [windows platform](https://www.espressif.com/en/support/download/other-tools)
|
||||
|
||||
You can find the driver for CH340 for Windows for example [here](https://www.wch-ic.com/search?q=CH340&t=downloads) . An older version of the driver is for example [here](https://blog.laskakit.cz/wp-content/uploads/2020/03/CH341SER.zip)
|
||||
|
||||
<img src="doc/how to flash chip select.jpg" width=25% height=25%>
|
||||
|
||||
It's necessary to erase the FLASH using the **ERASE** button before the first firmware flash.
|
||||
|
||||
<img src="doc/how to flash.jpg" width=30% height=30%>
|
||||
|
||||
#### Partitions table
|
||||
|
||||
Here is the partitions table:
|
||||
|
||||
| Name | Type | SubType | Offset | Size | Flags |
|
||||
|---------|---------|---------|----------|----------|-------|
|
||||
| nvs | data | nvs | 0x9000 | 0x5000 | |
|
||||
| otadata | data | ota | 0xe000 | 0x2000 | |
|
||||
| app0 | app | ota_0 | 0x10000 | 0x1E0000 | |
|
||||
| app1 | app | ota_1 | 0x1F0000 | 0x1E0000 | |
|
||||
| spiffs | data | spiffs | 0x3D0000 | 0x20000 | |
|
||||
| coredump| data | coredump| 0x3F0000 | 0x10000 | |
|
||||
|
||||
However, for uploading the firmware, it's important to use this configuration of addresses and files:
|
||||
|
||||
- address **0x1000** - **ESP32_PrusaConnectCam.ino.bootloader.bin**
|
||||
- address **0x8000** - **ESP32_PrusaConnectCam.ino.partitions.bin**
|
||||
- address **0x10000** - **ESP32_PrusaConnectCam.ino.bin**
|
||||
In the file **mcu_cfg.h**, after line 16 is definitions that specify the version of the board for which the software will be compiled. It is necessary to uncomment the line with the version of the board that will be used.
|
||||
|
||||
<a name="prusa_connect"></a>
|
||||
## How to connect ESP32-cam to Prusa Connect
|
||||
## How to connect camera board to Prusa Connect
|
||||
|
||||
- Open up the **Prusa Connect** webpage [connect.prusa3D.com](https://connect.prusa3D.com)
|
||||
- Log in
|
||||
|
|
@ -248,25 +140,22 @@ Service AP is for for the first camera configuration. If the camera is connected
|
|||
|
||||
<a name="factory_cfg"></a>
|
||||
## How to reset configuration to factory settings
|
||||
To reset the settings to factory defaults, follow these instructions:
|
||||
Each version of the [supported board](#supported_boards) uses a different pin for camera reset. Therefore, it is necessary to refer to the documentation for the specific board to determine which pin is used for reset camera configuration to factory configuration.
|
||||
|
||||
<img src="doc/factory_cfg.jpg" width=30% height=30%>
|
||||
|
||||
- Connect PIN **IO12** to **ground**.
|
||||
- **Plug in** the power supply.
|
||||
- Wait for **10 seconds**.
|
||||
- After 10 seconds, the **FLASH LED will start flashing**.
|
||||
- **Disconnect** PIN **IO12** from **ground** (but don't disconnect the power supply).
|
||||
- After disconnecting **IO12** from **ground**, the **FLASH LED** will **stop flashing**, and the MCU will **automatically reboot**.
|
||||
- Now the MCU is in the factory settings.
|
||||
The procedure is always the same:
|
||||
- Ground the pin for camera reset configuration.
|
||||
- Connect the power supply.
|
||||
- Wait for 10 seconds.
|
||||
- An LED will start blinking (refer to the board's documentation).
|
||||
- Disconnect the ground from the camera reset configuration pin.
|
||||
- The LED will stop blinking.
|
||||
- The camera configuration will be restored to factory settings.
|
||||
|
||||
<a name="status_led"></a>
|
||||
## Status LED
|
||||
|
||||
On the board, there is a status LED that provides a visual indicator of the module's current status
|
||||
through blinking at defined intervals.
|
||||
|
||||
<img src="doc/status_led.jpg" width=25% height=25%>
|
||||
through blinking at defined intervals. Each [supported board](#supported_boards) has the STATUS LED located in a different place. It is necessary to refer to the documentation to locate the STATUS LED on the board.
|
||||
|
||||
Upon module activation, the LED illuminates. After processor initialization, the LED exhibits different blinking intervals based on the current mode of the module
|
||||
|
||||
|
|
@ -277,53 +166,6 @@ Upon module activation, the LED illuminates. After processor initialization, the
|
|||
|
||||
The approximate boot time of the device is 15-20 seconds.
|
||||
|
||||
<a name="schematic"></a>
|
||||
## Schematic for ESP32-cam board
|
||||
|
||||
<img src="doc/ESP32-CAM-AI-Thinker-schematic-diagram.png" width=70% height=70%>
|
||||
|
||||
Board description
|
||||
|
||||
<img src="doc/esp32-cam_parts.jpg" width=50% height=50%>
|
||||
|
||||
Pinout
|
||||
|
||||
<img src="doc/pinout.png" width=50% height=50%>
|
||||
|
||||
<a name="led_issue"></a>
|
||||
## FLASH LED issue
|
||||
The board has a problem with the FLASH LED, as it lacks any current limitation for the LED. Consequently, frequent use of the FLASH LED can lead to malfunction, due to excessive current flow.
|
||||
|
||||
One simple solution is to connect an external LED via a relay, transistor, or MOSFET to the board, as shown in the next picture. Using a relay is not ideal, but it provides a simple solution.
|
||||
|
||||
<img src="doc/relay_flash_bb.png" width=40% height=40%>
|
||||
|
||||
Another solution is to use an LED COB or a USB LED lamp. I utilized a board from a simple USB LED lamp. The transistor has a current limitation of 500mA, and my USB lamp has a current consumption of approximately 180mA. The original LED has a current consumption of 60-80mA. After calculation, the total current consumption is approximately 260mA, which falls within the current limitation of the transistor. Therefore, it is possible to solder the negative wire from the COB LED or the USB LED lamp to the transistor. The positive wire needs to be soldered to +5V.
|
||||
|
||||
This is my USB LED lamp
|
||||
|
||||
<img src="doc/usb_lamp.jpg" width=40% height=40%>
|
||||
|
||||
The next step is to solder the negative wire from the LED lamp to the transistor collector, and the positive wire from the LED lamp to the +5V on the board.
|
||||
|
||||
<img src="doc/esp32-cam_with_led_lamp.jpg" width=40% height=40%>
|
||||
|
||||
The third option is to solder a resistor between the collector of the transistor and the PCB. I used a 10-ohm resistor in a 0603 package. This option is more complicated for users with limited soldering experience.
|
||||
|
||||
<img src="doc/esp32-cam_flash_led_resistor.jpg" width=40% height=40%>
|
||||
|
||||
<a name="ext_wifi"></a>
|
||||
## External/internal WiFi antenna
|
||||
|
||||
The standard ESP32-CAM board utilizes an internal antenna on the PCB. However, this antenna can sometimes cause issues with the quality of the WiFi signal, leading to slow photo uploads to PrusaConnect or connectivity problems. Fortunately, there is an option to connect an external antenna. This requires changing the resistor position, as shown in the picture below. Then, you can use a 2.4GHz Wi-Fi cable with a U.FL to RP-SMA connector and a standard 2.4GHz WiFi antenna
|
||||
|
||||
<img src="doc/esp32-cam_ext_ant.png" width=40% height=40%>
|
||||
|
||||
<a name="power_supply"></a>
|
||||
## Power Supply
|
||||
|
||||
The device requires a 5V power supply, with a maximum current consumption of 2A. Power is supplied via a micro USB connector when using the original programmer.
|
||||
|
||||
<a name="logs"></a>
|
||||
## Debug logs
|
||||
|
||||
|
|
@ -368,6 +210,23 @@ The standard command sequence for camera basic settings is
|
|||
- setauthtoken:TOKEN;
|
||||
- mcureboot;
|
||||
|
||||
<a name="rest"></a>
|
||||
## Camera WEB API
|
||||
|
||||
The camera have a WEB API, allowing several operations to be performed through the web interface.
|
||||
|
||||
| Command | Description |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| http://IP/action_capture | Capture snapshot |
|
||||
| http://IP/action_send | Capture snapshot, and send to Prusa Connect |
|
||||
| http://IP/light?on | Light ON |
|
||||
| http://IP/light?off | Light OFF |
|
||||
| http://IP/flash?on | FLASH ON |
|
||||
| http://IP/flash?off | FLASH OFF |
|
||||
| http://IP/action_reboot | Reboot MCU |
|
||||
| http://IP/get_logs | Get logs from micro SD card |
|
||||
| http://IP/saved-photo.jpg | Get last captured photo |
|
||||
|
||||
<a name="stream"></a>
|
||||
## Video stream
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
|
@ -0,0 +1,240 @@
|
|||
# Ai Thinker ESP32-CAM
|
||||
|
||||
What we need for functionality
|
||||
- ESP32-CAM AI-thinker board with OV2640 camera module [ here ](#esp32)
|
||||
- Supported camera modules [here](#cam_modules)
|
||||
- Module board version [here](#different_mcu)
|
||||
- How to flash binary files to board from Linux/MAC/Windows [ here ](#flash_fw)
|
||||
- How to compile software in the Arduino IDE [ here ](#arduino_cfg)
|
||||
- How to reset the configuration to factory settings [here](#factory_cfg)
|
||||
- Status LED [ here ](#status_led)
|
||||
- Schematic main board is [here](#schematic)
|
||||
- Issue with FLASH LED on the main board [here](#led_issue)
|
||||
- External WiFi antenna [here](#ext_wifi)
|
||||
- Power supply [here](#power_supply)
|
||||
- Potential issue [here](#issue)
|
||||
|
||||
<a name="esp32"></a>
|
||||
## ESP32-CAM AI-thinker board
|
||||
|
||||
Basic informations:
|
||||
- Low cost version
|
||||
- FLASH LED on the board
|
||||
- Option connecting external FLASH LED
|
||||
- Micro SD card slot
|
||||
- Internal WiFi antenna, after HW modification it's possible connecting external antenna
|
||||
- Additional HW must be purchased for programming
|
||||
- 4MB FLASH and 4MB external PSRAM
|
||||
- 520 KB SRAM
|
||||
|
||||
It's a few dollars board with **ESP32** MCU and Camera. It's necessary to buy a board with **camera module OV2640**. The board is sold without a programmer by default. It is possible to program it using the FTDI USB to UART converter, or purchase an official programmer for the board. We recommend purchasing an official programmer. It can save a lot of trouble with connecting and programming the board. There are currently [2 different board versions](#different_mcu), but only one is compatible with the official programmer.
|
||||
|
||||
<img src="esp32-cam.jpg" width=30% height=30%>
|
||||
|
||||
In the following picture, we can see the **ESP32-CAM** board and the programator for the board.
|
||||
|
||||
<img src="esp32_and_prog.jpg" width=30% height=30%>
|
||||
|
||||
<a name="cam_modules"></a>
|
||||
## Supported camera modules
|
||||
|
||||
It's necessary to use a camera version **OV2640**. If using a different camera, modification of the camera's pinout can be needed, or some camera settings may not work correctly. We recommend to use a camera module with a viewing angle of 120° or 160°.
|
||||
|
||||
|
||||
These are currently known or tested camera modules:
|
||||
|
||||
| Camera chip | FOV | Resolution | Tested | Works | Description |
|
||||
|-------------|------|------------|--------|-------|------------------------------------------|
|
||||
| OV2640 | 30° | 2MP | No | N/A | |
|
||||
| OV2640 | 44° | 2MP | No | N/A | |
|
||||
| OV2640 | 66° | 2MP | Yes | Yes | Recommended. Standard camera module |
|
||||
| OV2640 | 120° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 160° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 200° | 2MP | No | N/A | |
|
||||
| OV2640 | 222° | 2MP | No | N/A | |
|
||||
| OV2640IR | 160° | 2MP | Yes | Yes | |
|
||||
| OV8225N | 66° | 2MP | Yes | Yes | |
|
||||
| OV3360 | 66° | 3MP | Yes | Yes | |
|
||||
| OV5640-AF | 72° | 5MP | Yes | Yes | Overheating, slow photo loading |
|
||||
|
||||
<a name="different_mcu"></a>
|
||||
## Different MCU version
|
||||
|
||||
There are currently 2 versions of the board, but only one version is possible programming via oficial **CH340** programmer. The blue rectangle shows the differences between the HW versions.
|
||||
|
||||
<img src="cam_versions.jpg" width=50% height=50%>
|
||||
|
||||
The red arrow points to a pin that differs between these boards. In version 1, this pin is used for **MCU RESET (GND/R)**. In version 2, this pin serves as ground **(GND)**. Version 1 can be programmed via **CH340**, whereas version 2 cannot be programmed via **CH340**. For version 2, we tested programming via **FT232RL** or **CP2102**, and the programming process worked successfully.
|
||||
|
||||
If we want to program the MCU without the original programmer with **CH340**, or if we want to program the second version of the board, then we need to follow the following instructions. We will need a USB to UART converter, such as **FT232**, **CP2102** or **CH340**. I have tested firmware uploading to the **ESP32-cam** with these converters. Uploading FW to the **second** version using **CH340** did not work for me. Uploading FW using **CH340** only worked for me for the first version of **ESP32-cam** board. For the next steps, I will use the **FT232RL** converter. We connect the **ESP32-cam** to the **FT232** according to the following diagram, where we connect:
|
||||
|
||||
<img src="ESP32-cam prog_bb.png" width=60% height=60%>
|
||||
|
||||
- **VCC** from **FT232** to **5V** on the **ESP32-CAM**. **CAUTION!** It is necessary to observe the maximum supply voltage of the **ESP32-CAM**, otherwise irreversible damage to the **ESP32-CAM** module may occur.
|
||||
- **GND** from **FT232** to **GND** on the **ESP32-CAM**
|
||||
- **TX** from **FT232** to **U0R** on the **ESP32-CAM**
|
||||
- **RX** from **FT232** to **U0T** on the **ESP32-CAM**
|
||||
- **IO0** from **ESP32-CAM** to **GND** on **ESP32-CAM**. By connecting the **IO0** pin to **GND**, we switch the board to the mode in which it expects firmware uploading.
|
||||
|
||||
Next step is connect the **FT232** converter to the PC and install the correct driver. Then we proceed with uploading the firmware to the **ESP32-cam**, which is described [here](https://github.com/prusa3d/Prusa-Firmware-ESP32-Cam?tab=readme-ov-file#how-to-flash-binary-files-to-esp32-cam-board-from-linuxmacwindows). After successfully uploading the firmware to the **ESP32-cam**, we disconnect **IO0** from **GND**, disconnect the **FT232** converter from the **ESP32-CAM**, and connect the **ESP32-CAM** to the power supply.
|
||||
|
||||
The recommended version includes the MCU ESP32 (ESP32-S) with 520 KB of SRAM and external 4M PSRAM
|
||||
|
||||
<a name="flash_fw"></a>
|
||||
## How to flash binary files to board from Linux/MAC/Windows
|
||||
|
||||
#### Partitions table for flashing FW
|
||||
|
||||
Here is the partitions table:
|
||||
|
||||
| Name | Type | SubType | Offset | Size | Flags |
|
||||
|---------|---------|---------|----------|----------|-------|
|
||||
| nvs | data | nvs | 0x9000 | 0x5000 | |
|
||||
| otadata | data | ota | 0xe000 | 0x2000 | |
|
||||
| app0 | app | ota_0 | 0x10000 | 0x1E0000 | |
|
||||
| app1 | app | ota_1 | 0x1F0000 | 0x1E0000 | |
|
||||
| spiffs | data | spiffs | 0x3D0000 | 0x20000 | |
|
||||
| coredump| data | coredump| 0x3F0000 | 0x10000 | |
|
||||
|
||||
However, for uploading the firmware, it's important to use this configuration of addresses and files:
|
||||
|
||||
ZIP file with build binary files: **esp32-cam.zip**
|
||||
|
||||
- address **0x1000** - **ESP32_PrusaConnectCam.ino.bootloader.bin**
|
||||
- address **0x8000** - **ESP32_PrusaConnectCam.ino.partitions.bin**
|
||||
- address **0x10000** - **ESP32_PrusaConnectCam.ino.bin**
|
||||
|
||||
**It is important to download the correct binary files! Each type of camera has its own ZIP archive with files for uploading the firmware.**
|
||||
|
||||
#### Linux/MAC
|
||||
|
||||
You must use the console to upload the firmware on the MAC or Linux platform. First, ensure you have installed esptool for Python. You can find it on the manufacturer's website, ESPRESSIF, [here](https://docs.espressif.com/projects/esp-at/en/latest/esp32/Get_Started/Downloading_guide.html#linux-or-macos).
|
||||
|
||||
And command for FLASH FW is here, where **/dev/ttya0** is your serial interface for communication with the ESP32-cam board. This is the command for the first flash FW to MCU.
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --erase-all --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
This command contains the parameter **--eras-all**, which erases the entire flash in the MCU. So, for just updating the firmware, it is necessary to remove the parameter **--eras-all**; otherwise, the MCU configuration will also be deleted. The basic command list can be found [here](https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/basic-commands.html)
|
||||
|
||||
Here is the command for updating the firmware in the MCU without erasing the MCU configuration
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
Launching the esptool application may be different in different operating systems
|
||||
|
||||
#### Windows
|
||||
|
||||
Driver for CH340 USB to UART convert for Windows is for example [here](https://www.wch-ic.com/search?q=CH340&t=downloads) . An older version of the driver is for example [here](https://blog.laskakit.cz/wp-content/uploads/2020/03/CH341SER.zip)
|
||||
|
||||
<img src="how to flash chip select.jpg" width=25% height=25%>
|
||||
|
||||
It's necessary to erase the FLASH using the **ERASE** button before the first firmware flash.
|
||||
|
||||
<img src="how to flash.jpg" width=30% height=30%>
|
||||
|
||||
<a name="arduino_cfg"></a>
|
||||
## How to compile software in the Arduino IDE
|
||||
|
||||
Board configuration in the Arduino IDE 2.3.2
|
||||
- Tools -> Board -> ESP32 Arduino -> AI Thinker ESP32
|
||||
- Tools -> Flash frequency -> 80MHz
|
||||
- Tools -> Core Debug Level -> None
|
||||
- Tools -> Erase all Flash Before Sketch Upload -> Disable **(first flash, new board = enable. otherwise = disable)**
|
||||
- Tools -> Flash Mode -> DIO
|
||||
- Tools -> Partition scheme -> Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
|
||||
|
||||
When flashing the firmware to a new, empty ESP32-CAM device for the first time, it is necessary to use the 'Erase' function.
|
||||
|
||||
This can be found under **Tools** -> **Erase all Flash Before Sketch Upload** -> **Enable**.
|
||||
|
||||
After the initial firmware upload to the MCU, it's necessary to disable this option. If you do not disable this option, your camera configuration will continue to be erased from the flash memory after uploading new firmware from the Arduino IDE.
|
||||
|
||||
It is necessary to enable support for the correct board version in the file **mcu_cfg.h** after line 16.
|
||||
|
||||
<a name="factory_cfg"></a>
|
||||
## How to reset configuration to factory settings
|
||||
To reset the settings to factory defaults, follow these instructions:
|
||||
|
||||
<img src="factory_cfg.jpg" width=30% height=30%>
|
||||
|
||||
- Connect PIN **IO12** to **ground**.
|
||||
- **Plug in** the power supply.
|
||||
- Wait for **10 seconds**.
|
||||
- After 10 seconds, the **FLASH LED will start flashing**.
|
||||
- **Disconnect** PIN **IO12** from **ground** (but don't disconnect the power supply).
|
||||
- After disconnecting **IO12** from **ground**, the **FLASH LED** will **stop flashing**, and the MCU will **automatically reboot**.
|
||||
- Now the MCU is in the factory settings.
|
||||
|
||||
<a name="status_led"></a>
|
||||
## Status LED
|
||||
|
||||
On the board, there is a status LED that provides a visual indicator of the module's current status
|
||||
through blinking at defined intervals.
|
||||
|
||||
<img src="status_led.jpg" width=25% height=25%>
|
||||
|
||||
Upon module activation, the LED illuminates. After processor initialization, the LED exhibits different blinking intervals based on the current mode of the module
|
||||
|
||||
- **Service AP Mode only:** The LED blinks every **400 ms**, indicating the module's availability in service AP mode.
|
||||
- **Connecting to WiFi AP:** While connecting to a WiFi Access Point, the LED blinks at intervals of **800 ms**.
|
||||
- **Connected to WiFi Network:** Upon successful connection to a WiFi network, the LED blinks at intervals of **4000 ms**, signaling a stable connection.
|
||||
- **Problematic State:** If an issue or error occurs, the LED accelerates its blinking to every **100 ms**.
|
||||
|
||||
The approximate boot time of the device is 15-20 seconds.
|
||||
|
||||
<a name="schematic"></a>
|
||||
## Schematic for ESP32-cam board
|
||||
|
||||
<img src="ESP32-CAM-AI-Thinker-schematic-diagram.png" width=70% height=70%>
|
||||
|
||||
Board description
|
||||
|
||||
<img src="esp32-cam_parts.jpg" width=50% height=50%>
|
||||
|
||||
Pinout
|
||||
|
||||
<img src="pinout.png" width=50% height=50%>
|
||||
|
||||
<a name="led_issue"></a>
|
||||
## FLASH LED issue
|
||||
The board has a problem with the FLASH LED, as it lacks any current limitation for the LED. Consequently, frequent use of the FLASH LED can lead to malfunction, due to excessive current flow.
|
||||
|
||||
One simple solution is to connect an external LED via a relay, transistor, or MOSFET to the board, as shown in the next picture. Using a relay is not ideal, but it provides a simple solution.
|
||||
|
||||
<img src="relay_flash_bb.png" width=40% height=40%>
|
||||
|
||||
Another solution is to use an LED COB or a USB LED lamp. I utilized a board from a simple USB LED lamp. The transistor has a current limitation of 500mA, and my USB lamp has a current consumption of approximately 180mA. The original LED has a current consumption of 60-80mA. After calculation, the total current consumption is approximately 260mA, which falls within the current limitation of the transistor. Therefore, it is possible to solder the negative wire from the COB LED or the USB LED lamp to the transistor. The positive wire needs to be soldered to +5V.
|
||||
|
||||
This is my USB LED lamp
|
||||
|
||||
<img src="usb_lamp.jpg" width=40% height=40%>
|
||||
|
||||
The next step is to solder the negative wire from the LED lamp to the transistor collector, and the positive wire from the LED lamp to the +5V on the board.
|
||||
|
||||
<img src="esp32-cam_with_led_lamp.jpg" width=40% height=40%>
|
||||
|
||||
The third option is to solder a resistor between the collector of the transistor and the PCB. I used a 10-ohm resistor in a 0603 package. This option is more complicated for users with limited soldering experience.
|
||||
|
||||
<img src="esp32-cam_flash_led_resistor.jpg" width=40% height=40%>
|
||||
|
||||
<a name="ext_wifi"></a>
|
||||
## External/internal WiFi antenna
|
||||
|
||||
The standard ESP32-CAM board utilizes an internal antenna on the PCB. However, this antenna can sometimes cause issues with the quality of the WiFi signal, leading to slow photo uploads to PrusaConnect or connectivity problems. Fortunately, there is an option to connect an external antenna. This requires changing the resistor position, as shown in the picture below. Then, you can use a 2.4GHz Wi-Fi cable with a U.FL to RP-SMA connector and a standard 2.4GHz WiFi antenna
|
||||
|
||||
<img src="esp32-cam_ext_ant.png" width=40% height=40%>
|
||||
|
||||
<a name="power_supply"></a>
|
||||
## Power Supply
|
||||
|
||||
The device requires a 5V power supply, with a maximum current consumption of 2A. Power is supplied via a micro USB connector when using the original programmer.
|
||||
|
||||
<a name="issue"></a>
|
||||
## Potential issue with this board
|
||||
|
||||
- The flash LED may fail after some time due to the absence of a current-limiting resistor.
|
||||
- The WiFi signal quality on this board may be weaker compared to other boards and may degrade over time.
|
||||
|
Before Width: | Height: | Size: 461 KiB After Width: | Height: | Size: 461 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 553 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 309 KiB |
|
Before Width: | Height: | Size: 572 KiB After Width: | Height: | Size: 572 KiB |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 440 KiB |
|
Before Width: | Height: | Size: 507 KiB After Width: | Height: | Size: 507 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 639 KiB After Width: | Height: | Size: 639 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 365 KiB After Width: | Height: | Size: 365 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
|
@ -0,0 +1,5 @@
|
|||
# ESP32-S3-CAM
|
||||
|
||||
In progress
|
||||
|
||||
<img src="S2a5f9d4b3dd34ff5911a27bccf34fdeci.webp" width=50% height=50%>
|
||||
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
# ESP32-S3 Development Board CAM
|
||||
|
||||
In progress
|
||||
|
||||
<img src="S9a29fb4b51f344d880d455deb28844acy.webp" width=50% height=50%>
|
||||
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 222 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 400 KiB |
|
After Width: | Height: | Size: 908 KiB |
|
|
@ -0,0 +1,182 @@
|
|||
# ESP32-S3-EYE 2.2
|
||||
|
||||
What we need for functionality
|
||||
- ESP32-S3-EYE 2.2 board with OV2640 camera module [ here ](#esp32)
|
||||
- Supported camera modules [here](cam_modules)
|
||||
- How to flash binary files to board from Linux/MAC/Windows [ here ](#flash_fw)
|
||||
- How to compile software in the Arduino IDE [ here ](#arduino_cfg)
|
||||
- How to reset the configuration to factory settings [here](#factory_cfg)
|
||||
- Status LED [ here ](#status_led)
|
||||
- Schematic main board is [here](#schematic)
|
||||
- FLASH LED issue [here](#flash-led-issue)
|
||||
- Power supply [here](#power_supply)
|
||||
- Potential issue [here](#issue)
|
||||
|
||||
<a name="esp32"></a>
|
||||
## ESP32-S3-EYE 2.2
|
||||
|
||||
Basic informations:
|
||||
- On the board missing LED for flash
|
||||
- Option connecting external FLASH LED
|
||||
- Micro SD card slot
|
||||
- Internal WiFi antenna
|
||||
- no additional HW is needed for programming
|
||||
- 8MB FLASH and 8MB external PSRAM
|
||||
|
||||
This is a more expensive version with a more powerful ESP32-S3 processor. The board is sold with an OV2640 camera module. No additional hardware is required for programming. The ESP32-S3 processor is programmed via the processor's USB interface.
|
||||
|
||||
<img src="ESP32-S3-EYE-isometric.png" width=30% height=30%>
|
||||
|
||||
<img src="description.png" width=50% height=50%>
|
||||
|
||||
<a name="cam_modules"></a>
|
||||
## Supported camera modules
|
||||
|
||||
The board is officially sold with an OV2640 camera module with 66.5° field of view.
|
||||
|
||||
These are currently known or tested camera modules:
|
||||
|
||||
| Camera chip | FOV | Resolution | Tested | Works | Description |
|
||||
|-------------|--------|------------|--------|-------|------------------------------------------|
|
||||
| OV2640 | 66.5° | 2MP | Yes | Yes | Recommended. Standard camera module |
|
||||
|
||||
<a name="flash_fw"></a>
|
||||
## How to flash binary files to board from Linux/MAC/Windows
|
||||
|
||||
#### Partitions table for flashing FW
|
||||
|
||||
For uploading the firmware, it's important to use this configuration of addresses and files:
|
||||
|
||||
ZIP file with build binary files: **esp32-s3-eye-22.zip**
|
||||
|
||||
- address **0x0** - **ESP32_PrusaConnectCam.ino.bootloader.bin**
|
||||
- address **0x8000** - **ESP32_PrusaConnectCam.ino.partitions.bin**
|
||||
- address **0x10000** - **ESP32_PrusaConnectCam.ino.bin**
|
||||
|
||||
**It is important to download the correct binary files! Each type of camera has its own ZIP archive with files for uploading the firmware.**
|
||||
|
||||
#### Linux/MAC
|
||||
|
||||
You must use the console to upload the firmware on the MAC or Linux platform. First, ensure you have installed esptool for Python. You can find it on the manufacturer's website, ESPRESSIF, [here](https://docs.espressif.com/projects/esp-at/en/latest/esp32/Get_Started/Downloading_guide.html#linux-or-macos).
|
||||
|
||||
And command for FLASH FW is here, where **/dev/ttya0** is your serial interface for communication with the ESP32-cam board. This is the command for the first flash FW to MCU.
|
||||
|
||||
```
|
||||
./esptool --chip esp32s3 -p /dev/ttya0 -b 921600 --before default_reset --after hard_reset write_flash --erase-all --flash_mode dio --flash_size 8MB --flash_freq 80m 0x0 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
This command contains the parameter **--eras-all**, which erases the entire flash in the MCU. So, for just updating the firmware, it is necessary to remove the parameter **--eras-all**; otherwise, the MCU configuration will also be deleted. The basic command list can be found [here](https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/basic-commands.html)
|
||||
|
||||
Here is the command for updating the firmware in the MCU without erasing the MCU configuration
|
||||
|
||||
```
|
||||
./esptool --chip esp32s3 -p /dev/ttya0 -b 921600 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 8MB --flash_freq 80m 0x0 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
Launching the esptool application may be different in different operating systems
|
||||
|
||||
#### Windows
|
||||
|
||||
The driver should be installed automatically by Windows
|
||||
|
||||
In the first step, you need to open the application **flash download tool**, and select MCU version
|
||||
|
||||
<img src="chip_select.jpg" width=25% height=25%>
|
||||
|
||||
Then, select the communication port. It's necessary to erase the FLASH using the **ERASE** button before the first firmware flash.
|
||||
|
||||
Before erasing the FLASH memory, it is necessary to switch the board to bootloader mode. Hold down the BOOT button (red arrow), press the RESET button (green arrow), wait for 1 second, and release the BOOT button. Then, you can erase the FLASH memory using the ERASE button. After a successful erase, the status will change to FINISH.
|
||||
|
||||
<img src="flash_button.png" width=30% height=30%>
|
||||
|
||||
Then is possible upload FW to MCU. It is necessary again switch the board to bootloader mode. Hold down the BOOT button (red arrow), press the RESET button (green arrow), wait for 1 second, and release the BOOT button. Then, you can erase the FLASH memory using the ERASE button.
|
||||
|
||||
<img src="flash.jpg" width=30% height=30%>
|
||||
|
||||
<a name="arduino_cfg"></a>
|
||||
## How to compile software in the Arduino IDE
|
||||
|
||||
Board configuration in the Arduino IDE 2.3.2
|
||||
- Tools -> Board -> ESP32 Arduino -> ESP32S3 Dev Module
|
||||
- Tools -> USB CDC on BOOT -> Enabled
|
||||
- Tools -> CPU Frequency -> 240MHz (WiFi/BT)
|
||||
- Tools -> Core debug level -> None
|
||||
- Tools -> USB DFU on BOOT -> Disable
|
||||
- Tools -> Erase all Flash Before Sketch Upload -> Disable **(first flash, new board = enable. otherwise = disable)**
|
||||
- Tools -> Events Run On -> Core 0
|
||||
- Tools -> Flash Mode -> DIO 80MHz
|
||||
- Tools -> Flash Size -> 8MB
|
||||
- Tools -> Jtag Adapter -> Disable
|
||||
- Tools -> Arduino Runs On -> Core 0
|
||||
- Tools -> USB Firmware MSC On Boot -> Disable
|
||||
- Tools -> Partition scheme -> Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
|
||||
- Tools -> PSRAM -> OPI PSRAM
|
||||
- Tools -> Upload Mode -> USB-OTG CDC (TinyUSB)
|
||||
- Tools -> Upload Speed -> 921600
|
||||
- Tools -> USB Mode -> Hardware CDC and JTAG
|
||||
- Tools -> Zigbee mode -> Disable
|
||||
|
||||
When flashing the firmware to a new, empty ESP32-S3-EYE 2.2 device for the first time, it is necessary to use the 'Erase' function.
|
||||
|
||||
This can be found under **Tools** -> **Erase all Flash Before Sketch Upload** -> **Enable**.
|
||||
|
||||
After the initial firmware upload to the MCU, it's necessary to disable this option. If you do not disable this option, your camera configuration will continue to be erased from the flash memory after uploading new firmware from the Arduino IDE.
|
||||
|
||||
It is necessary to enable support for the correct board version in the file **mcu_cfg.h** after line 16.
|
||||
|
||||
<a name="factory_cfg"></a>
|
||||
## How to reset configuration to factory settings
|
||||
To reset the settings to factory defaults, follow these instructions:
|
||||
|
||||
<img src="factory_cfg.png" width=30% height=30%>
|
||||
|
||||
- Push and hold **UP+** button
|
||||
- **Plug in** the power supply.
|
||||
- Wait for **10 seconds**.
|
||||
- After 10 seconds, the **STATUS LED will start flashing**.
|
||||
- **PULL UP+** button (but don't disconnect the power supply).
|
||||
- The **STATUS LED** will **stop flashing**, and the MCU will **automatically reboot**.
|
||||
- Now the MCU is in the factory settings.
|
||||
|
||||
<a name="status_led"></a>
|
||||
## Status LED
|
||||
|
||||
On the board, there is a status LED that provides a visual indicator of the module's current status
|
||||
through blinking at defined intervals.
|
||||
|
||||
<img src="status_led.png" width=25% height=25%>
|
||||
|
||||
Upon module activation, the LED illuminates. After processor initialization, the LED exhibits different blinking intervals based on the current mode of the module
|
||||
|
||||
- **Service AP Mode only:** The LED blinks every **400 ms**, indicating the module's availability in service AP mode.
|
||||
- **Connecting to WiFi AP:** While connecting to a WiFi Access Point, the LED blinks at intervals of **800 ms**.
|
||||
- **Connected to WiFi Network:** Upon successful connection to a WiFi network, the LED blinks at intervals of **4000 ms**, signaling a stable connection.
|
||||
- **Problematic State:** If an issue or error occurs, the LED accelerates its blinking to every **100 ms**.
|
||||
|
||||
The approximate boot time of the device is 15-20 seconds.
|
||||
|
||||
<a name="schematic"></a>
|
||||
## Schematic for ESP32-cam board
|
||||
|
||||
The scheme is available [here](SCH_ESP32-S3-EYE-MB_20211201_V2.2.pdf) in PDF format
|
||||
|
||||
<a name="led_issue"></a>
|
||||
## FLASH LED issue
|
||||
|
||||
The board does not have an LED that could serve as a camera flash. However, there is an option to use PIN 48, which is typically used to turn on the backlight of the LCD display, as a camera flash. The image shows 3 arrows:
|
||||
|
||||
- Green, PIN48
|
||||
- RED, VCC 3.3V
|
||||
- BLUE, GND
|
||||
|
||||
<img src="ext_flash.png" width=25% height=25%>
|
||||
|
||||
<a name="power_supply"></a>
|
||||
## Power Supply
|
||||
|
||||
The device requires a 5V power supply, with a maximum current consumption of 2A. Power is supplied via a micro USB connector when using the original programmer.
|
||||
|
||||
<a name="issue"></a>
|
||||
## Potential issue with this board
|
||||
|
||||
- I tried using an LCD screen with WHITE color as a flash, but the light from the LCD screen is not strong enough for illumination.
|
||||
|
|
@ -0,0 +1 @@
|
|||
https://www.espressif.com/en/support/documents/certificates
|
||||
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 385 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 341 KiB |
|
After Width: | Height: | Size: 385 KiB |
|
After Width: | Height: | Size: 259 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 372 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
|
@ -0,0 +1,194 @@
|
|||
# Freenove ESP32-Wrover-CAM
|
||||
|
||||
What we need for functionality
|
||||
- Freenove ESP32-Wrover-CAM [ here ](#esp32)
|
||||
- Supported camera modules [here](#cam_modules)
|
||||
- Module board version [here](#different_mcu)
|
||||
- How to flash binary files to board from Linux/MAC/Windows [ here ](#flash_fw)
|
||||
- How to compile software in the Arduino IDE [ here ](#arduino_cfg)
|
||||
- How to reset the configuration to factory settings [here](#factory_cfg)
|
||||
- Status LED [ here ](#status_led)
|
||||
- Board schematic [here](#schematic)
|
||||
- External FLASH LED [here](#led_issue)
|
||||
- Power supply [here](#power_supply)
|
||||
- Potential issue [here](#issue)
|
||||
|
||||
<a name="esp32"></a>
|
||||
## Freenove ESP32-Wrover-CAM
|
||||
|
||||
Basic informations:
|
||||
- On the board missing LED for flash
|
||||
- Option connecting external FLASH LED
|
||||
- Missing micro SD card slot
|
||||
- Internal WiFi antenna
|
||||
- no additional HW is needed for programming
|
||||
- 4MB FLASH and 4MB external PSRAM
|
||||
- 520 KB SRAM
|
||||
|
||||
This board version is built on the same processor, ESP32, as the AiThinker ESP32-CAM. However, a different module with the processor is used in this version. The board missing a LED for FLASH and a Micro SD card slot. The board has an internal WiFi antenna, which has better WiFi signal quality than the AiThinker ESP32-CAM board.
|
||||
|
||||
<img src="ESP32-WROVER-CAM.jpg" width=30% height=30%>
|
||||
|
||||
<a name="cam_modules"></a>
|
||||
## Supported camera modules
|
||||
|
||||
It's necessary to use a camera version **OV2640**. If using a different camera, modification of the camera's pinout can be needed, or some camera settings may not work correctly. We recommend to use a camera module with a viewing angle of 120° or 160°.
|
||||
|
||||
These are currently known or tested camera modules:
|
||||
|
||||
| Camera chip | FOV | Resolution | Tested | Works | Description |
|
||||
|-------------|------|------------|--------|-------|------------------------------------------|
|
||||
| OV2640 | 30° | 2MP | No | N/A | |
|
||||
| OV2640 | 44° | 2MP | No | N/A | |
|
||||
| OV2640 | 66° | 2MP | Yes | Yes | Recommended. Standard camera module |
|
||||
| OV2640 | 120° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 160° | 2MP | Yes | Yes | Recommended |
|
||||
| OV2640 | 200° | 2MP | No | N/A | |
|
||||
| OV2640 | 222° | 2MP | No | N/A | |
|
||||
| OV2640IR | 160° | 2MP | Yes | Yes | |
|
||||
| OV8225N | 66° | 2MP | Yes | Yes | |
|
||||
| OV3360 | 66° | 3MP | Yes | Yes | |
|
||||
| OV5640-AF | 72° | 5MP | Yes | Yes | Overheating, slow photo loading |
|
||||
|
||||
<a name="different_mcu"></a>
|
||||
## Different MCU version
|
||||
|
||||
There are several versions of the boards. A clone was used for software testing. I assume that the original version and the clone do not differ, and the software will work on both in the same way.
|
||||
|
||||
The original board version contain brand **FREENOVE**
|
||||
|
||||
<img src="ESP32-WROVER-CAM.jpg" width=20% height=20%>
|
||||
|
||||
On the clone **FREENOVE** brand missing
|
||||
|
||||
<img src="ESP32-WROVER-CAM-clone.png" width=30% height=30%>
|
||||
|
||||
<a name="flash_fw"></a>
|
||||
## How to flash binary files to board from Linux/MAC/Windows
|
||||
|
||||
#### Partitions table for flashing FW
|
||||
|
||||
For uploading the firmware, it's important to use this configuration of addresses and files:
|
||||
|
||||
ZIP file with build binary files: **esp32-wrover-dev.zip**
|
||||
|
||||
- address **0x1000** - **ESP32_PrusaConnectCam.ino.bootloader.bin**
|
||||
- address **0x8000** - **ESP32_PrusaConnectCam.ino.partitions.bin**
|
||||
- address **0x10000** - **ESP32_PrusaConnectCam.ino.bin**
|
||||
|
||||
**It is important to download the correct binary files! Each type of camera has its own ZIP archive with files for uploading the firmware.**
|
||||
|
||||
#### Linux/MAC
|
||||
|
||||
You must use the console to upload the firmware on the MAC or Linux platform. First, ensure you have installed esptool for Python. You can find it on the manufacturer's website, ESPRESSIF, [here](https://docs.espressif.com/projects/esp-at/en/latest/esp32/Get_Started/Downloading_guide.html#linux-or-macos).
|
||||
|
||||
And command for FLASH FW is here, where **/dev/ttya0** is your serial interface for communication with the ESP32-cam board. This is the command for the first flash FW to MCU.
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --erase-all --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
This command contains the parameter **--eras-all**, which erases the entire flash in the MCU. So, for just updating the firmware, it is necessary to remove the parameter **--eras-all**; otherwise, the MCU configuration will also be deleted. The basic command list can be found [here](https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/basic-commands.html)
|
||||
|
||||
Here is the command for updating the firmware in the MCU without erasing the MCU configuration
|
||||
|
||||
```
|
||||
./esptool -p /dev/ttya0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x1000 ESP32_PrusaConnectCam.ino.bootloader.bin 0x8000 ESP32_PrusaConnectCam.ino.partitions.bin 0x10000 ESP32_PrusaConnectCam.ino.bin
|
||||
```
|
||||
|
||||
Launching the esptool application may be different in different operating systems
|
||||
|
||||
#### Windows
|
||||
|
||||
Driver for CH340 USB to UART convert for Windows is for example [here](https://www.wch-ic.com/search?q=CH340&t=downloads) . An older version of the driver is for example [here](https://blog.laskakit.cz/wp-content/uploads/2020/03/CH341SER.zip)
|
||||
|
||||
<img src="how to flash chip select.jpg" width=25% height=25%>
|
||||
|
||||
It's necessary to erase the FLASH using the **ERASE** button before the first firmware flash.
|
||||
|
||||
<img src="flash.jpg" width=30% height=30%>
|
||||
|
||||
<a name="arduino_cfg"></a>
|
||||
## How to compile software in the Arduino IDE
|
||||
|
||||
Board configuration in the Arduino IDE 2.3.2
|
||||
- Tools -> Board -> ESP32 Arduino -> ESP32 Wrover Module
|
||||
- Tools -> CPU Frequency -> 240MHz (WiFi/BT)
|
||||
- Tools -> Core debug level -> None
|
||||
- Tools -> Erase all Flash Before Sketch Upload -> Disable **(first flash, new board = enable. otherwise = disable)**
|
||||
- Tools -> Flash frequency -> 80MHz
|
||||
- Tools -> Flash Mode -> DIO
|
||||
- Tools -> Partition scheme -> Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
|
||||
|
||||
When flashing the firmware to a new, empty ESP32-Wrover-dev device for the first time, it is necessary to use the 'Erase' function.
|
||||
|
||||
This can be found under **Tools** -> **Erase all Flash Before Sketch Upload** -> **Enable**.
|
||||
|
||||
After the initial firmware upload to the MCU, it's necessary to disable this option. If you do not disable this option, your camera configuration will continue to be erased from the flash memory after uploading new firmware from the Arduino IDE.
|
||||
|
||||
It is necessary to enable support for the correct board version in the file **mcu_cfg.h** after line 16.
|
||||
|
||||
<a name="factory_cfg"></a>
|
||||
## How to reset configuration to factory settings
|
||||
To reset the settings to factory defaults, follow these instructions:
|
||||
|
||||
<img src="reset_pin.png" width=30% height=30%>
|
||||
|
||||
- Connect PIN **IO12** to **ground**.
|
||||
- **Plug in** the power supply.
|
||||
- Wait for **10 seconds**.
|
||||
- After 10 seconds, the **STATUS LED will start flashing**.
|
||||
- **Disconnect** PIN **IO12** from **ground** (but don't disconnect the power supply).
|
||||
- After disconnecting **IO12** from **ground**, the **STATUS LED** will **stop flashing**, and the MCU will **automatically reboot**.
|
||||
- Now the MCU is in the factory settings.
|
||||
|
||||
<a name="status_led"></a>
|
||||
## Status LED
|
||||
|
||||
On the board, there is a status LED that provides a visual indicator of the module's current status
|
||||
through blinking at defined intervals.
|
||||
|
||||
<img src="status_led.png" width=25% height=25%>
|
||||
|
||||
Upon module activation, the LED illuminates. After processor initialization, the LED exhibits different blinking intervals based on the current mode of the module
|
||||
|
||||
- **Service AP Mode only:** The LED blinks every **400 ms**, indicating the module's availability in service AP mode.
|
||||
- **Connecting to WiFi AP:** While connecting to a WiFi Access Point, the LED blinks at intervals of **800 ms**.
|
||||
- **Connected to WiFi Network:** Upon successful connection to a WiFi network, the LED blinks at intervals of **4000 ms**, signaling a stable connection.
|
||||
- **Problematic State:** If an issue or error occurs, the LED accelerates its blinking to every **100 ms**.
|
||||
|
||||
The approximate boot time of the device is 15-20 seconds.
|
||||
|
||||
<a name="schematic"></a>
|
||||
## Schematic for ESP32-cam board
|
||||
|
||||
Unfortunately, I was unable to obtain the schematic for this version of the board. I found a schematic online, but it is in very low resolution and is difficult to read.
|
||||
|
||||
<img src="schematic.png" width=25% height=25%>
|
||||
|
||||
And here is the pinout
|
||||
|
||||
<img src="Freenove-ESP32-Wrover-CAM-pinout.png" width=70% height=70%>
|
||||
|
||||
<a name="led_issue"></a>
|
||||
## External FLASH LED
|
||||
|
||||
This board version don't have **FLASH LED** on the board. Therefore, if a FLASH LED is needed, a GPIO 14 pin should be used to connect an external LED for FLASH. The FLASH LED can be connected, for example, as an LED strip using a relay.
|
||||
|
||||
<img src="led_sch_bb.png" width=30% height=30%>
|
||||
|
||||
For the external LED is in the SW used **GPIO pin 14**.
|
||||
|
||||
<img src="ext_led.png" width=30% height=30%>
|
||||
|
||||
However, a 5mm LED can also be connected directly. **CAUTION**: The digital GPIO output from the ESP32-WROVER-DEV board has a current limitation of a **maximum of 40mA**! Therefore, it is recommended to switch the LED using a **transistor** rather than directly through the GPIO pin. Improper use of the GPIO pin can lead to permanent damage.
|
||||
|
||||
<a name="power_supply"></a>
|
||||
## Power Supply
|
||||
|
||||
The device requires a 5V power supply, with a maximum current consumption of 2A. Power is supplied via a micro USB connector when using the original programmer.
|
||||
|
||||
<a name="issue"></a>
|
||||
## Potential issue with this board
|
||||
- This version does not have a slot for a Micro SD card, so it may be complicated to obtain logs from it.
|
||||
|
||||
|
After Width: | Height: | Size: 625 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 618 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 652 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
# Seeed Studio XIAO ESP32S3 sense cam
|
||||
|
||||
In progress
|
||||
|
||||
<img src="seeed-studio-xiao-esp32s3-sense.png" width=50% height=50%>
|
||||
|
After Width: | Height: | Size: 405 KiB |
|
After Width: | Height: | Size: 441 KiB |
|
After Width: | Height: | Size: 788 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 682 KiB |