ESP32-S3-A7670E-4G

From Waveshare Wiki
Jump to: navigation, search
ESP32-S3-A7670E-4G
ESP32-S3-A7670E-4G.jpg

ESP32-S3R2
Type C UART GPIO
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

The ESP32-S3-A7670E-4G (the development board) is a multifunctional, high-performance microcontroller development board designed by Waveshare. It integrates an A7670E 4G communication module, a universal OV camera interface, a TF card slot, RGB lights, an 18650 battery slot, a battery voltage measurement IC, a solar charging interface, and other peripherals. It employs the ESP32-S3R2, a system-level chip (SoC) that integrates low-power Wi-Fi and BLE5.0. Additionally, it comes with an external 16MB Flash and 2MB PSRAM. The SoC incorporates a hardware encryption accelerator, RNG, HMAC, and digital signature modules, meeting the security requirements of the Internet of Things (IoT).
The A7670E 4G communication module provides mobile network capabilities, enabling functionalities like portable Wi-Fi and IoT data transmission when combined with the ESP32-S3R2. Its various low-power operating modes cater to power consumption demands in IoT, mobile devices, outdoor monitoring, smart home applications, and other scenarios.

Features

  • Comes with a high-performance Xtensa® 32-bit LX7 dual-core processor with up to 240MHz.
  • Support 2.4GHz WiFi (802.11 b/g/n) and Bluetooth® 5 (LE) with onboard antenna.
  • Built-in 512KB of SRAM and 384KB ROM, with onboard 2MB PSRAM and an external 16MB Flash memory.

Hardware Description

ESP32-S3-A7670E-4G-details-intro2.png
  • Onboard surface-mounted antenna, you can use it or shorten it to connect the external antenna as shown in ⑲ and ⑳.
  • Onboard RGB colorful beads, WS2812B driver as shown in ㉓.
  • Onboard Camera interface: using 24pin camera interface as shown in ⑫.

The supported camera list is shown below:

model max resolution color type Len Size
OV2640 1600 x 1200 color 1/4"
OV3660 2048 x 1536 color 1/5"
OV5640 2592 x 1944 color 1/4"
OV7670 640 x 480 color 1/6"
OV7725 640 x 480 color 1/4"
NT99141 1280 x 720 color 1/4"
GC032A 640 x 480 color 1/10"
GC0308 640 x 480 color 1/6.5"
GC2145 1600 x 1200 color 1/5"
BF3005 640 x 480 color 1/4"
BF20A6 640 x 480 color 1/10"
SC101IOT 1280 x 720 color 1/4.2"
SC030IOT 640 x 480 color 1/6.5"
SC031GS 640 x 480 color 1/6"
ESP32-S3-A7670E-4G-details-intro1.png
  • Onboard TF-Card slot, support storing files and pictures as shown in ⑬.
  • Onboard solar panel charging interface as shown in ⑱.
    • You can select different resistor values on the back to switch the solar input voltage.
    • When the solar panel is charging, the onboard green LED will light up, as shown in figures ㉖ and ㉘.
  • The onboard circuit switch allows you to control the circuit on/off when using the 18650 power supply, as shown in figure ㉛.
  • Onboard USB to UART chip and automatic download circuit, after connecting the Type-C cable to program the demo and firmware, as shown in ⑦.
  • Using ESP32-S3 USB to connect to the A/SIM7670X USB connector, and using TinyUSB protocol to realize ppp dial-up network access as the portable WIFI.
  • The onboard 18650 battery header is designed for a single 3.7V 18650 lithium battery. Pay attention to the polarity markings on the lithium battery interface.
  • When the battery is reversed, the onboard yellow LED will light up as a warning, as shown in ㉕.
  • The development board reserves GPIO pins for external device connections, which can be flexibly configured as I2C, SPI, and other peripheral functions. For detailed functions, please refer to the GPIO allocation description.
  • The board also includes a GNSS IPEX1 connector. After powering on, you can enable the GNSS positioning function using the relevant commands, as shown in ㉑.
  • There are built-in microphone and speaker interfaces provided. The A7670X series development board can utilize these interfaces for making phone calls, as shown in ㉝ and ㉞.
  • Furthermore, there is a DIP switch onboard for convenient control of the Camera, USB HUB circuit, and 4G module power supply. It can also control the USB circuit switching of the 4G module, as depicted in figure ㉚.
  • Onboard LED Description:
    • Onboard battery anti-reverse warning LED, the yellow LED is on when the batteries are reversely connected as shown in ㉕.
    • Onboard green solar panel charging LED, the LED is on when the solar panel input voltage is active, as shown in ㉖.
    • Onboard blue power indicator, lights on when the power is connected to start up, as shown in ㉔.
    • The onboard module network indicator will turn on in red once the module is powered on. After successfully registering to the network, it will flash at a frequency of 200ms, as shown in figure ㉗.

