There are two main sections to the wiring setup, so they're shown in seperate diagrams below. First, we'll start with the Power.
Since the Fona has fantastic power management, we'll make use of that to manage the battery, recharging, etc. The only tricky bit is to get the 5V needed for the Raspberry Pi and the PiTFT, so we'll use a powerboost DC-DC converter for that which will covert the ~3.8 volts from the FONA up to 5V.
Here's the diaigram of the power wiring:
We put a swtich on the lipo battery so we can power everything on and off from one switch. The battery terminals on the pin heeader are then fed into the 500mA boost DC-DC converyer, which outputs 5V to the PiTFT. We're feeding it into the optional header, as the main header on the piTFT is connected to the Raspberry Pi, so the power feeds through the PiTFT and on to the Raspberry Pi.
For the connections from the FONA to the DC-DC converter and from there to the Raspberry Pi, you can either solder directly onto the boards, or use the 2.5mm pitch pin header and get some suitable connectors to go onto those. Alternatively, you could solder the wires directly into the holes on the PCBs, but that means that you can't take it apart as easily, but it's quicker to get up and running. :)
Next we'll look at how to wire the Fona, including how to connect it back to the Raspberry Pi UART port. Here's the diagram:
There are a few things worth noting:
- The Vin pin is connected to Vbat, to set the logic level converter. Without this the Fona won't do much. See the pinout info of the Fona.
- The Key pin is connected to ground, this means that the Fona will ALWAYS be pwered on when there's powere coming into the battery port. This is done so that we can use one switch to powere everything up and down. The downside is that the unit must be powered on during charge.
- THe Ring Indicator wire is optional. The current PiPhone software does not use it, so it's only really there for when the RI signal is handled in software in the future.
After those items of note, there's really just GND, Rx and TX wires.
All connections are made to the optional header on the PiTFT, as the main header on the Raspberry is taken up with the PiTFT header.
So that's it. As you can see it's really just soldering a few wires into the correct place! :)
Here's an image of a suggested assembly layout, but it's up to yourself how you want your own custom PiPhone to look:
I put a double layer layer of duct-tape on the back of the Raspberry Pi, the used velcro to put on the DC-DC, and a bolt for the FONA. For the LiPo battery I used a cable-tie to tie it to the Raspberry Pi.
Here's a few more suggestions:
You could use a sheet of acrylic/perspex and mount the Raspberry Pi on one side, and the Battery/FONA/DC-DC converter on the other.
Depending on the size of your battery, you could mount the battery between the PiTFT and the Raspberry Pi. You might even be able to fit the FONA in there, but be very careful that there are no shorts!
And if you're an expert maker, you might even try to take some of the connectors off the Raspberry Pi to slim the whole thing down.
Why not top it all off with a 3D printed case! I'd love do see what you do here! :)