Creating an auto-answer, wireless intercom using Arduino and a SIM900 GSM shield

<![CDATA[I was recently commissioned to build a custom intercom system for a friend's interactive installation. The plan was for it to use professional mics to relay voice signals over a long distance – potentially anything from a few meters to a few miles.

The long-range requirement made radio mics a poor choice. Long range two-way radios ("walkie talkies") might have been an option, but again there are potential issues around range, audio interference from other systems, the requirement for either vox activation or "push to talk" and the complexity of trying to interface them with pro-quality mics and speakers.

Call me maybeThe solution I came up with uses an Arduino (currently a Duemilanove I had salvaged from my original tweeting door bell project) and a GSM shield to provide two-way comms over unlimited distances via regular mobile phone networks.

The system is really simple to use: plug any mic into the standard 3.5mm socket, optionally plug any speaker or amp into the line out socket, power it (via USB or 9V DC) and give the box a call from your mobile phone. The box automatically answers immediately – zero rings – and relays the mic audio and, optionally, the line-out audio between the two locations.

It works brilliantly. Within a few seconds of powering the unit it automatically connects to the phone network and is ready to receive calls. Call clarity is excellent, especially when using a decent quality mic that is appropriate for the target environment – e.g. omni or directional, passive or powered, etc.

And because the calls are always inbound to the device there’s no issue with bills or call credit on the device. I currently have it powered with a 50p ($1) ASDA prepaid SIM card. This card uses the EE network in the UK, which in turn roams both the Orange and T-Mobile networks, giving probably the best coverage and reliability in the UK… for a total spend of 50p.

Although the system is currently configured very simply (call it and it’ll answer), at it’s core this is a really flexible system. All the information normally available over GSM – like date, time and caller ID – can be used in software, so it would be possible to modify the system to only answer calls from certain numbers or at certain times of day.

Perhaps more interestingly, the software could use any Arduino-compatible input, for example automatically dialling or texting out when light, sound, temperature or anything else is detected. Infinite possibilities!

Here’s the bare-bones Arduino code in version 1.0 of the project:

#include <SoftwareSerial.h>
SoftwareSerial SIM900(2, 3);
char incoming_char=0;

void setup()
  delay(2000); // time to start up
  delay(10000); // give time to log on to network.

void SIM900power()
  digitalWrite(8, HIGH);
  delay(3000); // Hold the power button for 3 secs
  digitalWrite(8, LOW);

void loop()
  if(SIM900.available() >0)
  {; //Get the character from the cellular serial port.
    // In this simple case don't bother checking what data is incoming
    // just assume it might be a call and try to answer it - no harm in trying!
    // In a more advanced project this would be the place to check Caller ID, etc

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.