Last week I attended the Arduino GSM Playground organised by Telefonica Digital.
The Arduino GSM shield was released about a month ago; manufactured by Arduino, but designed by Telefonica. All the specs are available on the Arduino webiste.
I’ll do a bit of research on GSM first, then I’ll try and highlight some features of the shield, and finally I’ll tell you all about my little hack at the playground.
1. About GSM
I recently found out that I was using a lot of acronyms without knowing what they meant. A LOT. So, let’s start with the meaning of GSM. GSM stands for Global System for Mobile Communications (originally, Groupe Spécial Mobile); thanks Wikipedia.
As I understand it, it is a network system, now recognized as an international standard for telecommunications. It was developed as a digital system to replace an existing analog cellular network. It is optimised for full duplex telephony (send/receive). Good to know : the cellular phone gets its name from the division of a geographic area into hexagonal cells; each area is covered by a station/antenna.
GSM provides useful services such as:
- encryption, for secure phone calls
- data networking
- call forwarding
- caller ID
- multi-party conferencing
GPRS (General Packet Radio Service) is a packet that carries the information from one cell to another.
For more details, I recommend these links:
2. The Arduino GSM shield
a) What is a shield?
According to the Arduino website, “shields are boards that can be plugged on top of the Arduino PCB extending its capabilities. The different shields follow the same philosophy as the original toolkit: they are easy to mount, and cheap to produce.”
In other words, a shield is an add-on for the Arduino board. Each one of them has specific functionalities. You will, for example, find a WiFi shield, an Ethernet shield, a prototyping shield, a GPS shield,… and of course the latest GSM shield.
b) A few features
The GSM shield only requires a normal SIM card, that you would put in a mobile phone. It might be wise to go with a pre-paid card, depending on the project, to avoid astronomic phone bills!
The shield enables you to send and receive calls and text messages, and connect to the Internet (pretty useful when you can’t use the Ethernet or WiFi shield because you don’t have a router nearby). In short, you could build your own mobile phone with Arduino and a GSM shield. Although, I doubt it would be much smaller than this:
3. A simple hack
Before starting, ensure you’ve got the latest version of the Arduino IDE because it includes examples for the GSM shield.
It all started with the idea for an app, Feel-good songs for friends, which basically would call your friends at random and play them the MP3 of a happy song. You don’t need an Arduino for that, just a service like Twilio, for example. However, with the GSM shield and Arduino, you can actually send 8-bit sounds over the phone. And I only had to write a few lines of code to do so! (The rest was mostly copy and paste). I am always a bit worried when I open the IDE, because I’m not fluent in Processing yet, but actually, it is quite easy to understand. So, all I did was merge two examples that were available in the IDE: toneMelody, by Tom Igoe and MakeVoiceCall, by Javier Zorzano. And Voilà! toneMelody is written to work with pin 8 of the Arduino board, so all you have to do is connect pin 8 with the microphone input of your GSM shield.
Thanks to Sam for his advice! 🙂
b) Next steps
Going further, I think I would try and change the melody, maybe make it random (or selected randomly from a library) for each call, or build an online interface where you can create a tune before sending it to your friends (it’s actually a bit more personal than just playing an MP3). I might also have a look at DTMF (Dual-tone multi-frequency signaling), like Sam suggested; I don’t know much about it yet but it might be interesting to create “richer” tones.