Hardware Connection

This development board's ESP32-S3 UART to USB module and 4G module USB use the same Type-C interface, and you can select the USB interface of the 4G module, ESP32-S3 USB connector, or the Type-C interface through the dip switch on the back of the development board. This function is mainly used when the ESP32-S3 uses Tiny USB 4G module communication as a portable WiFi, wireless hotspot.
ESP32-S3-A7670E-4G-details-11.png
Esp32-s3-a-sim7670x 240124 05.pngEsp32-s3-a-sim7670x 240124 04.png

Solar Panel Charging

The solar input selection resistor on the back of the development board can switch the maximum voltage of solar input. By default, the 0-ohm resistor is used to connect to the 5V marking position, supporting solar panels with 5~6V voltage input. When using solar panels with higher voltage input, the corresponding voltage solder joints should be shorted. ESP32-S3-A7670E-4G-Solar.jpg

Dimensions

ESP32-S3-A7670E-4G-Dim.jpg

Development Environment Configuration

  • The following development system is Windows by default.

ESP-IDF

  • It is recommended to develop with the VSC plug-in.

Develop with VSCode

Install VSCode

1. Open the download page of the official VSCode website, and select the corresponding system and system bit to download.
ESP32-S3-Pico 05.jpg
2. After running the installation package, the rest can be installed by default, but here for the subsequent experience, it is recommended to check boxes 1, 2, and 3.
ESP32-S3-Pico 06.jpg
    • After the first two items are enabled, you can open VSCode directly by right-clicking files or directories, which can improve the subsequent user experience.
    • After the third item is enabled, you can select VSCode directly when you choose how to open it.

Install Espressif IDF Plug-in

  • Note: The latest version of the current plug-in is V1.6.0, for a consistent experience, users can choose the same version as us.
1. Open VSCode and use the shortcut key Shift + Ctrl + X to enter the plugin manager.

ESP32-S3-Pico 07.jpg

2. In the search bar, type Espressif IDF, select the corresponding plug-in, and click install.

ESP32-S3-Pico 08.jpg

3. Press F1 to enter:
esp-idf: configure esp-idf extension

ESP32-S3-Pico 09.jpg

4. Choose express (This tutorial is for users who install it for the first time, so only the first general installation tutorial is covered.)

ESP32-S3-Pico 10.jpg

5. Open and display this screen.

ESP32-S3-Pico 11.jpg

6. Choose a server to download.

ESP32-S3-Pico 12.jpg

7. Select the ESP-IDF version you want now, we choose the latest V5.0.1 (note that ESP-IDF started to support ESP32-S3 only after V4.4).

ESP32-S3-Pico 13.jpg

8. The following two are the ESP-IDF directory installation address and the ESP-IDF required tools installation address respectively.

ESP32-S3-Pico 14.jpg

    • Note: If you have installed ESP-IDF before, or if it has failed, please make sure to delete the file completely or create a new path.
9. Once the configuration is finished, click "install" to download.

ESP32-S3-Pico 15.jpg

10. Enter the download page, and it will automatically install the corresponding tools and environment, just wait a moment.

ESP32-S3-Pico 15.jpg

11. After the installation is completed, it will enter the following screen, indicating that the installation is finished.

