Compare commits

...

20 Commits

Author SHA1 Message Date
Miroslav Pivovarsky db0112e9c2
Update README.md 2025-01-02 21:28:35 +01:00
Miroslav Pivovarsky 9a70b1c31b update picture 2025-01-02 21:27:35 +01:00
Miroslav Pivovarsky d42ba99511 added picture 2025-01-02 21:19:43 +01:00
Miroslav Pivovarsky 0b1f3b75cd
Merge pull request #67 from devsfan3/patch-1
Update README
2025-01-02 21:01:26 +01:00
Miroslav Pivovarsky 8dd9cf66e9 fix typo 2025-01-02 20:18:19 +01:00
Miroslav Pivovarsky 10cb00fdcd update build script 2025-01-02 20:17:04 +01:00
Miroslav Pivovarsky 5608b4c4c4 added ESP32-S3 WROOM Freenove board 2025-01-02 20:16:52 +01:00
Miroslav Pivovarsky df58d5d5cb update libs 2025-01-02 20:16:06 +01:00
Miroslav Pivovarsky 80711f9722
Update mcu_cfg.h 2025-01-02 20:12:03 +01:00
Miroslav Pivovarsky d7e39a1a4d
Merge pull request #92 from muesli/bump-version
Bump to v1.1.1
2025-01-02 20:08:52 +01:00
Miroslav Pivovarsky 5888e42c9d
Update README.md 2024-12-28 13:05:06 +01:00
Miroslav Pivovarsky 1770b0bc62
Update README.md 2024-12-28 13:03:55 +01:00
Miroslav Pivovarsky 734fe6325b Updated documentation for ESP32-S3 WROOM Freenove 2024-12-28 12:58:21 +01:00
Miroslav Pivovarsky e93f7ee0e4 update pinout for ESP32-S3 wroom Freenove 2024-12-28 12:55:25 +01:00
Miroslav Pivovarsky 999968ef94 Added support for ESP32-S3 Wroom Freenove 2024-12-27 23:34:48 +01:00
Miroslav Pivovarsky 8180aa84c0 update libs 2024-12-27 23:33:40 +01:00
Christian Muehlhaeuser 7a90f47a1e Bump to v1.1.1 2024-12-03 00:08:31 +01:00
devsfan3 8e87eaca88
Add files via upload 2024-09-12 17:12:45 -05:00
devsfan3 b29945df10
Update README.md 2024-09-12 17:12:13 -05:00
devsfan3 009ff6741c
Update README.md
Added a how-to on how to use ESP Tool on Chrome to flash boards.
2024-09-12 17:06:02 -05:00
25 changed files with 397 additions and 38 deletions

1
.gitignore vendored
View File

@ -31,7 +31,6 @@
*.lib
# Executables
*.exe
*.out
*.app

View File

@ -8,12 +8,12 @@
This project uses other libraries. It is necessary to install them in the arduino IDE.
- Library - License - Version - Link
- ESPAsyncWebServer - LGPL 3.0 - 3.3.22 - https://github.com/mathieucarbou/ESPAsyncWebServer
- AsyncTCP - LGPL 3.0 - 3.2.14 - https://github.com/mathieucarbou/AsyncTCP
- ArduinoJson - MIT - 7.2.1 - https://github.com/bblanchon/ArduinoJson
- ESPAsyncWebServer - LGPL 3.0 - 3.4.5 - https://github.com/mathieucarbou/ESPAsyncWebServer
- AsyncTCP - LGPL 3.0 - 3.3.1 - https://github.com/mathieucarbou/AsyncTCP
- ArduinoJson - MIT - 7.3.0 - https://github.com/bblanchon/ArduinoJson
- ArduinoUniqueID - MIT - 1.3.0 - https://github.com/ricaun/ArduinoUniqueID
- arduino-esp32 - LGPL 2.1 - 3.0.7 - https://github.com/espressif/arduino-esp32
- DHTnew - MIT - 0.4.21 - https://github.com/RobTillaart/DHTNew
- arduino-esp32 - LGPL 2.1 - 3.1.0 - https://github.com/espressif/arduino-esp32
- DHTnew - MIT - 0.5.2 - https://github.com/RobTillaart/DHTNew
Arduino IDE configuration for the MCU are stored in the module_XXX.h file.

