Leonardo + GPRS GSM IOT Board

  • Product Code: WCW07517B
  • Stock

    Warehouse Stock Status Location
    Centurion In Stock A SHELF
    Stellenbosch In Stock 792
  • R365.00 (price excl. VAT)


Leonardo + GPRS GSM IOT Board

The Leonardo GPRS/GSM IOT Board to provide your project a way of convenient remote control, It’s widely used in remote control, telemetry, communication, automatic control and so on. It can receive phone calls and text message to control the relay ON or OFF. What more, this boards have four relay so that it can control several appliances at the same time.

Meanwhile, this board serves as the main control system applied to smart homes. Not only that, it uses the SIM808. It can also be used by Arduino/Crowduino to realize the operation of other modules.

Quick Spec

  • GPRS/GSM function
  • Standard Micro SIM Card (SIM CARD NOT INCLUDED)
  • Power Interface:USB,DC
  • Working Frequency: 16MHz
  • Compliant to GSM phase 2/2+
  • Supports 3.0V to 5.0V logic level
  • Microcontroller: ATmega32u4,8-bit AVR MCU
  • Low power consumption, 1mA in sleep mode
  • Supports load: DC/AC maximum current:2A AC:100~240V
  • Controlled by AT Command (3GPP TS 27.007, 27.005 and SIMCOM enhanced AT Commands).
  • Quad-Band 850 / 900/ 1800 / 1900 MHz - would work on GSM networks in all countries across the world.
  • Class 4 (2 W @ 850 / 900 MHz)
  • Class 1 (1 W @ 1800 / 1900MHz)
  • Current Supply: 2A
  • USB: 5V
  • Power Supply:
    • Min.: 7VDC
    • Max: 12VDC
  • Temperature: -30~+85oC
  • Board site: 9.5cm X 6.5cm

Silk Screen

900px_Leonardo_GPRSGSM_IOT_Board_cam350

Demo Code


/*
 * Author: Elecrow Keen
 * Date:6/30/2017
 * IDE V1.8.2 
 * Email:keen@elecrow.com    
 * Function: SMS control relay
 * Please note:
    When the the board receive "R1O" by SMS, the relay 1 will be open and the "R1C" that it will be close. 
    
    "R1O"/""R1C" means:
      R ->  Relay
      1 ->  Relay 1 
      O ->  Open
      C ->  Close
      
    It also used Relay2,Relay3 and Relay4.
 */

#define DEBUG true    //Open the debug information 

 // the number of the Relay pin
const int Relay1 = 2;
const int Relay2 = 3;
const int Relay3 = 4;
const int Relay4 = 5;
/*
R1O means open  relay 1
R1C means close relay 1
The same as others 
*/
String R1O = "R1O";
String R1C = "R1C";
String R2O = "R2O";
String R2C = "R2C";
String R3O = "R3O";
String R3C = "R3C";
String R4O = "R4O";
String R4C = "R4C";

char target[] ="CMTI";  
int sms_no;
String get_message = "";   

void setup() {  
      Serial.begin(19200); 
      Serial1.begin(19200); 
      for(int i=2;i<6;i++){ // initialize the Relay pins status:
        pinMode(i,OUTPUT);
        digitalWrite(i,LOW);
      }
      //Power on the SIM800C
      
      pinMode(9,OUTPUT);
      digitalWrite(9,HIGH);
      delay(3000);
      digitalWrite(9,LOW);
      delay(1000);
      
      sendData("AT",2000,DEBUG);
      sendData("AT+CMGF=1",1000,DEBUG);        //Set the SMS in text mode
} 

void loop() { 
       if(Serial1.available()>0){
        Serial.write(Serial1.read());
            
          if(Serial1.find(target)){                  //If receive a new SMS
             sms_no = Serial1.parseInt();            //Get the SMS ID        
             get_message = "AT+CMGR="+(String)sms_no; //The command of the content of the SMS
             Serial.println("******************** Print the relay status *********************" );
             Data_handling(get_message,500,DEBUG);    //Get the content of the SMS 
             Serial.println("*****************************END*********************************" );
         } 
         
     }
     while(Serial1.read() >= 0){}                     // Clear serial buffer   
}

