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.
- 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.
- 2 x LED indicators, for monitoring the module operating status.
- Onboard nano-SIM card slot supports 2G SIM card *
* Depending on the local network service provider.
|2G||GSM 850/EGSM 900/DCS
1800/PCS 1900 MHz
|GNSS||GPS, GLONASS, BeiDou||GPS, GLONASS, BeiDou, Galileo||N/A|
|Available Area||Most of Countries and areas||Global||SIM7020C：China|
|Power type||External Li-po battery OR Raspberry Pi Pico USB port|
|Li-po battery||3.7V ~ 4.2V|
|Module standalone current||Idle mode：12mA||Idle mode：10mA||Idle mode：5.6mA|
|Sleep mode：0.65mA||Sleep mode：1.2mA||Sleep mode：0.4mA|
|Backup Mode：8uA||PSM Mode：3.2uA||PSM Mode：3.4uA|
|Audio input/output||onboard microphone,with speaker header||N/A|
|Switch||Li-po battery and USB power supply switch||Li-po battery power supply switch|
|SIM card||2G SIM card (1.8V / 3V)||NB-IoT / Cat-M card (1.8V ONLY)||NB card (1.8V / 3V)|
|Antenna connector||LTE, GNSS, BT||LTE, GNSS||LTE|
|Dimensions||76.15 × 24.00mm||73.5 × 24.00mm|
- Pico-SIM868-GSM/GPRS/GNSS x 1 （Pin header should be soldered）
- Raspberry Pi Pico x 1
- SIM card x 1 （Support supports 2G service）
- Micro USB cable x 1
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.
How to Use
Use in Windows
- 1. Press and hold the BOOTSET button on the Pico board, connect the pico to the USB port of the computer through the Micro USB cable, and release the button after the computer recognizes a removable hard disk (RPI-RP2).
- 2. Copy the pico_micropython_xxxxxxxx.uf2 file in the python directory to the recognized removable disk (RPI-RP2)
- 3. Open Thonny IDE (note: use the latest version of Thonny, otherwise there is no Pico support package, the latest version under Windows is v3.3.3)
- 4. Click Tools->Settings->Interpreter, select Pico and the corresponding port as shown in the figure
Use in Raspberry Pi environment
- 1. The process of flashing the firmware is the same as that on Windows, you can choose to copy the pico_micropython_xxxxxxxx.uf2 file into pico on PC or Raspberry Pi.
- 2. Open Thonny IDE on the Raspberry Pi Mountain (click the Raspberry logo -> Programming -> Thonny Python IDE ), you can check the version information in Help->About Thonny
To make sure your version has Pico support package, you can also click Tools -> Options... -> Interpreter to select MicroPython (Raspberry Pi Pico and ttyACM0 port
as the picture shows:
If your current Thonny version does not have the pico support package, enter the following command to update the Thonny IDE
sudo apt upgrade thonny
3. Click File->Open...->python/main.py to run the script
This demo 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
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: SIM868 Series GNSS Application Note V1.02
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 on AT commands, please check the manual: SIM800 Series_AT Command Manual
In this example, the Raspberry Pico is connected to the Internet through NB-IoT, and the data is transmitted through TCP and the server. The server that obtains the public network IP needs to be used (this example uses the Alibaba Cloud server):
- Description of the instructions
AT+CSQ #Query the network signal quality, the first parameter is that the network signal quality ehich the maximum value is 31, the larger the value, the stronger the network signal AT+CREG? #Query the network registration status, where the second parameter is 1 or 5, it means the registration has been successful. AT+CGATT? #Query whether the module is attached to the GPRS network AT+CSTT="CMNET #set the APN according to the actual network, here we take CMNET as an example AT+CIICR #activates mobile scene AT+CIFSR #get local IP address AT+CIPSTART="TCP","22.214.171.124",5000 #Establish a TCP/IP connection, as shown in the following figure
- Download the Python demo: the TCP part of the code is as follows:
def tcp(sms_info="qixi"): send_at('AT+CIPSHUT', 'OK') send_at("AT+CSQ", "OK") send_at("AT+CREG?", "OK") send_at('AT+CGATT?', 'OK') send_at('AT+CSTT=\"CMNET\"', 'OK',5) send_at('AT+CIICR', 'OK') send_at('AT+CIFSR', 'OK') send_at('AT+CIPSTART=\"TCP\",\"126.96.36.199\",\"2317\"', 'OK') send_at('AT+CIPSEND', ">",5) uart.write(bytearray(sms_info)) uart.write(bytearray(hexstr_to_str("1A")))
- Screenshot of Pico running on Thonny client:
- Server receives data
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:
- 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+http_get_server+'\"', '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：
- 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+http_post_server+'\"', '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")
- For more details on the HTTP function, please refer to the manual: SIM800_Series_IP_Application_Note_V1.05.pdf
Results of web page access on the server：http://pico.wiki/esp-chart.php
1.Open C program folder
2.Open through Vs coed, select the corresponding compilation tool and the demo to be run (annotate the demo you don't use, delete annotation in the demo you need and run one demo each time)
4.Press and hold the BOOT button of Pico and then power it on, and enable Pico to enter the disk mode. Drag the UF2 file under the build file to the RPI-RP2 drive letter
5.At this point, Pico starts to run the corresponding program, and you can check the running status through the serial port assistant
- SIMCom GPS
- Chinese characters and Unicode code conversion
- File:SIM800 Series_AT Command Manual_V1.11.pdf
- File:SIM800 Series_TCPIP_Application Note_V1.03.pdf
- File:SIM800 Series_MQTT_Application Note_V1.03.pdf
- File:SIM800 Series_Bluetooth_Application Note_V1.09.pdf
- File:SIM868 Series_GNSS_Application Note_V1.02.pdf
- File:SIM800 Series_Email_Application Note_V1.02.pdf
- File:SIM800 Series_GSM Location_Application Note_V1.03.pdf
- File:SIM800 Series_IP_Application Note_V1.05.pdf
- File:SIM800 Series_MMS_Application Note_V1.02.pdf
- File:SIM800 Series_NTP_Application Note_V1.03.pdf
- File:SIM800 Series_PCM_Application Note_V1.02.pdf
- File:SIM800 Series_SSL_Application Note_V1.05.pdf