NB-IoT/CAT-M1 SIM7080

Getting Started with TechStudio SIM7080 Development Board

Table of Content

Overview

The TechStudio SIM7080 Development Board (The SIM7080 Dev Board) adds wireless access to your IoT project. The on-board SIM7080G module supports both LTE CAT-M1 and NB-IoT Low Power Wide Area Network (LPWAN) technologies that are designed to provide LTE cellular communication to small IoT devices. The build-in Global Navigation Satellite System (GNSS) receiver provides global position information that is often need for tracking applications.

The small form factor and low cost allows IoT system designer/software developer to utilise the development board for “drop-in” deployment, this minimises the risk for developing customised board after the initial hardware and software development was done, and greatly accelerates the time between development and deployment stages.

Highlighted Features

  • Supports LTE CAT-M1 and NB-IoT mode, and global bands (see Specification)
  • Supports GNSS positioning (GPS, GLONASS, BeiDou, and Galileo)
  • Future-proof eSIM chip footprint reserved on PCB
  • On-board battery charger via USB interface
  • UART control pins for interfacing with MCU
  • On-board Voltage translator controllable based on host MCU power voltage (3.3V/5V)
  • Capable to power the host MCU either directly via 3.7V Li-Po battery or via on-board LDO
  • GNSS active antenna power control by host MCU
  • SIM card slot that supports 1.8V SIM card (does not support 3.3V SIM card)

Specification

Parameters Specifications
Support Bands CAT-M:B1/B2/B3/B4/B5/B8/B12/B13/B14/B18/B19/B20/B25/B26/B27/B28/B66/B85
NB-IoT:B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B25/B26/B28 /B66/B71/B85
Output Power LTE RF Power Class 5 (Typ. 21dbm)
Data Rate CAT-M1: Uplink: 1119Kbps, Downlink: 589Kbps
NB-IoT: Uplink: 150Kbps, Downlink: 136Kbps
VBat Voltage When powered by USB: 4.1V, Li-Po: 3.3 to 4.2V
LDO Output 3.3V @ 600mA maximum
Charging Current 500mA
Power Consumption (Based on SIMCOM SIM7080G datasheet):
PSM: 3.2uA, Sleep: 0.6mA @PTW=40.96s eDRX=81.92s, Idle: 10mA,
Active (CAT-M1 band B8): 120mA @21dbm, 103mA @10dbm,
Active (NB-IoT band B8): 147mA @21dbm, 84@10dbm

Hardware

Each TechStudio SIM7080 Development Board ships with a LTE PCB antenna and an active GNSS ceramic antenna. The SIM7080 Dev Board itself weight less than 10 grams with a dimension of just 47 × 38.5 × 8 mm (excluding the header pins that extend out of the PCB). But it packed with functionalities and flexibility for using it as a development board as well as a "drop-in" implementation for your end product.

All PCB design files and schamatic can be found at TechStudio github and are released under the Creative Commons Attribution Share Alike 4.0 license.

The SIM7080 Dev Board is designed for battery-operation with low-power consumption in mind, it comes with a built-in battery charger, and can be powered by any single-cell 3.7V Li-Po battery for long lasting operation hours. The design of the board also offers the capability to power the host MCU either directly via Battery or via on-board 3.3V, 600mA LDO. To further reducing the power consumption, It has the capability for host MCU to turn off the power source of the active GNSS antenna when GNSS operation is no long required or not in use.

SIM7080 dev board highlight
SIM7080 dev board highlight

USB cable, Li-Po battery, sim card are not included. LTE CAT-M or NB-IoT SIM card is required for proper operation of the TechStudio SIM7080 Development Board.

There are three LED indicators on board, unlike many of the MCU development board, the SIM7080 Dev board does not come with any always-on power indication LED, this is by-design to save power consumption for battery-operation.

STATUS (BLUE) - Lit when the module is turn-on and booted.

NETLIGHT (GREEN) - This LED provides the indicator of network activities:

  • 64ms on, 800ms off: the module has not register to the network yet.
  • 64ms on, 3 seconds off: the module has registeredd with the network successfully and ready for communication.
  • 64ms on, 300ms off: a data service connection has been established and ready for data transmission.
  • off: when the SIM7080 module is off or in PSM mode.

CHARGE (RED) - Lit during the charging of battery. Off when the battery charging is completed and the battery is full.

Pinouts

TechStudio SIM7080 Development Board has a 10-pin male header for easy interfacing with any type of MCUs, and providing power source for powering the MCU.

