Arduino Communication Technologies (Bluetooth, GSM/GPRS & WiFi)

Data Communication Technologies Santiapps

Arduino Comm Technologies

Im using a Sim900 module I got from SainSmart.  It basically looks like this:

Arduino - SIM900 GSM_GPRS module Santiapps Marcio Valenzuela
Arduino – SIM900 GSM_GPRS Module
Arduino - SIM900 GSM_GPRS module Santiapps Marcio Valenzuela
Arduino – SIM900 GSM_GPRS Module

Its important to understand something in Arduino-world!

Arduino is a brand and as such, it makes branded products.  But there are a bunch of other companies that do similar things.  The same way you can get an arduino-like board from a bunch of other manufacturers, you can also get a bunch of add-on modules or shields from other manufacturers as well.
In my case, I have an original Arduino UNO/MEGA board:
Arduino_MEGA Santiapps Marcio Valenzuela
Arduino_MEGA
But I decided to go with a cheaper, TinySine WiFi shield.  That TinySine WiFi shield has a WiFiBee module on top of it.  That WiFiBee is the name TinySine gave its little module that it plopped on top of a shield.  But the WiFiBee module actually uses a WiFly from Roving Networks.  So you can see how this can get confusing.
It gets specially confusing because Arduino also has its own WiFi shields.  And they have their own examples online.  So you may find yourself trying to use an Arduino sketch or tutorial (on a web site or youtube) on a module on top of a shield that is not an original Arduino shield.
Here is what my WiFi-module shield looks like:
Ardiuno - WiFiBee Module Santiapps Marcio Valenzuela
Arduino – WiFiBee Module
So wait…modules, shields, boards…wth!
Your board is your Arduino or arduino-like board, the main board with the micro-controller chip on it.
A shield is usually a smaller board you plop over your main Arduino board.  It has fixed pins on it that fit nicely into your Arduino board.  The pins must match for these to work.  Thats why its important to make sure that if you are buying a WiFi or BT or GSM shield for an Arduino, to ask or research if that shield fits an Arduino UNO or an Arduino MEGA or anything else.  Otherwise, the nicely made pins wont fit nicely over your board.  It will still work but you will have to get a breadboard or use a bunch of cables to make the jump between fixed pins on the shield and fixed pins on the main board.  But the shield is still just a shield.  Its main purpose is to hardwire connections from a module that performs some task, to your Arduino board, using fixed pins.
A module is usually something that resides on a shield which is responsible for some specific feature, such as WiFi communication.  Those modules usually have their own micro-controller(s) to carry out their own logic and interface with your Arduino board via the shield.
The shield is basically just another board that has some hard-wired cables in a board.  Anybody can make a shield.  You can buy a module and a proto-board and make your own shield.  It’s usually easier to just buy a shield or use a module directly, as we will see in this case.
In the picture of the WiFi module you can actually see it all come together:
Ardiuno - WiFiBee Module Santiapps Marcio Valenzuela
Arduino – WiFiBee Module

The board on the bottom is actually an Arduino UNO board (smaller than the MEGA).  You can see the silvery USB port sticking out on the top left and the black plastic power jack on the bottom left.  The board itself is green colored.

Just over that you can see the TinySine WiFi shield in blue color, right above it.  Its pins stick right into the Arduino UNO board below.

Finally on top of the shield you can see the red colored board which contains the Roving Networks’ WiFly module.  Unfortunately you can’t see it because it is facing down.  We are only seeing the underside with all the solder points.

In my next post Ill talk about my experience with all three comm technologies:

  1. BT using HC-05 module
  2. WiFi using the TinySine (Roving Networks module) shield
  3. GSM/GPRS with the Sim900 module

See ya!

Arduino (IoT): Simple Tutorial Reconocimiento de Voz (Geeetech)

Voice Recognition Technology Santiapps

Arduino Honduras Santiapps Marcio Valenzuela

Tutorial Reconocimiento de Voz – Geetech

Otro módulo de reconocimiento de voz por Geeetech.com

