Difference between revisions of "Pico-2g-expansion"

From SB-Components Wiki

 
(12 intermediate revisions by the same user not shown)
Line 24: Line 24:
 
</div>
 
</div>
 
   <div class="large-4 column">
 
   <div class="large-4 column">
[[File:Pico_2g_expansion.png|thumb|left|alt=Pico 2G Expansion| Buy it From : ''[https://shop.sb-components.co.uk/products/pico-2g-expansion Click Here]'']]
+
[[File:Pico_2g_expansion.png.png|thumb|left|alt=Pico 2G Expansion| Buy it From : ''[https://shop.sb-components.co.uk/products/pico-2g-expansion Click Here]'']]
 
   </div>
 
   </div>
 
</div>
 
</div>
Line 83: Line 83:
  
 
* Now open the below examples code as per their function to test the pico 2G Expansion in Thonny Ide.
 
* Now open the below examples code as per their function to test the pico 2G Expansion in Thonny Ide.
** Make_Call.py : To make calls on a defined number.
+
** SIM868.py: This file contain the library of the module, you need to add this file to pico.
** Send_SMS.py : To send a Text message on the defined number.
+
** pico_2g_exp.py: This is the main file that you need to run.
** fetch_gps.py : Fetch the Current GPS NMEA data.
+
** Lcd1_14driver.py : This library is of lcd 1.14 inch
** BT_Test.py : Discover nearby Bluetooth devices.
 
  
* To make a call, Open the  Make_Call.py file in thonny ide and enter your mobile number from '''123456''' to the actual number at the end of this code, and timeout to release the code after specified seconds (i.e: 15 seconds in the default case).
+
* To make a call, you need to uncomment this line ''' Call = SIM868.call(Mobile_number,10)''' in ''' pico_2g_exp.py ''' file
<source lang="python">
+
* To make a message, you need to uncomment this line ''' Message = SIM868.message(Mobile_number,Write_message) ''' in ''' pico_2g_exp.py ''' file
check_start() # Initialize SIM Module
+
* To turn on GPS, you need to uncomment this line ''' Gps = SIM868.gps() ''' in ''' pico_2g_exp.py''' file
network_check() # Network connectivity check
+
* To scan Bluetooth devices, you need to uncomment this line ''' Bluetooth = SIM868.bluetooth() ''' in ''' pico_2g_exp.py ''' file
make_call("123456" , 15) # Replace "123456" with Mobile number and 15 with timeout to hang call in seconds
 
</source>
 
  
* To send text message, Open the Send_SMS.py and edit the below line to update tesxt message and recipient number from '''123456''' to recipient  Number.
+
You need to enter your mobile number in the code '''pico_2g_exp.py''' to make call and send the message
<source lang="python">
+
 
# SMS test
+
* Please follow the Resources to run 1.14' LCD
sms_text ="Hello from Pico 2G."
 
send_sms("123456", sms_text)
 
</source>
 
  
 
== Resources ==
 
== Resources ==

Latest revision as of 12:33, 30 December 2021

Pico 2G Expansion

Raspberry Pi Pico 2G Expansion is a QUAD-Band GSM/GPRS/GNSS Expansion designed dedicatedly for Raspberry Pi Pico with UART, USB 2.0 Interface, 850/900/1800/1900 MHz, Bluetooth 3.0 based on SIM868 module to perform easy and efficient communication. Pico 2G Expansion works on the embedded TCP/UDP Protocols with Multi-constellation GNSS receiver support.

Pico 2G Expansion also includes a 1.14-inch display with a resolution of 240 x 135 pixels, 65K RGB colors, and a sharp and vivid exhibiting effect, designed primarily for user engagement via SPI connection by incorporating a GPIO header. The 1.14-inch LCD includes the ST7789 Driver and SPI Interface, decreasing the amount of IO pins required.

Features

  • 1.14” LCD
  • Low Power Consumption
  • 850/900/1800/1900 MHz Frequency band
  • Bluetooth 3.0
  • LED Indicators
  • Serial/USB/SIM868 Selection Jumpers

Specifications

  • Operating Voltage - 5V(via USB)
  • Communication - UART/USB 2.0
  • SIM Module - SIM868
  • Compatibility - Raspberry Pi Pico
  • Operating Temperature - -400 ~ 800 C
  • Dimensions - 68 x 119.64 mm
Pico 2G Expansion
Buy it From : Click Here

Pinout

PICO 2G Board PICO Pins
VCC 5V
GND GND
LCD DIN GP11
LCD CLK GP10
LCD DC GP8
LCD CS GP9
LCD RST GP12
LCD BL GP13
SIM868 PWRKEY GP22
SIM868 TX GP1
SIM868 RX GP0

Jumper Selection

SIM868 Operation (Device Selection)
Jumpers 1 Jumper 2 MODE
Short P_TX - U_RX Short P_RX - U_TX Pico to USB Communication
Short U_RX - S_RX Short U_TX - S_TX USB to SIM868 Communication
Short P_TX - S_RX Short P_RX - S_TX SIM868 to Pico Communication
Open Open No Communication

Installation

USB to SIM868 Communication

  • Connect Selection jumpers for USB to SIM868 communication mode.
  • Insert SIM card on SIM card slot, and connect GSM and GSM Antenna on antenna connector.
  • Connect USB on the USB port of Pico 2G GSM board.
  • Press and hold PWR_KEY to turn on the GSM module (SIM868) and release it once STATUS led turned on.
  • Now open any Serial terminal app on (Windows or Linux), Set com port of Pico 2G expansion and baud rate to 9600.
  • Now you can send AT commands from the terminal to control your SIM868 Module.

MicroPython

  • Connect Pico on Pico 2G Expansion.
  • Connect jumper in SIM868 to Pico Communication mode.
  • Connect GSM and GPS antenna on Antenna connectors.
  • Insert 2G enabled SIM card on sim card port.
  • Download or clone the repository of Pico 2G expansion from the below link.

https://github.com/sbcshop/Pico-2G-Expansion

  • Now open the below examples code as per their function to test the pico 2G Expansion in Thonny Ide.
    • SIM868.py: This file contain the library of the module, you need to add this file to pico.
    • pico_2g_exp.py: This is the main file that you need to run.
    • Lcd1_14driver.py : This library is of lcd 1.14 inch
  • To make a call, you need to uncomment this line Call = SIM868.call(Mobile_number,10) in pico_2g_exp.py file
  • To make a message, you need to uncomment this line Message = SIM868.message(Mobile_number,Write_message) in pico_2g_exp.py file
  • To turn on GPS, you need to uncomment this line Gps = SIM868.gps() in pico_2g_exp.py file
  • To scan Bluetooth devices, you need to uncomment this line Bluetooth = SIM868.bluetooth() in pico_2g_exp.py file

You need to enter your mobile number in the code pico_2g_exp.py to make call and send the message

  • Please follow the Resources to run 1.14' LCD

Resources