ESP32-S3-Pico 17.jpg

Official Demo Usage

  • Click here to view more details provided by the official ESP.
Creating a Demo
1. Using the shortcut F1, type:
esp-idf:show examples projects

ESP32-S3-Pico 18.jpg

2. Choose your current IDF version:

ESP32-S3-Pico 19.jpg

3. Take "Hello World" as an example:

ESP32-S3-Pico 20.jpg

4. ① Choose the corresponding demo.
5. ② The readme file will explain which chip the demo is suitable for (the following section will introduce how to use the demo and its file structure, which is omitted here).
6. ③ Click to create the demo.
7. Choose the path to place the demo and ensure that there is no folder with the same name as the demo.

ESP32-S3-Pico 21.jpg

Modify COM Port
1. The corresponding COM port is displayed here, click on it to modify.

ESP32-S3-Pico 22.jpg

2. We check the device manager COM port, and select COM5, please select according to your corresponding COM port:

ESP32-S3-Pico 23.jpg

3. Choose the project and demo.

ESP32-S3-Pico 24.jpg

4. Then the COM port is modified.
Modify the Driver
1. Here shows the driver used, click here to modify the corresponding driver:

ESP32-S3-Pico 25.jpg

2. Choose the project or demo:

ESP32-S3-Pico 24.jpg

3. Wait for a few seconds after clicking.

ESP32-S3-Pico 27.jpg

4. Choose the driver we need, that is, the main chip ESP32S3.

ESP32-S3-Pico 28.jpg

5. Choose the openocd path, we can just choose one as it doesn't matter.

ESP32-S3-Pico 29.jpg

The Rest of the Status Bar Introduction

ESP32-S3-Pico 30.jpg

  • ① SDK configuration editor: many functions and configurations of ESP-IDF can be modified within it.
  • ② Clean up everything and delete all compiled files.
  • ③ Compile.
  • ④ Current download method, default is UART.
  • ⑤ Program the current firmware, please do it after compiling.
  • ⑥ Open the serial monitor to view serial information.
  • ⑦ Combined button for compiling, programming, and opening the serial monitor (most commonly used during debugging).
Compile, Program, and Serial Port Monitoring
1. Click on the Compile, Program, and Open Serial Monitor buttons we described earlier.

ESP32-S3-Pico 31.jpg

2. It may take a long time to compile, especially for the first time.

ESP32-S3-Pico 32.jpg

  • During this process, ESP-IDF may take up a lot of CPU resources and therefore may cause system lag.
3. If it fails to download, you can hold the boot button to power on and then release the button, and then program the download.

ESP32-S3-Pico 33.jpg

4. After successful download, it will automatically enter the serial monitor, and you can see the corresponding information output from the chip and prompt to reboot after 10s.

ESP32-S3-Pico 34.jpg

Arduino

  • If you do not use arduino-esp32 before, you can refer to this link.

Install Arduino

1. Open the official software download webpage, and choose the corresponding system and system bits to download.

ESP32-S3-Pico 35.jpg

2. You can choose "Just Download", or "Contribute & Download".

ESP32-S3-Pico 36.jpg

3. Run to install the program and install it all by default.

Install arduino-esp32

1. Open Preferences.

ESP32-S3-Pico 37.jpg

2. Add the corresponding board manager URLs and click it.

ESP32-S3-Pico 38.jpg

3. Add the following content in the blank.
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

ESP32-S3-Pico 39.jpg

4. Save the setting.
5. Open the board manager and enter ESP32 in the search bar.

ESP32-S3-Pico 40.jpg

6. Wait for downloading.

ESP32-S3-Pico 41.jpg

7. arduino-esp32 is downloaded.

ESP32-S3-Pico 42.jpg

Use Arduino Demo

1. Select the demo, here we choose the demo to get the chip ID.

ESP32-S3-Pico 43.jpg

2. Select the board as ESP32S3 Dev Module.

ESP32-S3-Pico 44.jpg

3. Choose the COM5 port of ESP32-S3 USB.

ESP32-S3-Pico 45.jpg

4. Click the download button, then it compiles and downloads automatically.

ESP32-S3-Pico 47.jpg

5. Finish.

ESP32-S3-Pico 48.jpg

6. Open the Serial Port Monitor.

ESP32-S3-Pico 49.jpg

7. See the chip ID of the loop output.

ESP32-S3-Pico 50.jpg

Cat-1 Module Command Set

HTTP

AT Command

Command Description

Return

AT+HTTPINIT

Open HTTP service

OK

AT+HTTPPARA="URL",https://www.waveshare.cloud/api/sample-test/

Connect to the remote server

OK

AT+HTTPDATA=5,1000

Input the data

DOWNLOAD <Enter hello OK

AT+HTTPACTION=0

Open HTTP request, 0:GET; 1:POST; 2:HEAD; 3:DELETE; 4:PUT

OK

+HTTPACTION: 0,200,54

AT+HTTPTERM

Close HTTP service

OK

AT+HTTPPARA

Set HTTP parameters

OK

AT+HTTPHEAD

Read the HTTP response header message

OK

AT+HTTPREAD

Read the HTTP response message

OK

ESP32-S3-A-SIM7670X-4G HAT-HTTP.png

MQTT

AT Command

Command Description

Return

AT+CMQTTSTART

Open MQTT service

OK

AT+CMQTTACCQ=0,"Waveshare-7670X",0

Apply for MQTT client

OK

AT+CMQTTCONNECT=0,"tcp://mqtt.easyiothings.com",20,1

Send MQTT request, connect to the private MQTT server (MQTTS)

OK

AT+CMQTTTOPIC=0,8

Input the message to publish the topic

>A7670Pub OK

AT+CMQTTPAYLOAD=0,9

Input the message to be published

OK >waveshare

AT+CMQTTPUB=0,0,60

Publish the message

OK +CMQTTPUB: 0,0

AT+CMQTTSUB=0,8,1

Subscribe to message threads

>A7670Sub OK +CMQTTSUBTOPIC: 0,0

[10:03:39.665]Receive←◆ +CMQTTRXSTART: 0,8,15 +CMQTTRXTOPIC: 0,8 A7670Sub +CMQTTRXPAYLOAD: 0,15 {"data":"test"} +CMQTTRXEND: 0

AT+CMQTTSTOP

Stop MQTT service

OK

AT+CMQTTREL

Release the client

OK

AT+CMQTTUNSUBTOPIC

Unsubscribe the topic

OK

AT+CMQTTUNSUB

Release subscription

OK


ESP32-S3-A-SIM7670X-4G HAT-MQTT.png

GNSS

AT+CGNSSPWR=1 Open GNSS +CGNSSPWR: READY!
AT+CGNSSTST=1 Open GNSS data output OK

ESP32-S3-A-SIM7670X-4G HAT-GNSS.png

Phone Call

  • Connect the configured speaker to the development board.
ATD10086; Dial phone numbers OK VOICE CALL: BEGIN
ATA Answer OK VOICE CALL: BEGIN
ATH Hang off OK VOICE CALL: END: 000017

Send and Receive SMS Messages

Send English Messages

1. Set the local SMS message center: AT+CSCA="+8613800755500" + Enter; return OK.
Note: China Mobile's SMS service center number is +861380xxxx500, where xxxx is your long-distance telephone area code, the SMS center of each place may not be the same, for more details, you can query online or call the mobile Unicom customer service, the SMS center for Shenzhen (0755).
2. AT+CMGF=1: Set the SMS mode as TEXT;
3. AT+CMGS="phone number" <Enter>, set the receiver phone number, and then return: ">"; Send the required message, such as "Send message test!", and Enter is not needed at the end. After editing the message, send it in hexadecimal format with the key value of 1A for sending (1A represents "CTRL+Z" and is used to indicate the module to execute the send operation, alternatively 1B, "ESC," can be sent to cancel the operation). After successful transmission, the module returns +CMGS: 15 to confirm successful sending, as shown in the figure below.
A7600X-Message1.jpg

Receive English Messages

