Select Page

Controlling home appliances by interfacing gsmsim300 with stm32l

This page gives idea about the project that how by using gsm sim300 we can control our home apliances by a simple sms from our cell phones.

INTRODUCTION

GSM (global system for mobile communications) is an open, digital cellular technology used for transmitting mobile voice and data services. GSM supports voice calls and data transfer speeds of up to 9.6 kbit/s, together with the transmission of SMS (short message service).This SIM300 GSM GPRS Modem is a highly flexible plug and play modem based on tri-band SIM300 GSM module.Industrial quality PCB with adequate grounding for better performance and noise immunity.RS232 Interface with Hardware Flow Control Support.(5 wire Serial interface with TX, RX, RTS, CTS & GND signals). The SIM300 KIT is a fully integrated module with SIM card holder, power supply etc. This module can be easily connected with low cost MCUs like AVR/PIC/8051also. The basic communication is over asynchronous serial line. This is the most basic type of serial communication that’s why it is very popular and hardware support is available in most MCUs. The data is transmitted bit by bit in a frame consisting a complete byte. Thus at high level it is viewed as a simple text stream. Commands are sent as simple text.

 

 

 

Unlike mobile phones, a GSM modem doesn’t have a keypad and display to interact with. It just accepts certain commands through a serial interface and acknowledges for those.

These commands are called as AT commands. 

There are a list of AT commands to instruct the modem to perform its functions. Every command starts with “AT”. That’s why they are called as AT commands. AT stands for attention.

SIM300 AT Command Set

since we know the basics of stm32USART library and how to use it to initialize the USART, send and receive character data, so we look what commands are available with SIM300 module and we issue commands and check the response. SIM300 supports several functions like sending text messages, making phone call etc. Each of the tasks is done using a command, and sim300 has several commands known as the command set. All SIM300 commands are prefixed with AT+ and are terminated by a Carriage Return (or <CR> in short). The ASCII code of CR is 0x0D (decimal 13). Anything you write to SIM300 will be echoed back from sim300’s tx line. That means if you write a command which is 7 bytes long (including the trailing CR) then immediately you will have same 7 bytes in the MCU’s UART incoming buffer. If you don’t get the echo back then it means something is wrong !

HARDWARE CONNECTION TO RUN THE APPLICATION

To connect the GSM daughter board with the STM32 demonstration kit the user must perform the following:

1)connect PB10(TX -USART3of stm32l) to pin1 of J1

2)connect PB11(RX-USART3 of stm32l) to pin3 of J1

Block Diagram

 

Block Diagram

 

 

STM32L Discovery Board

 

STM32L DISCOVERY BOARD

 

 

References

  1. UM0794 User manual_GSM interface library for surveillance applications 
  2. Class Notes
  3. Wikipedia
  4. AT Commands Set_ SIM300_ATC_V1.06
  5. STM32L DISCOVERY MANUAL

 

Project Team Members

Narmada Naik

Yogesh Bn