I connected everything – that is: battery, SIM card, push button, LED and transistor and level shifting for 2.8V <-> 5V logic. And considering how much trouble people seem to have had I was surprised how quickly it worked!
The only two things I ran into was:
- The first SIM card I used didn't want to talk to the GE865. Probably because it is for a 3G modem and not a phone. Anyway, the second (normal) SIM card worked perfectly.
- Using the Arduino IDE's serial monitor as terminal interface didn't really work. But using "screen /dev/tty.usbserial-A9007ND2 9600" from the Terminal prompt worked flawlessly.
I had zero problems with the power supply. Even though I'm not using the recommended low ESR capacitor. Maybe because I'm in a densly cell-phone-covered area. Or maybe because the battery is capable of delivering up to 2A by itself.
And everything worked: sending and receiving SMS'es, retrieving a web page using GPRS. Nice! Now I just need to connect it to a DTMF decoder and a Speakjet :-)
Here's a picture of the breadboard setup:
– at least to begin with.
- Power supply
The power supply is ciritial. Firstly, the module requires 3.8V (will accept 3.4V - 4.2V). Secondly, the power supply has to be able to supply 2 Amps in peaks. This is way more than most simple power supplies can handle. This seems to be the single most common source of problems people have when the module does not work properly.
I will power the module from a single 3.7V LiPo battery. The hardware guide recommends a battery capacity of 500-1000 mAh in order to handle an output of 2A. Therefore [this] battery looks ideal.
In order to handle the current spikes a capacitor must be fitted. It is crucial that the capacitor is a "low ESR" type. The hardware guide recommends a 100 µF 10V tantalum capacitor.
- Logic levels
The module uses 2.8V CMOS logic levels. That means that logical high is nominally 2.8V (specified as between ~2.2V and 3.0V). This is different from the ATmega168 levels where output high is close to Vcc (required input high when supplied at 3.7V is ok at approx. 2.0V).
TextMate Bundle to build and upload Arduino sketches
Far be it from me in any way, shape or form to criticize the Arduino IDE which is simple, easy to use and works flawlessly (at least I have never had any problems). However, there are times when I find it preferable to write the Arduino sketches in TextMate (which is the text editor for Mac, in case you didn't know) since it has better... well, text editing functions. Until yesterday I frequently wrote/edited the sketches in TextMate and then copied the text over to the Arduino IDE in order to upload the sketch.
There are several guides on compiling and uploading from the command line and also several TextMate bundles for doing this but I couldn't get any of them to work on my setup (Mac OS X 10.6.1, Arduino Duemilanove and Arduino 0017) so I had to hack one together myself using bits and pieces from the other available bundles and documentation from various forums.
Here it is: TextMate bundle for Arduino 0017
This bundle assumes that the Arduino IDE version 0017 is installed in /Applications and it named "Arduino". If this is not the case you need to change a path in the makefile (refer to the section about messing with the Makefile).
How to use it
- Extract the zip and double-click the .tmbundle file to install it in TextMate (which, of course, you will need to have installed beforehand).
- Create a new document in TextMate, write some Arduino code (or copy/paste in the sample Blink code) and save the file with a .pde extension
- Hit Cmd-R to compile and upload the sketch
You can also hit Cmd-B just to compile without uploading (to check your syntax).
Note that a folder named "applet" will be created in the same location as the .pde file during compilation. (You can delete it if you want or leave it in place.)
MCU and F_CPU settings
The Makefile needs to know what AVR processor and which clock speed to compile to. The defaults are ATmega328 and 16 MHz (i.e. a standard Arduino Duemilanove).
These values can be overridden by setting other values in TextMate's preferences. In the TextMate preferences, choose the "Advanced" tab and click "Shell Variables". Add the following variables to override the default values:
For example, the following settings will compile for an ATmega168 running at 8 MHz:
If one or both of the above variables are deleted or disabled, the default values will be used.
Messing with the Makefile
If you need to change something in the Makefile (e.g. the path to the Arduino tools) go right ahead and do it.
The Makefile is located in the bundle. The bundle is located in ~/Library/Application Support/TextMate/Bundles. Option-click and choose "Show Package Contents" and then open the "Support" folder and edit the Makefile to your heart's content.