DIY Cellphone

Published on February 2017 | Categories: Documents | Downloads: 58 | Comments: 0 | Views: 278
of 20
Download PDF   Embed   Report

Comments

Content

 

DIY Cellphone The DIY Cellphone is a working (albeit basic) cellphone that you can make yourself. It can make and receive phone calls and text messages, store names and phone numbers, and display the time. It builds on the hardware Shield  but extends it with a full interface, including display, buttons, speaker, and software in the  the Arduino GSM Shield hardware,, software) software), which also microphone, etc. The source files for the cellphone are hosted on GitHub ( hardware includes an issue list where you can file bug reports or request enhancements. VARIATIONS

There are two main variants of the DIY cellphone: one that tha t uses a black and white LCD like those found on old Nokia phones and one that uses an eight-character eight -character matrix of red LEDs. The LCD shows more information (six lines of fourteen characters) but breaks over time. The variant with the LED matrix is harder to use but the display is more robust. MAKING THE PHONE

Making the DIY cellphone can be a fairly involved process p rocess but it doesn't necessarily require specific electronics expertise. You'll need to order the circuit board and electronics components (about $200 total) and have access to some other electronics tools. There's a good amount of fine hand soldering to be done: about 60 components, mostly surface-mount, which can take from one to five or ten hours, depending on your experience. Programming and, especially, debugging the phone can take a while  – again, depending on your experience and how much goes wrong. Making the case requires some plywood and veneer, along with access to a laser cutter (or you can find your own way to enclosure the circuit board). In short, this is a difficult but potentially do-able do -able project. ORDERING THE CIRCUIT BOARD

You can order a version of the circuit board from  from  OSH Park Park.. It costs about $60 and you get three copies of the board.   Order Order  LCD variant  variant from OSH Park.



 

Order LED matrix variant  Order  variant from OSH Park. Park,, Advanced Alternatively, you can upload the Gerber files to a fabrication service yourself, either either  OSH Park



Circuits,, AP Circuits, Circuits Circuits, or a number of others. Each time I order boards, I save the Gerber files in my GitHub repository, in a directory named according to the date. Find the latest here:  here: LCD variant variant,, LED matrix variant. variant.  There are a few different files in the directory:

 



.cmp: top (component) side copper layer (i.e. the lines of copper forming the actual electronic connections on



the top side of the board) .sol: bottom (solder) side copper layer (same, for the bottom of the board)



.stc: top (component-side) solder mask (stop) layer (i.e. the green layer covering the copper)

       





     



 

.sts: bottom (solder-side) solder mask (stop) layer .plc: top (component-side) silk screen (legend) layer, plus overall board dimensions (i.e. the white text on the top of the board, plus a line indicating the t he overall board shape for which there isn't a separate file) .pls: bottom (solder-side) silk screen (legend) layer (white text on the bottom of the board) .drd: (excellon) drill file (specifies where holes should be drilled in the board and how big they should be) .dri: drill tool file, often not needed (text description of the drill sizes used)

You'll need to upload these (typically in a single zip file) and sometimes specify which file is what. This is a twolayer board, 5.15" x 2.3", and the standard options for board thickness (0.62"), copper weight (1 oz), and solder mask should be fine. You'll want to get solder mask and silk-screen on both sides. Getting the corners rounded might count as a complex shape and cost extra; e xtra; I think it's worth it but it's not necessary. GETTING THE PARTS

There's no kit available for the cellphone but you can order the parts from various websites.

 

Electronic Components

SparkFun  and andDigi-Key Digi-Key.. You'll also need to get the the  M10 Most of the electronic components are available from  from SparkFun GSM Module  Module from the Arduino store. BOM.pdf  (LCD variant), variant),  BOM.pdf BOM.pdf  (LED matrix variant) Bill of Materials:  Materials: BOM.pdf Tools

WES51)) with a good tip, To assemble the phone, you'll a need a good soldering setup: a soldering iron (e.g. the  WES51 fine-pitch solder, desolder wick, tweezers, etc. To program the microcontroller, you'll need an AVR in-system programmer (like the  the AVRISP mkII) mkII) and a3.3V FTDI Cable Cable  (or equivalent breakout board). To charge the battery, you'll need a mini-USB cable. To make the laser-cut case, you'll need access to a laser cutter and a small philips screwdriver. SIM Card

The phone should work with a full-size SIM card from any GSM provider. I've been using T-Mobile in the United States but the phone has also been tested with AT&T and in India, China, and Europe. Other Materials

For the laser cut enclosure, you'll need:

 



A sheet of 1/4" / 6 mm plywood, pl ywood, like this  this craft plywood from Midwest Products Products  available at many art supply stores. (Avoid the micro-lite aircraft plywood from Midwest Products or other plywood with dark adhesive layers as they tend to burn in the laser-cutter.)

 



   



A sheet of wood veneer, preferably with adhesive backing. Six M0, 5/8", pan-head machine screws (e.g. this  this  100 pack from McMaster-Carr) McMaster-Carr ) 

McMaster-Carr))  Six M0 nuts (e.g. this  this  50 pack from McMaster-Carr Or, try making a difference enclosure (e.g. with 3D-printing or by milling m illing a mold).



Images of the assembled circuit boards (LCD variant). Click to enlarge.  

Images of the assembled circuit boards (LED matrix variant). Click to enlarge.   SOLDERING THE ELECTRONICS

 

While the cellphone uses many small, surface-mount surface -mount components, it's possible to solder it together by hand with a good soldering iron and some practice. Most of the components are straightforward to solder (apart from their small size), with a few exceptions:

 

Capacitors: Be careful of the polarity on the large (1000 uF) capacitors, they may explode if you solder them

 

backwards. Use the orange stripe to orient them correctly. Polarity : Other components with polarity include the super-capacitor, the LEDs (note the two small green dots





on one side), the ATmega1284P microcontroller (note the circle in one corner), the M10 GSM module (which has an arrow in one corner), the SIM card socket, the microphone, and the diode di ode (note the faint grey line on one side). These components have no polarity (can be soldered either way around): the crystal (8 MHz), speaker, reset button, small capacitors, and resistors. Other components only physically align in one orientation (but make sure the transistors aren't upside down and that the buttons aren't rotated 90 degrees).    Antenna: When soldering the antenna, start with the pad that faces the GSM module. That's the one that



carries the electrical signal; the others are simply there for structural support (to hold the antenna down). You may even be able to heat the solder on that pad from the top of the antenna, the heat can be conducted

 



through the two vias (small holes) in it. Solder Jumpers: There are two solder jumpers on the bottom of the board, labelled "Cell" and "uC". Solder the center pad of each to the pad labelled "uC". (This connects the RX and TX lines from the FTDI header to the ATmega1284P on the board so that they communicate over serial. If you instead solder the center pad to the

 



"Cell" pad, the FTDI cable connects directly to the GSM module so that you can communicate with it from the computer.) Speaker : The speaker is awkward to solder because it has no legs. l egs. First, apply solder to the pads on the PCB. Then rest the speaker on top of the PCB (aligning its pads with those on the board) and solder it from the bottom. You can feed in solder or melt the pre-applied p re-applied solder from below. If it doesn't work, don't remove the speaker  (you  (you might rip its pads off). Instead, try to re-melt the solder on its pads by inserting i nserting the iron into

 

the holes from below. USB Connector : Only the two outer (of the five small) legs l egs of the USB connector are used, so you don't have

 

to solder the three central legs. (Do solder the four corners, though, they provide structural support). ISP Header : Because you only need to burn the bootloader once, I typically don't solder pins into the ISP





(2x3) header. Instead, you can insert pins into the connector on your ISP and hold them against the pins (from the top of the board) while you burn the bootloader. If you have trouble, you can solder pins to the holes but

 



you'll have to adjust the case to make room for it. LCD (LCD variant only): You only need to solder the eight pins at the top of the screen, not the eight pins on the bottom. To solder them, insert male header pins from f rom the bottom (so that their plastic portion is under the board). First solder them to the PCB, then put the display on top (verifying its orientation). Then solder the pins to the display.

COMPILING THE SOFTWARE

The cellphone's software is an Arduino program that makes use of various libraries and a third-party hardware definition. You can compile and upload it with the Arduino software s oftware but some initial setup is required: page..  1.  Download and install Arduino 1.0.4 (tested) or 1.0.5 from the theArduino software page for  Windows Windows  or  or Mac Mac..  2.  Install the  the Git version control software. software . See, for example, the instructions from GitHub for 3.  Checkout the cellphone's source code  code  from GitHub, GitHub, e.g. "git clone https://github.com/damellis/cellphone2.git". Then "cd cellphone2" to change into the source code's directory. 4.  Checkout the other repositories used by the cellphone's software with "git submodule init" and "git submodule update". 5.  For the LED matrix variant, checkout the LED matrix branch with "git checkout led-matrix". (The code for the LCD variant is stored in the default master branch.) 6.  Run Arduino and, in the preferences dialog, set your sketchbook folder to the cellphone2 directory (that you checked out from github).

 

7.  Also in the preferences dialog, enable verbose information on compile and upload. (This will help you debug if anything goes wrong.) 8.  Restart the Arduino software. 9.  Select "DIY Cellphone" from the Tools > Board menu. 10.  Select AVRISP mkII (or whichever programmer you're using) from the Tools > Programmer menu. 11.  Plug the LiPo battery into the cellphone. 12.  Initiate "Burn Bootloader" from the Tools menu (while holding the pins in the ISP header against the corresponding holes in the PCB). This may take a few minutes. 13.  Connect the 3.3V FTDI cable to the FTDI header (the black wire goes on the side labelled "B", the green on the side labelled "G"). 14.  Open the Cellphone sketch from the sketchbook. 15.  From the Tools > Serial Port menu, select the item corresponding to the FTDI cable. 16.  Upload the Cellphone sketch. 17.  The screen should turn on and show the word "connecting". 18.  Insert a SIM card into the socket. 19.  It may take a while for the cellphone to connect to the network. If it doesn't connect after a few minutes, try resetting the board (by pressing the small reset button). You can see debugging information in the Arduino serial monitor at 9600 baud. 20.  Once the phone connects to the network, you'll see the words "connected" and "caching" on the screen. After a few seconds, the screen will go blank. That's a sign s ign that the phone has successfully started up and is i s now on the lock screen. See "using the phone" below for more information. 5/23/13

15:54    15:54

unlock    unlock

The unlocking screen (backlight will be off) 5/23/13

lock    lock

15:54  15:54 

menu  menu 

The home screen 617  617  

back  back  

call  call 

The dialing screen USING THE PHONE

Unlocking the Phone

Once the phone successfully starts up, it will be locked and the screen will be blank. To unlock unloc k the phone, press any button; the date and time will appear on the screen for a few seconds (this is the "unlocking" screen). On the LED matrix variant, the date and time will scroll back and forth across the screen. If, during this time, you press the "unlock" key (the top-left button), the phone ph one will unlock and, if using the LCD variant, the screen's backlight will turn on. On the LCD variant, the date and time will remain on-screen, and the soft-keys labels will read "lock" and "menu". On the LED matrix variant, the time will remain on the display, without scrolling. This is the home screen.

 

Locking the Phone

From the home screen, you can lock the phone by pressing the left soft-key button (the upper-left button). The screen and backlight will turn off but the phone will still be on and able to receive phone calls or text messages.  Adjusting the Contrast/Brightness

When the phone is in the "unlocking" screen, you can adjust the contrast (for the LCD variant) or brightness (for the LED matrix variant) by using the up and down buttons (the two central buttons of the group of four buttons  just below the screen). Dialing a Phone Number

You can dial a number from the home screen. Simply press the button corresponding to the first digit of the number. You'll be taken to the dialing screen where you can enter the rest of the number. Press * to delete the last digit entered or "back" (the left soft-key) s oft-key) to go back to the home screen. By pressing # one or more times in succession, you can enter #, *, or +. To call the number, press the right soft-key ("call"). Using the Phone Book (Contact List)

From the home screen, press the down arrow (the lower of the group of four butt ons just below the display) to enter the phone book. Use the down and up arrows to navigate to the desired entry. Press the right soft-key ("okay") to enter a menu from which you can call cal l that contact, send a text message to that contact, add a new entry to the address book, or edit or delete the contact.  Adding a Contact

To add a contact, first enter the contact list by pressing the down arrow from the home screen. Then press the right button to enter the contact menu ("call", "text", "add entry", etc); scroll (using the down and up buttons) down to the "add entry" menu item and press the right button. Now you can enter the name of the contact using the keypad (2 is "abc", 3 is "def", etc.; 1 is space, * is backspace, and # is shift). Once you've entered the contact's name, press the down arrow to move to the field for entering the contact's phone number. (You can press the up arrow to return to the field for entering the contact's name.) Enter the contact's number using the keypad (* is again backspace, but # now cycles between #, *, and +). When you've entered both the name and phone number, press the right button to save the contact (or the left button to cancel). Calling a Contact

To call a contact in your contact list, scroll to that contact, press the right button to bring up the contact menu ("call", "text, etc.) and then press the right button again to call. Texting a Contact

To text a contact, scroll to their entry in your contact list and press the right button to bring up the contact menu. Scroll down to "text" and press the right button. Now you can enter your message using the keypad. (As for entering a contact's name, 2 is "abc", 3 is "def", etc.; 1 is space, * is backspace, and # is shift.) Press the right button to send the text (or the left button to cancel). TROUBLESHOOTING

There are a lot of pieces and, therefore, a lot of things that might not work. Here are some potential problems and some possible solutions. Can't burn the bootloader onto the microcontroller.

   



Does the microcontroller have power? (Is the battery is plugged in and a nd charged?)



Are the legs of the microcontroller soldered correctly (i.e. is each leg actually soldered to the corresponding pad and are the legs free of shorts / solder s older bridges)? In particular, check the legs connected to the ISP header, to VCC, and to ground.

 

 

Are the pins in the header of the ISP being held firmly against the corresponding holes on the board? You

 

might try soldering pins into the ISP header (on top of the board). Is the crystal soldered correctly? (If not, the first step of burning the bootloader might succeed but the second





one might fail.) Can't compile the cellphone program.

   





Are you using Arduino 1.0.4 or 1.0.5? Did you checkout the submodules of the cellphone2 repository? (They contain the required libraries and board definition.)

 

Is the Arduino sketchbook folder set to the cellphone2 folder? fol der? (Otherwise, the Arduino software won't be able to find the libraries and the board definition.)

 

Is "DIY Cellphone" selected from the Tools > Board menu?





Can't upload the cellphone program.

   



Is the FTDI cable connected correctly (black wire to side labelled "B"; green wire to "G")?



Did you select the right serial port from the Tools > Serial Port menu? (Try unplugging the FTDI cable and see which item disappears from the menu; that's the one corresponding to the cable.)

     

Are the solder jumpers soldered correctly (central pad connected to the "uC" pad)? Is the board powered?

   

Is the crystal still soldered correctly? Did the bootloader burn successfully? (If not, see that issue above.)

 



 

Is the FTDI header soldered correctly? The 0.1 uF capacitors near it? The RX and TX legs of the microcontroller?

Can't connect to the network.

  Is there a SIM card in the socket?   Is the SIM socket soldered correctly? The 22 ohm resistors? The corresponding pads on the GSM module?   Is the antenna soldered correctly? The corresponding pad on the GSM module?   Is the 0 ohm resistor soldered correctly (to the trace connecting the M10 GSM module to the antenna)?   Do you have reception?   Is the SIM card locked to another phone?    AT&T (and possibly other carriers): have you activated your SIM card and phone on AT&T's website? You'll



 

 

 

need the IMEI number printed on the M10 GSM module.  Another component doesn't work (e.g. display, speaker, microphone, microphone, buzzer).

   





Is the component soldered correctly? Are the connected components (e.g. the corresponding legs of the microcontroller or GSM module) soldered correctly?

SERIAL DEBUGGING

You can further debug the phone by communicating with the GSM module via serial communication with the computer, using the microcontroller as a proxy. To do so, upload the SerialProxy sketch to the phone (using a 3.3V FTDI cable or breakout board). Then open the serial monitor and set the baud rate to 9600 and the line ending to "carriage return". After a few seconds, you should see: READY AT OK

That means the GSM is ready to receive AT commands (text strings that mostly start with the letters "AT"). The module  but here are a few basic ones: commands are detailed in the  the  datasheet for the GSM module  AT

Test/synchronization command. If you enter "AT" in the serial monitor (with a "carriage return" line ending), you should get a response of "OK".  AT+CREG?

 

Check the status of the network registration (connection). The response will be in the form "+CREG 0,N", with N being: 0 (not registered to a network), 1 (registered to a network), 2 (searching for networks), 3 (network registration denied), or 5 (registered, roaming).  AT+CPBS?

Display currently-selected phone book. Sample response: "+CPBS: "SM",50,250", with the "SM" indicating the SIM card is the current phone book (some other options include "MC" for the missed call list, "RC" for the received call list, and "ME" for the GSM module phone-book) and that 50 of its 250 entries are in use. This command can be useful for verifying that the GSM module is able to communicate with the SIM card.  AT+CPBS="SM"

Select the SIM card's phone book. You can also replace the "SM" with the abbreviations for the other phone books listed previously.  AT+CPBR=1

Read the first entry from the currently-selected phone book. Replace the 1 with the number of the entry you wish to read (up to the total phone book size reported by AT+CPBS?). MAKING THE ENCLOSURE

You can make a simple but functional enclosure from laser-cut plywood and veneer, along with some small screws (see materials above): 1.  Before cutting the case, check that the case files match the circuit board. In particular, I've made a lot of tweaks to the size and location of the screw holes, so check that they're in the same place on the PCB and the case. (Note that the holes in the bottom veneer file should be bigger than the others, this is to accommodate the nut, recessing it slightly.) 2.  If you soldered pins onto the ISP header, you'll need to cutout a space for them in the top piece of plywood. Edit DIY-Cellphone-Top accordingly. 3.  Laser-cut the plywood (1/4" / 6mm) using the DIY-Cellphone-Top and DIY-Cellphone-Bottom files in the  the  Case/ folder  of the damellis/cellphone2hw repository on GitHub. The SVG files were created in Inkscape, then folder exported to hpgl for importing to CorelDraw. 4.  Laser-cut the veneer using the DIY-Cellphone-Top-Veneer and DIY-Cellphone-Bottom-Veneer files. Cut the veneer with the wood front facing up (adhesive back face down). 5.  Remove the adhesive backing from the top veneer piece and stick it to the outer face of the top plywood piece. Repeat with the back, again attaching the veneer to the outer face of the plywood. 6.  There's a bit of empty space between the top of each button and the veneer. You might need to stick small spacers to the back of the top piece of veneer, one for each button (in the middle of each rectangular flexure cutout in the veneer). That way, you don't have to depress the veneer v eneer as much to press the button. 7.  Slip the top and bottom pieces of the case c ase over the circuit board. You'll have to fit the b battery's attery's wire in between the GSM module and the battery connector, folding it in half. The plywood pieces should rest flat against the circuit board. 8.  Insert the six screws and thread them onto the nuts. DESIGN FILES

The design files and source code for the cellphone can be found on GitHub: David A. Mellis

 

 

photos  are on Flickr.  Click an image see a larger version;  version;  more photos VARIATIONS

 Above Left: cardboard enclosure by Jeff Warren. Above Above Right: purpleheart enclosure by Dena Molnar. Below Left: milled enclosure by Yoav Sterman. Below Right: 3D-printed enclosure by Ben Peters.   PRESS

phone  by Tom Cheshire (Nov. 12, 2012) Wired UK:  UK: How to make your own mobile phone New Scientist:  Scientist: Making your own phone is easier than you might think, think , Lisa Grossman (Mar. 21, 2013) ABC News:  News: Make Your Own Cellphone for $120 in Parts, Plus SIM Card: It's Not Rocket Science, Science , Karin Halperin (Apr. 23, 2013)

DIY Cellphone

 

The DIY Cellphone is a working (albeit basic) cellphone that you can make yourself. It can make and receive phone calls and text messages, store names and phone numbers, and display the time. It builds on the hardware Shield  but extends it with a full interface, including display, buttons, speaker, and software in the  the Arduino GSM Shield hardware,, software) software), which also microphone, etc. The source files for the cellphone are hosted on GitHub ( hardware includes an issue list where you can file bug reports or request enhancements. VARIATIONS

There are two main variants of the DIY cellphone: one that uses a black and white LCD like those found on old Nokia phones and one that uses an eight-character eight -character matrix of red LEDs. The LCD shows more information (six lines of fourteen characters) but breaks over time. The variant with the LED matrix is harder to use but the display is more robust. MAKING THE PHONE

Making the DIY cellphone can be a fairly involved process p rocess but it doesn't necessarily require specific electronics expertise. You'll need to order the circuit board and electronics components (about $200 total) and have access to some other electronics tools. There's a good amount of fine hand soldering to be done: about 60 components, mostly surface-mount, which can take from one to five or ten hours, depending on your experience. Programming and, especially, debugging the phone can take a while  – again, depending on your experience and how much goes wrong. Making the case requires some plywood and veneer, along with access to a laser cutter (or you can find your own way to enclosure the circuit board). In short, this is a difficult but potentially do-able project. ORDERING THE CIRCUIT BOARD

You can order a version of the circuit board from  from  OSH Park. Park. It costs about $60 and you get three copies of the board.

 

Order  LCD variant  Order variant from OSH

 

Park. Order  LED matrix variant Order variant  from





OSH Park. Alternatively, you can upload the Gerber files to a fabrication service yourself, either either  OSH Park Park,, Advanced Circuits,, AP Circuits, Circuits Circuits, or a number of others. Each time I order boards, I save the Gerber files in my GitHub repository, in a directory named according to the date. Find the latest here:  LCD variant variant,, LED matrix variant. variant.  There are a few different files in the directory:

 



.cmp: top (component) side copper layer (i.e. the lines of copper forming the actual electronic connections on the top side of the board)

 



.sol: bottom (solder) side copper layer (same, for the bottom of the board)

 



.stc: top (component-side) solder mask (stop) layer (i.e. the green layer covering the copper)

 

.sts: bottom (solder-side) solder mask (stop) layer

 

.plc: top (component-side) silk screen (legend) layer, plus overall





board dimensions (i.e. the white text on the top of the board, plus a line indicating the overall board

 

shape for which there isn't a

 



separate file) .pls: bottom (solder-side) silk screen (legend) layer (white text on the bottom of the board)

 



 



.drd: (excellon) drill file (specifies where holes should be drilled in the board and how big they should be) .dri: drill tool file, often not needed (text description of the drill sizes used)

You'll need to upload these (typically in a single zip file) and sometimes specify which file is what. This is a twolayer board, 5.15" x 2.3", and the standard options for board thickness (0.62"), copper weight (1 oz), and solder mask should be fine. You'll want to get solder mask and silk-screen on both sides. Getting the corners rounded might count as a complex shape and cost extra; e xtra; I think it's worth it but it's not necessary. GETTING THE PARTS

There's no kit available for the cellphone but you can order the parts from various websites. Electronic Components

SparkFun  and andDigi-Key Digi-Key.. You'll also need to get the the  M10 Most of the electronic components are available from  from  SparkFun GSM Module  Module from the Arduino store. Bill of Materials:  Materials: BOM.pdf BOM.pdf  (LCD variant), variant),  BOM.pdf BOM.pdf  (LED matrix variant) Tools

To assemble the phone, you'll a need a good soldering setup: a soldering iron (e.g. the  WES51 WES51)) with a good tip, fine-pitch solder, desolder wick, tweezers, etc. To program the microcontroller, you'll need an AVR in-system programmer (like the  the AVRISP mkII) mkII) and a3.3V FTDI Cable Cable  (or equivalent breakout board). To charge the battery, you'll need a mini-USB cable. To make the laser-cut case, you'll need access to a laser cutter and a small philips screwdriver. SIM Card

The phone should work with a full-size SIM card from any GSM provider. I've been using T-Mobile in the United States but the phone has also been tested with AT&T and in India, China, and Europe. Other Materials

For the laser cut enclosure, you'll need:

 



A sheet of 1/4" / 6 mm plywood, pl ywood, like this  this craft plywood from Midwest Products  Products available at many art supply stores. (Avoid the micro-lite aircraft plywood from Midwest Products or other plywood with dark adhesive layers as they tend to burn in the lasercutter.)

 



A sheet of wood veneer, preferably with adhesive backing.

 

 



Six M0, 5/8", pan-head machine screws (e.g. this  this 100 pack from McMaster-Carr))  McMaster-Carr

 



Six M0 nuts (e.g. this  this  50 pack from McMaster-Carr) McMaster-Carr) 

Or, try making a difference enclosure (e.g. with 3D-printing or by milling m illing a mold).

Images of the assembled circuit boards (LCD variant). Click to enlarge.  

Images of the assembled circuit boards (LED matrix variant). Click to enlarge.   SOLDERING THE ELECTRONICS

While the cellphone uses many small, surface-mount surface -mount components, it's possible to solder it together by hand with a good soldering iron and some practice. Most of the components are straightforward to solder (apart from their small size), with a few exceptions:

 



Capacitors: Be careful of the

polarity on the large (1000 uF) capacitors, they may explode if you solder them backwards. Use the orange stripe to orient them

 



correctly. Polarity : Other components with polarity include the supercapacitor, the LEDs (note the two small green dots on one side), the ATmega1284P microcontroller (note the circle in one corner), the M10 GSM module (which has an arrow in one corner), the SIM card socket, the microphone, and the diode (note the faint grey line on one side). These components

 

have no polarity (can be soldered either way around): the crystal (8 MHz), speaker, reset button, small capacitors, and resistors. Other components only physically align in one orientation (but make sure the transistors aren't upside down and that the buttons aren't rotated 90 degrees).    Antenna: When soldering the



antenna, start with the pad that faces the GSM module. That's the one that carries the electrical signal; the others are simply there for structural support (to hold the antenna down). You may even be able to heat the solder on that pad from the top of the antenna, the heat can be conducted through

 



the two vias (small holes) in it. Solder Jumpers: There are two solder jumpers on the bottom of the board, labelled "Cell" and "uC". Solder the center pad of each to the pad labelled "uC". (This connects the RX and TX lines from the FTDI header to the ATmega1284P on the board so that they communicate over serial. If you instead solder the center pad to the "Cell" pad, the FTDI cable connects directly to the GSM module so that you can communicate with it from the computer.)

 



Speaker : The speaker is awkward to solder because it has no legs.

First, apply solder to the pads on the PCB. Then rest the speaker on top of the PCB (aligning its pads with those on the board) and solder it from the bottom. You can feed in solder or melt the preapplied solder from below. If it doesn't work, don't remove the speaker  (you  (you might rip its pads

off). Instead, try to re-melt the solder on its pads by inserting the iron into the holes from below. 

 

USB Connector : Only the two

outer (of the five small) legs of the

 

USB connector are used, so you don't have to solder the three central legs. (Do solder the four corners, though, they provide

 



structural support). ISP Header : Because you only need to burn the bootloader once, I typically don't solder pins into the ISP (2x3) header. Instead, you can insert pins into the connector on your ISP and hold them against the pins (from the top of the board) while you burn the bootloader. If you have trouble, you can solder pins to the holes but you'll have to adjust the case to make room for it.

 



LCD (LCD variant only): You only

need to solder the eight pins at the top of the screen, not the eight pins on the bottom. To solder them, insert male header pins from the bottom (so that their plastic portion is under the board). First solder them to the PCB, then put the display on top (verifying its orientation). Then solder the pins to the display. COMPILING THE SOFTWARE

The cellphone's software is an Arduino program that makes use of o f various libraries and a third-party hardware definition. You can compile and upload it with the Arduino software s oftware but some initial setup is required: 1.  Download and install Arduino 1.0.4 (tested) or 1.0.5 from page..  the theArduino software page

  2. Install the  the Git version control software.. See, for example, the software instructions from GitHub for for  Windows  Windows or  or Mac Mac..  3.  Checkout the cellphone's source code  from GitHub, code GitHub, e.g. "git clone https://github.com/damellis/cellpho ne2.git". Then "cd cellphone2" to change into the source code's directory. 4.  Checkout the other repositories used by the cellphone's software with "git submodule init" and "git submodule update". 5.  For the LED matrix variant, checkout the LED matrix branch

 

with "git checkout led-matrix". (The code for the LCD variant is stored in the default master branch.) 6.  Run Arduino and, in the preferences dialog, set your sketchbook folder to the cellphone2 directory (that you checked out from github). 7.  Also in the preferences dialog, enable verbose information on compile and upload. (This will help you debug if anything goes wrong.) 8.  Restart the Arduino software. 9.  Select "DIY Cellphone" from the Tools > Board menu. 10.  Select AVRISP mkII (or whichever programmer you're using) from the Tools > Programmer menu. 11.  Plug the LiPo battery into the cellphone. 12.  Initiate "Burn Bootloader" from the Tools menu (while holding the pins in the ISP header against the corresponding holes in the PCB). This may take a few minutes. 13.  Connect the 3.3V FTDI cable to the FTDI header (the black wire goes on the side labelled "B", the green on the side labelled "G"). 14.  Open the Cellphone sketch from the sketchbook. 15.  From the Tools > Serial Port menu, select the item corresponding to the FTDI cable. 16.  Upload the Cellphone sketch. 17.  The screen should turn on and show the word "connecting". 18.  Insert a SIM card into the socket. 19.  It may take a while for the cellphone to connect to the network. If it doesn't connect after a few minutes, try resetting the board (by pressing the small reset button). You can see debugging information in the Arduino serial monitor at 9600 baud. 20.  Once the phone connects to the network, you'll see the words "connected" and "caching" on the

 

screen. After a few seconds, the screen will go blank. That's a sign that the phone has successfully started up and is now on the lock screen. See "using the phone" below for more information. 5/23/13

15:54  15:54 

unlock unlock   

The unlocking screen (backlight will be off) 5/23/13

lock lock   

15:54  15:54 

menu  menu 

The home screen 617  617  

back  back  

call  call 

The dialing screen USING THE PHONE

Unlocking the Phone

Once the phone successfully starts up, it will be locked and the screen will be blank. To unlock unloc k the phone, press any button; the date and time will appear on the screen for a few seconds (this is the "unlocking" screen). On the LED matrix variant, the date and time will scroll back and forth across the screen. If, during this time, you press the "unlock" key (the top-left button), the phone ph one will unlock and, if using the LCD variant, the screen's backlight will turn on. On the LCD variant, the date and time will remain on-screen, and the soft-keys labels will read "lock" and "menu". On the LED matrix variant, the time will remain on the display, without scrolling. This is the home screen. Locking the Phone

From the home screen, you can lock the phone by pressing the left soft-key button (the upper-left button). The screen and backlight will turn off but the phone will still be on and able to receive phone calls or text messages.  Adjusting the Contrast/Brightness

When the phone is in the "unlocking" screen, you can adjust the contrast (for the LCD variant) or brightness (for the LED matrix variant) by using the up and down buttons (the two central buttons of the group of four buttons  just below the screen). Dialing a Phone Number

You can dial a number from the home screen. Simply press the button corresponding to the first digit of the number. You'll be taken to the dialing screen where you can enter the rest of the number. Press * to delete the last digit entered or "back" (the left soft-key) s oft-key) to go back to the home screen. By pressing # one or more times in succession, you can enter #, *, or +. To call the number, press the right soft-key ("call").

 

Using the Phone Book (Contact List)

From the home screen, press the down arrow (the lower of the group of four butt ons just below the display) to enter the phone book. Use the down and up arrows to navigate to the desired entry. Press the right soft-key ("okay") to enter a menu from which you can call cal l that contact, send a text message to that contact, add a new entry to the address book, or edit or delete the contact.  Adding a Contact

To add a contact, first enter the contact list by pressing the down arrow from the home screen. Then press the right button to enter the contact menu ("call", "text", "add entry", etc); scroll (using the down and up buttons) down to the "add entry" menu item and press the right button. Now you can enter the name of the contact using the keypad (2 is "abc", 3 is "def", etc.; 1 is space, * is backspace, and # is shift). Once you've entered the contact's name, press the down arrow to move to the field for entering the contact's phone number. (You can press the up arrow to return to the field for entering the contact's name.) Enter the contact's number using the keypad (* is again backspace, but # now cycles between #, *, and +). When you've entered both the name and phone number, press the right button to save the contact (or the left button to cancel). Calling a Contact

To call a contact in your contact list, scroll to that contact, press the right button to bring up the contact menu ("call", "text, etc.) and then press the right button again to call. Texting a Contact

To text a contact, scroll to their entry in your contact list and press the right button to bring up the contact menu. Scroll down to "text" and press the right button. Now you can enter your message using the keypad. (As for entering a contact's name, 2 is "abc", 3 is "def", etc.; 1 is space, * is backspace, and # is shift.) Press the right button to send the text (or the left button to cancel). TROUBLESHOOTING

There are a lot of pieces and, therefore, a lot of things that might not work. Here are some potential problems and some possible solutions. Can't burn the bootloader onto the microcontroller.

 



 



Does the microcontroller have power? (Is the battery is plugged in and charged?) Are the legs of the microcontroller soldered correctly (i.e. is each leg actually soldered to the corresponding pad and are the legs free of shorts / solder bridges)? In particular, check the legs connected to the ISP header,

 



to VCC, and to ground. Are the pins in the header of the ISP being held firmly against the corresponding holes on the board? You might try soldering pins into the ISP header (on top of the board).

 



Is the crystal soldered correctly? (If not, the first step of burning the

 

bootloader might succeed but the second one might fail.) Can't compile the cellphone program.

 

Are you using Arduino 1.0.4 or 1.0.5?

 

Did you checkout the submodules of the cellphone2 repository? (They contain the required libraries and board definition.)

 

Is the Arduino sketchbook folder set to the cellphone2 folder? (Otherwise, the Arduino software won't be able to find the libraries







and the board definition.)

 



Is "DIY Cellphone" selected from the Tools > Board menu?

Can't upload the cellphone program.

 



 



Is the FTDI cable connected correctly (black wire to side labelled "B"; green wire to "G")? Did you select the right serial port from the Tools > Serial Port menu? (Try unplugging the FTDI cable and see which item disappears from the menu; that's the one corresponding to the cable.)

 



Are the solder jumpers soldered correctly (central pad connected

   





to the "uC" pad)? Is the board powered? Is the FTDI header soldered correctly? The 0.1 uF capacitors near it? The RX and TX legs of the microcontroller?

 



 



Is the crystal still soldered correctly? Did the bootloader burn successfully? (If not, see that issue above.)

Can't connect to the network.

   





Is there a SIM card in the socket? Is the SIM socket soldered correctly? The 22 ohm resistors? The corresponding pads on the

 



GSM module? Is the antenna soldered correctly? The corresponding pad on the GSM module?



 

Is the 0 ohm resistor soldered correctly (to the trace connecting

 

the M10 GSM module to the

   





antenna)? Do you have reception? Is the SIM card locked to another phone?

   AT&T (and possibly other



carriers): have you activated your

SIM card and phone on AT&T's website? You'll need the IMEI number printed on the M10 GSM module.  Another component doesn't work (e.g. display, speaker, microphone, microphone, buzzer).

 



Is the component soldered correctly?

 



Are the connected components (e.g. the corresponding legs of the microcontroller or GSM module) soldered correctly?

SERIAL DEBUGGING

You can further debug the phone by communicating with the GSM module via serial communication with the computer, using the microcontroller as a proxy. To do so, upload the SerialProxy sketch to the phone (using a 3.3V FTDI cable or breakout board). Then open the serial monitor and set the baud rate to 9600 and the line ending to "carriage return". After a few seconds, you should see: READY AT OK

That means the GSM is ready to receive AT commands (text strings that mostly start with the letters "AT"). The module  but here are a few basic ones: commands are detailed in the  the  datasheet for the GSM module  AT

Test/synchronization command. If you enter "AT" in the serial monitor (with a "carriage return" line ending), you should get a response of "OK".  AT+CREG?

Check the status of the network registration (connection). The response will be in the form "+CREG 0,N", with N being: 0 (not registered to a network), 1 (registered to a network), 2 (searching for networks), 3 (network registration denied), or 5 (registered, roaming).  AT+CPBS?

 

Display currently-selected phone book. Sample response: "+CPBS: "SM",50,250", with the "SM" indicating the SIM card is the current phone book (some other options include "MC" for the missed call list, "RC" for the received call list, and "ME" for the GSM module phone-book) and that 50 of its 250 entries are in use. This command can be useful for verifying that the GSM module is able to communicate with the SIM card.  AT+CPBS="SM"

Select the SIM card's phone book. You can also replace the "SM" with the abbreviations for the other phone books listed previously.  AT+CPBR=1

Read the first entry from the currently-selected phone book. Replace the 1 with the number of the entry you wish to read (up to the total phone book size reported by AT+CPBS?). MAKING THE ENCLOSURE

You can make a simple but functional enclosure from laser-cut l aser-cut plywood and veneer, along with some small screws (see materials above): 1.  Before cutting the case, check that the case files match the circuit board. In particular, I've made a lot of tweaks to the size and location of the screw holes, so check that they're in the same place on the PCB and the case. (Note that the holes in the bottom veneer file should be bigger than the others, this is to accommodate the nut, recessing it slightly.)

 

2.  If you soldered pins onto the ISP header, you'll need to cutout a space for them in the top piece of plywood. Edit DIY-Cellphone-Top accordingly. 3.  Laser-cut the plywood (1/4" / 6mm) using the DIY-CellphoneTop and DIY-Cellphone-Bottom folder  of the files in the  the Case/ folder damellis/cellphone2hw repository on GitHub. The SVG files were created in Inkscape, then exported to hpgl for importing to CorelDraw. 4.  Laser-cut the veneer using the DIY-Cellphone-Top-Veneer and DIY-Cellphone-Bottom-Veneer files. Cut the veneer with the wood front facing up (adhesive back face down). 5.  Remove the adhesive backing from the top veneer piece and stick it to the outer face of the top plywood piece. Repeat with the back, again attaching the veneer to the outer face of the plywood. 6.  There's a bit of empty space between the top of each button and the veneer. You might need to stick small spacers to the back of the top piece of veneer, one for each button (in the middle of each rectangular flexure cutout in the veneer). That way, you don't have to depress the veneer as much to press the button. 7.  Slip the top and bottom pieces of the case over the circuit board. You'll have to fit the battery's wire in between the GSM module and the battery connector, folding it in half. The plywood pieces should rest flat against the circuit board. 8.  Insert the six screws and thread them onto the nuts.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close