Going cellular with your Arduino projects

You can add a huge measure of extensibiltiy to a project by using a cellular connection. Anywhere the device can get service you can interact with it. In the past this has been a pretty deep slog through datasheets to get everything working, but this tutorial will show the basics of interacting with phone calls and text messages. It’s the 26th installment of what is becoming and mammoth Arduino series, and the first one in a set that works with the SM5100B cellular shield.

We love the words of warning at the top of the article which mention that a bit of bad code in your sketch could end up sending out a barrage of text messages, potentially costing you a bundle. But there’s plenty of details and if you follow along each step of the way we think you’ll come out fairly confident that you know what you’re doing. Just promise us that you won’t go out and steal SIM cards to use with your next project. Find part two of the tutorial here and keep your eyes open for future installments.

A hundred bucks for the module though. Way too pricey. Just use an old crappy mobile phone.
As long as you’ve got the AT commands for the phone, which are pretty standard/easy to get hold of, you’re golden.
True, things get a little more complicated if the phone uses PDU for sms, but it well documented and lots of examples out there.

One warning about crappy mobile phones is that some of them have such bad firmware that they’re unable to stay on for extended periods of time without crashing. I tried to make a SMS gateway using some old SE T68i phones but they would always hang or reboot after a week. Back then most phones couldn’t have the firmware user upgraded either.

@David: actually, since your home likely already has internet to send messages over, that would not be the best application of this sort of thing.
I’d rather see it in a car, doing a range of things, from remote starting it on a snowy day, to unlocking it if you lock your keys inside, or having it respond back with GPS data if it’s stolen (or being able to remotely kill the car if it’s stolen)

I own both the Sparkfun SM5100B and hwkitchen’s GSM Playground. Hands down, no contest, the GSM Playground is a better device. To sum it up, Hello World with the SF unit is entering a command to send yourself a text. Hello World with the GSM Playground is sending it a text containing “Temp?” and getting texted back with the measured temperature.
Compare: Sparkfun’s offering is essentially a breakout board for the Spreadtrum radio. Hwkitchen’s offering is a fully populated shield with things like a mic, a lipo connector, a rtc, dtmf converter, gpio addressing via the Telit radio, a far sturdier antenna connection, switchable power to the radio, a thermometer, and more.
Sparkfun offers 1 sketch, a basic serial pass-through. Hwkitchen offers over 1500 lines of code in a library, and 5 sketches detailing usage possibilities.

I bought the SM5100B first, and soon after found the GSM Playground. I was pretty successful with rewriting the library to work with the SM5100B, AT commands are mostly created equal. What I couldn’t resist was the additional hardware, neatly packaged on the shield. Now that I’ve used it for about a week, I can say it was worth buying a second GSM shield.

A note about SIM cards. T-Mobile and AT&T offer prepaid, but only AT&T will let you use GPRS without buying a package. T-Mobile requires that you buy a $2 24hr “unlimited” data pass. AT&T charges $0.01/Kb.
A note about AT&T: If you plan on buying a $20 to-go phone from Walmart for its SIM, do not activate your service with the to-go phone. If you do, the SIM will be locked to that device for 6 months. In fact, skip the to-go phone idea altogether, AT&T locations should be able to sell you a SIM for $25, which includes $15 in airtime.

I’m finalizing some functions for the GSM Playground library that should make service activation on AT&T easy, if anyone is interested I’ll update here when I’m done.

If you’re still following this thread, I would love to see what you’ve done with porting the GSM playground library for the SM5100b. I am in the middle of a project where this could be very helpful. Have you posted that code anywhere? Thanks!

I actually haven’t gotten far enough into it to find out what my problems are yet :) I plan to do what you suggest and harvesting the relevant code from their library. I just figured I could pick up where you left off if you had already done it. Thanks.

@Bill D. Nothing is stopping you from using a pre-paid SIM with the GSM Shield.
To answer your question, the $20 Nokia 2320 to-go phone at Walmart has a F-bus interface, below the SIM slot. If properly connected, you should be able to issue AT commands. The shield will always do a better job though, as you’d design the system to perform only the tasks you want.

@piercedgeek Skymall is reputable. The SIM card looks legitimate, but why would you want it? The page says you can only receive calls and texts for free, outbound communication isn’t free, and the price per unit of GPRS isn’t listed. If you plan on making international calls, $0.15/minute is probably a good deal, but that’s about it.

FCC regulations/registration requirements (and/or other applicable laws/regulations) not withstanding, it’d be an interesting experiment to use this to in conjunction with OpenBTS.
It’d at least give you some way to limit
the access (cell phone rf taps not withstanding)
to the “phone based” controls.

WTF, people have been doing this with regular MCU’s and cellphones forever. Why does this site keep posting old knowledge as if it’s hot off of the press?

You DON’T need an “arduino” to do any of this. Seriously, just learn to use an MCU and build your own stuff. There is no skill in plugging an “arduino” into some pre-built cellular module and following step by step directions to make it work.

It is amazing how many kids I have encountered in the EE program at my school that don’t have the first clue how to use a microcontroller on its own, yet show their step-by-step assembled and programmed “arduino project” as if they know even the first thing about how it really workds.

“There is no skill in plugging an “arduino” into some pre-built cellular module and following step by step directions to make it work.”

Isnt it great that everyone can learn electronics like Jake and never have a middle step. The joy of just going, I like electronics, and then knowing how to handle micro-controllers automatically is great!

@Jake Cry moar.
Far more offensive than an article about hardware designed to be easily accessible to anyone are the comments from the snot-nosed, holier than thou types like you. Is a functional Arduino based device inherently worth less than an identically functioning device based on traditional hardware approaches? No. Only an elitist would think that.

