We will learn about LILYGO T-SIM7000G ESP32 development board which combines the ESP32 chip, the SIM7000G module, microSD card slot, battery holder, and charger on the same board. Besides Wi-Fi and Bluetooth, you can communicate with this development board using SMS. You can also connect it to the internet using your SIM card GPRS and get GPS location too.
Tag: Project 600a Guide to LILYGO T-SIM7000G ESP32 development board – AT communication. Acoptex.lt
- Sketch: None;
- Libraries: None;
- Other attachments: None.
2.Lora 868/915Mhz function shield 1pc (optional)
3. Compact solar mini panel 1pc from 4.4V to 6V (optional)
4.Li-Ion/Li-Po battery 1pc (optional)
5. Micro SD card with SD card adapter 1pc (optional)
6. nano SIM card (4G) with data plan 1pc
8.16PIN 2.54mm Terminal Screw Terminals Block Connector 150V 6A 2pcs (optional)
Understanding the LILYGO T-SIM7000G ESP32 development board
|Main chip: ESP32 (WROVER-B Module) (240MHz dual-core processor)|
|Interface: USB, SD Card, CN3065 solar energy charging interface for 4.4-6.8V solar panel with DW01A battery protection IC|
|Flash Memory: 4M Flash / 8M PSRAM|
|Button: Reset, Power switch|
|USB to TTL: CP2104|
|Car Clock: 40MHz|
|SIM Card Size: Nano SIM Card|
|Operating Temperature Range: -40 – +85 degrees|
|Product Size: 111mm * 37mm * 20mm|
|Product Weight: 50g|
|Working Voltage: 5v input|
Solar input voltage range：4.4 – 6V
Working Current: About 200mA
Charging Current: 780mA
Battery Model: 18650
Battery Holder Model: 18650 battery holder
JST Connector: 2pin 2mm
USB: TYPE-C 3.0
|Protocol ：802.11 b/g/n(802.11n，speed up to150Mbps)A-MPDU and A-MSDU polymerization，support 0.4μS Protection interval|
|Frequency ：range 2.4GHz~2.5GHz(2400M~2483.5M)|
|Transmit Power ：22dBm|
|Communication distance : 300m|
|Protocol meet Bluetooth : v4.2BR/EDR and BLE standard|
|Radio Frequency : with -97dBm sensitivity NZIF receiver Class-1,Class-2&Class-3 emitter AFH|
|Audio Frequency : CVSD&SBC audio frequency|
|Wi-Fi Mode : Station/SoftAP/SoftAP+Station/P2P|
|Security Mechanism : WPA/WPA2/WPA2-Enterprise/WPS|
|Encryption Type : AES/RSA/ECC/SHA|
|Firmware Upgrade :UART download/OTA (Through network/host to download and write firmware）|
|Software Development : Support cloud server development /SDK for user firmware development|
|Networking Protocol : IPv4,IPv6,SSL,TCP/UDP/HTTP/FTP/MQTT|
|User Configuration : AT + Instruction set, cloud server, android/iOSapp|
|OS : FreeRTOS|
The LILYGO T-SIM7000G ESP32 is a development board with a SIM7000G chip and ESP32. This adds LTE (4G), GPS, and GPRS to your board:
- You can send SMS;
- Get location and time using GPS;
- Connect board to the internet using GPRS;
- But it doesn’t support phone calls.
This development board also comes with:
- a battery holder for a 18650 battery;
- a battery charging circuit where you can connect solar panels to recharge the battery;
- a microSD card slot that can be useful for data logging projects or to save configuration settings.
You will need to have a nano SIM card with a data plan and a USB-C cable to upload code to the development board.
Two main versions of the LILYGO T-SIM7000G ESP32 development board have been released with the current board having better power management than the pervious version of this development board.
This board is these improvements.
- Added active GPS antenna power control, when the module GPIO4 is not turned on the antenna consumes only the static current of the LDO;
- Replaced TP4056 with CN3065 for solar charge input management;
- Added reverse battery protection;
- Added battery overcharge protection;
- Added battery over-discharge protection.
Version 20191227 (Version 1.0)
- Pin VIN is a USB input, if a battery is being used to power the device there will be no voltage output from VIN meaning 3.3v is the only power output.
- When using the built-in battery pack the on/off switch will function as normal, supplying/cutting off power to the board, However, if an external battery pack is used and attached to the VBAT pin the on/off switch will be bypassed meaning the only way to shut off will be to disconnect the batteries.
- ON/OFF switch is for battery use only, it will not function when plugged into USB.
- Battery voltage can not be read when plugged into USB using the onboard BAT ADC(35).
- Recommended solar panels are 4.4V to 6V DO NOT EXCEED OR BOARD MAY BE DAMAGED.
- When an SD card in you can not upload software in Arduino IDE since the SD card uses IO2 as CS, the SD card must be removed when uploading a new sketch.
- On Version 1.1, When using GPS the SIM7000 GPIO4 needs to be set to HIGH to enable the antenna modem.sendAT(“+SGPIO=0,4,1,1”); once finished the pin can be set LOW modem.sendAT(“+SGPIO=0,4,1,0”); to prevent power leaking to the GPS antenna, This will make help battery life. If using USB or battery life is not a concern, it can be left HIGH.
Specification: check here
Schematic diagrams for each version:
- LILYGO T-SIM7000G ESP32 Version 1.0 schematic diagram
- LILYGO T-SIM7000G ESP32 Version 1.1 schematic diagram
Signals and connections of LILYGO T-SIM7000G ESP32 development board
The onboard indicator light description:
- the red indicator LED near the upper right of the switch is only on when the battery is connected, and it is always ON when the USB is connected. It indicates that the battery is charging. If the battery is not connected, it may be FLASHING;
- the green indicator LED which is below the red indicator LED lights up only when the battery is fully charged, and it is always ON when the battery is connected;
- the status indicator LED (red color) is close to the side of the SIM7000G antenna. If the SIM7000G starts normally, it will always be ON. If it does not start normally, it will be OFF. It cannot be turned off by software.
- Close to the status indicator is the network indicator LED (red color), it indicates the network status, it can be closed by software.
The following pictures show the pinout of the T-SIM7000G ESP32 development board.
This is the pinout for version V1.0.
Pinout for the improved board V1.1.
Connections between the ESP32 and the SIM7000G chip:
|POWER KEY||GPIO 4|
To communicate with the microSD card, you need SPI communication protocol. These are the GPIOs used:
|MicroSD Card (TF card)||ESP32|
1.T-SIM7000G can be used with Lora 868/915Mhz function Shield.
2. Using 16PIN 2.54mm Terminal Screw Terminals Block Connector 150V 6A with T-SIM7000G
3. Using compact mini solar panel (not included in this set). You will need to solder wires to corresponding terminals (black wire to negative (-), red wire to positive (+))
Step by Step instruction
Please note that in order to use the board you need to solder pin headers.
1.Preparing for operation / Do wiring
1.Please note that if you want to test the micro SD card features, you should only insert a micro SD card, after uploading the code and have it formatted on your PC/Laptop.
2.Insert a nano SIM card. Please note that to use LTE and GPRS you need a nano SIM card with data plan. It can be expensive in some countries. I recommend to use a SIM card with a prepaid or monthly plan, so you will know exactly how much you spent.
3.Connect the Full Band LTE antenna (SIM) and connect the GPS antenna.
4.If you want to use Solar panel then you need to solder 2-pin plug wires to compact mini solar panel and plug in into development board if you are planning to use solar panel (optional). If you want to use Solar panel then insert Li-Ion battery 18650 in a battery holder (optional).
5. Connect LILYGO T-SIM7000G ESP32 development board USB Type-C interface with USB Type A to USB C data cable to PC/Laptop USB port.
6. ON/OFF switch is for battery use only, it will not function when plugged into USB.
2. Using modem – AT Commands
AT commands are used to control MODEMs, as is the case of the SIM7000G. In the case of the ESP32, you send the AT commands via serial communication protocol. Then, the modem responds back also via serial communication. There are four types of AT commands: test; read; set; execution. You can find the complete list of AT commands for the SIM7000G here.
You can use different software tools: Terminal, USR-TCP232-Test V1.4, AiThinker_Serial_Tool_V1.2.3, coolterm, sscom3.2 , KiTTY, putty,tera term, Access port and so on. We recommend you to use AiThinker_Serial_Tool_V1.2.3 or sscom3.2, as you can save your AT commands and it’s very easy to use.
1.If you have many devices connected to your PC/Laptop then you need to find your LILYGO T-SIM7000G ESP32 development board USB port number. If it’s just LILYGO T-SIM7000G ESP32 development board connected to USB port of your PC then go to next step. Please note that we use Windows 11. Go to Search and type Control panel, then select it. In Hardware and Sound section click on View devices and printers. Scroll down and in Unspecified find your USB-Enchanced-SERIAL CH9102 (COM..). In our case it’s COM3.
2. We are using AiThinker Serial Tool V1.2.3. So we downloaded and unzipped the folder. Find and click on AiThinker Serial Tool V1.2.3.exe to open the program.
3.Select portNum – (We have COM3), BaudRate leave as 115200, DataBits – 8. Click on Open serial button.
4. The modem will start. If you see the AT OK it means that your board is ready for AT communication and you can start to send AT commands.
5. Type ATI and click on Send button to display product identification information.
6.Type AT+GMI and click on Send button to request manufacturer identification.
7.Type AT+GMM and click on Send button to request TA model identification.
8.Type AT+GMR and click on Send button to request TA revision identification of software release. We have version – 1529B08SIM7000G.
9.Type AT+GSN and click on Send button to request TA serial number identification (IMEI).
10.Type AT+GCAP and click on Send button to request complete TA capabilities list. GSM function is supported.
11.Type AT+CPIN? and click on Send button to request an alphanumeric string indicating whether some password is required or not. The SIM card is ready or not.
12.Type AT+CGREG? and click on Send button to request network registration status. 0 Disable network registration unsolicited result code, 1 Registered, home network.
13.Type AT+CFUN? and click on Send button to request the settings of Phone Functionality. 0 minimum functionality, 1 full functionality.
14.Type AT+CMGF=1 and click on Send button to select SMS message format. 1 Text mode, 0 PDU mode.
15. You can find the complete list of AT commands for the SIM7000G here.
3. APN setup
- To connect your SIM card to the internet, you need to have your phone plan provider’s APN details. You need the domain name, username, and password.
- If you search for GPRS APN settings followed by your phone plan provider name, (For example, GPRS APN Labas), you can usually find in a forum or in their website all the information that you need. For example in my case: https://www.smarthunter.lt/content/category/5-gprs-lietuvos-tinklu-operatoriu-apn
- It can be a problem to find the details of APN if you use provider which is not well -known. So, you will probably need to contact your provider directly.
We have learnt about LILYGO T-SIM7000G ESP32 development board and how to communicate with modem using AT commands.
Check for more DIY projects here.