View File

@ -254,12 +254,12 @@ void Camera::SetFlashStatus(bool i_data) {
}
#endif
/* Neopixel control of the FLASH */
/* rgbLedWrite control of the FLASH */
#if (true == CAMERA_FLASH_NEOPIXEL)
if (true == i_data) {
neopixelWrite(FLASH_NEOPIXEL_LED_PIN, RGB_BRIGHTNESS, RGB_BRIGHTNESS, RGB_BRIGHTNESS);
rgbLedWrite(FLASH_NEOPIXEL_LED_PIN, RGB_BRIGHTNESS, RGB_BRIGHTNESS, RGB_BRIGHTNESS);
} else if (false == i_data) {
neopixelWrite(FLASH_NEOPIXEL_LED_PIN, 0, 0, 0);
rgbLedWrite(FLASH_NEOPIXEL_LED_PIN, 0, 0, 0);
}
#endif
#endif

View File

@ -7,22 +7,22 @@
Contact: miroslav.pivovarsky@gmail.com
@bug: no know bug
*/
#ifndef _MCU_CFG_H_
#define _MCU_CFG_H_
/* ----------------- CAMERA TYPE ---------------*/
#define AI_THINKER_ESP32_CAM true
#define ESP32_WROVER_DEV false
#define CAMERA_MODEL_ESP32_S3_DEV_CAM false
#define CAMERA_MODEL_ESP32_S3_EYE_2_2 false
#define CAMERA_MODEL_XIAO_ESP32_S3_CAM false
#define CAMERA_MODEL_ESP32_S3_CAM false
#define AI_THINKER_ESP32_CAM true
#define ESP32_WROVER_DEV false
#define CAMERA_MODEL_ESP32_S3_DEV_CAM false
#define CAMERA_MODEL_ESP32_S3_EYE_2_2 false
#define CAMERA_MODEL_XIAO_ESP32_S3_CAM false
#define CAMERA_MODEL_ESP32_S3_CAM false
#define ESP32_S3_WROOM_FREENOVE false
/* ---------------- BASIC MCU CFG --------------*/
#define SW_VERSION "1.1.0" ///< SW version
#define SW_VERSION "1.1.2" ///< SW version
#define SW_BUILD __DATE__ " " __TIME__ ///< build number
#define CONSOLE_VERBOSE_DEBUG false ///< enable/disable verbose debug log level for console
#define DEVICE_HOSTNAME "Prusa-ESP32cam" ///< device hostname
@ -90,7 +90,7 @@
/* ----------------- WiFi CFG -------------------*/
#define WIFI_STA_WDG_TIMEOUT 60000 ///< STA watchdog timeout [ms]
#define WIFI_DISABLE_UNENCRYPTED_STA_PASS_CHECK false ///< enable/disable WEP/WPA/WPA2/... encryption for STA mode . for the wifi network without encryption set to false
#define WIFI_DISABLE_UNENCRYPTED_STA_PASS_CHECK false ///< enable/disable WEP/WPA/WPA2/... encryption for STA mode . for the wifi network without encryption set to false
/* ----------------- NTP CFG --------------------*/
#define NTP_SERVER_1 "pool.ntp.org" ///< NTP server
@ -110,7 +110,7 @@
#define TIMELAPS_PHOTO_SUFFIX ".jpg" ///< photo file type for timelaps
/* ---------------- FACTORY CFG ----------------*/
#define FACTORY_CFG_PHOTO_REFRESH_INTERVAL 30 ///< in seconds
#define FACTORY_CFG_PHOTO_REFRESH_INTERVAL 30 ///< in the second
#define FACTORY_CFG_PHOTO_QUALITY 10 ///< 10-63, lower is better
#define FACTORY_CFG_FRAME_SIZE 0 ///< 0 - FRAMESIZE_QVGA, ..., 6 - FRAMESIZE_UXGA. Look function Cfg_TransformFrameSizeDataType
#define FACTORY_CFG_BRIGHTNESS 0 ///< from -2 to 2
@ -311,4 +311,4 @@
#endif
/* EOF */
/* EOF */