If you’re really in an EE program, and you haven’t realized the importance of projects like Arduino, you’ve learned nothing. Which makes sense, given your proclivity to intentionally upset yourself.

You’d hear about Arduino a heck of a lot less if you’d stop reading articles about it.

Try this: Get yourself a cellphone, pull it apart, and find the little vibrator/motor. cut off the motor, and replace those pins with wires. OMG you have a remote device that could trigger a bomb now…. 20 year old technology!

@Mike
For projects I mentioned in my post, remotely unlocking your car, starting it, killing it, would all be receive only for the device, and if it’s stolen, I’m sure you’d be MORE then happy to pay whatever the outbound SMS price is for the device to reply back with GPS loc. And all for $3/month? Please tell me if you find a better plan :)

Everyone is bashing each other for costs, level of skills and such. Fact is… You need something to plug your arduino to the phone network ? You have a hundred bucks and like investing in your hobbies ? Buy it. Your a real hardware specialist ? You only build stuff out of The oldest and cheapest

Pieces you can find ? Just dont buy it. While this guy learn new things, you simply demonstrate that you dont know that much. And for most of the projects in the comments, a Google voice account with anything hooked up to The internet and your all set

@piercedgeek I’d ask skymall what the charges are, as the cheapest yearly prepaid on Att and Tmo is $100 just to keep the number active for a year. And if it’s being used in the US, Att and Tmo are the only real gsm providers.
If you’re only going to be sending it a couple texts a day, and aren’t interested in receiving confirmation from the device, the plan you found would probably be cheapest.

@geez2, The ideas in the comments are not the only use cases for a gsm radio. GV+(anything)+Internet does what, exactly? How are you going to use that to remotely start your car?

This “us vs them” crap is old. A device build with arduino is not inherently worth less than identically functioning device built without. If you think otherwise, you’ve probably wasted your time complaining to strangers on the internet about it. How smart is that?

I’m sorry, pal, but you are dead wrong. There are 3 seniors in the program working on a design project right now. They were in the lab yesterday, talking about how it needed ethernet, stepper motor control, etc.

Two of them had “arduinos” sitting on the desk, they were talking about how awesome it was, and how all they needed was to spend 50 bucks on an “ethernet shield” and another 50 or so for the right “arduino”, download someone’s code for controlling it all, piece it together, and have their final project.

I looked over and said “Oh, you guys working with atmel processors?”

Their response: “Huh?”

We proceeded to talk about the “arduino”. They didn’t even understand that the microcontroller on board had nothing to do with “arduino”. Furthermore, their senior project is going to consist of a bunch of pre-assembled boards, plugged in to each other, running from code that they copied off of the internet and pieced together.

If you want to learn how to program a microcontroller, and want to do it on an “arduino”, good for you. Just don’t call yourself an electrical engineer. If you want to use it in a project, good for you, just understand that you didn’t build it. You just plugged it in.

If you want to be a REAL hobbyist or engineer, build your own damn board. THIS requires skill, and you will learn so much doing it!

So, I say once again, “arduino” stifles skill building, and I scoff at the word “arduino”. I work part time with an engineering firm. Any potential intern that we interview who mentiones “arduino” is going to be questioned extensively on what an “arduino” is and how it works. 1000 bucks says he doesn’t really know, and won’t get hired as a result.

Jake, I know almost nothing about electronics. I do have an arduino. If not for the arduino I would have never made the leap. I am now struggling but between some google and kind guidance. So yes, they can be a shortcut for some. However they bring some new folks to the hobby that would have never got started.

Jake, I’m sorry you’ve confused the comments section of HaD with the Dean of your program. I do not, nor does anyone on this site, give a crap about your feelings towards your classmates.
The article is about someone writing about their experience with an arduino and gsm radio shield. The author, afaik, is not purporting to be an EE student; Your rant has absolutely nothing to do with the topic.
What have I gotten wrong? That your comments are more offensive than the article? Nope, that’s true. That a device built with an arduino is not inherently worth less than an identical device built without? Nope, that too is true. That only an elitist would think otherwise? Maybe elitist isn’t the right word. That you’ve learned nothing in your EE program because you don’t understand the importance of arduino? That’s arguable, as you’ve probably learned enough to fancy yourself as better than those who use arduino. Which makes elitist the right word. You’ve got a proclivity to upset yourself, you proved it by reading and commenting on an article you knew you wouldn’t like. And there’s no arguing that if you avoid articles that have a picture of an arduino you’d hear about it less.

That said, there are certainly times when the use of an arduino isn’t warranted. If you’re in EE, using an arduino in your final project is probably taking the easy way out. If you want to be an electrical engineer an arduino isn’t going to cut it. That should be self evident.
But here’s the thing: You’ve got your emotions for your classmates, and the Internet, mixed up. The vast majority of arduino users are not in EE, and most of them do not care about what happens after they click compile, so long as the actions they’ve written occur. And that is 100% OK! Arduino lets people easily interface with hardware that was previously unreachable.
That’s why it is important. Anyone, not just people who’ve done extensive studying, can work with hardware. That’s huge. It exposes many people to things they would otherwise never know. Like coding, debugging, and soldering.
They aren’t fake hobbyists, what they’re doing isn’t not learning, they simply have no interest in learning two tons of crap before getting started. It’s a good thing, accept it, move on.

Really? Then why does this site continue to post “arduino” related topics and refer to the builder as some sort of electrical engineer? Don’t ask me to quote this, I’m not going to dig through the archives, but it happens pretty regularly.

YES, the “arduino” and any other third party MCU board with loads of open source code is intended for a hobbyist that does not want/need to understand how it really works. THAT is why it is BAD in an EE program – and THAT is why they are looked down upon by the REAL engineers in my program.

You sound bitter. I assure you that I don’t have emotions for my classmates, I simply have a distaste for laziness. Deal with it ;)