Posts | Comments

Planet Arduino

Archive for the ‘sms’ Category

Feb
17

Bluetooth mobile phone accessory for Missed calls and SMS

arduino, bluetooth, mobile, sms Commenti disabilitati su Bluetooth mobile phone accessory for Missed calls and SMS 

FP7M9G1H350ECJ6.LARGE

zmashiah @ instructable shows us how he build a display to easily check for his phone status, like battery remaining charge, missed calls and unread SMS. Data is transfered to an Arduino board via bluetooth. He writes:

When at home, I do not carry my phone with me everywhere… so sometimes phone rings or an SMS comes in and I do not hear that. With the volume of music played by the teenagers at home, that is not a surprise :-) so I decided to build a small accessory that will show up the number of missed calls and unread SMS. In order to ensure it is very visible I use a 7 Segment LED display so it can be viewed from distance.

Bluetooth mobile phone accessory for Missed calls and SMS - [Link]

Feb
06

New Project: The Connected Office: Text Message-Based Remote Display

3D printing, arduino, Computers & Mobile, gsm, in out board, makerbot, sms, text message Commenti disabilitati su New Project: The Connected Office: Text Message-Based Remote Display 

bebackAt work, I often use a Post-it note stating my whereabouts on my office door for those who stop by looking for me when I am out. Some notes are one-time use like “On vacation. Back on 11/20.”, and some can be reused like “Up in the 3113 lab.” Sometimes, […]

Read more on MAKE

Nov
17

arduinoPowerFailBox

When the power went out at his parents’ shop and ruined the contents of their fridge, [Lauters Mehdi] got to work building a custom power failure alert system to prevent future disasters. Although some commercial products address this problem, [Lauters] decided that he could build his own for the same cost while integrating a specific alert feature: one that fires off an SMS to predefined contacts upon mains power failure.

The first step was to enable communication between an Arduino Micro and a Nokia cell phone. His Nokia 3310 uses FBus protocol, but [Lauters] couldn’t find an Arduino library to make the job easier. Instead, he prototyped basic communication by running an Arduino Uno as a simple serial repeater to issue commands from the computer directly to the phone, and eventually worked out how to send an SMS from the ‘duino. [Lauters] then took the phone apart and tapped into the power button to control on/off states. He also disconnected the phone’s battery and plugged it into an attached PCB. The system operates off mains power but swaps to a 1000mAH 9V backup battery during a power outage, logging the time and sending out the SMS alerts. A second message informs the contacts when power has been restored.

