GSM Shield SM5100 - Arduino And Firewing

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Thu Aug 22, 2013 2:54 am

I just thought I would share what ive been up to recently and will be an on going project amongst other things I have going on at the moment..

Ive been fascinated whenever ive seen GSM modules on websites like ProtoPic and kepted putting it of because the cost of the boards/shields always seem a bit high. But ive been a purchased one! :lol:

The one I have is from here sm5100 gsm module like I said its not a cheap board :cry:
gsmsm5100.jpg
gsmsm5100.jpg (11.59 KiB) Viewed 29325 times
I have some Firewing and Arduino code which can send and receive SMS messages, its been great fun sending SMS messages on your iPhone to an Firewing/Arduino board and turning some leds on and off! :) the projects you can make from this gsm module will be very cool, like a temperature device which could alert you by sms (text message) or you could send it a sms to increase or decrease the temperature of your house heating?!..

The interface to the gsm is all done by Uart with AT commands, I'll share more info soon..
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Fri Aug 23, 2013 6:26 am

Now that I think about it, you could have just one of these GSM modules and a central microcontroller for your whole house. You could then interface just about everything to your microcontroller (like heating / cooling, lights, alarm system, garage door, electronic locks etc...)

You could then make an iphone or android app where you could have a nice touch interface which would generate a text message and send it for you.

Now all I need is a whole heap of time!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Mon Aug 26, 2013 4:51 am

brad wrote:You could then make an iphone or android app where you could have a nice touch interface which would generate a text message and send it for you.
Now your talking Brad, great idea! :D


Some important thing's I thought I would share with these SM5100 GSM module's.

* The GSM shield only works with “2G” GSM mobile networks operating on the 850, 900 and PCS1800 MHz frequencies.
◦ Australians – can use any carrier’s SIM card, except for “Three”.
◦ Canadians – this doesn’t work with Sasktel.
◦ North Americans – check with your cellular carrier first if you can use third-party hardware (i.e. the shield).
◦ United Kingdom - (T-Mobile and Orange) use a standard known as GSM1800, (O2 and Vodafone) use a standard known as GSM900.
Some of the info above is just what I have found on the internet, you may need to double check with your network for your country.

As I am from the UK I have a working GSM sheild using the 02 network..

* You will also require a GSM antenna for the shield. One can be found here Quad-band Cellular Duck Antenna SMA
antenna.png
antenna.png (22.38 KiB) Viewed 29302 times
I also found out while using the Shield with Firewing that the GSM shield needed more power (current) when it was transmitting. Which I have purchased from DF-Robot Power Shield
The GSM shield can draw upto 2amps while transmitting (ref datasheet), this CAN NOT be done using just the USB connection to the Firewing/Arduino board. You will also require a power supply which can supply 2amps, In my case I have used a 9v (2amp) mains power supply.
I have configured the power board jumpers so that Output control and Output detection jumpers are removed, while the Input power selection jumpers are set to PWRIN.. If using the Firewing board you will also need to connect the power supply Input 9v to the VIN pin on the board with a connector wire, this is where the GSM shield regulator gets it power from.
Very Important - Set the power board output voltage to 5v, ignore the led voltage indicators as I have found this to be incorrect!. Use a multimeter to set the output voltage.
pin%20out%20diagram.jpg
DF Robot Power Shield
pin%20out%20diagram.jpg (166.73 KiB) Viewed 29302 times
I have put a small comms programme together for firewing which can be used to send GSM AT commands to the GSM shield. It uses both firewing Uarts, one for a serial comms and the other which communicates to the GSM shield.

You can find the commands in the following PDF file:
CEL-09533-AT Command.zip
(762.78 KiB) Downloaded 599 times

Code: Select all

' import Uart modules...
imports Uart
imports Uart2

' main program entry point...
Sub Main()
   Uart.SetBaudrate(Uart.Baudrate.Is38400)
   Uart2.SetBaudrate(Uart2.Baudrate.Is9600)
   Uart.ReadTerminator = 13
   dim command as string 
   while true
      if Uart.DataAvailable then
         Uart.Read(command)
         Uart2.Write(command,13,10)
         'Uart.Write(command,13,10)
      end if                
      if Uart2.DataAvailable then
        Uart.WriteByte(Uart2.ReadByte())
      end if
   end while
End Sub
With everything connected and running with the code above on a firewing board, and with a serial comms connected to the board (firewing/swordfish serial comms not supported) you can try this Terminal prog com port development tool, Ensure the settings are 9600, 8, N, 1. you should be presented with the following:

+SIND: 1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1
+SIND: 11
+SIND: 3
+SIND: 4

It will take around 15 to 30 secs for the text above to appear in full.
What you are being presented with is a log of the GSM module’s actions. But what do they all mean?
◦+SIND: 1 means the SIM card has been inserted.
◦+SIND: 10 - line shows the status of the in-module phone book.
◦+SIND: 11 means the module has registered with the cellular network.
◦+SIND: 3 means the module is partially ready to communicate.
◦+SIND: 4 means the module is fully ready to communicate.

If you have all of the above then we are ready to communicate with the GSM module..
So now we can check that the gsm shield is fully ready, lets try ringing the shield?
Pick up a phone and call it, ring the gsm shield twice and hang up, as the gsm shield rings check out the serial comms window, you shouled be presented with something like this:
RING
+CLIP: "XXXXXXXXXX",129
RING
+CLIP: "XXXXXXXXXX",129
NO CARRIER
+SIND: 6,1
The "XXXXXXXXXX" should be the callers ID number (mobile number). Now that we know the gsm module is fully working.
time to have some more fun! :)

Here's an example code using Arduino:

Code: Select all