void Data_handling(String command, const int timeout, boolean debug)  //data handling function
{
    String response = "";    
    Serial1.println(command); 
    long int time = millis();
    while( (time+timeout) > millis()){
      while(Serial1.available()){       
        response += (char)Serial1.read(); 
      }  
    }    
   if (response.indexOf(R1O)>=0) {
    digitalWrite(Relay1,HIGH);
    if(debug){
    Serial.println("Open Relay 1");
    }
    }
   else if (response.indexOf(R1C)>=0) {
    digitalWrite(Relay1,LOW);
    if(debug){
    Serial.println("Close Relay 1");
    }
   }
   else if(response.indexOf(R2O)>=0) {
    digitalWrite(Relay2,HIGH);
    if(debug){
    Serial.println("Open Relay 2");
    }
   }
   else if(response.indexOf(R2C)>=0) {
    digitalWrite(Relay2,LOW);
    if(debug){
    Serial.println("Close Relay 2");
    }
   }
   else if (response.indexOf(R3O)>=0) {
    digitalWrite(Relay3,HIGH);
    if(debug){
    Serial.println("Open Relay 3");
    }
   }
   else if(response.indexOf(R3C)>=0) {
    digitalWrite(Relay3,LOW);
    if(debug){
    Serial.println("Close Relay 3");
    }
   }
   else if(response.indexOf(R4O)>=0) {
    digitalWrite(Relay4,HIGH);
    if(debug){
    Serial.println("Open Relay 4");
    }
   }
   else if(response.indexOf(R4C)>=0) {
    digitalWrite(Relay4,LOW);
    if(debug){
    Serial.println("Close Relay 4");
    }
   }else
   Serial.println("....Error message....");
}

void sendData(String command, const int timeout, boolean debug)  //Send command function
{
    String response = "";    
    Serial1.println(command); 
    long int time = millis();
    while( (time+timeout) > millis()){
      while(Serial1.available()){       
        response += (char)Serial1.read(); 
      }  
    }    
    if(debug){
      Serial.print(response);
    }    
}

Recommendation

10uF and 100uF over VCC and GND

Resources

Shipping List

  • 1 X Leonardo + GPRS GSM IOT Board
  • 1 X GSM Antenna


Tags: leonardo, gprs, gsm, iot, board, sim80

Also Bought

NFC ACR122U RFID Smart Reader/Writer 13.56 MHz

NFC ACR122U RFID Smart Reader/Writer 13.56 MHz

NFC ACR122U RFID Contactless Smart Reader/Writer - 13.56 MHz The ACR122U NFC Reader is a PC-linked contactless smart card reader/writer developed based on 13.56 MHz Contactless (RFID) Technology. C..

R729.00

Capacitor Electrolytic 100uF (10 Pack)

Capacitor Electrolytic 100uF (10 Pack)

Quick Spec Value = 100uF Voltage 16V Shipping List 10 x 100uF 16V ..

R14.00

Capacitor 10uF 25V (10 Pack)

Capacitor 10uF 25V (10 Pack)

Capacitor 10uF 25V (10 Pack) Low-profile electrolytic decoupling capacitors 10uF/25V. These capacitors are great transient/surge suppressors and work well as charge pump caps for MAX232 circuits. Hig..

R28.00

Current sensor ( CT ) 100Amp

Current sensor ( CT ) 100Amp

Current sensor ( CT ) 100Amp Current transformers (CTs) are sensors that are used for measuring alternating current. They are particularly useful for measuring whole building electricity consumptio..

R115.00

Mini PIR sensor

Mini PIR sensor

Mini PIR sensor HC-SR505 small body sensing module is based on infrared technology, automatic control products, high sensitivity, high reliability, ultra-small, ultra-low-voltage operation mode. Wide..

R50.00