View File

@ -0,0 +1,103 @@
/**
@file module_ESP32-S3_Wroom_Freenove.h
@brief Definition of the ESP32-S3 Wroom FreeNove board
@author Miroslav Pivovarsky
Contact: miroslav.pivovarsky@gmail.com
Board configuration in the arduino IDE 2.3.2
Tools -> Board -> ESP32 Arduino -> ESP32S3 Dev Module
Tools -> USB CDC on BOOT -> Disabled
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 -> QIO 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 -> UART0 / Hardware CDC
Tools -> Upload Speed -> 921600
Tools -> USB Mode -> Hardware CDC and JTAG
Tools -> Zigbee mode -> Disable
https://freenove.com/fnk0085
@bug: no know bug
*/
#pragma once
#include "mcu_cfg.h"
#ifdef ESP32_S3_WROOM_FREENOVE
/* --------------- CAMERA CFG -------------------*/
#define PWDN_GPIO_NUM -1 ///< Power down control pin
#define RESET_GPIO_NUM -1 ///< Reset control pin
#define SIOD_GPIO_NUM 4 ///< SCCB: SI/O data pin
#define SIOC_GPIO_NUM 5 ///< SCCB: SI/O control pin
#define Y2_GPIO_NUM 11 ///< SCCB: Y2 pin
#define Y3_GPIO_NUM 9 ///< SCCB: Y3 pin
#define Y4_GPIO_NUM 8 ///< SCCB: Y4 pin
#define Y5_GPIO_NUM 10 ///< SCCB: Y5 pin
#define Y6_GPIO_NUM 12 ///< SCCB: Y6 pin
#define Y7_GPIO_NUM 18 ///< SCCB: Y7 pin
#define Y8_GPIO_NUM 17 ///< SCCB: Y8 pin
#define Y9_GPIO_NUM 16 ///< SCCB: Y9 pin
#define VSYNC_GPIO_NUM 6 ///< Vertical sync pin
#define HREF_GPIO_NUM 7 ///< Line sync pin
#define PCLK_GPIO_NUM 13 ///< Pixel clock pin
#define XCLK_GPIO_NUM 15 ///< External clock pin
/* ------------------ MCU CFG ------------------*/
#define BOARD_NAME F("ESP32-S3 WROOM Freenove") ///< Board name
#define ENABLE_BROWN_OUT_DETECTION false ///< Enable brown out detection
#define ENABLE_PSRAM true ///< Enable PSRAM
/* --------------- OTA UPDATE CFG --------------*/
#define OTA_UPDATE_FW_FILE PSTR("ESP32-S3-WROOM_FREENOVE.bin") ///< OTA update firmware file name
#define FW_STATUS_LED_PIN 2 ///< GPIO pin for status FW update LED
#define FW_STATUS_LED_LEVEL_ON LOW ///< GPIO pin level for status LED ON
/* --------------- FLASH LED CFG ---------------*/
#define ENABLE_CAMERA_FLASH true ///< Enable camera flash function
#define CAMERA_FLASH_DIGITAL_CTRL true ///< Enable camera flash digital control
#define CAMERA_FLASH_PWM_CTRL false ///< Enable camera flash PWM control
#define CAMERA_FLASH_NEOPIXEL true ///< Enable camera flash NeoPixel control
#define FLASH_GPIO_NUM 14 ///< Flash control pin
#define FLASH_NEOPIXEL_LED_PIN 48 ///< External flash control pin. RGB LED NeoPixel
#define FLASH_OFF_STATUS 0 ///< PWM intensity LED for OFF. 0-2^FLASH_PWM_RESOLUTION = 0-255
#define FLASH_ON_STATUS 205 ///< PWM intensity LED for ON. limitation to 80%. 2^FLASH_PWM_RESOLUTION * 0.8% = 204
#define FLASH_PWM_FREQ 2000 ///< frequency of pwm [240MHz / (100 prescale * pwm cycles)] = frequency
#define FLASH_PWM_CHANNEL 0 ///< channel 0
#define FLASH_PWM_RESOLUTION 8 ///< range 1-20bit. 8bit = 0-255 range
/* --------------- SD CARD CFG ---------------*/
#define ENABLE_SD_CARD true ///< Enable SD card function
#define SD_PIN_CLK 39 ///< GPIO pin for SD card clock
#define SD_PIN_CMD 38 ///< GPIO pin for SD card command
#define SD_PIN_DATA0 40 ///< GPIO pin for SD card data 0
/* ---------- RESET CFG CONFIGURATION ----------*/
#define CFG_RESET_PIN 21 ///< GPIO 12 is for reset CFG to default
#define CFG_RESET_LED_PIN 2 ///< GPIO for indication of reset CFG
#define CFG_RESET_LED_LEVEL_ON HIGH ///< GPIO pin level for status LED ON
/* -------------- STATUS LED CFG ----------------*/
#define STATUS_LED_ENABLE false ///< enable/disable status LED
#define STATUS_LED_GPIO_NUM 2 ///< GPIO pin for status LED
#define STATUS_LED_OFF_PIN_LEVEL LOW ///< GPIO pin level for status LED ON
/* -------------- DHT SENSOR CFG ----------------*/
#define DHT_SENSOR_ENABLE false ///< enable/disable DHT sensor
#define DHT_SENSOR_PIN 47 ///< GPIO pin for DHT sensor
#endif // AI_THINKER_ESP32_CAM
/* EOF */

