Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Nexus 7 built in to double DIN enclosure. External DAC, USB drives, Auto ON / SLEEP

  1. #1
    Ion
    Ion is offline
    Newbie
    Join Date
    Jun 2013
    Location
    Raleigh, NC
    Posts
    5

    Nexus 7 built in to double DIN enclosure. External DAC, USB drives, Auto ON / SLEEP


    While researching my own project, I stumbled across this forum and the discussions about Android and the Nexus 7. I joined up to contribute to the discussions based on my experience installing a Nexus 7 tablet in my Corvette. This seems like a good place to develop ideas like this, as Android and PC based car computers have a lot of common ground. I also believe Android may very well be the future of car computing due to power efficiency, size, cost, and touch optimized apps.



    Here is my full build journal:
    http://forums.corvetteforum.com/c6-c...ld-thread.html

    I built a standard sized double din Android radio out of a RadioShack project box and a Metra double din adapter. It's housing a Nexus 7, USB Hub, CNX-P5V step down power converter, and a USB audio interface. Internal bits were mounted using brackets with I/O coming out the back. Using the RCA out 2x port, I get 6 outs from the EQ that's next in the chain. I use the left channel of the RCA inputs 2x port for the noise canceling mic. Additional ports include 12V constant in, 12V accessory in for a remote, and common chassis ground in. USB extension wires run out the top to the interior right side of my glove box.

    Theoretically, this would bolt up in any car. I wanted to develop a solution that would work for anyone. I didn't cut or permanently modify the car in any way, so the stock radio can go back in at any time. I relocated the USB port on the tablet, as it would have collided with mount points in the car otherwise. This is a common problem in most applications. I moved it to the speaker grill, which seems to be a good solution.



    I've spent many hours working through implementation issues. I've noticed many others on the forum having the same problems. In an effort to help, I've collected some lessons learned below.

    Sound Quality Issues

    Problem: The bluetooth and headphone out have inferior sound quality. The 1/8" out has a weak signal and a noisy DAC when driving 6 channels though splitters.

    Solution: I used a USB DAC that gives me clean line level audio out. It connects to an inexpensive Clarion EQ line driver that gives me six 7V RCA outs, volume control, panning, and a secondary sound source input for a phone or other uses. You could even use the optical out on the DAC for a high end DSP processor. When using this method, the sound quality is excellent.

    Storage Issues

    Problem: Storage is limited to a flash memory card, unless you use an OTG cable to make the tablet a host. Unfortunately, most kernels will not allow you to charge the tablet while in host mode. While there are a number of great streaming music services available, tethering connections aren't always reliable. Furthermore, data caps and throttling can be an issue with some providers.

    Solution: Timur's USB ROM offers USB host mode charging. This means that you can connect a USB hub with attached storage and audio interface. The tablet will stay charged and attached peripherals are externally powered. This solution requires Timur's kernel and a special version of the USB OTG cable with power input.

    Using a streaming music service, you can download playlists for offline use using Wi-Fi or side-load your music collection directly onto the drive. When tethered while driving, your playlists will automatically update in the background. However, having no connection or throttling issues won't be a problem since you already have a large collection of music available locally.


    Safe Control and UI Issues

    Problem: Many people have concerns about safe operation while driving. Basic functions should be accessible without taking your eyes off the road.

    Solution: The knobs on the clarion are small, but you can still use them for volume sub control or mute without taking your eyes off the road. You can safely switch tracks using the Google music player and Spotify because both apps support swipe gestures to switch songs. I don't even have to take my hand off the shifter, I can quickly switch tracks by swiping left or right anywhere on the display. I also hooked in a USB media remote that sits in my arm rest. Another option is voice control. Dragon Dictation lets me say phrases like "Play <any song> by <any artist> with <Spotify | Google Music>" and song will promptly start playing. Phrases like "Find Italian restaurants in the area" will bring up Yelp listings that I can subsequently ask it to navigate to.

    Boot Time

    Problem: I've heard complaints about boot time with Android and the time it takes to start playing music.

    Solution: Using Timur's ROM, boot time is not an issue because the tablet is always on. The OS watches for external power events and turns the screen on when the car starts and puts the tablet to sleep when car shuts off. There is minimal power loss in deep sleep because wake timers, communication, and background analytics are all stopped. I only lose 1-2% battery power overnight on average. It's back to 100% in less than 10 minutes during my morning commute. I disabled the lock screen, so it resumes what I was doing when the car starts. Due to virtual links, there is no need to remount the drives, even though they were not powered while the car was off. I can resume playing a song immediately. With this solution, the tablet works like a normal radio.

    Connectivity Issues

    Problem: I addressed Internet connectivity in the storage section. Now I'd like to address how you can connect auxiliary devices.

    Solution: I have a bluetooth OBD II module communicating with Dash command and Torque apps for all the realtime data I could want. These are great apps, complete with data logging capabilities, shift lights etc. I can also see how many G's I'm pulling on the freeway off ramps

    Aux in: I ran two USB extension cables and a set of RCAs with a removable 1/8" adapter to the glove box for the option of hooking up any auxiliary device. The Clarion is inexpensive, but it offers the basic features you'd want from a radio, including aux in. It has an adjustable gain on the secondary input to match the levels to the primary source so, there is no sudden change in volume when switching sources.

    Noise canceling mic: The external USB DAC also has inputs that can be used for connecting a mic. I ran an extension wire up inside of the A-pillar to the right side of the visor.

    Apps
    I saw someone ask about apps that work well in a car. There are countless inexpensive and free apps that work well. The sky is the limit. This is a big part of why I went with Android. Navigation, OBDII, voice control, streaming music, car widgets, all with easily readable touch optimized input. I can even LISTEN to the news with the NBC app playing top stories on the way to work. Passengers can watch the news, Netflix, Hulu, Plex, or locally stored movies.

    Phone Calls
    I've yet to set this up but it's possible and on my to-do list. Tablet Talk lets you dial and send / receive texts from your tablet. It's essentially just a remote that controls the phone with no sound. To do this, you need to patch the phones output to the secondary aux input and switch sources. You'd also need a mount for your phone that places it close enough for the microphone to be in range. Otherwise, you would need a second external mic. Alternatively, you could use Talkatone with a Google Voice phone number. You can have your regular phone number forward to Google Voice after a certain number of rings. To receive the call, don't answer your phone and it will go directly to the car. If you don't answer the call in the car, it goes to Google voicemail transcription. I'll probably go with the second method.

    Charging / Power

    Overall Problem: There are number of challenging issues related to charging and power. Driving all this kit requires a lot of current. Most people go through a few cheap solutions that disappoint before finding one that's up to the task. If you don't have a sufficient power supply, your tablet won't stay fully charged.

    Problem 1: Converting 12V to 5V with a supply that can provide sufficient current.

    Solution 1: Most people try to disassemble or splice into a car cigarette lighter adapter, which just doesn't cut it. Even if the manufacturer claims it's rated for 3A, these usually have two USB ports with shared power, so you're not getting 3A to one port.

    You need a step down converter. The simplest way to reduce the voltage of a DC supply is to use a linear regulator. These are inexpensive, but they dissipate excess power as heat. Adequate cooling will be required with this solution via a heat sink. For a linear regulator I'd recommend using the Carnetix CNX-P5V as a stand alone POL regulator. I'm using this one myself with a CPU heat sink and have no charging or temperature issues while driving. It's only $26.

    Buck converters are more efficient, but more expensive. The DCDC-USB is a great converter that can supply up to 10A, but it costs $60 and requires some programming.

    Problem 2: Getting the OS to leverage the available power. I've read about people getting inconsistent results and they weren't sure why.

    Solution 2: After reviewing the data sheets for the charging circuit and the low level code, I understand the problem. The charging circuit will check the impedance of the supply connection and limit charge rates accordingly. For this reason, it's best to use wires that are as thick and short as possible. You also want a good, solid, chassis ground connection. Ideally, you can avoid ground loops by making this a common point where your EQ is also grounded.

    Secondly, the OS distinguishes between USB and AC charging modes. Modern computers and hubs only provide between 100-500mA per port as per spec, with Macs being the exception. By contrast, the charging adapters included with your device can provide ~2A. Timur's USB ROM enables fast AC charging while in host mode. However, you have to ensure that there is an adequate power supply. You can't power your USB OTG cable with a 500mA port.

    When calculating your power budget, you need to consider the power that will be used by the tablet, the USB DAC, and your drives. You'll want to allow 2A for the tablet for fast charging. An efficient USB DAC, like the UCA 202, will need about 100mA. The current rating on the hard drive you use will need to be added to that. If it were 1A, the total current would be 3.1A.
    When connecting all this together, your tablet is on the host side of the hub. Power will be supplied with a USB OTG cable like the one pictured below.

    Name:  Messages Image(1468238667) copy.png
