This article guides users to programmable monitoring and temperature monitoring applications using GSM / GPRS SIM900A Easy product with PIC Easy R1 products manufactured by AT-COM. The thermal sensor used is LM35DZ. The open source code is written to be compatible with the USB Hid Bootloader of the PIC Easy R1. Users can "Plug and Play" the flexibility of ATCBus on each product.
1. Introduction to PIC Easy R1
PIC Easy R1 is an AT-COM product that gives users the convenience of combining ATCBus with Microchip's PIC18F4550-I / PT microcontrollers. The board supports USB Full Speed V2.0 USB connection, with USB HID Bootloader, which allows users to download firmware directly to PIC18F4550-I / PT without any other load. In addition, the 48MHz PIC18F4550 high performance microprocessor meets the needs of programmers deploying applications such as Wifi, Ethernet, USB, CAN, PWM.
2. Introduction of GSM/GPRS SIM900A Easy
SIMCom Introduces The Sim900A is an extremely compact GSM / GPRS module designed for the global market. The Sim900A is available in dual band EGSM 900MHz, 1800MHz DCS as a terminal with a powerful single-core processor, enhancing key features based on the ARM926EJ-S processor, for You benefit from the compact size (24 x 24 x 3 mm), which meets the space requirements of M2M applications.
GSM/GPRS SIM900A Easy is a product developed by AT-COM based on the features of SIM900A module. GSM/GPRS SIM900A Easy is designed with built-in soles SIMCard, GSM built-in PIFA Antenna, earphone jack, enabling users to easily research and deploy GSM/GPRS related applications such as: Besides, the compact size, handy data output, GSM/GPRS SIM900A Easy will bring to the inspiration of modern and sophisticated design.
3. Application monitoring and temperature alerts via SMS
To accomplish this, we need the following equipment:
+ Board PIC Easy R1.
+ Board GSM/GPRS SIM900A Easy.
+ Temperature sensor LM35DZ.
Step2: Connect the hardware
We connect the system according to the following diagram:
Step 3: Load code for PIC Easy R1
The SIM900A Easy GSM / GPRS code is presented in the article using the CCS Compiler for the PIC18F4550 microcontroller. The code is written in the USB HID Bootloader of PIC Easy R1, which allows the microcontroller to run at a clock frequency of 48MHz. Downloadable SIM card in GSM / GPRS SIM900A Easy.
After downloading the code to the computer, it should be edited and recompiled with PIC C compiler software.
After unpacking, open the file main.c, proceed to correct the phone number in the code to send message board coordinates.
After the compilation is completed, we proceed to load firmware for PIC18F4550 via USB HID Bootloader.
To enter the USB Hid Bootloader mode of PIC Easy R1, do the following:
Connect the PIC Easy R1 to PC via USB mini on the board. Then press and hold the SW1 / RD0 button and press the RESET button. The PIC Easy R1 will enter the HID Bootloader mode. When entering the HID Bootloader mode, the Led LD2 / RD3 will flash continuously, waiting for the user to update the firmware for the PIC18F4550.
In order to load firmware for user application running on PIC Easy R1, user can use Microchip USB Bootloader V2.9j program to flash Firmware to Program Memory of PIC18F4550.
After downloading the USB Bootloader V2.9j program to your computer, extract the winrar file and click on the HIDBootloader.exe file to run the USB Bootloader program on your computer.
After the PIC reset, the board starts up the SIM900A module and reports the complete startup message to the phone number that we fixed in the code above.
We set the alarm temperature for the system according to the following syntax:
Note: The installation message begins with a pound (#) and ends with a dot (.).
When the system detects that the temperature exceeds the alarm temperature, send a warning message to the telephone number that was installed above.