Head over to [Lauters's] project blog for schematics and photos, then see his GitHub for the source code. If you want to see other SMS hacking projects, check out the similar build that keeps a remote-location cabin warm, or the portable power strip activated by SMS.


Filed under: Arduino Hacks, home hacks, Microcontrollers

smsTempController

As connected as we are, reliable and affordable internet is still a luxury in the far reaches. [kohleick's] country home is not just remote; with temperatures dropping to -30C in the winter, it’s practically Arctic. His solution for controlling the thermostat from afar was to take advantage of the GSM network and implement a SMS-based heater controller. The unit typically operates in “antifreeze mode,” but sending a simple text message prior to visiting causes the heater to kick it up to a more comfortable setting for your arrival. Daily logs report the system’s status, and an alert will trigger when temperatures fall below a set limit, thus indicating potential faults with the heater.

The build uses a Freeduino paired with an external GSM modem for communication and an LCD to display current status and menus, which users access via three buttons on the side of the picture frame. [kohleick] connected two temperature sensors: one directly to the Freeduino’s shield and a second outside the house. After the temperature sensors detect deviance from the set point, or upon SMS instruction, the Freeduino will crank up the heat through a 5V relay attached to the home’s boiler. Head over to the Instructables page linked above for a bill of materials, schematics, and the code. The Siemens GSM modem in this build is nothing to worry about, but be careful if you try to reproduce this project with an Arduino GSM shield, or your house might really heat up.


Filed under: Arduino Hacks, Cellphone Hacks, home hacks, Microcontrollers
Set
18

Tutorial – Arduino and SIM900 GSM Modules

arduino, gsm, lesson, Linksprite, SHD_SIM900_N8, shield, sim900, SIMCOM, sms, tronixstuff, tutorial Commenti disabilitati su Tutorial – Arduino and SIM900 GSM Modules 

Use the SIM900 GSM modules with Arduino in Chapter 55 of our Arduino Tutorials. The first chapter is here, the complete series is detailed here.

Introduction

The goal of this tutorial is to illustrate various methods of interaction between an Arduino Uno (or compatible) and the GSM cellular network using a SIM900 GSM shield, with which you can then use your existing knowledge to build upon those methods.

We’ll be using a SIMCOM SIM900 GSM module shield. (If you’re looking for tutorials on the Spreadtrum SM5100 modules, start here). There must be scores of Arduino shields or modules using the SIM900, so as you can imagine each one may be a little bit different with regards to the hardware side of things – so we’re assuming you have an understanding of how hardware and software serial works as well as supply voltages and the hardware side of the Arduino world.

As for the specific shield to use, we just chose the cheapest one available at the time – which turned out to be the “SIM900 GPRS/GSM Arduino shield” from Linksprite:

Linksprite SIM900 GSM Arduino Shield

However with a little research and work, the sketches provided should also work with any SIM900 module/shield and Arduino – as long as you have the appropriate serial and power settings. 

Getting Started

A little preparation goes a long way, so make sure you’ve covered the following points:

  • Regarding your cellular provider. Do you have coverage on a GSM 850 MHz, GSM 900 MHz, DCS 1800 MHz or PCS 1900 MHz network?  When we say GSM that means 2G – not 3G, 4G or LTE. Will they allow the use of non-supported devices on the network? Some carriers will block IMEI numbers that were not provided by their sales channel. Or you may have to call the provider and supply the IMEI of your GSM module to allow it on the network. Finally, it would be wise to use either a prepaid or an account that offers unlimited SMS text messaging – you don’t want any large bills if things go wrong.
  • Power. Do you have adequate power for your SIM900 module? Some shields will use more current than the Arduino can supply (up to 2A), so you may need an external high-current supply. The Linksprite shield we use needs 5V up to 2A into the onboard DC socket. Otherwise, check with your supplier.
  • Antenna. If your module/shield etc. doesn’t have an antenna – get one. You do need it.
  • Turn off the PIN lock on the SIM card. The easiest way to do this is to put the SIM in a handset and use the menu function.
  • And as always, please don’t make an auto-dialler…

AT-5000 auto dialler

Furthermore, download the SIM900 hardware manual (.pdf) and the AT command manual (.pdf), as we’ll refer to those throughout the tutorial.

Power

There is a DC socket on the shield, which is for a 5V power supply:

Linksprite SIM900 GSM Arduino shield power

Although the data from Linksprite claims the shield will use no more than 450 mA, the SIMCOM hardware manual (page 22) for the module notes that it can draw up to 2A for short bursts. So get yourself a 5V 2A power supply and connect it via the DC socket, and also ensure the switch next to the socket is set to “EXT”.

Furthermore, you can turn the GSM module on and off with the power button on the side of the shield, and it defaults to off during an initial power-up. Therefore you’ll need to set D9 to HIGH for one second in your sketch to turn the module on (or off if required for power-saving). Don’t panic, we’ll show how this is done in the sketches below.

Software Serial

We will use the Arduino software serial library in this tutorial, and the Linksprite shield has hard-wired the serial from the SIM900 to a set of jumpers, and uses a default speed of 19200. Make sure you your jumpers are set to the “SWserial” side, as shown below:

Linksprite GSM SIM900 Arduino shield serial jumpers

And thus whenever an instance of SoftwareSerial is created, we use 7,8 as shown below:

SoftwareSerial SIM900(7, 8); // RX, TX

If you shield is different, you’ll need to change the TX and RX pin numbers. This also means you can’t use an Arduino Leonardo or Mega (easily).

Wow – all those rules and warnings?

The sections above may sound a little authoritarian, however we want your project to be a success. Now, let’s get started…

A quick test…

At this point we’ll check to make sure your shield and locate and connect to the cellular network. So make sure your SIM card is active with your cellular provider, the PIN lock is off, and then insert it and lock the SIM card  to the carrier on the bottom of the shield:

Linksprite Arduino GSM SIM900 shield SIM card

Then plug the shield into your Uno, attach 5V power to the DC socked on the GSM shield, and USB from the Uno to the PC. Press the “PWRKEY” button on the side of the shield for a second, then watch the following two LEDs:

Linksprite GSM Arduino SIM900 shield status LEDs

The bright “STATUS” LED will come on, and then the “NETLIGHT” LED will blink once every 800 milliseconds- until the GSM module has found the network, at which point it will blink once every three seconds. This is shown in the following video:

Nothing can happen until that magic three-second blink – so if that doesn’t appear after a minute, something is wrong. Check your shield has the appropriate power supply, the antenna is connected correctly, the SIM card is seated properly and locked in- and that your cellular account is in order. Finally, you may not have reception in that particular area, so check using a phone on the same network or move to a different location.

Making a telephone call from your Arduino

You can have your Arduino call a telephone number, wait a moment – then hang up. This is an inexpensive way of alerting you of and consider the following sketch:

// Example 55.1

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8); // configure software serial port

void setup()
{
  SIM900.begin(19200);               
  SIM900power();  
  delay(20000);  // give time to log on to network. 
}

void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(5000);
}

