To complete this tutorial you need:
– 1 x Jolla
– 1 x BreadboardTOH or 1 x MyHalf or lots of copper wiring, tape and a solder iron
– 1 x pc with interwebs connection
Goal of this tutorial is to end up with a basic working prototype of your first TOH.
Getting to know your phone
Your phone has 6 pogo-pins on the back, a USB port and a 3.5 jack. This gives us:
– power in/out
– data in/out
– sound out
This would be an excellent time to read paragraph 2.2 to 2.2.5 of the Developer-Kit. It is just 1.5 pages and has all the info you need.
Example 1: PowerTOH (using DCin)
The DCin port needs 5V and can take a max of 1000ma. But you already know that, because you’ve read the paragraphs mentioned above.
Anyway, if you supply power to DCin port, but can not provide enough power, the voltage will drop accordingly, but it will still charge. So no biggie if the selected parts will supply less.
As power-source we will use a Li-ion battery, which will provide us with 3.7V. This is not enough (3.7<4.3), so we will need some voltage step-up booster to give 5V and finally a switch seems like a good idea.
Sparkfun is a good place to shop for components, but places like Ebay, Adafruit and many more have lots of fun stuff. So, google ‘sparkfun li-ion‘, ‘sparkfun switch‘ and ‘sparkfun step-up‘. Choose a large battery, because there is a lot of power lost in conversions. Choose a switch that is not ‘momentary’, otherwise you have to keep it pushed in all the time. Choose a step-up that is able to use 3.7V and goes to 5V with as much milli-amps as possible.
Select some fine components and solder it all together, that is it. Seriously.
@unpixels has made such a proto
Example 2: BoomboxTOH (using 3.3V out and audio jack)
Phone speakers are generally not really loud and not of great quality. This is inherently due to the restricted size. The audio port is strong enough to power some earplugs or headset, but hooking this up to bigger speakers will not shake a stadium. To quote XKCD:
The developer kit tells us that the 3.3V pin can deliver preferrably below 150ma, or 300ma for short periods of time. Going with max power we have 3.3V*0.3A=1 Watt. Googling for ‘stereo amplifier breakout’ gives us a nice product from Adafruit. It can deliver up to 2.8 Watts, so run it at half volume if you do not want your phone to protect itself by shutting down. It runs at 5V, so hook it up to the step-up booster found in Example 1! Connect it on your BreadboardTOH with a 3.3 jack breakout or cut up an audio cable you have laying around and solder it all together. Hook ANY speakers up to it.
Example 3: Digital clock (using 3.3V and I2C pins)
Adafruit has this one, which looks nice! Looking on the product page there is not a lot of data on the product, but there is a LINK to a hookup guide.
Quoting and commenting on:
Next up, let’s wire it up to an Arduino. We’ll be using an Arduino. Or a Jolla obviously!
- Connect CLK to the I2C clock – I2C clock means the SCL pin
- Connect DAT to the I2C data – I2C data means the SDA pin
- Connect GND to common ground
- Connect VCC+ to power – 5V is best but 3V will work if that’s all you’ve got (it will be dimmer) Will come back on this later
- Connect Vi2c to your microcontroller’s logic level (3-5V) – Connect to 3.3V
Both Vi2c and Vcc MUST be connected to 3 to 5VDC! Vcc is for the LED driver power, Vi2c is what sets the logic level for communication to the chip.
Three thing are to be discussed to make this work:
1. I2C level
The Jolla’s I2C pins run at 1.8V, while we want to run this part on 3.3V. Without boosting the I2C level, this will not work. If you use the BreadboardTOH or MyHalf, there is already a I2C level-converter on board, so you can just use the SDA-3.3V and SCL-3.3V pins. Otherwise, also use an I2C level-converter breakout.
If you want to save power and are happy with a dimmer display, just hook it up to 3.3V. If you want to go all out, use a step-up booster and supply it with 5V.
This will be discussed in a later tutorial!
That’s it for now! Scroll through all the parts at Adafruit and Sparkfun to get some inspiration for you first project and use your mad google skillz to hook it up!