Requisitos:

  1. Computadora (mac)
  2. Arduino MEGA (u otra variante Arduino) o incluso Arduino clone, Edison, Raspberry…  Este tutorial en particular usa una Arduino MEGA.
  3. Geeetech Module
  4. Breadboard
  5. Arduino IDE (https://www.arduino.cc/en/Main/Software)
Arduino Tutorial Reconocimiento Voz Geeetech Santiapps Marcio Valenzuela
Arduino Tutorial Reconocimiento Voz Geeetech

El código esta aqui:

[code]
int redPin = 9;
int yellowPin = 10;
int whitePin = 11;
int greenPin = 12;
// Send 0xaa11 to store red, yellow, green, on, off
// Send 0xAA21 to import to group 1
byte com = 0; //reply from voice recognition
void setup() {
Serial.begin(9600);
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(whitePin, OUTPUT);
delay(2000);
Serial.write(0xAA);
Serial.write(0x37);
delay(1000);
Serial.write(0xAA);
Serial.write(0x21);
}

void loop(){
while(Serial.available()){
com = Serial.read();
switch(com){
case 0x11: // Primer comando
digitalWrite(whitePin, HIGH);
break;
case 0x12: // Segundo comando
digitalWrite(yellowPin, HIGH);
break;
case 0x13: // Tercer comando
digitalWrite(redPin, HIGH);
break;
case 0x14: // Cuarto comando
digitalWrite(redPin, HIGH);
digitalWrite(yellowPin, HIGH);
digitalWrite(greenPin, HIGH);
digitalWrite(whitePin, HIGH);
break;
case 0x15: // Quinto comando
digitalWrite(redPin, LOW);
digitalWrite(yellowPin, LOW);
digitalWrite(greenPin, LOW);
digitalWrite(whitePin, LOW);
break;
}
}
}

[/code]

Ese proyecto se puede ver:

Aqui

 

Wow!  Esto se está poniendo bueno!

Web Client to post/get data to web with Arduino via SIM900 module

Sim900 Debugging Testing Module Arduino Santiapps
Arduino - SIM900 GSM_GPRS module Santiapps Marcio Valenzuela
Arduino – SIM900 GSM_GPRS Module

This is actually my work log on Arduino & SIM900 GSM/GPRS module.

I’m starting off from here:

https://github.com/MarcoMartines/GSM-GPRS-GPS-Shield/blob/GSMSHIELD/examples/GSM_GPRSLibrary_Client/GSM_GPRSLibrary_Client.ino

But Im getting this error:

status=READY
ATT: ERROR
RIC:
ERROR

DB:STARTING NEW CONNECTION
ATT: SHUT OK
RIC:
SHUT OK

DB:SHUTTED OK
status=ERROR ==> Not connecting to apn for some reason.

DB:NOT CONN
ATT: OK
RIC:
ERROR

DB:NOT CONN

Number of data received:
0

Data received:

This was quickly solved by increasing the timeout value in the inetGSM library file from 500 to 10000 ms.

Now the error is:

GSM Shield testing.
DB:ELSE
DB:CORRECT BR
RIC: ATE0
ATT: +CPMS:
+CPMS: 28,190,28,190,28,190
ATT: SHUT OK
status=READY
DB:STARTING NEW CONNECTION
DB:SHUTTED OK
DB:APN OK
DB:CONNECTION OK
RIC: 10.124.39.139
DB:ASSIGNED AN IP
status=ATTACHED
DB:RECVD CMD
ATT: CONNECT OK
DB:NOT CONN
ATT: OK
RIC: AT+CIPSTART=”TCP”,”www.google.com”,80
ERROR
DB:NOT CONN
ATT: OK
RIC: AT+CIPSTART=”TCP”,”www.google.com”,80
ERROR
DB:NOT CONN
Number of data received:
0
Data received: 

So it seems its losing the connection.  I believe it might be due to a power loss situation where the SIM900 is reported to require a steady 2A power supply to avoid such issues when it requires bursts of energy.

Im currently researching how to solve this issue…

I was about to try a capacitor (22microF) and a 4xAA battery pack thru the Vin when all of a sudden it worked!

I just tried it again another day and it worked again.  Apparently my sim wasn’t properly activated…

GSMesting.
GSM Shield testing.
ATT: OK
RIC:
OK

DB:ELSE
ATT: OK
RIC:
OK

DB:ELSE
ATT: OK
RIC:
OK

DB:ELSE
ATT: OK
RIC:
OK

DB:CORRECT BR
ATT: OK
RIC:
OK

ATT: OK
RIC:
OK

ATT: OK
RIC: ATE0

OK

ATT: OK
RIC:
OK

ATT: OK
RIC:
OK

ATT: OK
RIC:
OK

ATT: OK
RIC:
OK

ATT: +CPMS:
RIC:
+CPMS: 37,190,37,190,37,190

OK

ATT: OK
RIC:
OK

ATT: SHUT OK
RIC:
SHUT OK
status=READY
ATT: ERROR
RIC:
ERROR

DB:STARTING NEW CONNECTION
ATT: SHUT OK
RIC:
SHUT OK

DB:SHUTTED OK
ATT: OK
RIC:
OK

DB:APN OK
ATT: OK
RIC:
OK

DB:CONNECTION OK
ATT: ERROR
RIC:
10.125.69.222

DB:ASSIGNED AN IP
status=ATTACHED

10.125.69.222
ATT: OK
RIC:
OK

DB:RECVD CMD
ATT: CONNECT OK
RIC:
OK

ATT: OK
RIC:
CONNECT OK

DB:OK TCP
ATT: >
RIC:
>
DB:>
ATT: SEND OK
RIC:
SEND OK

DB:SENT

Number of data received:
50

Data received:

HTTP/1.0 302 Found
Location: http://www.google.hn/?gws_rd=cr&ei=rEtyVZzBI9XfsAT9zLvABA
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=4bf4186862639d93:FF=0:TM=1433553836:LM=1433553836:S=vDVVuaRrLthWg9Cz; expires=Mon, 05-Jun-2017 01:23:56 GMT; path=/; domain=.google.com
Set-Cookie: NID=68=cj3CJ_MYqgELI9nt9GdFr0DLx8QyH9jRSQ3hWD8XgKpJhzAmKLaw-bY1KDmg5ylOvsj5zDAfkQ29QmOurH9vHxhb44f5wMqaH6AuO5vtHIJBEF1_4U4IqTyVEswuSdmq; expires=Sun, 06-Dec-2015 01:23:56 GMT; path=/; domain=.google.com; HttpOnly
P3P: CP=”This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info.”
Date: Sat, 06 Jun 2015 01:23:56 GMT
Server: gws
Content-Length: 258
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Alternate-Protocol: 80:quic,p=0

<HTML><HEAD><meta http-equiv=”content-type” content=”text/html;charset=utf-8″>
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF=”http://www.google.hn/?gws_rd=cr&amp;ei=rEtyVZzBI9XfsAT9zLvABA”>here</A>.
</BODY></HTML>

CLOSED