void callSomeone()
{
  SIM900.println("ATD + +12128675309;"); // dial US (212) 8675309
  delay(100);
  SIM900.println();
  delay(30000);            // wait for 30 seconds...
  SIM900.println("ATH");   // hang up
}

void loop()
{
  callSomeone(); // call someone
  SIM900power();   // power off GSM shield
  do {} while (1); // do nothing
}

The sketch first creates a software serial port, then in void setup() starts the software serial port, and also turns on the GSM shield with the function SIM900power (which simply sets D9 high for a second which is the equivalent of pressing the power button). Notice the delay function in void setup – this gives the GSM module a period of time to locate and log on to the cellular network. You may need to increase (or be able to decrease) the delay value depending on your particular situation. If in doubt, leave it as a long period.

The process of actually making the call is in the function callSomeone(). It sends a string of text to the GSM module which consists of an AT command. These are considered the “language” for modems and thus used for various tasks. We use the ATD command to dial (AT… D for dial) a number. The number as you can see in the sketch needs to be in world-format. So that’s a “+” then the country code, then the phone number with area code (without the preceding zero).

So if your number to call is Australia (02) 92679111 you would enter +61292679111. Etcetera. A carriage return is then sent to finalise the command and off it goes dialling the number. Here’s a quick video demonstration for the non-believers:

After thirty seconds we instruct the module to hand up with another AT command – “ATH” (AT… H for “hang up”), followed by turning off the power to the module. By separating the call feature into a function – you can now insert this into a sketch (plus the preceding setup code) to call a number when required.

Sending an SMS text message

This is a great way of getting data from your Arduino to almost any mobile phone in the world, at a very low cost. For reference, the maximum length of an SMS text message is 160 characters – however you can still say a lot with that size limit. First we’ll demonstrate sending an arbitrary SMS. Consider the following sketch:

// Example 55.2

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);

void setup()
{
  SIM900.begin(19200);
  SIM900power();  
  delay(20000);  // give time to log on to network. 
}

void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(5000);
}

void sendSMS()
{
  SIM900.print("AT+CMGF=1\r");                                                        // AT command to send SMS message
  delay(100);
  SIM900.println("AT + CMGS = \"+12128675309\"");                                     // recipient's mobile number, in international format
  delay(100);
  SIM900.println("Hello, world. This is a text message from an Arduino Uno.");        // message to send
  delay(100);
  SIM900.println((char)26);                       // End AT command with a ^Z, ASCII code 26
  delay(100); 
  SIM900.println();
  delay(5000);                                     // give module time to send SMS
  SIM900power();                                   // turn off module
}