Sim7080 Dev Board Pinouts
Sim7080 Dev Board Pinouts

VBAT: The voltage on this pin varies depend on the power source used. When the SIM7080 Dev Board is connected via USB, the VBAT voltage is supply via the VUSB and the battery is cut off. The VBAT will be at approximately 4.1V. When the USB is disconnected and the board is powered via a Li-Po battery, the VBAT voltage varies between 3.3v and 4.2v depend on the output voltage of the Li-Po battery.

This VBAT pin can be used as the power source to the host MCU. If you have a 5V MCU, it can be used to feed into a DC-DC boost converter to generate a 5V supply that is required to power the MCU. If you using a 3.3V MCU, the MCU can either be powered by feeding the VBAT into an LDO on the MCU board (if available) or powered by the 3.3V pin from the SIM7080 Dev Board, see 3.3V pin description for more information.

VIO: SIM7080 Dev Board interface is operated on 1.8v voltage domain, meaning that a level translator is required when interfacing with a 3.3V or 5V MCU chip. Applying either a 3.3V or 5V voltage to this input pin will enable the on-board level translator. You should connect this pin based on your MCU operating voltage. For a 5V MCU such as Arduino Uno, this pin should connect to the 5V supply from the MCU board. For a 3.3V MCUs such as ESP32/ESP8266, or STM32 MCU, this pin should be connect to 3.3V power pin (either from the 3.3V pin of the SIM7080 Dev Board or from your 3.3V MCU board).

RI: The RI pin can be programmed to generate an 'interrupt' output signal to inform the host MCU about particualr network event. It is by default high and will pull low by the SIM7080 depend on network activities, for example, it can be configured to signal the MCU when an SMS is received, or used to wake up MCU when the SIM7080 module wake up from Power Saving Mode (PSM).

DTR: Depend on configuration via AT Command, the SIM7080 module can be put into sleep mode when the module is idle. When SIM7080 module enters the sleep mode, the MCU can wake up the SIM7080 from sleep mode by pulling down DTR.

RXD & TXD: The SIM7080 Dev Board uses UART to send and receive commands and data. RXD is an input pin that should be connect to the TXD of your MCU, and TXD is the output pin that the SIM7080 Dev Board used to send data to a host MCU, and therefore should connect to the RXD of your host MCU.

PWRKEY: This pin connect to the on-board PWRKEY push button via a protection diode. While the push button allows you to manually turn on and turn off the SIM7080 Dev board, this pin allows MCU to turn on and off the SIM7080 Dev Board using any GPIO output. By pull down this pin to ground for approximate 1.2 seconds would turn the SIM7080 Dev Board on or off. This pin however should not be tie to ground permanently as SIM7080 module will go into auto-reset if this pin is pull to ground for more than 10 seconds.

3.3V: The SIM7080 Dev Board has an on-board LDO regulator that provides a 3.3v voltage output with maximum current of 600mA, which is suffient to even power a power-demanding MCU such as ESP8266/ESP32.

If you are having a 5V MCU board such as Arduino Uno, leave this pin open, do not connect this pin to the 3.3V on your MCU board. Power your MCU with a 5V power supply or using the VBAT to drive a boost-up DC-DC converter to drive the 5V MCU Board.

ANT_CTRL: SIM7080 Dev Board utilizes an active GNSS antenna which require a power source of 3.3v and can be powered by the on-board 3.3v power supply. When GNSS no longer is in use, or when the module is turn off, or in sleep mode, the power source to the active GNSS antenna should be cut off to reduce power consumption. This GNSS antenna control pin can be driven by the MCU for turning GNSS power source on or off. Set the the ANT_CTRL pin to logic LOW would turn off the GNSS power source. To turn on the GNSS power source, apply a logic HIGH (3.3v or 5v) to this pin will enable the GNSS power source.

Interfacing with MCU

TechStudio SIM7080 Development Board offers many flexibility for interfacing with MCU, how to connect to the MCU depends on your application requirements and your ultimate use case.

Minimum Connection

The minimum mandated connection for interfacing with SIM7080 Dev Board requires only 4 wires as shown in the picture below. This offers you the ability to enable the level translator which in turn enable the UART interface between the MCU and the board. If you want to be able to turn on/off the SIM7080 Dev Board via software, add an extra GPIO pin connected to PWRKEY pin for triggering the power up process.

Using GNSS