1. Send a message "This is a receive test for SIM7600X!" on your phone to the test module.
2. When receiving a message, the serial port will automatically report the information. For example, "SM", 20, indicates that there are 20 messages in the Short Message (SM) storage. The message just sent is the 20th message.
3. Read the message: AT+CMGR=20 reads the 20th message (AT+CMGL="ALL" is for reading all information).
4. Delete the message: AT+CMGD=20 as shown below:
5. Convert the displayed message to text through the conde converter.
A7600X-Message2.jpg
A7600X-Message3.jpg

Send Chinese Message

Set the parameters to send the message:

 AT+CMGF=1             //Set to text mode 
 AT+CSCS="UCS2"           //Set the message text to the UCS2 encoding set
 AT+CSMP=17,167,2,25          //Sets the text mode parameters
 AT+CMGS="00310033003400330032003100310039003100300031"          //Sets the UCS2 set for the receiver's cell phone number

Wait for the return of ">", then send the converted message content (00530049004D003700360030003000584E2D658777ED4FE16D4B8BD5) in hexadecimal format. There's no need for a carriage return at the end. After editing the message, send it using the hexadecimal format by pressing 1A to initiate the sending process, as shown in the figure below.
A7600X-Message4.jpg

Receive Chinese Message

 AT+CMGF=1   //Setting the text display
 AT+CSCS="GSM"  //Setting the GSM code set
 AT+CNMI=2,1  //Set up new message notifications
//When receiving a message, the serial port will automatically report the information, as shown in the following figure put back is the 21st message
AT+CMGR=21  //Read the content of the SMS with the serial number

Convert the information in the software to Chinese as shown below:
A7600X-Message5.jpg

TTS (Text-to-Speech) Text Conversion to Speech

The commonly used commands for TTS (Text-to-Speech) text conversion to speech are as follows:

AT+CTTSPARAM=? // View the range of adjustable parameters
AT+CTTSPARAM=1,3,0,1,1 // Set parameters
AT+CTTSPARAM? // Read the current TTS settings
AT+CTTS=1,"6B228FCE4F7F75288BED97F3540862107CFB7EDF" // Synthesize and play UCS2 encoded text
AT+CTTS=2,"1234567890" // Synthesize and play text

A7670E-Cat-1 TCP02.png

LBS Base Station Position

The common commands for LBS (Location-Based Service) base station positioning functionality are as follows:

AT+CLBS=? // View the range of parameters that can be set
AT+SIMEI=xxxxx // If there is no IMEI, set the IMEI first; xxxxx must correspond to the IMEI code on the module sticker
AT+CLBS=2 // Retrieve detailed address
AT+CLBS=1 // Retrieve current latitude and longitude

A7670E-Cat-1 TCP03.png

Demo Explaination

ESP32-S3 Application

Camera

This demo is based on the CameraWebServer demo of the ESP32.

Esp32-s3-a-sim7670x 240124 01.png

Esp32-s3-a-sim7670x 240124 02.png
  • Firstly, you need to set the WiFi name and password and switch the hardware to ESP32S3 by default.
  • Please turn on the CAM of the DIP switch on the back of the development board, and connect to the supported cameras.
  • Please check CameraPins:
#define PWDN_GPIO_NUM     -1
#define RESET_GPIO_NUM    -1
#define XCLK_GPIO_NUM     34
#define SIOD_GPIO_NUM     15
#define SIOC_GPIO_NUM     16
#define Y9_GPIO_NUM       14
#define Y8_GPIO_NUM       13
#define Y7_GPIO_NUM       12
#define Y6_GPIO_NUM       11
#define Y5_GPIO_NUM       10
#define Y4_GPIO_NUM       9
#define Y3_GPIO_NUM       8
#define Y2_GPIO_NUM       7
#define VSYNC_GPIO_NUM    36
#define HREF_GPIO_NUM     35
#define PCLK_GPIO_NUM     37
  • Program the demo Burn the code and open the terminal to access the prompted IPs:

ESP32-S3-A-SIM7670X-4G02.png

TF-Card