void loop()
{
  sendSMS();
  do {} while (1);
}

The basic structure and setup functions of the sketch are the same as the previous example, however the difference here is the function sendSMS(). It used the AT command “AT+CMGF” to tell the GSM module we want to send an SMS in text form, and then “AT+CMGS” followed by the recipient’s number. Once again note the number is in international format. After sending the send SMS commands, the module needs  five seconds to do this before we can switch it off. And now for our ubiquitous demonstration video:

 

You can also send text messages that are comprised of numerical data and so on – by compiling the required text and data into a string, and then sending that. Doing so gives you a method to send such information as sensor data or other parameters by text message.

For example, you might want to send daily temperature reports or hourly water tank levels. For our example, we’ll demonstrate how to send a couple of random numbers and some text as an SMS. You can then use this as a framework for your own requirements. Consider the following sketch:

// Example 55.3

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
int x,y;
String textForSMS;

void setup()
{
  SIM900.begin(19200);
  SIM900power();  
  delay(20000);  // give time to log on to network. 
  randomSeed(analogRead(0));
}

void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(7000);
}

void sendSMS(String message)
{
  SIM900.print("AT+CMGF=1\r");                     // AT command to send SMS message
  delay(100);
  SIM900.println("AT + CMGS = \"+12128675309\"");  // recipient's mobile number, in international format
  delay(100);
  SIM900.println(message);                         // message to send
  delay(100);
  SIM900.println((char)26);                        // End AT command with a ^Z, ASCII code 26
  delay(100); 
  SIM900.println();
  delay(5000);                                     // give module time to send SMS
  SIM900power();                                   // turn off module
}

void loop()
{
  x = random(0,255);
  y = random(0,255);
  textForSMS = "Your random numbers are ";
  textForSMS.concat(x);
  textForSMS = textForSMS + " and ";
  textForSMS.concat(y);
  textForSMS = textForSMS + ". Enjoy!";  
  sendSMS(textForSMS);
  do {} while (1);
}

Take note of the changes to the function sendSMS(). It now has a parameter - message, which is a String which contains the text to send as an SMS. In void loop() the string variable textForSMS is constructed. First it contains some text, then the values for x and y are added with some more text. Finally the string is passed to be sent as an SMS. And here it is in action:

Conclusion

After working through this tutorial you should have an understanding of how the basics of the GSM shield and AT commands work. If there’ s demand we’ll continue with more features and possibilities in a future tutorial, so let us know via the contact page.  And if you enjoyed the tutorial, or want to introduce someone else to the interesting world of Arduino – check out my book (now in a third printing!) “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Tutorial – Arduino and SIM900 GSM Modules appeared first on tronixstuff.

Over the last few years I’ve been writing a few Arduino tutorials, and during this time many people have mentioned that I should write a book. And now thanks to the team from No Starch Press this recommendation has morphed into my new book – “Arduino Workshop“:

shot11

Although there are seemingly endless Arduino tutorials and articles on the Internet, Arduino Workshop offers a nicely edited and curated path for the beginner to learn from and have fun. It’s a hands-on introduction to Arduino with 65 projects – from simple LED use right through to RFID, Internet connection, working with cellular communications, and much more.

Each project is explained in detail, explaining how the hardware an Arduino code works together. The reader doesn’t need any expensive tools or workspaces, and all the parts used are available from almost any electronics retailer. Furthermore all of the projects can be finished without soldering, so it’s safe for readers of all ages.

The editing team and myself have worked hard to make the book perfect for those without any electronics or Arduino experience at all, and it makes a great gift for someone to get them started. After working through the 65 projects the reader will have gained enough knowledge and confidence to create many things – and to continue researching on their own. Or if you’ve been enjoying the results of my thousands of hours of work here at tronixstuff, you can show your appreciation by ordering a copy for yourself or as a gift :)