In order to use the GNSS receiver, other than config the SIM7080 Dev Board with the proper AT commands, you will need to have a GPIO pin set to OUTPUT mode and uses it to control the ANT_CTRL pin, this allows you to turn on/off the GNSS power source. See "GNSS Control" in the later part of this guide for the code related to ANT_CTRL.

Powering the MCU board

The SIM7080 Dev Board offers two power sources for powering the MCU board, this become very handy when you using the SIM7080 Dev Board for your "drop-in" deployment, as it not only has its battery charging circuit, and the battery can also used to power the MCU directly.

The VBAT output a voltage between 3.2 to 4.2V depend on the battery charged status. This can be used to feed into a 3.3V LDO voltage regulator on your 3.3V MCU boards (such as an STM32 Blue Pill/Necleo boards, or ESP8266/ESP32), or feed into a DC-DC boast converter to generate a 5V in case you are using an 5V MCU boards (such as an Arduino Uno).

VBAT can't be used to feed into Vin of an 5V MCU board directly to power the 5V MCU boards as many of the Vin pin on MCU boards required a voltage much higher than 5V in order for the on-board 5V regulator to function properly.

The SIM7080 Dev Board comes with an on-board LDO (Low Dropout) 3.3 regulator that can supply up to a maxium of 600mA output current. This power source at the 3.3v pin can be used to directly power a 3.3V MCU and we recommend you use this pin as the power source for your MCU board, as many 3.3V regulators on the MCU boards are not neccesary designed for battery operation in mind and has higher leakage current or drop-out voltage for battery operation.

Testing with AT Commands

The easiest way to test out the SIM7080 Dev Board is to connect the board to a USB-TTL adaptor, this allows you to test all the AT commands for the application you are going to develop even before writing a single line of code.

USB - UART Connection with SIM7080 dev hoard
USB - UART Connection with SIM7080 dev hoard

Setup Tools and Connectivity

  • USB-TTL Adaptor
  • AT Command Tester (Windows) or Arduino IDE(Mac/Linux)
  • SIM7080 Development Board

If you are on Windows, download and install AT Command Tester, SeeedStudio has a wiki page that provides a good tutorial on how to use the program.

AT Command Tester
AT Command Tester

As AT Command Tester is a Windows-based software, if you are on the MacOS or Linux, the alternative way is to utilize Serial Monitor on Arduino IDE to send AT Command, you can download and install Arduino IDE.

Send AT Commands

Press the PWRKEY to turn on the SIM7080 Dev Board. The UART take a couple of seconds to be ready after boot up.

Run AT Command Tester and check if the program can detect the serial port that SIM7080 is using, and set the baud rate.

For those using Arduino IDE, open Arduino IDE and click on dropdown menu Tools -> Port to make sure that the SIM7080 Dev Board is connected, then click the Serial Monitor icon on the top right corner to open the Serial Monitor, select a baud rate (e.g. 115200), and make sure other settings are set as the picture shown.

Arduino IDE Serial Monitor Configuration
Arduino IDE Serial Monitor Configuration for Sending AT Commands

SIM7080 Dev Board is auto-baud, meaning that whatever baud rate the host is used to send the "AT", it would be auto-detected and set accordingly. So you might need to send a couple of "AT" commands before the SIM7080 Dev Board acknowledge back an "OK", once it acknowledged, you can then send other AT Commands over.

Here are a few AT Commands that you might want to try out to get to know about the SIM7080 module and the network status. Consult SIM7080 AT Command Manual to have better understanding of each command.

AT Command Description SIM7080 Response
AT+CGMM Get Module Name SIMCOM_SIM7080
AT+CGMR Get Firmware Revison Revision:1951B05SIM7080
AT+GSN Get IMEI number 869951030006302
AT+CBC Get Battery Status +CBC: 0,62,3810
AT+CIMI Get IMSI number 460113007570785
AT+COPS? Check Current Carrier +COPS: 0,0,"Singtel",7
AT+CGNAPN Get Network APN +CGNAPN: 1,"stmiot"
AT+CSQ Get Singal Quality +CSQ: 24,99
AT+CNACT? Network Active Status +CNACT: 0,0,"0.0.0.0"
+CNACT: 1,0,"0.0.0.0"
+CNACT: 2,0,"0.0.0.0"
+CNACT: 3,0,"0.0.0.0"

HTTP over TCP via AT Commands

The commands we tried so far doesn't really do much other than checking some information and status of the module. In this section, we will establish a TCP connection and send a HTTP GET request to httpbin.org server, all done by using AT commands.