#include <SoftwareSerial.h> // Virtual serial port
SoftwareSerial cell(2,3);
char incoming_char = 0;

void setup()
{
  //Initialize serial ports for communication.
  Serial.begin(9600);
  delay(25000);
  cell.begin(9600);
  Serial.println("Starting SM5100B Communication...");
}

void loop(){
  //If a character comes in from the cellular module...
  if( cell.available() > 0 ){
  //Get the character from the cellular serial port.
  incoming_char = cell.read();

  //Print the incoming character to the terminal.
  Serial.print(incoming_char);
  }

  //If a character is coming from the terminal to the Arduino...
  if( Serial.available() > 0 ){
    incoming_char = Serial.read();//Get the character coming from the terminal
    cell.print(incoming_char); //Send the character to the cellular module.
  }
}
I hope someone finds this useful :)
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Mon Aug 26, 2013 6:00 am

We can make the GSM shield ring a phone/mobile

To do this we type the following into the Terminal Window:
ATDXXXXXXXXXX
(you need to change the "XXXXXXXXXX" to the number you want to ring. example 01245123123)
Then to hang up we type the following:
ATH

*Edited*
Make sure that the GSM module uart baudrate matches the uart baudrate of the serial terminal.
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Thu Aug 29, 2013 7:32 am

Thanks for the writeup Gav!

The good thing with this is you could just buy a really cheap sim card and put maybe $10 of credit on it and it should last you for quite a while.

I have more to write but I have to go to work. I'll be back!

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Thu Aug 29, 2013 9:02 pm

Okay I'm home (finally!)

Once again, thanks for the write up. I was wondering if you wouldn't mind me posting this to the main bradsprojects site?

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Fri Aug 30, 2013 3:31 am

brad wrote:Okay I'm home (finally!)
Good day at work? :)
brad wrote:Once again, thanks for the write up. I was wondering if you wouldn't mind me posting this to the main bradsprojects site?
That'll be great, sure you can post it on the main site..
brad wrote:The good thing with this is you could just buy a really cheap sim card and put maybe $10 of credit on it and it should last you for quite a while.
You can indeed, and that's exactly what I done here in the UK, my sim card cost £10 but it came with £10 credit. :D
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Fri Aug 30, 2013 9:22 pm

Just wanted to share some more info..

You can use this website to give you your country GSM operating frequency bands. Just select your country and check out the 2G capabilities results..

Also I've collected all the info I can find on the SM5100b, here is a Zip file which contains.
•Users Manual
•Hardware Specification
•Reference Schematics
•SMS Application Notes
•GPRS Application Notes
•AT Command Set
GSM GPRS Module - SM5100B.zip
(1.89 MiB) Downloaded 574 times
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Sat Aug 31, 2013 10:27 pm

Excellent!

Thanks Gav, will post it up when I have a few spare moments. Once it's up you'll have to let me know if there is anything I should add or take away etc...

I thought, maybe it could be an add on for a 8x8 game system where you could play something like connect four with someone in a different state / country and once you make a move, it would sms details of your move to the other player etc...

But then I thought, that would be one expensive game of connect 4...

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Sun Sep 01, 2013 1:08 am

brad wrote:Excellent!
Thanks Gav, will post it up when I have a few spare moments. Once it's up you'll have to let me know if there is anything I should add or take away etc...
Sure, when ever you get enough time Brad :)
brad wrote:I thought, maybe it could be an add on for a 8x8 game system where you could play something like connect four with someone in a different state / country and once you make a move, it would sms details of your move to the other player etc...
But then I thought, that would be one expensive game of connect 4...
That is a good idea, I'm not sure what options you get in Australia with mobile networks but I guess you could use your idea with a Contract sim card? most of the network suppliers here in the UK offer free sms messages etc?. It'll still be costly though if you wanted to connect with someone from a different country :(
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Mon Sep 02, 2013 8:40 pm

I've been trying to write up the post on my main site for this Gav but it is having huge issues with trying to copy and paste text - it looses the formatting and is being generally annoying. Will see what I can do when I have some more spare time!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Tue Sep 03, 2013 5:16 am

No rush buddy.. I've been working on a VB serial terminal for the gsm module :)
gsmterminal.jpg
gsmterminal.jpg (18.6 KiB) Viewed 29240 times
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Tue Sep 03, 2013 10:20 pm

Nice Bitfogav.

I'll have to wait for that to be ready - will it be available to the general public, or are you just using it for yourself?

I miss programming in Visual Basic. I'll have to come up with a project that requires the use of it again :)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: GSM Shield SM5100 - Arduino And Firewing

Post by bitfogav » Tue Sep 03, 2013 10:47 pm

brad wrote:Nice Bitfogav.

I'll have to wait for that to be ready - will it be available to the general public, or are you just using it for yourself?

I miss programming in Visual Basic. I'll have to come up with a project that requires the use of it again :)

It will be available to the general public, I'm just testing it with Firewing and the Arduino boards. all test's are going good!.

Yes your visual basic programmes was very impressive, I enjoyed the visual basic version of the 8x8 matrix :)
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: GSM Shield SM5100 - Arduino And Firewing

Post by brad » Tue Sep 03, 2013 10:52 pm

bitfogav wrote:
brad wrote:Nice Bitfogav.

I'll have to wait for that to be ready - will it be available to the general public, or are you just using it for yourself?

I miss programming in Visual Basic. I'll have to come up with a project that requires the use of it again :)

It will be available to the general public, I'm just testing it with Firewing and the Arduino boards. all test's are going good!.

Yes your visual basic programmes was very impressive, I enjoyed the visual basic version of the 8x8 matrix :)
I do enjoy using LED matrix displays!

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 17 guests