View File

@ -14,7 +14,7 @@
#include "mcu_cfg.h"
#if ((AI_THINKER_ESP32_CAM + ESP32_WROVER_DEV + CAMERA_MODEL_ESP32_S3_DEV_CAM + CAMERA_MODEL_ESP32_S3_EYE_2_2 + CAMERA_MODEL_XIAO_ESP32_S3_CAM + CAMERA_MODEL_ESP32_S3_CAM) != 1)
#if ((AI_THINKER_ESP32_CAM + ESP32_WROVER_DEV + CAMERA_MODEL_ESP32_S3_DEV_CAM + CAMERA_MODEL_ESP32_S3_EYE_2_2 + CAMERA_MODEL_XIAO_ESP32_S3_CAM + CAMERA_MODEL_ESP32_S3_CAM + ESP32_S3_WROOM_FREENOVE) != 1)
#error "Exactly one camera model must be defined as true."
#endif
@ -36,6 +36,9 @@
#elif (true == CAMERA_MODEL_ESP32_S3_CAM)
#include "module_ESP32-S3-CAM.h"
#elif (true == ESP32_S3_WROOM_FREENOVE)
#include "module_ESP32-S3_Wroom_Freenove.h"
#else
#error "No module selected"

View File

@ -3,19 +3,20 @@
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. You can find a list of supported boards below. Additionally, for each supported board, there is a guide on how to upload the firmware, how to compile code for it, some basic information and a list of known issues for this particular board.
This project uses other libraries. It is necessary to install them in the Arduino IDE:
- App [Arduino IDE 2.3.3](https://www.arduino.cc/en/software)
- MCU support [arduino-ESP32 3.0.7](https://github.com/espressif/arduino-esp32)
- App [Arduino IDE 2.3.4](https://www.arduino.cc/en/software)
- MCU support [arduino-ESP32 3.1.0](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.2.14](https://github.com/mathieucarbou/AsyncTCP)
- Library [ESPAsyncWebServer 3.3.22](https://github.com/mathieucarbou/ESPAsyncWebServer)
- Library [ArduinoJson 7.2.1](https://github.com/bblanchon/ArduinoJson)
- Library [AsyncTCP 3.3.1](https://github.com/mathieucarbou/AsyncTCP)
- Library [ESPAsyncWebServer 3.4.5](https://github.com/mathieucarbou/ESPAsyncWebServer)
- Library [ArduinoJson 7.3.0](https://github.com/bblanchon/ArduinoJson)
- Library [UniqueID 1.3.0](https://github.com/ricaun/ArduinoUniqueID)
- Library [DHTnew 0.4.21](https://github.com/RobTillaart/DHTNew)
- Library [DHTnew 0.5.2](https://github.com/RobTillaart/DHTNew)
What we need for functionality:
- 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 flash using Chrome [here](#browser_flash)
- 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)
@ -37,7 +38,7 @@ What we need for functionality:
| Ai-Thinker ESP32-cam | Full | Yes | Yes | Board/Ext | Yes | Yes | [ here ](doc/AI_Thinker-ESP32-cam/README.md) |
| ESP32-S3-EYE 2.2 | Full | Yes | Yes | External | Yes | Yes | [ here ](doc/ESP32-S3-EYE-22/README.md) |
| Freenove ESP32-Wrover cam | Full | Yes | No | External | Yes | Yes | [ here ](doc/ESP32-Wrover-dev/README.md) |
| Freenove ESP32-S3-Wroom | in Progress | | | | | | [ here ](doc/Freenove%20ESP32-S3-Wroom/README.md) |
| Freenove ESP32-S3-Wroom | Full | Yes | Yes | Board/Ext | Yes | Yes | [ here ](doc/Freenove%20ESP32-S3-Wroom/README.md) |
| ESP32-S3-DEV-CAM | in Progress | | | External | | | [ here ](doc/ESP32-S3-DEV-CAM/README.md) |
| Seeed Studio XIAO ESP32S3 | Full | Yes | Yes | External | Yes | Yes | [ here ](doc/XIAO_ESP32S3/README.md) |
| ESP32-S3-CAM | Full | Yes | Yes | Board/Ext | Yes | Yes | [ here ](doc/ESP32-S3-CAM/README.md) |
@ -49,6 +50,20 @@ The compiled firmware for each supported board is published with every release.
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="browser_flash"></a>
## How to flash using Chrome
It is also possible to flash firmware using ESP Tool on a WEB browser https://espressif.github.io/esptool-js/
**This option is currently not supported on the Ai Thinker ESP32-cam board version.**
Ensure that you set the correct baud rate from the documentation for the board you are using (921600). Select the serial port your board is connected to. You can then click "Add File" and select each .bin file for your board. Make sure that you input the **correct Flash Address** from the documentation from your board. For the initial flash, click "Erase Flash", and when that is complete, click "Program." See below for a screenshot of how to configure ESP Tool for the Freenove Wrover board.
<img src="doc/ESPToolConnect.jpg" width=50% height=50%>
<img src="doc/ESPTool.png" width=50% height=50%>
<img src="doc/ESPToolFinish.jpg" width=50% height=50%>
<a name="arduino_lib"></a>
## How to compile software in the Arduino IDE

BIN
doc/ESPTool.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

BIN
doc/ESPToolConnect.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
doc/ESPToolFinish.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
doc/ESPToolPort.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

View File

@ -1,5 +1,199 @@
# Freenove ESP32-S3-WROOM CAM
In progress
<img src="Board.jpg" width=50% height=50%>
# Freenove ESP32-S3 WROOM
What we need for functionality
- Freenove ESP32-S3 WROOM 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)
- External temperature sensor DHT22/DHT11 [here](#ext_sens)
- Potential issue [here](#issue)
<a name="esp32"></a>
## Freenove ESP32-S3 WROOM
Basic information:
- On the board is LED WS2812b 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
- Excellent WiFi signal
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="Board.jpg" width=30% height=30%>
<img src="board_des.jpg" width=30% height=30%>
<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 |
| OV2640 | 120° | 2MP | Yes | Yes | Recommended |
| OV2640 | 160° | 2MP | Yes | Yes | Recommended |
| OV2640IR | 160° | 2MP | Yes | Yes | |
<a name="flash_fw"></a>
## How to flash binary files to board from Linux/MAC/Windows
For programming we will use the right USB-C connector
<img src="prog.png" width=25% height=25%>
#### 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-wroom-freenove.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 qio --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 **--erase-all**, which erases the entire flash in the MCU. So, for just updating the firmware, it is necessary to remove the parameter **--erase-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 qio --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. SW for FW flash (Flash Download Tools) is [here](https://www.espressif.com/en/support/download/other-tools)
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.
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 -> ESP32S3 Dev Module
- Tools -> USB CDC on BOOT -> Disabled
- 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 -> QIO 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 -> UART0 / Hardware CDC
- Tools -> Upload Speed -> 921600
- Tools -> USB Mode -> Hardware CDC and JTAG
- Tools -> Zigbee mode -> Disable
When flashing the firmware to a new, empty Freenove ESP32-S3-Wroom 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%>
- Connect PIN **21** (red) to **ground** (blue).
- **Plug in** the power supply.
- Wait for **10 seconds**.
- After 10 seconds, the **STATUS LED will start flashing**.
- **Disconnect** PIN **21** from **ground** (but don't disconnect the power supply).
- After disconnecting **21** 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
For the board existing only pinout. I don't found schematic
<img src="ESP32S3_Pinout.png" width=25% height=25%>
<a name="led_issue"></a>
## FLASH LED issue
The board includes a single WS2812b FLASH LED. This FLASH LED emits light dimly. However, there is an option to use PIN 14, as a external flash light. The image shows 3 arrows:
- Green, PIN 14
- 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="ext_sens"></a>
## External temperature sensor DHT22/DHT11
Below you will find the wiring diagram for the DHT22 or DHT11 sensor.
| Camera board | DHT22/DHT11 |
|--------------|-------------|
| 3.3V (red) | VCC |
| GND (blue) | GND |
| IO47 (green) | Data |
<img src="dht_22.png" width=30% height=30%>
<a name="issue"></a>
## Potential issue with this board

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@ -88,6 +88,17 @@
#
# 9. Install the ESP32 core:
# ./arduino-cli core install esp32:esp32
#
# 10. for updating the ESP32 core and libraries:
# ./arduino-cli core list
# ./arduino-cli core update-index
# ./arduino-cli core upgrade
# ./arduino-cli core list
# ./arduino-cli lib list
# ./arduino-cli lib update-index
# ./arduino-cli lib upgrade
# ./arduino-cli lib list
#
# ---------------------------------------------
set -e
@ -102,6 +113,20 @@ if [ ! -f arduino-cli ]; then
exit 1
fi
echo "----------------------------------------------"
echo "Check updated libraries"
./arduino-cli lib list
./arduino-cli lib update-index
./arduino-cli lib upgrade
./arduino-cli lib list
echo "----------------------------------------------"
echo "Check updated cores"
./arduino-cli core list
./arduino-cli core update-index
./arduino-cli core upgrade
./arduino-cli core list
mkdir -p ../build/output
build_start=`date`
@ -110,7 +135,7 @@ build_start=`date`
echo "----------------------------------------------"
echo "Building Ai Thinker board"
mkdir -p ../build/esp32-cam
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define AI_THINKER_ESP32_CAM false/#define AI_THINKER_ESP32_CAM true/' mcu_cfg.h
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define AI_THINKER_ESP32_CAM false/#define AI_THINKER_ESP32_CAM true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:esp32cam:CPUFreq=240,FlashFreq=80,FlashMode=dio,PartitionScheme=min_spiffs,DebugLevel=none,EraseFlash=none --output-dir ../build/esp32-cam
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
@ -130,7 +155,7 @@ mv ../build/esp32-cam.zip ../build/output/
echo "----------------------------------------------"
echo "Building ESP32 Wrover Dev board"
mkdir ../build/esp32-wrover-dev
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define ESP32_WROVER_DEV false/#define ESP32_WROVER_DEV true/' mcu_cfg.h
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define ESP32_WROVER_DEV false/#define ESP32_WROVER_DEV true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:esp32wrover:FlashFreq=80,FlashMode=dio,PartitionScheme=min_spiffs,DebugLevel=none,EraseFlash=none --output-dir ../build/esp32-wrover-dev
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
@ -150,7 +175,7 @@ mv ../build/esp32-wrover-dev.zip ../build/output/
echo "----------------------------------------------"
echo "Building ESP32-S3-EYE 2.2 board"
mkdir ../build/esp32-s3-eye-22
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_ESP32_S3_EYE_2_2 false/#define CAMERA_MODEL_ESP32_S3_EYE_2_2 true/' mcu_cfg.h
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_ESP32_S3_EYE_2_2 false/#define CAMERA_MODEL_ESP32_S3_EYE_2_2 true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=cdc,CPUFreq=240,FlashMode=dio,FlashSize=8M,PartitionScheme=min_spiffs,DebugLevel=none,PSRAM=opi,LoopCore=0,EventsCore=0,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default --output-dir ../build/esp32-s3-eye-22
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
@ -170,7 +195,7 @@ mv ../build/esp32-s3-eye-22.zip ../build/output/
echo "----------------------------------------------"
echo "Building XIAO ESP32-S3 Sense"
mkdir ../build/xiao-esp32-s3
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_XIAO_ESP32_S3_CAM false/#define CAMERA_MODEL_XIAO_ESP32_S3_CAM true/' mcu_cfg.h
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_XIAO_ESP32_S3_CAM false/#define CAMERA_MODEL_XIAO_ESP32_S3_CAM true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:XIAO_ESP32S3:USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=160,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=opi,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default --output-dir ../build/xiao-esp32-s3
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
@ -190,7 +215,7 @@ mv ../build/xiao-esp32-s3.zip ../build/output/
echo "----------------------------------------------"
echo "Building ESP32-S3-CAM"
mkdir ../build/esp32-s3-cam
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_ESP32_S3_CAM false/#define CAMERA_MODEL_ESP32_S3_CAM true/' mcu_cfg.h
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define CAMERA_MODEL_ESP32_S3_CAM false/#define CAMERA_MODEL_ESP32_S3_CAM true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=dio,FlashSize=16M,PartitionScheme=min_spiffs,DebugLevel=none,PSRAM=opi,LoopCore=0,EventsCore=0,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default --output-dir ../build/esp32-s3-cam
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
@ -205,6 +230,26 @@ cp ../build/esp32-s3-cam/ESP32_PrusaConnectCam.ino.bin ../build/output/esp32-s3-
cd ../build/esp32-s3-cam && zip -r ../esp32-s3-cam.zip . && cd -
mv ../build/esp32-s3-cam.zip ../build/output/
# ----------------- ESP32-S3 WROOM FREENOVE -----------------
# build ESP32-S3 WROOM FREENOVE
echo "----------------------------------------------"
echo "Building ESP32-S3 WROOM FREENOVE board"
mkdir ../build/esp32-s3-wroom-freenove
sed -i 's/#define \(AI_THINKER_ESP32_CAM\|ESP32_WROVER_DEV\|CAMERA_MODEL_ESP32_S3_DEV_CAM\|CAMERA_MODEL_ESP32_S3_EYE_2_2\|CAMERA_MODEL_XIAO_ESP32_S3_CAM\|CAMERA_MODEL_ESP32_S3_CAM\|ESP32_S3_WROOM_FREENOVE\) .*/#define \1 false/' mcu_cfg.h && sed -i 's/#define ESP32_S3_WROOM_FREENOVE false/#define ESP32_S3_WROOM_FREENOVE true/' mcu_cfg.h
./arduino-cli compile -v -b esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=min_spiffs,DebugLevel=none,PSRAM=opi,LoopCore=0,EventsCore=0,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default --output-dir ../build/esp32-s3-wroom-freenove
if [ $? -ne 0 ]; then
echo "Build failed, exiting."
exit 1
fi
rm -f ../build/esp32-s3-wroom-freenove/ESP32_PrusaConnectCam.ino.elf
rm -f ../build/esp32-s3-wroom-freenove/ESP32_PrusaConnectCam.ino.map
rm -f ../build/esp32-s3-wroom-freenove/ESP32_PrusaConnectCam.ino.merged.bin
cp ../build/esp32-s3-wroom-freenove/ESP32_PrusaConnectCam.ino.bin ../build/output/ESP32-S3-WROOM_FREENOVE.bin
cd ../build/esp32-s3-wroom-freenove && zip -r ../esp32-s3-wroom-freenove.zip . && cd -
mv ../build/esp32-s3-wroom-freenove.zip ../build/output/
# --------------------------------------------------------
# Print build completion message
echo "----------------------------------------------"