Esp32-s3-a-sim7670x 240124 03.jpg
  • Insert the TF-Card into the TF card slot.
  • Pinout definition:
const int SDMMC_CLK = 5;
const int SDMMC_CMD = 4;
const int SDMMC_DATA = 6;
const int SD_CD_PIN = 46;
  • Program the demo, and open the terminal to display the file content:

ESP32-S3-A-SIM7670X-4G03.png

RGB

Onboard a WS2812b RGB LED, and the signal pin is 38.
After programming the sample demo, the LED light is expected to display a gradient color.

ESP32-S3-A-SIM7670X-4G-5.gif

BAT

This development board utilizes the MAX17048 as the battery charge measurement IC.

  • First, confirm the I2C pin.

ESP32-S3-A-SIM7670X-4G-08.png

  • Program the code and change the threshold:

ESP32-S3-A-SIM7670X-4G-09.png

Portable WIFI Demo

  • This demo uses the TinyUSB protocol stack to communicate with a 4G Cat-1 module, using ppp dial-up to provide the network to the ESP32-S3.
  • This demo uses the compiled firmware, please download Flash Tools first.

ESP32-S3-A-SIM7670X-4G HAT wIfI.png

  • The back of the development board toggle switch 4G on, USB off, re-power on the development board, wait for the LED display red, open the phone to connect to WIFI: ESP32-S3-A-SIM7670X-4G-HAT, password: 12345678 to access the Internet.

ESP32-S3-A-SIM7670X-4G HAT wIfI-3.jpg ESP32-S3-A-SIM7670X-4G HAT wIfI04.jpg

Esp32-s3-a7670e-wifi-comaned.png

Waveshare Cloud Application

Please download the demo, and open the GNSS-With-WaveshareCloud sample demo.
In this application, communication between ESP32-S3 and A7670E-FASE is established using ESP32-S3's software serial port. By sending AT commands, the GNSS (Global Navigation Satellite System) is activated, and NMEA GNSS data is parsed and uploaded to the Waveshare Cloud. The specific location of the development board is then displayed on a web view map page.

Here, we take the map service provided by Waveshare Cloud as an example: 1. Through Device|Attributeto create any devices, and obtain the MQTT connection data.

A7670E Cat-1-GNSS-HAT faq.png

2. Enter the parameters in the GNSS-With-WaveshareCloud demo.

GNSS with wavesharecloud.png

Gnss esp32-s3-a7670E-waveshareCLoud.jpg

Resource

Document

Demo

Tools & Driver

Application Note

A7600 & A7670 AT commands reference:


FAQ

 Answer:

ESP32-S3 can perform PPP dial-up internet using both serial port and USB. In this example, TinyUSB protocol is utilized, and USB enumeration addresses are used for dial-up internet.

{{{5}}}


 Answer:

The code in this example is compiled and flashed using esp-idf. If using Arduino IDE, porting of TinyUSB and handling of PPP packets will be necessary.

{{{5}}}


 Answer:

Currently, the development board connects to the A/SIM7670X 4G module's serial port using software serial. After enabling GNSS functionality with AT commands, the module outputs satellite signal data through its serial port. By sending AT commands to the serial port, data can be published. Filtering of NMEA signal data is required for listening to the returned values from the platform.

{{{5}}}



 Answer:

The default setting is null for the portable WiFi demo, if the module can't recognize the SIM card APN operator automatically, you need to modify the provided source code, refer to README.md in the directory of ESP32-S3-A-SIM7670X-4G-example.
The specific steps are as follows:
1. Refer to the ESP-IDF chapter of the development environment configuration, install the ESP-IDF development environment and vscode programming tools.
2. Use vscode to open the example program and enter menuconfig to set APN manually.
ESP32-S3-A7670E.png
3. Upload the demo to the development board, power off, and reboot the development board.

{{{5}}}


 Answer:

All the example demos provided use libraries downloaded and installed from the Arduino IDE library. These library files are constantly being updated and iterated upon, so often a library might be missing and can be directly downloaded and installed in the Arduino IDE.

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)