I solved a #firstworldproblem today - wireless audio in my car.
TL;DR - use an AirPort Express & replace its power supply with a 5V -> 3.3V step down module so it can be powered off USB/cigarette jack in the car.
Basically I was fed up with having so many cables floating around and getting tangled & I wasn’t happy with the compressed audio quality with Bluetooth, so I decided to come up with a wireless audio solution.
I did a bit of reading, and most people recommended an AirPort Express (APE) with an inverter running off the cigarette lighter jack. The idea is that you connect to the APE using wireless, then share music from your phone to the APE via AirPlay. The APE is then connected from its audio LineOut to your car via a headphone into the audio LineIn. I felt this solution was a bit wasteful, not to mention the the fact that it would be converting 12V DC to 110 AC, then down again when going into the APE. After waiting a few months, I did a bit more research and came across this post:
In summary, the user enjoiful describes a way of opening up the APE, pulling out the PSU and replacing it with an alternative power supply - USB. The great thing about this is that USB provides 5V DC, and the APE requires 3.3V DC. The end result is that you just need to convert the 5V to 3.3V somehow so that you don’t overload the APE.
This was the perfect solution as I had a USB port in my car, as well as an audio lineIn.
Parts required: * AirPort express - $110 * Star/Torx screwdriver - $8 * USB Cable - a standard USB cable, we all have spare ones of these. * Some standard wires - you could use anything laying around * a 5V to 3.3V DC stepdown - $4 * A soldering iron & some solder - Can pick these up for about $8 * Super glue
I ordered all the materials to complete the modification on Ebay, and followed the steps outlined in the original post. The only change I made was rather than having the USB plug into the back, I decided to cut the end off a USB cable and run it directly into the back of the device. The only down side of this is that you can’t remove the cable, but I didn’t really care.
Essentially what happens is, the car provides 5V DC out the USB, so I wired the 5V wire from the cut USB cable into a 5V to 3.3V step down module, this makes sure that the voltage going into the APE is 3.3V. I then wired the voltage out & ground of the step down module into the APE. Easy!
I then tested my converted device to my MacBook Air, and it seemed to power on, but as soon as the green light flicked on & tried to connect via WiFi, it would just restart. Boo! I wasn’t sure what was going on here, but I suspected that as soon as the WiFi started handling clients, it would draw more power from the power source, which would cause the voltage to drop. I used my multimeter to measure the voltage during the whole startup/connection process and discovered that the voltage dropped from 3.3V to 3V as soon as a client attempted to connect. Eeep!
I decided to try to see if an alternate (more stable) power source would do the trick so I plugged it into the PS3 and it seemed to work perfectly. Success!
Given these issues, I was worried that the voltage out of the USB port in my car might raise the same issues. Sure enough, I was right. Boo!
Never fear though! I zipped down to Best Buy and grabbed a cigarette lighter adapter -> USB to see if it would do a better job of regulating the 12V DC to 5V, and it did! It now works completely flawlessly - I can even stream Spotify/rdio tunes to my car by tweaking the network settings on the phone, so that it uses my LTE connection to stream the music from Spotify, and then relays it out the WiFi over AirPlay.
To setup your phone so that you can be connected to both the WiFi & still stream audio, you must manually configure your WiFi network IP to be statically assigned rather than via DHCP - you provide an IP & Subnet that is the same as the APE but make sure you don’t provide a gateway address, this tells the iPhone it should use your cellular network for data outside of the WiFi network.
The great thing about this solution is that when you’re driving with friends, they can connect to the WiFi network in the car, and stream music directly from their own phone - even while sitting in the back seat. :D The other great thing is that its not fixed to any specific car, I can pick it up and take it with me when I sell my car etc.
A little more technical:
A few people have asked for some more pictures of the internal setup, and a little explanation about what cables go where. Further below I have also posted screenshots of the APE setup along with how to configure your phone so that it uses cellular data while still connected to the WiFi hotspot.
When you cut the USB cable you find 4 wires:
- Green : USB Data
- White : USB Data
- Red : +5V DC
- Black : Ground
The wires we are interested in is the red & black. The black gets soldered onto the ground of the APE, and the red is connected to the VIN of the step down. A wire is the connected to the 3.3V out of the step down and soldered onto the input of the APE. You also have to ground the step down module to the ground of the APE too. See pictures below.
Once all connections were soldered and in place, I superglued the step down and cables to the APE to stop things moving around while the car is in motion.
I then just placed electrical tape over the back of the device to stop dust getting in.
The unit in the car.
Once you have completed the hardware hack and have it running, you can now configure the APE. I personally setup the APE before I did the hardware hack, but either way works.
Firstly, plug it in and let it power up, Then from the wireless icon in the menu bar, you should see an option about configuring a wireless network. I’m not 100% sure what the option is as I can’t remember, but a quick google should give you an idea of how to connect to it and bring up the settings for it. Another way to do this is open spotlight and search for ‘AirPort Utility’. It should show you the new APE in the list similar to this:
Click the device and select ‘Edit’. The next series of screenshots will basically go through the settings you need to set to configure your APE correctly.
Give it a name & a password so you can connect to it later to configure it.
Click the ‘Internet’ tab. Connect Using : DHCP, leave everything else blank.
Then press the ‘Internet Options’ button. Connect IPv6: Local-link only. Hit Save
Click the ‘Wireless’ tab. Set network mode to ‘Create a wireless network’, and give it a name. Select your security level and give it a password - this will be the password you use when connecting from your phone/ipad.
Press ‘Wireless Options’. Just make sure the details appear correct for your region and press ‘Save’.
Select the ‘Network’ Tab. Set the Router Mode to ‘DHCP and NAT’
Then press ‘Network Options’ and set the DHCP Lease time to 1 day. Then set the IPv4 DHCP range to 10.0.1.2 to 200 and make sure ‘Enable NAT Port Mapping Protocol’ is selected. Hit ‘Save’
Click the ‘AirPlay’ tab. Make sure ‘Enable AirPlay’ is checked. You can give the the speaker a different name if you wish, but I just left it the same as my APE WiFi name.
Click ‘Update’. This should close the dialog and drop you back to the main AirPort screen. From here you will see the little icon next to the name as an orange dot, and the light on the front of the device will also be orange. To stop this from happening, click the device in the AirPort utility (as per the first screenshot), and click each of the warnings that appear and select ‘ignore’ as we don’t care about them. This should then click the little light to green and you’re ready to go. Now all you have to do is setup your iPhone correctly.
Setting up your iPhone/iPad
Go into the Settings app, and click Wi-Fi, and click your new APE network. This will connect to the wifi network, but you’ll find that because the APE doesn’t have an internet connection, the internet won’t work on your phone. To get your phone to bypass using the wifi for data, click the blue arrow next to the name to view more options.
From this scree, select ‘Static’ and in the IP address settings enter: IP Address : 10.0.1.4 (for example) Subnet Mask: 255.255.0.0
Make sure you leave Router/DNS/Search Domains blank - this tells the iPhone that it should use its cellular network to route internet traffic rather than over the wifi network.
And you’re done! The slightly confusing this here is that when you’re connected on your APE wifi network, the ‘data’ icon at the top won’t look like the WiFi network symbol, but your normal cellular icon, such as E, 3G, 4G or LTE. Never fear, your phone is actually connected to the wifi network for the purposes of airplay.
Here is a few screen grabs of using the default Music app, and also using AirPlay with Spotify/rdio.