Download - DIY Cellphone

Transcript
  • 8/13/2019 DIY Cellphone

    1/20

    DIY CellphoneThe 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

    and software in theArduino GSM Shieldbut extends it with a full interface, including display, buttons, speaker,

    microphone, etc. The source files for the cellphone are hosted on GitHub (hardware,software), which also

    includes an issue list where you can file bug reports or request enhancements.

    V A R I A T I O N S

    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 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.

    M A K I N G T H E P H O N E

    Making the DIY cellphone can be a fairly involved process 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.

    O R D E R I N G T H E C I R C U I T B O A R D

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

    board.

    OrderLCD variantfrom OSH Park. OrderLED matrix variantfrom OSH Park.Alternatively, you can upload the Gerber files to a fabrication service yourself, eitherOSH Park,Advanced

    Circuits,AP 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,LED matrix 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 onthe 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 two-

    layer 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; I think it's worth it but it's not necessary.

    G E T T I N G T H E P A R T S

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

    http://arduino.cc/en/Main/ArduinoGSMShieldhttp://arduino.cc/en/Main/ArduinoGSMShieldhttp://arduino.cc/en/Main/ArduinoGSMShieldhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2http://oshpark.com/http://oshpark.com/http://oshpark.com/http://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/http://oshpark.com/http://oshpark.com/http://www.4pcb.com/http://www.4pcb.com/http://www.4pcb.com/http://www.4pcb.com/http://www.apcircuits.com/http://www.apcircuits.com/http://www.apcircuits.com/https://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttp://www.apcircuits.com/http://www.4pcb.com/http://www.4pcb.com/http://oshpark.com/http://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2hwhttp://arduino.cc/en/Main/ArduinoGSMShield
  • 8/13/2019 DIY Cellphone

    2/20

    Electronic Components

    Most of the electronic components are available fromSparkFunandDigi-Key.You'll also need to get theM10

    GSM Modulefrom the Arduino store.

    Bill of Materials:BOM.pdf(LCD variant),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)with a good tip,fine-pitch solder, desolder wick, tweezers, etc. To program the microcontroller, you'll need an AVR in-system

    programmer (like theAVRISP mkII)and a3.3V FTDI 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, like thiscraft plywood from Midwest Productsavailable at many art supplystores. (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. this100 pack from McMaster-Carr) Six M0 nuts (e.g. this50 pack from McMaster-Carr)Or, try making a difference enclosure (e.g. with 3D-printing or by milling 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.

    S O L D E R I N G T H E E L E C T R O N I C S

    http://www.sparkfun.com/http://www.sparkfun.com/http://www.sparkfun.com/http://www.digikey.com/http://www.digikey.com/http://www.digikey.com/http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289https://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttp://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#91772A060http://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397https://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttp://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://www.digikey.com/http://www.sparkfun.com/
  • 8/13/2019 DIY Cellphone

    3/20

    While the cellphone uses many small, 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 thembackwards. Use the orange stripe to orient them correctly.

    Polarity: Other components with polarity include the super-capacitor, the LEDs (note the two small green dotson 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 thatcarries 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 thecenter 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 thePCB. 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 solder from below. If it doesn't work, don't remove

    the speaker(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 haveto 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 onthe 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.

    C O M P I L I N G T H E S O F T W A R E

    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 but some initial setup is required:

    1. Download and install Arduino 1.0.4 (tested) or 1.0.5 from theArduino software page.2. Install theGit version control software.See, for example, the instructions from GitHub forWindowsorMac.3. Checkout the cellphone's source codefrom 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 submoduleupdate".

    5. For the LED matrix variant, checkout the LED matrix branch with "git checkout led-matrix". (The code for theLCD 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 youchecked out from github).

    http://arduino.cc/en/Main/Softwarehttp://arduino.cc/en/Main/Softwarehttp://arduino.cc/en/Main/Softwarehttp://git-scm.com/http://git-scm.com/http://git-scm.com/https://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-machttps://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-windowshttp://git-scm.com/http://arduino.cc/en/Main/Software
  • 8/13/2019 DIY Cellphone

    4/20

    7. Also in the preferences dialog, enable verbose information on compile and upload. (This will help you debug ifanything 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 onthe 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 Arduinoserial monitor at 9600 baud.

    20. Once the phone connects to the network, you'll see the words "connected" and "caching" on the screen. Aftera 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

    unlock

    The unlocking screen (backlight will be off)

    5/23/13 15:54

    lock menu

    The home screen

    617

    back call

    The dialing screen

    U S I N G T H E P H O N E

    Unlocking the Phone

    Once the phone successfully starts up, it will be locked and the screen will be blank. To unlock 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 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.

  • 8/13/2019 DIY Cellphone

    5/20

    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 (forthe 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) 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 buttons just below the display) toenter 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 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 (* isagain 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 rightbutton to send the text (or the left button to cancel).

    T R O U B L E S H O O T I N G

    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.

  • 8/13/2019 DIY Cellphone

    6/20

    Are the pins in the header of the ISP being held firmly against the corresponding holes on the board? Youmight 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 secondone 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 ableto 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, buzzer).

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

    correctly?

    S E R I A L D E B U G G I N G

    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

    commands are detailed in thedatasheet for the GSM modulebut here are a few basic ones:

    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?

    http://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdf
  • 8/13/2019 DIY Cellphone

    7/20

    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 entryyou wish to read (up to the total phone book size reported by AT+CPBS?).

    M A K I N G T H E E N C L O S U R E

    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 oftweaks 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 theCase/folderof the 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 theveneer 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 plywoodpiece. 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 smallspacers 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.D E S I G N F I L E S

    The design files and source code for the cellphone can be found on GitHub:

    David A. Mellis

    https://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Casehttp://web.media.mit.edu/~mellis/index.htmlhttp://web.media.mit.edu/~mellis/index.htmlhttps://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Case
  • 8/13/2019 DIY Cellphone

    8/20

    Click an image see a larger version;more photosare on Flickr.

    V A R I A T I O N S

    Above Left: cardboard enclosure by Jeff Warren. Above Right: purpleheart enclosure by Dena Molnar. Below

    Left: milled enclosure by Yoav Sterman. Below Right: 3D-printed enclosure by Ben Peters.

    P R E S S

    Wired UK:How to make your own mobile phoneby Tom Cheshire (Nov. 12, 2012)

    New Scientist:Making your own phone is easier than you might think,Lisa Grossman (Mar. 21, 2013)

    ABC News:Make Your Own Cellphone for $120 in Parts, Plus SIM Card: It's Not Rocket Science,Karin Halperin

    (Apr. 23, 2013)

    DIY Cellphone

    http://www.flickr.com/photos/mellis/sets/72157629294902700/http://www.flickr.com/photos/mellis/sets/72157629294902700/http://www.flickr.com/photos/mellis/sets/72157629294902700/http://www.wired.co.uk/magazine/archive/2012/11/play/make-your-own-mobile-phonehttp://www.wired.co.uk/magazine/archive/2012/11/play/make-your-own-mobile-phonehttp://www.wired.co.uk/magazine/archive/2012/11/play/make-your-own-mobile-phonehttp://www.newscientist.com/article/mg21729096.000-making-your-own-phone-is-easier-than-you-might-think.htmlhttp://www.newscientist.com/article/mg21729096.000-making-your-own-phone-is-easier-than-you-might-think.htmlhttp://www.newscientist.com/article/mg21729096.000-making-your-own-phone-is-easier-than-you-might-think.htmlhttp://abcnews.go.com/Technology/build-cell-phone/story?id=18952735http://abcnews.go.com/Technology/build-cell-phone/story?id=18952735http://abcnews.go.com/Technology/build-cell-phone/story?id=18952735http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://www.flickr.com/photos/mellis/8428228990/http://www.flickr.com/photos/mellis/8430303229/http://www.flickr.com/photos/mellis/9058290161/http://www.flickr.com/photos/mellis/9060713963/http://www.flickr.com/photos/mellis/8725022595/in/set-72157629294902700http://www.flickr.com/photos/mellis/8447674795/in/set-72157632698042046http://www.flickr.com/photos/mellis/8384518044/in/set-72157629294902700/http://www.flickr.com/photos/mellis/9511241570/http://abcnews.go.com/Technology/build-cell-phone/story?id=18952735http://www.newscientist.com/article/mg21729096.000-making-your-own-phone-is-easier-than-you-might-think.htmlhttp://www.wired.co.uk/magazine/archive/2012/11/play/make-your-own-mobile-phonehttp://www.flickr.com/photos/mellis/sets/72157629294902700/
  • 8/13/2019 DIY Cellphone

    9/20

    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

    and software in theArduino GSM Shieldbut extends it with a full interface, including display, buttons, speaker,

    microphone, etc. The source files for the cellphone are hosted on GitHub (hardware,software), which also

    includes an issue list where you can file bug reports or request enhancements.

    V A R I A T I O N S

    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 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.

    M A K I N G T H E P H O N E

    Making the DIY cellphone can be a fairly involved process 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 muchgoes 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.

    O R D E R I N G T H E C I R C U I T B O A R D

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

    board.

    OrderLCD variantfrom OSHPark.

    OrderLED matrix variantfromOSH Park.

    Alternatively, you can upload the Gerber files to a fabrication service yourself, eitherOSH Park,AdvancedCircuits,AP 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,LED matrix variant.

    There are a few different files in the directory:

    .cmp: top (component) sidecopper layer (i.e. the lines of

    copper forming the actual

    electronic connections on the top

    side of the board)

    .sol: bottom (solder) side copperlayer (same, for the bottom of theboard)

    .stc: top (component-side) soldermask (stop) layer (i.e. the green

    layer covering the copper)

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

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

    board dimensions (i.e. the white

    text on the top of the board, plus a

    line indicating the overall board

    http://arduino.cc/en/Main/ArduinoGSMShieldhttp://arduino.cc/en/Main/ArduinoGSMShieldhttp://arduino.cc/en/Main/ArduinoGSMShieldhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2hwhttps://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2http://oshpark.com/http://oshpark.com/http://oshpark.com/http://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/http://oshpark.com/http://oshpark.com/http://www.4pcb.com/http://www.4pcb.com/http://www.4pcb.com/http://www.4pcb.com/http://www.apcircuits.com/http://www.apcircuits.com/http://www.apcircuits.com/https://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/led-matrix/Eaglehttps://github.com/damellis/cellphone2hw/tree/master/Eaglehttp://www.apcircuits.com/http://www.4pcb.com/http://www.4pcb.com/http://oshpark.com/http://oshpark.com/shared_projects/6Zg0GFONhttp://oshpark.com/shared_projects/9KhdfD2Yhttp://oshpark.com/https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2hwhttp://arduino.cc/en/Main/ArduinoGSMShield
  • 8/13/2019 DIY Cellphone

    10/20

    shape for which there isn't a

    separate file)

    .pls: bottom (solder-side) silkscreen (legend) layer (white text

    on the bottom of the board)

    .drd: (excellon) drill file (specifieswhere 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 two-

    layer 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; I think it's worth it but it's not necessary.

    G E T T I N G T H E P A R T S

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

    Electronic Components

    Most of the electronic components are available fromSparkFunandDigi-Key.You'll also need to get theM10

    GSM Modulefrom the Arduino store.

    Bill of Materials:BOM.pdf(LCD variant),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)with a good tip,

    fine-pitch solder, desolder wick, tweezers, etc. To program the microcontroller, you'll need an AVR in-system

    programmer (like theAVRISP mkII)and a3.3V FTDI 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,like thiscraft plywood from

    Midwest Productsavailable 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.

    http://www.sparkfun.com/http://www.sparkfun.com/http://www.sparkfun.com/http://www.digikey.com/http://www.digikey.com/http://www.digikey.com/http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289https://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttp://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.midwestproducts.com/store/product/3282e69c-13f4-452f-9906-a40c0a5a9d8a/6mm_14_x_12_x_12_Craft_Plywood.aspxhttp://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891http://www.digikey.com/product-detail/en/WES51/WES51-120V-ND/526397https://github.com/damellis/cellphone2hw/blob/led-matrix/Components/BOM.pdf?raw=truehttps://github.com/damellis/cellphone2hw/blob/master/Components/BOM.pdf?raw=truehttp://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=6_33&products_id=289http://www.digikey.com/http://www.sparkfun.com/
  • 8/13/2019 DIY Cellphone

    11/20

    Six M0, 5/8", pan-head machinescrews (e.g. this100 pack from

    McMaster-Carr)

    Six M0 nuts (e.g. this50 packfrom McMaster-Carr)

    Or, try making a difference enclosure (e.g. with 3D-printing or by milling 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.

    S O L D E R I N G T H E E L E C T R O N I C S

    While the cellphone uses many small, 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 thepolarity on the large (1000 uF)

    capacitors, they may explode if

    you solder them backwards. Use

    the orange stripe to orient themcorrectly.

    Polarity: Other components withpolarity 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 (note the faint grey line onone side). These components

    http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.flickr.com/photos/mellis/9162546146/http://www.flickr.com/photos/mellis/9160323897/http://www.flickr.com/photos/mellis/8383433747/http://www.flickr.com/photos/mellis/8384518274/http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#90730A001http://www.mcmaster.com/#91772A060http://www.mcmaster.com/#91772A060
  • 8/13/2019 DIY Cellphone

    12/20

    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 surethe transistors aren't upside down

    and that the buttons aren't rotated

    90 degrees).

    Antenna: When soldering theantenna, 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 padfrom the top of the antenna, the

    heat can be conducted through

    the two vias (small holes) in it.

    Solder Jumpers: There are twosolder 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 sothat 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 awkwardto solder because it has no legs.

    First, apply solder to the pads on

    the PCB. Then rest the speakeron 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 solder from below. If it

    doesn't work, don't remove the

    speaker(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 twoouter (of the five small) legs of the

  • 8/13/2019 DIY Cellphone

    13/20

    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 onlyneed 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.C O M P I L I N G T H E S O F T W A R E

    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 but some initial setup is required:

    1. Download and install Arduino1.0.4 (tested) or 1.0.5 from

    theArduino software page.

    2. Install theGit version controlsoftware.See, for example, the

    instructions from GitHub

    forWindowsorMac.3. Checkout the cellphone's source

    codefrom 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 repositoriesused by the cellphone's software

    with "git submodule init" and "git

    submodule update".

    5. For the LED matrix variant,checkout the LED matrix branch

    http://arduino.cc/en/Main/Softwarehttp://arduino.cc/en/Main/Softwarehttp://arduino.cc/en/Main/Softwarehttp://git-scm.com/http://git-scm.com/http://git-scm.com/http://git-scm.com/https://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-windowshttps://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-machttps://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://github.com/damellis/cellphone2https://help.github.com/articles/set-up-git#platform-machttps://help.github.com/articles/set-up-git#platform-windowshttp://git-scm.com/http://git-scm.com/http://arduino.cc/en/Main/Software
  • 8/13/2019 DIY Cellphone

    14/20

    with "git checkout led-matrix".

    (The code for the LCD variant is

    stored in the default master

    branch.)

    6. Run Arduino and, in thepreferences dialog, set yoursketchbook 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 thecellphone.

    12. Initiate "Burn Bootloader" from theTools 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 tothe FTDI header (the black wire

    goes on the side labelled "B", the

    green on the side labelled "G").

    14. Open the Cellphone sketch fromthe sketchbook.

    15. From the Tools > Serial Portmenu, 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 thenetwork, you'll see the words"connected" and "caching" on the

  • 8/13/2019 DIY Cellphone

    15/20

    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

    unlock

    The unlocking screen (backlight will be off)

    5/23/13 15:54

    lock menu

    The home screen

    617

    back call

    The dialing screen

    U S I N G T H E P H O N E

    Unlocking the Phone

    Once the phone successfully starts up, it will be locked and the screen will be blank. To unlock 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 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) 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").

  • 8/13/2019 DIY Cellphone

    16/20

    Using the Phone Book (Contact List)

    From the home screen, press the down arrow (the lower of the group of four buttons 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 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 ContactTo 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).

    T R O U B L E S H O O T I N G

    There are a lot of pieces and, therefore, a lot of things that might not work. Here are some potential problems andsome possible solutions.

    Can't burn the bootloader onto the microcontroller.

    Does the microcontroller havepower? (Is the battery is plugged

    in and charged?)

    Are the legs of the microcontrollersoldered correctly (i.e. is each leg

    actually soldered to the

    corresponding pad and are the

    legs free of shorts / solderbridges)? In particular, check the

    legs connected to the ISP header,

    to VCC, and to ground.

    Are the pins in the header of theISP 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

  • 8/13/2019 DIY Cellphone

    17/20

    bootloader might succeed but the

    second one might fail.)

    Can't compile the cellphone program.

    Are you using Arduino 1.0.4 or1.0.5?

    Did you checkout the submodulesof the cellphone2 repository?

    (They contain the required

    libraries and board definition.)

    Is the Arduino sketchbook folderset to the cellphone2 folder?

    (Otherwise, the Arduino software

    won't be able to find the libraries

    and the board definition.)

    Is "DIY Cellphone" selected fromthe 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 portfrom 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 solderedcorrectly (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 solderedcorrectly?

    Did the bootloader burnsuccessfully? (If not, see thatissue 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 solderedcorrectly (to the trace connecting

  • 8/13/2019 DIY Cellphone

    18/20

    the M10 GSM module to the

    antenna)?

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

    phone?

    AT&T (and possibly othercarriers): 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, buzzer).

    Is the component solderedcorrectly?

    Are the connected components(e.g. the corresponding legs of the

    microcontroller or GSM module)soldered correctly?

    S E R I A L D E B U G G I N G

    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

    commands are detailed in thedatasheet for the GSM modulebut here are a few basic ones:

    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 thenetwork 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?

    http://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdfhttp://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdf
  • 8/13/2019 DIY Cellphone

    19/20

    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 thecurrently-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?).

    M A K I N G T H E E N C L O S U R E

    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, checkthat 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.)

  • 8/13/2019 DIY Cellphone

    20/20

    2. If you soldered pins onto the ISPheader, 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 theCase/ folderof the

    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 theDIY-Cellphone-Top-Veneer and

    DIY-Cellphone-Bottom-Veneerfiles. Cut the veneer with the wood

    front facing up (adhesive back

    face down).

    5. Remove the adhesive backingfrom 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 spacebetween the top of each buttonand 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 ofthe case over the circuit board.

    You'll have to fit the battery's wirein 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 threadthem onto the nuts.

    https://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Casehttps://github.com/damellis/cellphone2hw/tree/master/Case