Shop OBEX P1 Docs P2 Docs Learn Events
GSM module for transmitting further than XBee — Parallax Forums

GSM module for transmitting further than XBee

ElkinElkin Posts: 58
edited 2014-12-26 13:33 in Propeller 1
Hello forum,

I am working with a propeller application where I have to transmit data from several remote sites and I would like all the data to be sent back to my location. In the past I have tried the XBees but even with the 28 mile range it wasn't enough. Because these are remote locations, like the middle of lakes or mountain streams, an internet connection won't work either. It seems like there are off the shelf GSM modules that have been used with arduino (which I am not using), however I thought these would work more or less the same as the AT code that the XBee was using.

Before I look into this more, it would be nice to know if there was any object or code that someone else has worked with and would like to share.

More specifics on the project: I am storing about 8 comma separated values per line at 5 lines per second (5Hz). Each file is 15 minutes long. My goal is to wake up the GSM module once per hour and have it send 4 of these files (which are stored on flash memory) at once back to my PC using hyper terminal or an email account or something like that.

any advice would be greatly appreciated!

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2014-11-15 20:01
    Elkin - sounds like an interesting set of projects or experiments you are working with. I've been curious on various long distance communications methods, I don't have any practical advice to share, but I'll share what I know.

    For the GSM modules, sure they should work with a Propeller if there is a match on voltage communication levels. You can check the OBEX if there is an object. For the GSM modules to work, you would of course need to ensure the location has mobile service. Would it? I've explored using GSM with a propeller, but haven't dove into it yet. The communication set would be different than the XBee, you couldn't unplug the XBee and plug in the GSM and expect it to work. Instead you would have to adjust code for the initialization and sending of messages and retrying for failures.

    Another option, but certainly much more expensive, would be to use a satellite communication service. RockBlock (http://rockblock.rock7mobile.com/products-rockblock) would be such a device you could use. It would need a view of the sky to reach the satellite. The service can then be setup to e-mail you or you could use an API to gather the data from the service providers web site.

    I'd recommend checking out Digi's site for some other long distance radios. They might not be embedded like an XBee, to get the distance you are wanting you may have to get a packages product that you then interface to with a RS-232.
  • rabaggettrabaggett Posts: 96
    edited 2014-11-22 09:16
    I made some remote applications with the Xbee. You didn't say which you are using, but I found (The hard way) that you can get away with a much lower antenna with the 900 MHZ Xbees over water. 433 MHZ modules work marginally better, but you'll need to make better antennas. By my limited experimentation, The 2.4 GHZ ones simply 'drop out' with an included elevation angle from the antennas to smooth water over 178 degrees. The 900 MHZ work well to over 179.5 degree. This changes near shore, with this effect undetectable due to reflections from the land, trees, buildings, etc. Going to 900 MHZ, and making my shore antenna VERY high (150') got reliable results, on a clear day, at 15 miles.

    At any VHF or above, the curvature of the earth will limit you to about 7 miles with antennas about 6' off the ground. No matter how much antenna or power you throw at it. (Except for lucky reflections from tall objects, dense clouds, airplanes, meteor trails, The moon, etc) Elevation is everything.

    Yes, the range claims on the bubble pack GMRS radios is complete excrement of male bovine.

    I have not actually used the GSM modules, but I see from the datasheet that they may be operated like a modem, using the simple AT command set. (Different from AT commands with Xbee). The cell towers you would be communicating with will handily solve the elevation problem.
  • NAVFAC10NAVFAC10 Posts: 23
    edited 2014-11-22 18:13
    Elkin,
    I built a project a few years ago based on the prop and the SM5100B-D (GSM). The function of the project is simple... If the sensors attached to the prop detected something outside specific parameters, it would send an SMS (text message) to my bosses phone (including a few parameters, i.e. variables). Worked great. I purchased the GSM module from sparkfun. The main program is 8 pages (not including object files). I used "FullDuplexSerial" to communicate with the GSM module. The code is not "commented" very well. But if you are interested, I can dig up the code on my old computer and attach to this thread. Since the main object is rather lengthy, I will only send methods that you are interested in. Just let me know. The code is all in spin. Good luck.
  • rabaggettrabaggett Posts: 96
    edited 2014-11-25 12:58
    I certainly would be interested. I don't know how your code is arranged, but I would want to see how to send a message to a specific phone. Please consider posting the code even if it is long, I'm sure we 3 are not the only ones interested in this. With some back-and-forth, maybe we'll make something good enough for OBEX!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-11-25 13:10
    rabaggett wrote: »
    Please consider posting the code even if it is long, I'm sure we 3 are not the only ones interested in this.

    You are correct.

    Using some sort of GSM module has been on my todo list for a while now. I'd be interested in see the code.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2014-11-25 15:08
    Our company has several hundred remote sites that are monitored and controlled by a Propeller. The monitoring and other information we need on our home server is sent to us through a Verizon modem. The Propeller communicates simply with the modem via 8N1 serial (but USB and ethernet are available too), and the modems send us the unaltered info. We also have a similar modem that works on AT&T towers. I've even developed a protocol so I can send parameter changes and (better yet) Propeller firmware updates to any of the remote sites so the software can stay up to date as we make changes back in the office. I can give you some of the info over PM if you are interested.
  • NAVFAC10NAVFAC10 Posts: 23
    edited 2014-11-25 17:28
    Hey Guys. Going out of town tomorrow. Will try and dig up the code this weekend and post. BTW, I purchased the GSM, Evaluation board, and the quad band antenna at sparkfun (under the cellular link). Cost was about $140.00. I also had to purchase a sim card from T-Mobile. The monthly fee was about $20.00 (I did not send many SMS messages, didn't have to, thus the low price). Also, I used hyper terminal to experiment with AT commands. Beware, some of the documents (at the sparkfun website) are a little hard to understand (I think some of them were written overseas and translated to English). Anyway, Happy Thanksgiving.
  • rabaggettrabaggett Posts: 96
    edited 2014-11-27 04:34
    Bobb Fwed wrote: »
    I can give you some of the info over PM if you are interested.

    Yes, But.... don't get yourself in trouble.. Anything I (we) can make of this that is successful will go to the OBEX, MIT license and all. If we have such contact, and then I (or any of us) accidentally re-invent something your company considers their IP, it could be hard to 'splain Loosey.

    I'm kinda excited because this is the first project I've been interested in where this IP mess can't happen to me.
  • rabaggettrabaggett Posts: 96
    edited 2014-11-27 04:42
    NAVFAC10 wrote: »
    Hey Guys. Going out of town tomorrow. ... I purchased the GSM, Evaluation board, and the quad band antenna at sparkfun (under the cellular link).

    I'll buy a different one, maybe Adafruit's FONA. That way we can shoot for wider compatability. Have fun on your trip!
  • rabaggettrabaggett Posts: 96
    edited 2014-11-27 07:17
    Check out http://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf
    Gets really interesting about page 101.

    The complexity of the standard is bewildering, but if we limit ourselves to simple SMS functions, leaving data formatting to the application, this could make for a very simple object.
  • max72max72 Posts: 1,155
    edited 2014-11-27 15:46
    I made some tests with SIM900 modules.
    There is an object posted in the forum.
    I used SMS and they proved reliable and easy to send and receive.
    I used a nmea style message, with fixed width to simplify the process.
    Using internet connection was in my case difficult and unreliable.
    Nice thing is SMS work easily also in roaming.
    Massimo
  • max72max72 Posts: 1,155
    edited 2014-11-27 15:49
    Here is the original thread. I have to check if I updated it..
    http://forums.parallax.com/showthread.php/149716-SIM-900-GSM-module-interface-object-WIP
  • NAVFAC10NAVFAC10 Posts: 23
    edited 2014-11-29 11:50
    Hey guys. As promised, here is the main object that I used for my project. I did remove several methods that I'm sure you would not be interested in. I only used 4 pins on the evaluation to connect to the prop. TXD0, RXD0, GND, and P_ON. P_ON is used to turn on/off the GSM. This will completely shut down the GSM, saving power. I needed to do this because the project was in a remote location and used a battery and solar panel. However, in order to use it, you have to issue the following command "AT+AUTOPOWERON=OFF". You can get more info from the sparkfun website. The documents and comments on the website are invaluable. You will notice that I used a long delay after turning the unit on. This is to give the unit ample time to boot up and aquire a nearby tower. I would also suggest using the "AT+CSQ" command were the module will be based. This command returns a signal strength level. Once again, download applicable documents. You will notice that the code is very simple. Good luck.
  • rabaggettrabaggett Posts: 96
    edited 2014-12-01 02:00
    Thanks to max72 and NAVFAC10! This has undoubtedly saved all of us a lot of time. I can't wait to get my FONA.. (Waiting to order.. more stuff, save freight.) I see things I intend to explore from both posts! I'll try to post a quick, more generic version of what I intend to do soon (Untested, of course...) Thanks again.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2014-12-01 09:00
    rabaggett wrote: »
    Yes, But.... don't get yourself in trouble.. Anything I (we) can make of this that is successful will go to the OBEX, MIT license and all. If we have such contact, and then I (or any of us) accidentally re-invent something your company considers their IP, it could be hard to 'splain Loosey.

    I'm kinda excited because this is the first project I've been interested in where this IP mess can't happen to me.
    It's not a huge problem. Large portions of the code are "my own" code that I created on my own time that the company is using with my permission, and the company I work for isn't all that particular on things like this. We care much more about the hardware we develop than the software, and all the encryption algorithms we use would be omitted or heavily modified.
    Thanks for watching out for your fellow developer though.
  • NAVFAC10NAVFAC10 Posts: 23
    edited 2014-12-01 14:40
    One more thing... the documentation indicates that the GSM module uses, momentarily (for a few milliseconds), of about 2 amps during transmit. I used a 1000uf capacitor across the power supply line in anticipation. Seemed to work just fine. I used a 6volt gel cell rated at 4.5Ah (and a solar panel hooked to it). Also, when I was experimenting with the AT commands (using hyper-terminal), I issued the "AT+AUTOPOWERON=OFF" command. It is saved in EEPROM, thus is saved even after power is removed. Good luck.
  • ElkinElkin Posts: 58
    edited 2014-12-02 04:59
    Thanks for all of the input,

    This is definitely becoming an interesting project and it is quite obvious that this is something that more than just myself is interested in.

    After all of your comments I ended up deciding to go with a Telit Multitech MTSMC-EV3-MI-IM-N3 from semiconductor store. It is an easy install with the prop and the spin code was very kindly donated to me.The modules can operate on either serial or USB and can do anything form sending a simple text message to opening a full blown TCP/IP connection.

    Bobb Fwed and NAVFAC10, I am going to guess that these are not that different from your application (also using the verizon network), and probably have the same capabilities and features. I have ordered the modules and wench they get here (about 3-4 weeks) I would be interested in talking about this a little more with you over PM.

    If anyone would like more info about the modules that I went with, I'd be happy to share. In addition, I will talk to the person that has the code and see if that would be interested in posting it on here or on OBEX.

    Will post more when I have some updates.
  • rabaggettrabaggett Posts: 96
    edited 2014-12-03 08:07
    Bobb Fwed wrote: »
    It's not a huge problem. Large portions of the code are "my own" code that I created on my own time that the company is using with my permission, and the company I work for isn't all that particular on things like this. We care much more about the hardware we develop than the software, and all the encryption algorithms we use would be omitted or heavily modified.
    Thanks for watching out for your fellow developer though.

    Very well. I'm very interested in seeing what you've got!
    I've been writing some methods based on everything posted here, and on the tutorials from Sparkfun and Adafruit. I've been concentrating on receiving and sending text messages, and I think my code will work with all of the modules mentioned in this thread. I'll post what I've got as soon as I get it presentable. (I don't have any hardware in hand right now.)

    NAVFAC: Thanks for the heads up on the current spike!
  • rabaggettrabaggett Posts: 96
    edited 2014-12-26 13:33
    I have not done anything yet. (New job, moving, house hunting, running around waving arms going 'GAAAAAAA' don't leave much time.) I will get that code posted eventually!
Sign In or Register to comment.