Introduction: OURphone - an Open-Source Linux Smartphone

About: Inventor, scientist, maker, entrepreneur, problem-solver and part-time anarchist.

Mission

I want people to have more control over their most personal smart devices, so I created an Open-source, Upgradeable, Repairable Smartphone, that's completely Big Tech free. It's not theirs - it's O.U.R.S.

Introducing OURphone - a phone that any hobbyist with reasonable skill can replicate, improve on, share and enjoy. I hope you will copy my design and make it your own.

Please see my GitHub for the latest set of code and plans: https://github.com/evanman83/OURS-project/

The instructions below are copied from there. If you build an OURphone, please share your version on GitHub and contribute to the ongoing evolution of this concept.

Phone specs

  • 4G LTE internet
  • Call, SMS, Contacts book (contains a SIM7600 with sim card)
  • Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
  • 1 GB RAM
  • Running Raspbian - a Debian Linux OS with installable app store
  • Can run Facebook, WhatsApp, YouTube etc in browser
  • 4 inch 480 x 800 colour touch screen
  • 5MP colour camera
  • GPS (in browser)
  • Wifi
  • Bluetooth audio
  • 1 watt onboard audio speaker
  • 3 USB ports
  • "Convergent": HDMI port to plug in external monitor, USB to plug in keyboard and mouse
  • Screen lock switch
  • 9cm x 16cm x 3cm
  • 5 hours battery life
  • Big Tech free / optional - privacy achieved!

How it works

The Raspberry Pi provides the basic functions of a computer, now made portable by the two 3.6v batteries, down-converted to 5.1V DC. Telephony (calls and SMS) is made possibly via the Waveshare 4G HAT with a normal mobile network SIM card contained therein. The Pi communicates with the 4G HAT via ordinary AT commands. The startup.sh script runs the configuration necessary to activate a 4G mobile internet connection. The phone.py app provides a UI for dialling and calling, sending, receiving and replying to SMS, adding and removing records from a simple Address Book. The built-in microphone and speaker allow normal voice calls.

Supplies

  1. Waveshare SIM7600G-H 4G HAT (B) for Raspberry Pi
  2. Raspberry Pi 3 Model B
  3. Waveshare 4 inch 480x800 HDMI IPS LCD touch screen display HAT
  4. Lithium-ion battery 3.7V 3500mAh 18650 (x 2)
  5. HKD Raspberry Pi camera mod 5MP
  6. HKD DC/DC Buck Module 0.8-20V 2A converter
  7. Slide switch SPDT (screen lock switch)
  8. Slide switch DPDT (main power switch)
  9. Micro USB Lithium 18650 battery charger 1A
  10. HKD GSM antenna on IPEX 13 connector
  11. Mini condensor microphone
  12. 0.86inch 1W 8Ohm speaker
  13. HKD PAM8403 audio amplifier
  14. Miniature 5V relay
  15. 10uF electrolytic capacitor
  16. 10K potentiometer
  17. 3.5mm audio plug 4 pole (male TRRS)
  18. 3.5mm audio plug 3 pole (male stereo)
  19. Micro USB 5P plug in white housing R/A – rewireable (x 2)
  20. Battery holder for 18650 (x 2)

The total cost to build in April 2023 was ZAR3,639, approximately USD198 or EUR180.

Step 1: Rough Assembly and Testing

Buy all the parts listed above. Connect them based on the schematic attached here.

Start by connecting the below basic components using available cables and plugs. You don't need to solder / engineer anything at this point:

  1. Raspberry Pi
  2. 4G HAT + GSM and GPS antennas
  3. Raspberry Pi power supply
  4. Waveshare touchscreen
  5. Raspberry Pi camera (optional)
  6. Headphones with built-in mic
  7. Some USB cables
  8. Operational mobile phone SIM card with airtime and data

Follow the instructions listed in setup_commands.txt to ready the Raspberry Pi.

Part of that process will involve copying the files below into the Raspberry Pi home directory:

  • startup.sh (auto-start script to turn on internet) Copy the file startup.txt and rename as startup.sh
  • phone.py (the app that actually enables calls, SMS, Contacts, diagnostics, photos, GPS, etc)
  • location-provider.py (presents stored GPS coordinates at a URL for web-based location providers)
  • ringtone.wav (your phone's ringtone - replace as you wish!)
  • mobile-keyboard.xml (a custom keyboard based on the match keyboard software)

This should be enough to get the phone app working, the OS working, test internet, phone calls, SMS, GPS, camera, music playing, internet browsing, Bluetooth, Wifi.

Step 2: Making It Small

Most of the challenge of this project was making it small. Mobile phone manufacturers have devoted decades to ensuring their supply chain provides custom parts which snap together into super elegant designs that don't waste even a cubic millimeter of space. We don't have that advantage unfortunately, but there is still a lot that we can do to make this design compact.

USB and audio plugs

There are many USB and audio plugs being used in the project. These are too big to allow packaging the phone's components into the wooden phone cover (box) designed for it. To make these smaller, I used thin wire to make new cables, with custom plugs on either end. I made the plugs by using radically stripped down versions of the male plugs, taking off extra plastic housing, grinding off unnecessary bits and even bending some parts at right angles. Then I soldered on new leads and covered it with hot glue so that they are robust enough to force into tight spaces.

To save even more space I soldered USB connections directly to the back side of the Raspberry Pi. This was the plug going into the 4G HAT. If we had used a standard USB cable this would have taken up far too much space.

Fitting in the Waveshare 4G HAT board

This is a challenge because the 4G HAT sits in between the touch screen and the Raspberry Pi itself - a very tight space. Expect much swearing to get this right :) I used a combination of a Dremel tool (small rotary grinder) and miniature steel cutters to painstakingly cut off the large USB ports and the two thick metal pins. These proved useless for carrying USB data, so I couldn't use them anyway - only the micro USB port seemed to work (despite many messages to their Customer Support).

Be EXTREMELY careful removing these big items because it is very easy to cause significant physical destruction by lifting a track off the PCB, and then your module (the most expensive part of the build) is dead and unusable :( Only attempt if you have a surgeon's hand and a Zen Master's patience.

Once these items are removed and the whole device is now thinner, I hot glued the GSM and GPS antenna plugs and wires in place so they are not so fragile, and wrapped the whole thing in insulation tape.

Reducing the antennas

The GSM antenna provided is too big. So I purchased a PCB GSM antenna and soldered that onto the cable instead. It works ok, but signal is never 100%, only good-ish. The maximum I have seen is 87% strength.

The GPS antenna is also too big. So I crushed it slowly in a clamp and used a screwdriver to prise off the plastic casing, which takes up a lot of space. This revealed a much smaller GSM antenna chip, a hard metal square. I soldered this onto the cable instead and replaced the male-female adapter plug with just one little neat cable.

Step 3: Making the Phone Case

I needed to design a custom case to hold the components, yet I wanted to keep costs low, so I opted to use laser cut MDF board instead of 3D printing with plastic. The material and cuts cost me about ZAR120 ~ USD6.50.

Send the file laser-cut-cover.dxf to your nearest laser cutting service and ask them to cut it from 3mm MDF. You could use any material you like, as long as it is 3mm. If you want to use a thinner material then you will need to adjust the design because the parts fit together at 90 degrees.

One aspect of this design that I overlooked was heat management. The Raspberry Pi and Waveshare devices use a lot of power and create a lot of heat. Using a metal cover would help, as well as placing the Waveshare chip up against the cover like a heatsink of sorts.

Step 4: Tying It All Together

This is best described with pictures, but the main steps are:

  1. Make new male plugs for the micro USB and male 3.5mm TRRS / stereo plugs (as described above).
  2. Solder all the wires for the charger, power switch and power supply. Set the DC/DC converter to 5.1 VDC. Charge the batteries up for the first time, with the power switch in OFF / charging mode. Test whether the system can boot up and connect to the web - outbound calls and internet use a lot of current / make current spikes.
  3. Solder in the audio amp, speaker and volume knob. Play a test mp3 (I downloaded the RhythymBox app) and see how loud it plays over the speaker.
  4. Solder in the relay and screen lock switch. When the phone app is running, switching the screen lock switch should turn off the LCD screen and disable the touch controls. When a phone call begins, the relay should switch off the default Raspberry Pi audio and instead connect the phone call audio to the loudspeaker.
  5. Connect all the batteries, wires and plugs and test: Internet, phone call, SMS, GPS, music playing. There is a lot of guidance for troubleshooting in the file setup_commands.txt (provided above).
  6. Insert the 4G HAT between the touchscreen and Raspberry Pi, with audio and power cables pointing out the bottom right hand corner of the screen (facing the screen).
  7. Fold the camera ribbon cable under the 4G HAT and over and under the batteries - stick the camera in place with Prestick putty. (this system was annoying because every time I needed to remove the electronics from the cover I had to unwrap the camera - rather implement some kind of snap plug for the ribbon cable to make this easier)
  8. Stick the speaker with putty over the top right-hand grill (9 holes).
  9. Place the GPS antenna next to the top left-hand grill (9 holes). GSM antenna can go down the left-hand side of the cover.
  10. Start glueing the case together, starting from the bottom upwards, finishing with the front cover.


Step 5: Conclusion and Improvements

This project was delicious fun to build, but with an equal amount of frustration and struggle. The parts I struggled with most were the audio circuit design (I didn't know how to reduce the crackling), making robust USB and audio connectors that were small enough, and getting the power supply working. I learned a lot about not using cheap Croc-clip connectors :D Debugging the internet connection was also a lot of fiddling.

The result is a phone that actually does a whole lot of things. It is free from the influence of Big Tech in all but the chip manufacturing - there is no need for sign-ons, logins, tracking, adverts, privacy notices, terms and conditions etc. It's a simple phone that does what you need it to do.

That being said, the phone can do with a lot of improvement - and that's where you come in! Here are the things I think you should work on in your version:

  • Use a faster Raspberry Pi with more RAM, or a completely different single board computer (SBC), or the RPi 4 compute module (small)
  • Use a capacitative touch screen, not resistive touch
  • A bigger screen would be nice, taking up the full size of the device
  • Eliminate audio whining / cracking which sounds like occasional extra-terrestrial signals from space (I think this is an RPi 3 problem, or the audio amp / power supply needs isolation of some kind)
  • Customise Raspbian so the UI is more usable by finger (perhaps flash another OS like Ubuntu Touch or Firefox OS)
  • Use shielded cables for audio carrying wires
  • Add a microphone / USB audio card to enable audio on the video recordings
  • Connect phone call audio into Bluetooth (not just device audio)
  • Add an audio jack
  • Improve the main Phone python app so it's less 1990s Nokia
  • Detect and display remaining battery life
  • Get the internet connection to be more robust, sometimes it doesn't load on boot
  • Make it less like a brick

If you don't want to add those features, you can always add:

  • A burning CO2 laser
  • Eardrum-shattering bass speakers
  • A spectrometer
  • A terrifying AI chip

The options are endless :) Enjoy the build, and please share your version at my GitHub page!

Battery-Powered Contest

Second Prize in the
Battery-Powered Contest