For those who are not familiar with httpbin.org, it is a simple HTTP Request & Response Service. It allows user to send a http(s) request to the server, and it will response back with a HTTP respose code with a payload that includes all the HTTP headers and payload inforamation.

The AT commands for establishing an TCP connection with server can be found at SIM7080 TCP/UDP Application Note. Once the connection is established, data will be sent in HTTP format over the TCP connection.

AT
AT+CSQ
AT+CNACT=0,1
AT+CASSLCFG=0,"SSL",0
AT+CAOPEN=0,0,"TCP","httpbin.org",80
AT+CASEND=0,42,10000

GET http://httpbin.org:80/get HTTP/1.0

AT+CARECV=0,500
AT+CACLOSE=0
AT+CNACT=0,0

and here is the execution of those commands and the response from the SIM7080 module captured from Serial Monitor.

AT

OK
AT+CSQ

+CSQ: 25,99

OK
AT+CNACT=0,1

OK

+APP PDP: 0,ACTIVE
AT+CASSLCFG=0,"SSL",0

OK
AT+CAOPEN=0,0,"TCP","httpbin.org",80

+CAOPEN: 0,0

OK
AT+CASEND=0,42,10000

>
OK

+CADATAIND: 0

+CASTATE: 0,0
AT+CARECV=0,500

+CARECV: 422,HTTP/1.1 200 OK
Date: Fri, 13 Aug 2021 08:37:06 GMT
Content-Type: application/json
Content-Length: 197
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

{
  "args": {},
  "headers": {
    "Host": "httpbin.org",
    "X-Amzn-Trace-Id": "Root=1-61162f32-224007cb659089ed0217384d"
  },
  "origin": "111.65.44.32",
  "url": "http://httpbin.org/get"
}

OK
AT+CACLOSE=0

OK
AT+CNACT=0,0

OK

+APP PDP: 0,DEACTIVE

Here is a quick run down on what all those commands doing.

The AT call for attention, and used by the SIM7080 module to sync the baud rate between the host and the SIM7080 module.

For the first few seconds since boot, AT+CSQ would return +CSQ:99,99 which means the radio has not be able to receive a signal yet, you should wait until the response get back from the SIM7080 module with something like +CSQ:xx,99 where xx ranging from 2 (meaning a signal strength of -110dBm which translated as poor signal strength) to 30 (-54dBm, good signal strength).

The AT+CNACT=x,1 activate a data connection, the x is an ID that identify the connection, SIM7080 module allows up to 4 data connections, however some mobile carrier may only allow 1 data connection.

If you are not be able to get the correct signal strength or unable to activate the data connection up to this point, check your SIM card and your APN setup(with AT+CGNAPN command).

The AT+CASSLCFG=0,"SSL",0 indicates that we wish to establish a non-secure connection. The AT+CAOPEN=0,0,"TCP","httpbin.org",80 will open a TCP connection with httpbin.org server at port 80, the acknowledge from server +CAOPEN: 0,0 indicated that a connection has been established on data channel 0 with success.

We then tell the module that we are going to send 42 characters and set the timeout to 20 seconds (20000 millis seconds) with command of AT+CASEND=0,42,20000, this allows us to have time to manually input, or copy and paste the message. A prompt > will show on the screen to indicate that the module is ready to accept our input. We can then send our message as:

\n
GET http://httpbin.org:80/get HTTP/1.0\n
\n

Please noted that \n is the newline ASCII code and is part of the message that we should send over. For AT Command Tester, a message can be prepared and stored for sending the message. For Arduino IDE, the Serial Monitor does not accept \n ASCII code, in order to send the message, it will require to manually press <enter> key on the keyboard to send an \n ASCII code.

If everything done correctly, we should receive +CASTATE: 0,0 got back from the module, indicating that it has been sent successful via connection 0.

We can read the first 500 characters of what server sent back using AT+CARECV=0,500. The firt line of the data from the server +CARECV: 422,HTTP/1.1 200 OK shows that the server sent back a total of 422 bytes back using HTTP/1.1 protocol, and the HTTP response code in according to HTTP1.1(RFC2616) specification is 200(200 means OK, 400 means bad request, etc.).

When we done in retrieving the response data, we disconnect from the server and terminate the data connection with AT+CACLOSE=0 and AT+CNACT=0,0.

There are two sets of AT commands that can be used for HTTP communication, in addition to the TCP/UDP command set we demonstrated here, SIM7080 also offer a HTTP AT command set which can be found at SIM7080 HTTP(S) Application Note. The advantage of TCP command set over HTTP command set is that it requres less commands to achieve the same result when compare to HTTP command sets, however, HTTP command set make it easier to manually create HTTP headers and payload than using the TCP command set.