Views: 16793
Size:  18.8 KB

    With this cable and USB ROM, power goes both directions as shown in the diagram below.

    Name:  Messages Image(780195814) copy.png
Views: 18747
Size:  47.5 KB

    The 3.1A, or more depending on your particular hardware, will need to be connected to the male USB connector shown at the bottom of the diagram. The USB hub is attached on the right. If you use an active hub, you'll need to connect an additional supply. Regardless of which type you use, you'll need to look at the manufacturer's specifications to learn the per port current limit. If your hub supplies 500mA per port but your drive needs 1A, you can use a USB Y cable to bridge the power from 2 ports. Be cautious about using hubs with more than 4 ports because each port doesn't always get the same amount of power.

    Problem 3: Switching the supply on and off with the car.

    Solution 3: Use a 12V relay before your step down converter or use a converter with a remote output. Don't try to use the accessory line from your radio harness to power the converter, because it won't provide enough current. This should only be used as a remote signal. Any time power is removed from the input on the OTG cable, USB ROM will go to sleep.

    Problem 4: Temperatures in the car can get very hot due to the greenhouse effect. This presents some safety concerns with the lithium ion battery. Battery charging circuits have built in safety protection. If the interior of the car gets too hot while parked, charging will be disabled. There is a periodic wake up timer that will check the temperature. Charging won't be allowed to resume until the temperatures have decreased to an acceptable range, typically less than 45C. Some have noted that between 37-45C, charging may occur, but it is very slow.

    Solution 4: This is the last problem I'm tackling. I hope to have a solution in the coming weeks where the tablet battery isn't necessary. Ideally, I'd like to use an SLA battery or the car battery with a buck regulator to deliver 3.7V for standby. It's not a trivial problem, as modern batteries are smart, so the OS needs re-worked to believe the battery is still there. I'm currently identifying all the software procedures that will need to be re-written for safe operation. Stay tuned for updates.

    Credits:
    Most of this wouldn't be possible without Timur's USB ROM. It's the only reason I picked up a Nexus 7. I would have preferred to purchased a tablet with the Snapdragon processor I help design, or maybe even an iPad mini. However, Timur's ROM had too much value-add for a fixed car install to ignore. I'm stuck using a tablet powered by our competitor, Nvidia Tegra, for now. The next Nexus 7 is publicly rumored to have a Snapdragon chip, so this could change.

    Here's a link to Timur's USB ROM:
    http://mehrvarz.github.io/nexus-7-usbrom/

    It's associated development / discussion thread:
    http://rootzwiki.com/topic/37755-tim...ent-usb-audio/

    All of the tablet install related bits including the EQ line driver came out to around $500 bucks, about the same as a decent aftermarket radio. I did another $500 worth of audio upgrades at the same time since I had the car apart anyways.

    So that's it for now, let me know if you have more questions or suggestions.
    Last edited by Ion; 06-15-2013 at 01:37 PM.

  2. #2
    Variable Bitrate daclothe's Avatar
    Join Date
    Dec 2004
    Posts
    233
    Excellent write up. Well done and well written.

  3. #3
    Newbie
    Join Date
    Jun 2013
    Location
    Chicago, Illinois, United States
    Posts
    11
    wow...awesome job man, see I keep going back and forth on this I want android for sure but don't know if I want to go the tablet route but this looks very promising

  4. #4
    Newbie
    Join Date
    Jun 2013
    Location
    Chicago, Illinois, United States
    Posts
    11
    USB audio....amazing...thank you for this, ive got some thinking to do

  5. #5
    Newbie
    Join Date
    Jun 2013
    Location
    Chicago, Illinois, United States
    Posts
    11
    USB audio....amazing...thank you for this, ive got some thinking to do....I was unsure if I wanted to go the tablet route or get a touch screen and the android development sysbd...how s the GPS reception or are you using an external GPS

  6. #6
    Newbie focused313's Avatar
    Join Date
    Jul 2012
    Location
    Michigan
    Posts
    25
    I'm having a few issues with my tablet install, Acer a100 (not rooted), that I hope you can shed some light on...

    I have tasker set up to turn off the brightness, wifi, bluetooth, and screen timeout after 8 seconds, which all work fine. I use jetaudio for my music player and when it's playing, it won't stop and/or pause the music when the screen times out. I tried using "kill app" with tasker but it didn't work. The screen won't time out when on jetaudios main "now playing" screen, but if I'm not actively viewing the app, the screen will time out but the player won't stop. This is also true for tune in radio.

    My tablet is plugged in using the factory wall charger to a power inverter in the front cig lighter.

  7. #7
    Ion
    Ion is offline
    Newbie
    Join Date
    Jun 2013
    Location
    Raleigh, NC
    Posts
    5
    Quote Originally Posted by jathomas0910 View Post
    USB audio....amazing...thank you for this, ive got some thinking to do....I was unsure if I wanted to go the tablet route or get a touch screen and the android development sysbd...how s the GPS reception or are you using an external GPS
    Not al tablets have built in GPS, but the N7 does and the reception works fine. Navigation is working great for me with the default internal GPS.

    The development board approach is intriguing from a hardware perspective. If paired with a ByteByte case and a Lilliput screen, you could have a very clean looking install without much cutting / fabrication. I just don't know if there is a ROM like Timur's available for a development board. Touch-display drivers may need to be integrated as well. If someone knows of a good automotive tweaked ROM for a development board, I'd love to hear about it. Without this, some coding would be needed to make the most of this platform in a fixed car install. Total cost could be a bit more when all is said and done too as the Lilliput display will add a bit to the bill of materials.

    There are plenty of N7 car installs though so this seemed less risky to me at this point in time.

  8. #8
    Ion
    Ion is offline
    Newbie
    Join Date
    Jun 2013
    Location
    Raleigh, NC
    Posts
    5
    Quote Originally Posted by focused313 View Post
    I'm having a few issues with my tablet install, Acer a100 (not rooted), that I hope you can shed some light on...

    I have tasker set up to turn off the brightness, wifi, bluetooth, and screen timeout after 8 seconds, which all work fine. I use jetaudio for my music player and when it's playing, it won't stop and/or pause the music when the screen times out. I tried using "kill app" with tasker but it didn't work. The screen won't time out when on jetaudios main "now playing" screen, but if I'm not actively viewing the app, the screen will time out but the player won't stop. This is also true for tune in radio.

    My tablet is plugged in using the factory wall charger to a power inverter in the front cig lighter.
    Some have reported issues getting screen to wake-up by tap rather than with power button. This can be problematic if the power button is out of reach. In order for the display to process the input, it will need to be receiving power. I have found while experimenting that a media remote would allow me to turn on and off my screen. A remote will also switch tracks while screen is off.

    Out of curiosity though: Why have screen time out if you have an external power supply? I disabled my screen time-out and dim indefinitely with an app I found in the Play store. I wanted it to stay on like a normal navigation radio. My screen only shuts off when the car does.

  9. #9
    Low Bitrate
    Join Date
    Mar 2012
    Location
    Arezzo, Tuscany, Italy
    Posts
    92
    Great project Ion!
    How do you made the voice recognition working? I'm following Timur's USB ROM thread on rootzwiki and some major complaints are about external/usb dac's microphone not working. Did your setup works with google's own voice recognition?
    You named Dragon Dictation, but I can't find it on the Play Store..

  10. #10
    Ion
    Ion is offline
    Newbie
    Join Date
    Jun 2013
    Location
    Raleigh, NC
    Posts
    5
    Quote Originally Posted by papinist View Post
    Great project Ion!
    How do you made the voice recognition working? I'm following Timur's USB ROM thread on rootzwiki and some major complaints are about external/usb dac's microphone not working. Did your setup works with google's own voice recognition?
    You named Dragon Dictation, but I can't find it on the Play Store..
    Thanks. I just checked out your project thread. Very nice Alfo Romeo. I don't think I've ever seen one in person here in the US but we're supposed to get the 4C over here next year.

    I haven't had any issues with the mic and DAC so I'm not sure why others are. I'm using the Behringer UCA202 DAC with an Olympus ME-52W Noise canceling microphone. I use a 1/8" extension cable and a 1/8" to Mono RCA plug converter connected to the Left RCA input on the UCA202. The monitor switch is set to "OFF" so there will be no feedback. With this configuration, any voice app works incredibly well including Google's built in recognition. The App I'm primarily using is called Dragon Mobile Assistant.

    https://play.google.com/store/apps/d...uance.balerion

    The trick is just to mount the mic some place in the car where there isn't too much noise. My first location was on the A-Piller on the driver side near the dash and window as it was out of sight. This didn't work well because of proximity to air vent and also the window when open. Re-routing it to the middle of the trim above the windshield provided better results. Voice control is very helpful as the text and buttons on the Nexus are small and it can sometimes be hard to read in the direct sunlight.

    -Ion

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 06-16-2013, 04:28 PM
  2. App for auto pause/sleep??
    By DrLove in forum iPad Apps for the Car
    Replies: 5
    Last Post: 08-30-2011, 08:44 AM
  3. Auto On/Off Using Hibernate *and* Sleep?
    By Lumenii in forum Power Supplies
    Replies: 2
    Last Post: 09-01-2010, 12:27 PM
  4. Replies: 2
    Last Post: 10-06-2006, 01:37 PM
  5. FS: Hard Drives, External Enclosure
    By StratusPh34r in forum Classified Archive
    Replies: 12
    Last Post: 04-22-2005, 11:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •