This tutorial brings you from start to finish in constructing your very own smartphone. You will start by 3D printing a case, then soldering printed circuit boards together, assembly, and finally installing a mobile OS onto your phone and using Python to make it yours. You can learn more about this project at hackaday.io/project/5083

Skills Required:

  • Basic Soldering
  • Familiarity with the Raspberry Pi


Lots of time and patience

Step 1: Gather Materials

Before we begin, lets gather the components required for the build. You will need the following electronic components and PCBs:

  1. Raspberry Pi A+ 256MB
  2. Adafruit FONA uFL Version
  3. 3.5in PiTFT Assembled
  4. Raspberry Pi Camera 5MP
  5. Powerboost 500 Basic
  6. GSM Antenna
  7. 1W 8 ohm Metal Speaker
  8. USB Wifi Adapter
  9. Electret Microphone
  10. 1200mah Lithium Ion Battery
  11. 4-40 x 3/8in screws
  12. M2.5 x 5mm screws
  13. M2.5 x 20mm screws
  14. M2 x 5mm screws
  15. Slide Switch
  16. Wire

While waiting for your parts to ship, you can 3D print the enclosure.

Step 2: 3D Print the Enclosure

The smartphone consists of two 3D printed parts that make up the enclosure: The top and the bottom. Download the .stl files on thingiverse http://www.thingiverse.com/thing:752746. If you do not have access to a 3D printer, you can pay a company like Shapeways to do it for you. If you would like to customize the case to suit your needs, download the Solidworks files from my Github page.

I myself paid a company to do the 3D printing for me because I do not have the funds to buy one myself. If you would like more 3D printed projects from me, please vote for the tyfone in the 3D Printing contest. Thank you!

Step 3: Wire the Power Circuit

Now lets start wiring everything together. In the Fritzing diagram, there is a Raspberry Pi. Instead of connecting to the Raspberry Pi, connect your wires to the 26 pin male header on the PiTFT. Now that we have that out of the way, lets start making connections.

  1. Connect "bat" on the Adafruit FONA to "bat" on the Power Boost.
  2. Solder a wire from GND on the FONA to GND on the Power Boost.
  3. Solder a wire from GND on the power boost to one terminal on a slide switch.
  4. Also connect the GND pin on the power boost to a ground pin on the PiTFT (Same Pinout as the first 26 pins on a Raspberry Pi, notice the arrow and "1" indicating pin 1, which is 3v3)
  5. Connect the 5V line on the Power Boost to a 5v pin on your PiTFT.
  6. Solder a wire from the middle terminal of your slide switch to the "EN" pin (Enable) on the Power Boost.
  7. Solder a wire from the "KEY" pin on the FONA to Pin 40 (GPIO 21) on the Raspberry Pi. (Changed on commit acd5c08)
  8. Place the PiTFT over your Raspberry Pi A+
  9. Double check your connections


If you slide the slide switch the LEDs on the Power Boost should illuminate and the Raspberry Pi should power up. The PiTFT backlight should also turn on. If you have a PiTFT image on your Pi's SD card the screen should also boot up. Otherwise, it will just stay solid white, which is just fine for now. Most likely, no LEDs will illuminate on the FONA. To turn on the FONA, hold in the Key button on the device for two seconds or pull GPIO 18 on the Raspberry Pi high for two seconds. If you can power the Pi, TFT, and FONA from the battery and turn it all off from a switch, you are ready for the next step.

Step 4: Finish Wiring

Now that power connection are done, we can continue on to wiring up the UART to the Raspberry Pi, the speakers, and the microphone. Lets get started.

  1. Solder the 8 ohm speaker to "spk +" and "spk -" on the FONA. The polarity doesn't matter.
  2. Solder the red wire on the electret microphone to the Mic + pin on the FONA.
  3. Solder the black wire on the electret microphone to the Mic - pin on the FONA.
  4. Connect the "RI" (Ring indicator) pin on the Adafruit FONA to pin 7 (GPIO 4) on the PiTFT.
  5. Connect TX on the FONA to pin 10 (RX) on the PiTFT.
  6. Solder RX on the FONA to pin 8 (TX) on the PiTFT.
  7. Solder Vio on the FONA to bat, also on the FONA. If you want, you could also use a 3v3 line on the Raspberry Pi.
  8. Snap the uFL antenna onto the uFL connector on the FONA.
  9. Double check your connections.

If you power everything on now, it should behave the same as it did in the last step. In the next step, we will be setting up the FONA by adding a SIM card making it capable of communicating over a cellular network.

Step 5: Add SIM Card

Now that the wiring is complete, we can add a SIM card to make it possible for the FONA to communicate over a cellular network. The FONA uses 2G data networks, like T-Mobile. The FONA does not work with 3G or 4G networks. AT&T is planning to shut down their 2G network in 2016, so we will be using a T-Mobile SIM card activation kit. The FONA uses a standard SIM card, so a Micro or Nano SIM cards will not fit. Once you have a card, activate it by following the steps at t-mobile.com/activate. When you are done, insert the card into your FONA and power everything on. If the red LED on the FONA is blinking every 3 seconds, your FONA is connected to a cellular network! In the next step, we will setup the software to get your Raspberry Pi communicating with the FONA.

More info on T-Mobile's networks can be found here

If you are not in an area with T-Mobile coverage, any network with 2G GSM service will work just as well.

Step 6: Setup SD Card

Now that you have all the hardware wired up, we can setup the Raspberry Pi to communicate with it. Start by flashing the latest version of the PiTFT OS onto a micro SD card for your Raspberry Pi. You will want to use the latest PiTFT image, which can be downloaded here. The Jessie-Lite based image will work just fine and will require less space on the SD card. Once your SD card is prepared, insert it into your Pi and power it on. You should get the raspi-config utility on your PiTFT. It may be small but it will do for now. There are a few things you must set up it raspi-config:

  1. Expand filesystem is a must.
  2. Enable Camera
  3. Disable serial port. This is so the Raspberry Pi can communicate with the FONA
  4. Enable SSH. This is essential because the A+ only has one USB port.

End setup and reboot your Pi.

By typing startx the Raspberry Pi will enter LXDE on the PiTFT. To enter LXDE over the HDMI port type

FRAMEBUFFER=/dev/fb0 startx

Step 7: Setup WiFi and Clear Desktop

Your phone will not have a keyboard, so in order to access a command line you will have to setup WiFi and use ssh. In the desktop, put in your network information using Wifi Config. Shutdown the Raspberry Pi and insert a Wifi dongle. If you are still unable to connect via ssh, try using a USB hub to get going. More info on setting up WiFi can be found here. Once you are connected over SSH, you can clear the Desktop icons and remove the taskbar to make your phone look more professional.

1. Change to the desktop directory with the command

cd Desktop

2. Remove all app icons with the command:

sudo rm * 

3. Go back with

cd  /home/pi

4. Open the lxsession file with the command:

sudo nano /etc/xdg/lxsession/LXDE/autostart

5. Comment out the line "@lxpanel --profile LXDE"

6. Save and exit the file.

Step 8: Finish Software Installation


To test out your FONA, install minicom with the command:

sudo apt-get install minicom

Then run:

sudo minicom -D /dev/ttyAMA0 -b 9600

You should get a serial terminal. If you type


you should get "OK" back. If you don't, check your connections. If you do, the FONA is ready for operation.

Rotate Screen

You may have noticed the text on the PiTFT is sideways and not in the orientation for a phone. Lets change that with the command:

sudo nano /etc/modprobe.d/adafruit.conf

In the file, change the "rotate" parameter to 180.

Finally, to get the Pi to automatically boot to LXDE on the PiTFT, follow this step in the adafruit guide:


Calibrate Touchscreen

Start X and see if the touchscreen is working properly. If the mouse is not in the correct spot when you tap, you will need to calibrate the touchscreen. Run this command to do so:

sudo adafruit-pitft-touch-cal

The script will calibrate the touchscreen to work with the new orientation.

Install Camera Software

Now lets install the software used to take pictures with the Raspberry Pi camera. First type:

sudo apt-get install python-pip

Install picamera with:

sudo pip install picamera

Step 9: Install TYOS

TYOS is the mobile operating system (Technically, a modified version of Raspbian is the OS, and TYOS is just a GUI overlay) used to give your phone the capability to send and receive SMS messages, and make calls. To download TYOS run the command:

wget https://github.com/spadgenske/tyos/archive/0.5.6.zip

Extract the zip file with the command:

unzip 0.5.6

Finally rename it with:

mv TYOS-0.5.6 tyos

To start up TYOS, run the command:

sudo python /home/pi/tyos/src/main.py 

In TYOS, make a call and send a text message to make sure everything works. Once everything is working perfectly, we can set up TYOS to start on boot so no ssh is required.

Type sudo nano /etc/rc.local to get into the configuration file. At the bottom, right before the "exit 0" line, add a line saying the following:

sudo python /home/pi/tyos/src/main.py --power

The --power tag turns on the FONA. Without it TYOS assumes the FONA is on.

Change the background with the command:

sudo mv tyos/graphics/desktop-background.png /etc/alternatives/desktop-background

Make sure you do not include .png at the end of the line.

Now reboot your Pi. TYOS should startup on boot!

UPDATE 5/23/16: TYOS 0.5.6

Step 10: Putting Everything Together

Now we can secure everything into the case completing the smartphone.

  1. Using some hot glue, glue the speaker and the microphone it the their slots.
  2. Using the M2 screws, screw in the Raspberry Pi camera. Route the ribbon cable so it is out of the way of any other electronics.
  3. Using M2.5 screws, screw the Raspberry Pi A+ with SD card and USB Wifi down into the case.
  4. Connect the Pi camera ribbon cable to the Pi with the blue facing the camera.
  5. Also using M2.5 screws, screw the FONA SIM card up into the case.
  6. Organise the wiring making sure it does not interfere with any of the other electronics.
  7. Wrap the Power Boost in electrical tape to prevent a short.
  8. Sandwich the Power Boost and battery between the Raspberry Pi and PiTFT.
  9. Hot glue the slide switch into the switch slot on the top part of the case.
  10. Using 4-40 screws, screw the top and bottom halves of the case together.
  11. Test everything out.

Congratulations! You have just built your own smartphone! If you don't like the phone to be called "tytelli" just change the logo in /home/pi/tyos/graphics/logo.png to whatever you wish.

Just put everything together, but I have problems with the touchscreen when running tyos. The touchscreen is already calibrated and it works greatfully in the main screen, but as soon as I run main.py it seems the touch inputs are wrong, allowing me pressing only buttons on the left or right (power and phone dialer). <br>I tried connecting a mouse and with it I can press each button, (even if it's invisible). <br>Any debug application to show touch input coordinates or a way to calibrate it in a pygame? <br>Thanks for help!
<p>If you comment out line 60 in tyos/src/main.py (<a>https://github.com/spadgenske/TYOS/blob/master/src...</a>) you will have a visible mouse so if you tap and the mouse pointer appears that means you clicked. If your tapping the screen and the mouse pointer doesn't follow where you tap, the screen is not registering your presses. hope this helps!</p>
<p>How much does it cost to do it</p>
Could/would this work with the pi zero?
Everything should work with the Pi Zero. I don't think any changes are required.
<p>This is awsome!!!! im only 12 but i love this when im older im DEFINANTLY going to make this. + i voted for u =)</p>
<p>Why wait? I was only 13 when I got my first HAM license! Now is the time to start learning about electronics. It is fun!.</p><p>A good place to start would be https://learn.adafruit.com/</p>
<p>Agreed. I'm 15</p>
<p>I am nine</p>
<p>True. No point waiting. I started learning when I was 10 but I couldn't get the materials then cuz I was living in Africa where DIY stuff is almost non-existent. but I moved to Asia this year and I'm doing all kinda projects without stress.</p>
<p>True. No point waiting. I started learning when I was 10 but I couldn't get the materials then cuz I was living in Africa where DIY stuff is almost non-existent. but I moved to Asia this year and I'm doing all kinda projects without stress.</p>
<p>Tyler make a web browser for the tytelli. If you do this will become my favorite mobile OS </p>
<p>very nice, trying to get it going with a new rpi3<br>lots of issues but im getting to it slowly...</p><p>i can do everything in minicom using AT-commands but in tyos ive a lot of issues, cant sent SMS or place a call. e.g. i can type sms but send buttom doesnt do anything. touchscreen does not work properly (even after calibrating it), but i enabaled mousepointer so i can select/type things. crashes when im receiving a new sms or phonecalls.<br>Will continues testing/ bugfixing once ive got the hardware in a propper case, just flying around right now, not a good idea on the long run ;)</p><p>made a new phonecase for too, will post the stl-files on thingiverse once they are ready and tested. For power im using a single LiIon-Cell 26650 5Ah.</p>
<p>Adafruit hasn't officially updated their PiTFT kernel to work with the Raspberry Pi 3, that is probably why the touchscreen and TYOS aren't working properly. </p>
<p>very nice voy will have good experince</p>
<p>Desolder all unnecessary connectors and pin headers on the Raspberry Pi and then solder the pins going into the GPIO in the holes where headers used to exist.</p>
<p>Which raspberry pi do you need for the pi phone, David Hunter? On the diagram, there is a raspberry Pi B+, but on the part list you are saying we need a Raspberry Pi A+. David Hunter, may you please answer this questions?</p>
<p>You should add an estimated cost.</p>
<p>You should add an estimated cost.</p>
<p>wow :)</p>
<p>Great project but way too big. Needs to be comfortable in pocket and solid 16 hr battery life. When will this be possible? </p>
<p>???</p><p>It's not supposed to meet apple/samsung quality and needs - it's a brilliant bit of hardware hacking; a well executed challenge that Mach_5 has been kind enough to share.</p>
It is a cool project but its not an apple/samsung quality and needs its a real person needs who wants to have control of the internals of the phone. 4 hr battery life is not doable. The size is a bit big but probably manageable. Simple question to those more knowledgeable than me, is when will this be possible?
<p>When you write up the instructable.....</p>
<p>If the instructable is for a novelty item phone that's fine, I have asked a technical question to the author that hopefully they have the expertise to answer. Most people read the articles for fun I consider them serious projects. A phone that lasts 4 hours is not practical for anyone but is a step in the right direction. I want to solve real life problems so hopefully the author has some good info on that.</p>
Mate these authors are. Sharing with us. <br>Value able , personal Ideas.<br>That otherwise would not be shown to the public . <br>
<p>I remember having a phone with an hour and a half battery life. 4 hours would have been miraculous and for a make it yourself gadget - wonderful. . </p>
<p>It would probably have better battery life if it wasn't built out of separate, independently designed modules and/or had a means of turning those modules on/off. Wireless adapters consume a lot of power and so do screens and backlighting. Considering it's a DIY touch screen computer with phone capability, that's pretty serious for a hobbyist one-off project. --- Building this with a custom board utilizing the compute module would probably work pretty well since that would strip a lot of unnecessary devices/hardware from the board.</p>
<p>cool thx for the info I could see a lot of applications just for this equipment like transmitting video stream from your vehicle to a server as a dash cam that doesn't have to store data locally</p>
<p>Awesome project! I didn't know anyone could build their own smartphone.</p>
<p>this is a great idea! thats so awesome you're so smart congrats!!!!!!!</p>
<p>Congrats on the win! this is a fantastic instructable!</p>
<p>This site continues to amaze me ..!</p><p>Nice job! </p><p>(i'm stilllll waiting for someone to present a DIY full-scale nuclear submarine .. I mean just the hull and periscope for starts, actually .. Only needs a rather large titanium powder 3D printer ..</p><p>In the mean-time, this SmartPhone is tops! )</p><p>might be a few more days .. </p>
<p>You want to build a submarine? Look at:</p><p><a href="http://www.svseeker.com/wp/sv-seeker-2/submarines/?v=7516fd43adaa" rel="nofollow">http://www.svseeker.com/wp/sv-seeker-2/submarines/...</a></p><p>This is a fantastic site!</p>
<p><a href="http://www.instructables.com/member/TechPaul" rel="nofollow">TechPaul</a> made it! (author) <a rel="nofollow">Reply</a> 19 hours ago </p><div>Welcome to the 1990's. A GSM module that allows GPRS is hardly going to get any one excited now. I wouldn't build this, as is, because the 2G netwok that this module uses is being closed and the frequency band reused for the 4G network here.</div>
<p>The point isn't to build a top tier technology smartphone - the point is to build something and learn while doing it. I'm sure it could be improved upon, but keeping it simple is part of the beauty.</p>
<p>Yep --- But finding a easy-to-use 4G module is a little difficult. 2G should be around for at least 1-3 years but if you are building for the long term try a 3G module from Adafruit.</p>
<p>I want to build one of those phones made out of wood with the crank on the side.</p>
Now, That... Is AWESOME!
Can i use raspberry pi 2 model b....??? Plz help me....
Hi everyone I am from south Africa I was wondering which shop can I be able to buy my material and start building my smartphone tyfoon<br>
Hi everyone I am from south Africa I was wondering which shop can I be able to buy my material and start building my smartphone tyfoon<br>
Hi everyone I am from South Africa I was wondering which shop in south Africa I can be able to my material and start building my smartphone tyfoon
<p>can it work with the raspberry pi b</p>
<p>can you please upgrade the phone?</p><p>Maybe add game features or like a touch id like iPhone 5s</p>
<p>Great project! Want do build this one also but since I already tried Dave's Hunt PiPhone I don't want to waste the things I've bought for that phone: RPi B, 2.8 tft touchscreen from Adafruit and this GSM module: <a href="http://www.micro4you.com/store/sim900-gprs/gsm-module.html" rel="nofollow">http://www.micro4you.com/store/sim900-gprs/gsm-mod...</a></p><p>I have got the PiPhone to work sometimes and with every ten phonecall-tries I can get one working phonecall: it is too buggy and unreliable. So my question is: could you please make the TYOS capable of using the above GSM module? For now I do not really care about the extra functions of your TYOS. Those applications I want to do when I have the money to buy the things for the TyPhone. Hope you have the time and care for helping out? I am sure there are others who have tried the PiPhone build and wishes the same as I do....</p><p>Greetings from The Netherlands!</p>
<p>The board you mentioned above uses the SIM900 GSM module and my software works with the SIM800. But looking through the AT Command set for the module the commands seem to be the same. (http://goo.gl/Rkzmyc)This means my software should not need to be changed at all to work with the module (At least for calling) So you might as well try it out and see what happens. You will have to use a 3.5in screen or an HDMI one as the 2.8in screen is completely incompatible with my software.</p>

About This Instructable




Bio: Student teaching myself Electrical Engineering and Computer Science.
More by Mach_5:$20 Portable Raspberry Pi Game ConsoleBuild your own Home Automation and Monitoring SystemBuild Your Own Smartphone
Add instructable to: