E90Post
 


Horizon LED
 
BMW 3-Series (E90 E92) Forum > E90 / E92 / E93 3-series Technical Forums > AUDIO/VIDEO + BLUETOOTH + Electronics/Alarm/Software > Finally sewed up my Nexus 7 install!



Reply
 
Thread Tools Search this Thread
      07-18-2013, 11:44 PM   #1
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

Finally sewed up my Nexus 7 install!

I finally got around to tucking all the wires away on my Nexus 7 dash install!

The salient points of the install itself are medium integration, high functionality. I wanted to retain all OEM functionality, so I didn't go to the extreme of relocating the headunit or anything. I made an easily removable mount for my N7 that fits onto the existing mount I modded in for my iPhone, which sits just above the center dash buttons.

The important cable runs are: 1) A USB A extension run from that mounting point, behind the dash trim, around the passenger vent, and down into the fuse box area. 2) a USB A to B cable that runs out of the fuse box, behind the center console trim and up into the armrest. In the armrest is a small USB DAC, mostly to avoid a second cable to the N7 but also it sounds quite a bit better than the built in DAC. 3) a USB A to mini B power cable that runs from a cigarette lighter USB supply in the passenger footwell up into the fuse box behind all that trim. Basically this saves me having to add a cigarette lighter socket in the fuse box, and it's pretty well hidden in the first place so doesn't get in the way. As a bonus, one more USB power outlet for a passenger's phone.

Devices: The nexus 7, obviously. Important part here is software.

Power is provided by a Kensington PowerBolt Duo car charger in the passenger footwell. Uniquely, this little devil has two ports for a combined total of 3.1A output (Huge!) (2.1a on one port, 1 on the other). 2.1A should be more than enough for a generally charged tablet and a few accessories (hub, DAC, 3g stick, USB stick, others). And the leftover 1A port is still a comfortably fast charge even for newer devices.

The DAC is a no-name $15 Shenzen ebay special, but I'm still quite pleased. It's pretty obviously a datasheet-direct sample circuit for the burr-brown part it uses, tough to screw up.

The hub is some belkin thing I got from Fry's for like $7. Which hub you use in this case basically doesn't matter, with the exception that SOME power up quicker than others. When the injector power comes online, this hub is up and ready with the plugged accessories by the time the tablet boots, and everything works great. Another hub I tried (even cheaper) wasn't as quick, and the DAC wasn't recognized on boot - I had to replug the N7 to get USB devices back.

Finally, power injection is provided by a board I designed myself and had fabbed by OSH Park. If you're into electronics, that github link has the Eagle and CAM files, you know what to do. If you're not, but still interested in making the board, it requires minimal effort, $5 for 3 boards, and $10 or so in parts from Sparkfun for 3 boards. I can write up a quick tutorial and put a proper BOM in the github documentation, just ask.

Basically all it does is pass through data AND power, while tapping in power from a mini-USB port as well. The real point is that you can put it in the USB chain anywhere there's an A-male/A-female interface (like at the SLAVE end of a USB extension cable. Most readily available Y cables have the power insertion at the same end as the nexus 7, which is inconvenient.)

Software:
The Nexus 7 is running Cyanogenmod+USB Rom. The special sauce is the USB ROM, which enables two main things. For one, it enables hot-plugged USB DACs, and for two, it enables power-consuming host mode. Basically, in "fixed installation" mode, the N7 will consume power from an attached USB plug despite being in Host mode. Connected accessories REQUIRE a Y cable injecting power to function. As soon as that power goes away, the N7 will pause all music and go into deep sleep, where it consumes only a few mA of power. The internal battery should last a few months in this mode, without draining the car's battery at all.

Next steps: 1) I also made a USB power SWITCHING board, basically a relay that can disconnect power at will. I'm going to install this on the N7 USB line, switched by the Remote line from the headunit, such that when the headunit goes dark, the N7 automatically pauses music and goes dark as well.

2) as it stands, wheel buttons don't work with this setup. I need to get one of these suckers, which directly reads button output and sends programmable keystrokes to the N7 based on those. After programming, any button on the wheel can cause any action on the N7. In particular, the up and down buttons will become skip forward/back.

3) Ideally, there are a couple buttons I'd like to *repurpose* while there are also a couple I'd like to *keep*. Volume should control the headunit, but the voice command button is totally useless to me, if that were play/pause it'd be great. Such functionality would require much more thought to implement.
Attached Images
    
__________________
Appreciate 0
      08-18-2013, 03:47 AM   #2
dreamonn
Private First Class
United Kingdom
1
Rep
101
Posts

 
Drives: Alpina D3BT
Join Date: Jul 2013
Location: Leeds

iTrader: (4)

Nice job alexwhittemore

This is exactly the base setup I had in mind, & it's good to see that someone else has completed a similar project. I ordered most of the bits for my Nexus 7 install yesterday - my shopping list & initial ponderings are posted here Nexus 7 Car Install.

I'm going to try to integrate a reversing camera (& possibly a forward facing camera too) as part of the install. My goal is for a clutter free installation with maximum flexibility and usability. Do you have any ideas or suggestions for areas to locate the additional components? I have access to a PCB prototyper & a 3D printer so I can knock up boards & custom enclosures to re-package things if required.

Couple of questions:
Is there anything that you would do differently if you did it again?
Do you have any other plans to extend the functionality?
Are there any issues with using a Nexus 7 in a car install that still need ironing out?
Appreciate 0
      08-19-2013, 12:25 AM   #3
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

Thanks!

Quote:
Originally Posted by dreamonn View Post
Couple of questions:
Is there anything that you would do differently if you did it again?
Do you have any other plans to extend the functionality?
Are there any issues with using a Nexus 7 in a car install that still need ironing out?
There ARE a few issues, to the degree that I've temporarily given up on using this (my phone is easier and better still, for now).

The biggest problem is power. It happens to be the case that the USB cable I have supplying the N7 is relatively poor quality and high resistance, and the N7 throttles back how quickly it charges as a result. Unfortunately, the outcome is that the N7 won't charge under heavy use (GPS and screen, which is obviously prime functionality), and it'll charge only slowly with the screen off. That's a dealbreaker, but could be fixed with a new, better cable.

The bigger problem is power TIMING: I've got the cigarette lighter sockets wired to Terminal 30g (rather than T15), so they come on when the car is woken up from sleep (generally, powered from unlock to 30m after lock). Unfortunately, that means the 3G dongle powers off until the car is unlocked. On the one hand, this is good: it consumes a bunch of power, the battery would be drained and unable to start the car in a matter of days. Probably relatively many days, but it'd be a danger if you left on a long trip. Maybe a shorter trip, too. On the other hand, it means the dongle powers on at unlock. It takes a solid 15-20 seconds to get a connection and for the tablet to get online with it. It may not seem like long, but when you want to hop in the car, put on your pandora or find your directions, then get driving, you can do all of those things on your phone much quicker. Pulling it out and plugging it in becomes the much faster option.

Another power problem, the tablet is set to not sleep. That way, when you're using GPS or music or whatnot while driving, you don't have to use up concentration unlocking the tablet. Unfortunately, that also means it'll eat up 30m worth of battery after you lock and leave the car, only to advertise "HEY I'M A DESIRABLE GADGET AND EASY TO STEAL!" I planned to fix that with a relay PCB that would cut power to the tablet (but not the rest of the devices on the USB hub) as soon as you lock the car and leave. I was planning to do that by using the headunit's amplifier remote line as a signal, but it turns out that doesn't closely follow whether the headunit is on or not (for example, the headunit may be 'off', but the remote line still on for a few minutes), so it may or may not be good enough.

Finally, buttons. The steering wheel buttons obviously don't work for the tablet. I could get the device I mentioned to make skip forward and backward work. I could also probably assign the 'talk' button to play/pause. But then that'd require either disabling stock functionality of all other buttons, or coming up with a more clever device myself that plays man-in-the-middle for button presses, forwarding the ones I want and blocking the ones I don't want. More work.


Bottom line, I will probably revisit this, but for the $20 a month the freedompop subscription was costing me, it's easier and more convenient for now to simply use my phone
__________________
Appreciate 0
      11-06-2013, 01:38 AM   #4
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

I'd like to revisit this. My problems are:

Power: The USB cable system I have now isn't bulky enough and has too much resistance, so the Nexus throttles back and won't draw 2 amps like it needs to to stay alive on short trips.

Timing: The nexus doesn't dim as soon as the car's locked. This one is going to be hard, I think.

Internet: The FreedomPop stick is slow to connect when first powered on, especially by my house where there's poor service.

Mounting: That wire mount thing is ugly.

Buttons: Steering wheel buttons don't work.

--------------------------------------------------

Power I think the answer is to simply use bulkier cables. This might require some custom tweaking to get the cable to fit behind the dash trim, but should be doable. There's the possibility that, in USB host mode, the tablet WON'T EVER draw >500mA. That'd be a real issue.
EDIT: I just looked into this with my USB power analyzer. It seems there are two charging modes, "fast charging" and just regular-old. There's a toggle in the USB rom settings to enable fast-charging in USB host, which gives a big bad warning saying you could damage your battery. It seems, "fast charging" simply means "if you can use it, draw up to 10W", which is the normal mode in non-host. Which is to say, turn on that toggle and the nexus will take whatever power you give it, just make sure you're supplying enough for the nexus AND the accessories. So that's good. That means it's just up to me to make sure I've got a low-enough resistance wiring setup to the nexus.

Timing: Somehow I have to come up with a good way to cut external power to the tablet when the car is locked up. I don't know of any one line in the car that's effectively ON when the car is occupied but NOT ON when it's locked. I think the remote cable from the headunit would work, except I think even it stays on a bit after the headunit dims.

Internet: Easy. I was already paying ~$20/mo for FreedomPop because 500mb isn't enough. That $20 gets me an internet plan that includes tethering at AT&T.

Mounting: Easy: quad-lock. I can get one for my phone and bike while I'm at it.

Buttons: I think the only real solution here is to spring for the $50 aftermarket USB device. But that should take care of the problem. Unfortunately, it wouldn't on its own let me, say, INTERCEPT a useless button (voice command) and make it do what I want (voice search). That could be a project for later.
__________________

Last edited by alexwhittemore; 11-06-2013 at 02:01 AM.
Appreciate 0
      11-06-2013, 09:28 AM   #5
cdgatti
Lieutenant Colonel
cdgatti's Avatar
20
Rep
1,551
Posts

 
Drives: e90 328i
Join Date: May 2011
Location: KY

iTrader: (4)

I am thinking the ipad mini with the tune2air would be a nice setup.
Appreciate 0
      11-06-2013, 11:56 AM   #6
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

Quote:
Originally Posted by cdgatti View Post
I am thinking the ipad mini with the tune2air would be a nice setup.
In terms of replicating docked iPhone functionality, sure, but there are a few reasons I specifically want android:

Launcher. The android GUI is a bit more flexible, and there are already bunches of good car-mode launchers with nice big buttons, etc to choose from.

USB flexibility. Android allows you (with a custom rom) to enable USB host mode charging and wake on power/deep sleep on loss. I don't know that the iPad can be set up at all similar.

Future expansion: the hope is, in the future, to add some custom CAN bus hardware to allow for some combox-like features such as locate my car from another cell phone, remotely lock/unlock, perhaps even remote start. This is definitely all not possible (well, much harder) in an iOS environment.
Appreciate 0
      11-06-2013, 12:29 PM   #7
cdgatti
Lieutenant Colonel
cdgatti's Avatar
20
Rep
1,551
Posts

 
Drives: e90 328i
Join Date: May 2011
Location: KY

iTrader: (4)

Making hand over head motion... you are in a different league as far as what I want a 'phone' to do! My car is still first and foremost my device for getting from A to B and with a BMW really enjoying the journey. For me, but obviously not for everyone, all that stuff you talk about would merely give me too much to worry about.

But you go man - we need people like you to pave the way, so us slackers can pick up a morsel here and there!
Appreciate 0
      11-06-2013, 01:05 PM   #8
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

Haha, my friend's dad just bought himself a 5 series now that his kids are out of college, figured hey, wife and I might as well treat ourselves since our finances are suddenly amenable. What's hysterical is that he got a completely loaded 528 - he's not much one for power, but he wanted it as nice as possible. He doesn't understand how half the stuff in the car works, and it freaks him out when he accidentally turns on guidance. The HUD REALLY throws him off.

I'm the opposite though. Electrical engineer, I like doing this stuff just because it's possible.
__________________
Appreciate 0
      11-07-2013, 03:13 AM   #9
alexwhittemore
Lieutenant Colonel
24
Rep
1,697
Posts

 
Drives: 2009 Crimson 328i
Join Date: Oct 2012
Location: Los Angeles

iTrader: (0)

I worked on this a bunch tonight and found some peculiar things about charging.

Recall the problem I was having before was that the tablet would charge slower than replacement power under full usage and would die during a trip. I pulled out all the wiring, set it up on my bench, and got to testing. Sure enough, the tablet charged at like 250mA, which is nothing. And sure enough, the more wire I removed, the faster it charged. It seems the nexus is good about drawing only so much current the bus won't sag below 4.8ish volts. I had been using a big 6' extension on top of the 3' or so line feeding the power injector from my power source. After 18' of resistance (down and back), that worked out to be not much current at all.

Oddly, though, even CLOSEST to the power as I had cables to get, the tablet would only ever draw 4.5 or 5 watts (the stock charger is rated for double that!). Even with bulky powe-augmented homemade cables, that's not a lot of headroom to work with: 50% of theoretical max before you even start!

So I looked into using the dock port instead. Bingo! Kind of. Not actually at all. Well, I hooked some leads to my bench supply and touched them to the pins as per the internet (top pin with the screen right side up is gnd, bottom is 5v, and the two in the middle are audio). That worked GREAT. The tablet pulled 1.8 amps (!). So I went about figuring out how to interface that mechanically. It's a PITA. I settled on soldering some blobs onto the pins to make them stick out, then putting some copper tape on the inside of a shell-style case I picked up from game stop for $5 on clearance. It all ended up looking very ugly, but worked for prototype.

Unfortunately, while it sometimes worked right and definitely charged fast, getting power from two spots at once (USB plug AND dock pins) proved too confusing for the usbrom software. Sleep on power loss became unreliable, devices wouldn't connect, generally an unacceptable level of wonkiness for use in a car.

So I'm back at ground zero.

Well, actually I've got plans that are coming along. Details to come later.
Appreciate 0
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:01 PM.




e90post
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST