Header Ads Widget

Raspberry Pi Pico With SIM800L Module

In this blog, We are going to interface SIM800 GSM Module with Raspberry Pi Pico using Micropython. A lot of GSM modules are available in the global market, but we are going to use most popular and low cost SIM800L module and Raspberry Pi Pico for this blog.

GSM Modules are basically a GSM Modem running on 2G/3G/4G or 5G technology which can be used to generate call, Sending SMS, Sensing sensor data to cloud or to control industrial applications. In this blog, we are going to discuss about sim800l board. SIM800l is an ultra compact wireless module comes with preloaded AT firmware. You can use these AT command to configure the modem as well as to use its features.

Material Required:

  • SIM800L SIM Module
  • Raspberry Pi Pico
  • Breadboard
  • Jumper cables to make connection
  • USB Cable for programming of Pico
  • 3.7V Battery

Circuit Diagram :

Source Code:

This code is using the machine module to access the UART (universal asynchronous receiver-transmitter) on the device with a baud rate of 9600. It then defines two functions: "sendCMD_waitResp" and "waitResp". The "sendCMD_waitResp" function takes a command string and a UART object as inputs, and sends the command to the UART, then calls the "waitResp" function to wait for a response from the UART. The "waitResp" function takes a UART object and a timeout value as inputs, and waits for a response from the UART for a specified amount of time.

After that, it is calling these functions to send commands to the UART and waits for responses. The first command is "AT+CGATT?" to check the connection status, the second command is "ATDxxxxxxxxxx;", to dial a phone number, and the third command is "ATH" to hang up the call. And also it is waiting 2 sec and 8 sec before sending next command.

Post a Comment