You can review the table of contents, index and download a sample chapter from the Arduino Workshop website.

Arduino Workshop is available from No Starch Press in printed or ebook (PDF, Mobi, and ePub) formats. Ebooks are also included with the printed orders so you can get started immediately.

04/07/2013 – (my fellow) Australians – currently the easiest way of getting a print version is from Little Bird Electronics.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.


Over the last few years I’ve been writing a few Arduino tutorials, and during this time many people have mentioned that I should write a book. And now thanks to the team from No Starch Press this recommendation has morphed into my new book – “Arduino Workshop“:

shot11

Although there are seemingly endless Arduino tutorials and articles on the Internet, Arduino Workshop offers a nicely edited and curated path for the beginner to learn from and have fun. It’s a hands-on introduction to Arduino with 65 projects – from simple LED use right through to RFID, Internet connection, working with cellular communications, and much more.

Each project is explained in detail, explaining how the hardware an Arduino code works together. The reader doesn’t need any expensive tools or workspaces, and all the parts used are available from almost any electronics retailer. Furthermore all of the projects can be finished without soldering, so it’s safe for readers of all ages.

The editing team and myself have worked hard to make the book perfect for those without any electronics or Arduino experience at all, and it makes a great gift for someone to get them started. After working through the 65 projects the reader will have gained enough knowledge and confidence to create many things – and to continue researching on their own. Or if you’ve been enjoying the results of my thousands of hours of work here at tronixstuff, you can show your appreciation by ordering a copy for yourself or as a gift :)

You can review the table of contents, index and download a sample chapter from the Arduino Workshop website.

Arduino Workshop is available from No Starch Press in printed or ebook (PDF, Mobi, and ePub) formats. Ebooks are also included with the printed orders so you can get started immediately.

LEDborder

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Book – “Arduino Workshop – A Hands-On Introduction with 65 Projects” appeared first on tronixstuff.

Gen
19

Enabling F-bus communications with Arduino

cellular, f-bus, Hacks, Hardware, nokia, projects, Protocols, reverse engineering, sms, wireless Commenti disabilitati su Enabling F-bus communications with Arduino 

It’s always nice to see how creative makers approach communication issues in DIY projects, and today we would like to highlight the approach followed by Alex, from InsideGadgets.

On his website, he provides a detailed tutorial on how to use an old Nokia 6110 (or any derivatives) to send SMS messages by exploiting the Nokia’s F-bus, a simple bi-directional and full-duplex serial protocol.

After considerable reverse engineering work, made possible by useful online documentation, Alex finally managed to send a SMS from his Arduino board, connected to the phone, thanks to AVR libraries made available by AVRFreaks.

More information can be found on InsideGadget.

[Via: Inside Gadgets]

Gen
09

New Year’s Eve countdown clock included SMS interactivity

arduino hacks, countdown timer, gsm, Holiday Hacks, sms, text message Commenti disabilitati su New Year’s Eve countdown clock included SMS interactivity 

interactive-sms-new-years-countdown

We remember several years back, when text messaging was first becoming popular, we went to a bar which had a huge television that would display text messages sent to a particular number. This sounds like a novelty, but in a large group of folks who know one another it’s the sandbox of social games. Wanting to tap in on that fun for his New Year’s Eve party, [James] built this countdown timer that includes an element of SMS interactivity.

The rig is projector based. A computer using Processing does the majority of the work but [James] needed a way to accepts text messages (the locale of the party had no Internet connection so this was the best bet). He grabbed a GSM shield and his Arduino Leonardo. The bulk of the evening the display showed the last few messages received, with a small countdown timer in the lower corner. As the countdown approached zero the time was given prominence as in the image above. We guess he was lucky to find a prepaid SIM card that allowed free incoming text messages. Our cell provider charges us 20¢ for each.

You might give this one a whirl next year. If it’s not quite your thing take a look around. We’ve seen a lot of fun setups like this mini ball drop.


Filed under: arduino hacks, Holiday Hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook