Raspberry Pi Pico SIM868 GSM/GPRS/GNSS User Guide

Overview

The Pico-SIM868-GSM/GPRS/GNSS is a GSM, GPRS, GNSS, and Bluetooth module designed for Raspberry Pi Pico. This small size and low power module will easily enable your Raspberry Pi Pico multiple functions including making phone calls, sending SMS, 2G communication, global positioning, as well as Bluetooth transmission.

Feature

  • Standard Raspberry Pi Pico header, supports Raspberry Pi Pico series boards
  • UART communication, serial AT commands control
  • Supports SMS, phone call, GPRS, DTMF, HTTP, FTP, MMS, email, etc.
  • Bluetooth3.0 support allows Bluetooth data transfer
  • RTC real-time clock, with rechargeable Li-po battery
  • Integrates 3.7V Li-po battery connector and recharge circuit, allows being powered from external rechargeable Li-po battery, or recharge it in turn
  • Onboard microphone, together with speaker header, can be used to make phone calls
  • 2x LED indicators, for monitoring the module operating status
  • Onboard nano-SIM card slot supports 2G/4G SIM card *

* Depending on the local network service provider

Specification

Product typeSIM868
SIM7080G
SIM7020E
Working frequency
NB-IoTN/AB1/B2/B3/B4/B5/B8/B12/
B13/B18/B19/B20/B25/B26
/B28/B66/B71/B85
SIM7020C:
LTE-FDD:B1/B3/B5/B8
SIM7020E:
LTE-FDD:B1/B3/B5/B8/B20/B28
Cat-MN/AB1/B2/B3/B4/B5/B8/B12/B13
/B14/B18/B19/B20/B25/
B26/B27/B28/B66/B85
N/A
2GGSM 850/EGSM 900/DCS
1800/PCS 1900 MHz
N/AN/A
GNSSGPS, GLONASS, BeiDouGPS, GLONASS, BeiDou, GalileoN/A
Available AreaMost of Counties and areasGlobalSIM7020C:China
SIM7020E:Europe/Africa/Australia/Southeast Asia
Data transmit
NB-IoT(Kbps)-136(DL)/150(UL)26.15(DL)/62.5(UL)
Cat-M(Kbps)-589(DL)/1119(UL)-
2G(Kbps)85.6(DL)/85.6(UL)--
Other specification
Communication protocolTCP/UDP/HTTP/SSL/FTP
/POP3/SMTP/MQTT, etc.
TCP/UDP/HTTP/HTTPS/TLS/DTLS/PING/LWM2M/COAP/MQTT, etc.
Power typeExternal Li-po battery OR Raspberry Pi Pico USB port
Li-po battery3.7V ~ 4.2V
Logic level3.3V
Module standalone currentIdle mode:12mAIdle mode:10mAIdle mode:5.6mA
Sleep mode:0.65mASleep mode:1.2mASleep mode:0.4mA
Backup Mode:8uAPSM Mode:3.2uAPSM Mode:3.4uA
Audio input/outputonboard microphone,with speaker headerN/A
IndicatorNET:network indicator
Charge:recharge indicator
SwitchLi-po battery and USB power supply switchLi-po battery power supply switch
SIM card2G SIM card (1.8V / 3V)NB-IoT / Cat-M card (1.8V ONLY)NB card (1.8V / 3V)
Antenna connectorLTE、GNSS、BTLTE、GNSSLTE
Dimensions76.15 × 24.00mm73.5 × 24.00mm

Pinout


Dimensions


Hardware connection

  • Pico-SIM868-GSM/GPRS/GNSS x 1 (Pin header should be soldered)
  • Raspberry Pi Pico x 1
  • SIM卡 x 1 (Support supports 2G service)
  • Micro USB cable x 1


Description:

If you need to use audio, you need to connect a speaker.
When in use, it is recommended to connect to the lithium battery: when there is no additional USB power supply, turn on the USB to turn off the lithium battery power supply, switch to VBAT to use the lithium battery power supply; When connected to USB power, the USB can be used to charge the lithium battery, power the Pico or write firmware and programs.

Python Examples

Please follow the guides of Raspberry Pi to install and set up Pico for the Pico.