Using SimpleNB Library

Running AT commands directly with SIM7080 Dev Board allows you to plan for your application development and test out all the AT commands you would need for your application. Eventually you'd want to write a program to automate the sending of those AT commands with an MCU.

Although writing code to send AT commands sounds trivia but it is often an error-prone development process and take much longer than you expected on both development and testing. It will makes the life much easier to have a readily-available library, and that's where the SimpleNB Arduino library comes to rescue. Before using the library, there are a few things about the library we'd want to highlighted.

About SimpleNB

The SimpleNB library is based on TinyGSM. which is an open-source Arduino library for many mobile modules, ranging from 2G GSM modules, to NB-IoT modules. It is well tested and supports by the open-source community.

TinyGSM supports many legacy 2G modules and even WiFi modules that utilizing AT commands. What make SimpleNB different from TinyGSM is that SimpleNB stripped out the support of legacy GSM/3G modules and focus on only NB-IoT modules.

"Hello World" with SimpleNB

To demonstrate the use of SimpleNB library, upload the http_post sketch to your MCU board using Arduino framework, the sketch will create a TCP connection, and implement a HTTP POST request to send a JSON payload {"msg": "Hello World"} to the htppbin.org server.

An ESP32 is used as the host MCU and connect with TechStudio SIM7080 Dev Board as shown below. Serial2 of the ESP32 which is available at GPIO16(Rx) and GPIO17(Tx) is used as the UART for sending and receiving the AT Command, PWRKEY is connected to GPIO23. There is no particular reason why we used those two GPIO pins for controlling the SIM7080 module, you can use any pin you prefer. The default Serial port is used for Serial Monitor via ESP32's USB port.

You can use any MCU, in general, 3.3v MCU is more convenient than 5V MCU if you wish to power the MCU with battery for your deployment later. Some of the MCU like ATmega328p used in Arduino Uno, Nano, etc, has no second hardware Serial port, and therefore software serial would be needed and the baud rate is likely limited to 9600bps.

Connecting ESP32 to SIM7080 Dev Board
Connecting ESP32 to SIM7080 Dev Board

SimpleNB github provided a lot of information as well as examples for variable usage scenario. So we will not explain line by line here.

With the exception of sending a POST request than a GET request. The sketch uses almost the same set of AT commands behind the scene as we used in our previous direct AT command example. Many of the SimpleNB functions are simply a wrapper to the underneath AT commands, for example, activateDataNetwork() behind the scene sent AT+CNACT=0,1. However, these functions often do more than returning the AT command acknowleadge string.

GNSS Control

When using the GNSS, in addition to calling the APIs for getting GNSS data, it is required to activate and deactivate the ANT_CTRL pin.


//GPIO pin for GPS active-antenna power supply pin
#define ANT_CTRL 12

void setup() {
  Serial.begin(115200);

  // configure ANT_CTRL pin
  digitalWrite(ANT_CTRL, LOW);
  pinMode(ANT_CTRL, OUTPUT);
}

void loop() {
  // other initialisation codes here

  // enable GPS receiver and turn on antenna power
  digitalWrite(ANT_CTRL, HIGH);
  modem.enableGPS();
  delay(1000);

  GPS_t gps;
  modem.getGPS(&gps);
  Serial.print("Latitude: ");
  Serial.pritnln(gps.lat);
  Serial.print("Longitude: ");
  Serial.println(gps.lon);
  Serial.print("Accuracy: ");
  Serial.println(gps.accuracy);

  // disable GPS receiver and turn off antenna power
  modem.disableGPS();
  digitalWrite(ANT_CTRL, LOW);

SIM7080 offers two APIs for getting GNSS inforamtion in its GNSS Application Note. Unlike the TinyGSM library which use the AT command AT+CGNSINF for getting the GNSS data, SimpleNB uses AT+SGNSCMD to get the GNSS data. According to SIMCOM, AT+CGNSINF is a legacy API inherited from previous generation Qualcomm chip, Qualcomm no longer support and do not recommend of using AT+CGNSINF. Getting data using AT+CGNSINF suffers the issue mentioned in this stackoverflow post.

References

SIMCOM Documentations

TechStudio Github

3 Replies to “Getting Started with TechStudio SIM7080 Development Board

  1. I wanted to ask about the price and availability of the TechStudio SIM7080 development board.

Leave a Reply

Your email address will not be published. Required fields are marked *