Projects Microcontrollers "/>

Call me! (with Adafruit FONA)

09 September 2015 at 9:08 am

Article image for Call me! (with Adafruit FONA)

About a year ago, Adafruit launched the FONA. It’s a neat little breakout board that packs all the features you’d want in a phone such as Calling, SMS, Data and Lipo battery operation and charging. Add to that a good API that is easy to extend and we have a winner.

By itself, the module can’t do much, so you’ll need a microcontroller of some sort. My preference is using a Teensy 3.1 since these are just incredibly flexible, fast & cheap. They’re also small and placement friendly. By now I’ve used the FONA for two commercial projects and I thought it’d be nice to collect my experiences in this post.

Call for pizza using the ad on a bus station

The first project had me build the FONA into an advertising board. Check this video to see it in action. The large timer was connected to a motor that pulled it slowly back to zero. At each end position of the timer, there was a manual switch that triggered the FONA in different ways. When the timer was set to 15 minutes, the Teensy set the FONA to call up the pizza delivery. If the person turning the timer wanted, they could get a free pizza within 15 minutes. When the timer was set back to Zero, the Teensy prepared the FONA for the next customer.

As can be seen in the video, it was a snowy morning and I got to do some extra troubleshooting in the bus shed since the timer motor accidentally burned out the evening before and the replacement motor made so much electrical noise that it messed up the sensing on the button pins. I solved this by moving the button pins to analog pins and using a different threshold than the normal digital I/O used.

The FONA used a normal headset-mic to pick up the sound. To play it back I used some more Adafruit components - a 3.7W amplifier and these neat transducers. Despite being only 5W, it was not a problem to hear the sound on a busy Bus-stop when attaching the transducer firmly to the board itself. While the person waited for their pizza, we also played them some cheezy elevator-music. This came from the Teensy using the Audio Adaptor board. I really dig this board. So many cool audio things you can do. Really powerful!

The installation stood there for a whole day and worked without any issues despite the moist weather.

Call anywhere in the world for free!

The second project had us set up a telephone booth that looked kind of like a 1.2 meter tall iPhone. It was to promote the mobile provider MyCall and the idea was to make a phone booth where you can call for free (3 minutes at a time). JCDecaux also made a nice video for this one that highlights that the campaign gave 30% boost in sales.

The interface to the user was a 47” touchscreen showing a multi-screen AIR app that communicated with a Teensy 3.1 via Serial. Before calling, the user was asked to input their existing phone number. After their free call was finished, we used their phone number to send them a polite SMS telling that MyCall offered great prices on calls abroad (their specialty). The project stood outside in a very public space (outside the Oslo central station) for 10 days and worked without a single error. I’m really happy with the stability of the FONA/Teensy combination!

Both projects were done for JCDecaux with MesseTjeneste making the enclosures and me doing the software + electronics.

Fona tips and tricks learned

Here’s some things that are nice to know about FONA that you won’t find on the (as always) solid tutorial pages on Adafruit.com:

A lipo battery is indeed Required
The FONA needs a battery to be able to source the required power upon connecting to the network. A 2.2A / 5V dedicated power supply was not enough, but a half-charged 150mA lipo in addition to the USB connection did the trick. The lipo battery is now added as a requirement on the FONA product page.

GSM calling produces serious EMP
Once a call was placed or the FONA connected to the network, the audio chip in the Teensy Audio board was completely messed up. It produced random and unpleasant audible noise. I solved by moving the FONA away from the Teensy, putting them in two separate boxes. I also tried shielding them from each other, but I got very varying results. Much easier to just move them away from each other.

Not all SIM cards will work
I initially picked up a dirt cheap SIM card at a kiosk and it worked right away. This was from MyCall, the company I later made the kiosk for. I then needed to make a copy of the installation, but when I tried to use a SIM card from Norway’s largest telco Telenor, it didn’t work.

The SIM worked like a charm when inserted into a phone, but on the FONA I was unable to connect to the network. The SIM unlocked successfully, but I was denied access to the network. I later learned that holding down the KEY button for 20 seconds can solve this.

Library only covers some
I needed to blink some lights while a call was in progress and play some audio when the call ended. There currently isn’t a method in the default library to check this, but all I had to do was to look up the SIM800L datasheet to find the required AT command. I then looked through the Adafruit code to see how they had implemented similar features and added this (gist). It’s all just serial AT-commands that are wrapped nicely. Super simple!

Using Teensy
Since the Teensy has several Serial ports, you may need to make some minor changes to the default FONA sketches and lib. I’ve detailed these in this gist.

Ideas aplenty

My initial thought seeing the FONA was to build a phone, but I still haven’t done that. Instead, I’ve used it for installations. Using a phone rather than wifi or bluetooth has advantages and drawbacks, but there are some pretty cool things you can do with this. As an example of something I’d love to do:

  • Imagine an interactive window display controlled via SMS?
  • Using it as a transparent network access point?
  • Click-this-big-button-to-talk-to-support/sales?
  • Circuits that allow you to check status or remote control vending machines or controls? It would be really simple to make a machine send an SMS if it fails to do it’s task, so it can alert you that it needs service.
  • It could also be perfect for simple surveilance of hunting spots or beehives in rural areas where there’s no phone coverage
  • Turning on the heat at the family cottage via SMS

It’s so many cool things you can do with this when you don’t need to think about having wifi available!

I really dig how easy it is to build connected installations with the FONA board and it looks like others also think so since Adafruit has now expanded the range to also include a board with a GPS and some convenient starter packs. I’m looking forward to play much more with FONA in the future!