For easy use, we recommend you use the Thonny tool.

  • Thonny website
  • Please set the Thonny development environment to be RaspberryPi when setting

AT Test

This routine is mainly to facilitate the user can through the Thony software, directly test and verify the AT instruction transceiving module. The main program will start the module directly first and then check the network condition. After that, it will check the AT instructions entered by the user, send them to the module through the serial port, and then send the AT instructions back to the Pico serial port for printing.
For more details of AT commands, please check the manual:File:SIM800 Series_AT Command Manual_V1.11.pdf

Expected result


GPS Positioning

This example mainly demonstrates GPS positioning-related tests. To perform this example, the GPS antenna receiver must be placed outside (or in a window where the sky can be seen), and the GPS location cannot be obtained on rainy days。
For more details of AT commands, please check the manual:File:SIM868 Series_GNSS_Application Note_V1.02.pdf

Expected result


Taking calls

This example mainly demonstrates the phone call test. The module has an onboard microphone so that calls can be made directly to each other, and speakers are needed to hear the sound.
For more details of AT commands, please check the manual:File:SIM800 Series_AT Command Manual_V1.11.pdf

Expected result


HTTP

Description

In this example, Raspberry Pico is connected to the Internet through NB-IoT and gets the weather information from the weather website through HTTP GET. Meanwhile, the temperature information on Pico is pushed to the server through HTTP POST.
Users can access the website and view the data uploaded in real-time. The software schematic is as follows:

Server Web Page Deployment

User http://pico.wiki/esp-chart.php as example.


1、Server setup PHP, mysql and other environment, create database files. For example:

  • Database:example_esp_data
  • Password:your_password
  • user name:your_username
  • Create database table:
CREATE TABLE Sensor (
   id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
   value1 VARCHAR(10),
   value2 VARCHAR(10),
   value3 VARCHAR(10),
   reading_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP)

2、Example PHP files on the server are post-data.php and esp-chart.php

  • post-data.php: HTTP POST API that the SIM7080G module can call to POST data to the server.
  • esp-chart.php: The latest data uploaded by SIM7080G can be obtained from a web page accessed by the client and displayed in a graph.

Pico software setup

Download python example:Demo codes ,Part of the HTTP codes:

  • HTTP GET:
# HTTP GET TEST
def http_get():
   send_at('AT+HTTPINIT', 'OK')
   send_at('AT+HTTPPARA=\"CID\",1', 'OK')
   send_at('AT+HTTPPARA=\"URL\",\"'+http_get_server[0]+http_get_server[1]+'\"', 'OK')
   if send_at('AT+HTTPACTION=0', '200', 5000):
       uart.write(bytearray(b'AT+HTTPREAD\r\n'))
       rec_buff = wait_resp_info(8000)
       print("resp is :", rec_buff.decode())
   else:
       print("Get HTTP failed, please check and try again\n")
   send_at('AT+HTTPTERM', 'OK')
  • HTTP POST:
  1. HTTP POST TEST
def http_post():
   send_at('AT+HTTPINIT', 'OK')
   send_at('AT+HTTPPARA=\"CID\",1', 'OK')
   send_at('AT+HTTPPARA=\"URL\",\"'+http_post_server[0]+http_post_server[1]+'\"', 'OK')
   send_at('AT+HTTPPARA=\"CONTENT\",\"' + http_content_type + '\"', 'OK')
   if send_at('AT+HTTPDATA=62,8000', 'DOWNLOAD', 3000):
       uart.write(bytearray(http_post_tmp))
       utime.sleep(5)
       rec_buff = wait_resp_info()
       if 'OK' in rec_buff.decode():
           print("UART data is read!\n")
       if send_at('AT+HTTPACTION=1', '200', 8000):
           print("POST successfully!\n")
       else:
           print("POST failed\n")
       send_at('AT+HTTPTERM', 'OK')
   else:
       print("HTTP Post failed,please try again!\n")

Expected result


Results of web page access on the server:http://pico.wiki/esp-chart.php

Price: $31.89
Part Number: Pico-SIM868-GSM/GPRS/GNSS
Brand: Spotpear
SKU: 0105336