Project GamePi: Raspberry Pi Based Portable Game Console

Hi!

DSC_3044

 

Hope you’re well. In this weeks episode of ‘Weird Electronic Devices You Can Make In Your Own Home’, we’ll be diving into a Raspberry Pi based handheld inside of a Game Boy (DMG). My inspiration to pick this one up was seeing the awesome SuperPiBoy,  as well as the wonderful PiGRRL from Adafruit. I took bits from both of those projects, and added my own small touch.

Parts:

My little bit of spice for this project were the additional 3 controls on the rear panel. Instead of using momentary switches,  I used capacitive touch sensors. I chose the standalone versions that Adafruit sells, because the form factor is favorable to this application, and for simplicity.

I started with a trashed original Game Boy. I found it in a lot buy with a broken Game Gear (I can see another project in my future… :)) for 15$. I handed off the internals to a chip tune obsessed friend, and began the conversion.

I chose not to retain any of the original parts, except for the plastics. I first measured the LCD window, and shaved it to the appropriate size for the 3.5 inch LCD. I shaved down as much of the internal plastics as I could. I then mounted the LCD in place with hot glue. The KB button PCB mounts using the original mounting hardware, no modification required.

DSC_3008

With that done, I soldered a ribbon cable onto the button PCB, and removed the 12v -> 5V regulator from the LCD PCB. I found a datasheet for the regulator on my board, but your results may vary. Apparently, there are many revisions of this device. Here’s a link to a thread which speaks out the conversion in detail (Thanks SuperPiBoy). You can see where I soldered on to the 5V OUTPUT pad on the chip footprint in the photo. Worst case, you can search the board for a chip that has 12V on one pin, and 5V on another, it is likely that’s the chip that needs to be removed.

DSC_3028

The LCD PCB ends up being slightly too large to fit into the case, but can be safely shaved down without having to move any traces. If you needed to keep going with the shaving, the buttons can be moved easily.

DSC_3007

With that done, the Mini USB breakout gets mounted where the old power switch was. It’s the perfect footprint for that spot, and with a tiny bit of shaving, gets supported by the plastic standoff post in that corner.

  • The USB 5v and GND output get tied to the LiPoly Charger 5V and GND.
  • The Charger BAT and GND get tied to the respective V+ and GND on your battery of choice. (Please though, only use LiPoly with the LiPoly charger, obviously.)
  • Pass the V+ from your battery through your SPDT switch, and then along to the PowerBoost V+ input.
  • GND on the battery can go straight to the PowerBoost GND.
  • 5V Output from the PowerBoost goes to the TP2 pin on the Raspberry Pi, and PowerBoost Output GND goes to TP1 pin on the Pi.

Congrats! Your Pi is powered. Your LCD board will also need 5V output from the PowerBoost, as well as the three capacitive sensor boards and audio amplifier.

DSC_3016

DSC_3017

DSC_3023

After a significant amount of shaving of the rear case, I was able to mount all of the aforementioned electronics. The chargers and power input devices are mounted on the recessed area of plastic for the cartridge. The capacitive pads are underneath the label area of the rear plastic. I mounted a female USB port where the old Link port was, and the SPDT switch where the volume knob used to be. I hotglued my snazzy Kitch Bent battery cover in place, and cut it’s locking tab to save space.

DSC_3020

I drilled holes in the center of the cap-pad plastics, so there can be a tactile feeling when searching for the buttons on the rear case. I also used a significant amount of nuts/bolts and standoffs to hold everything in place solidly, so the rear case is littered with bolts in different areas. I used a “Cell” format battery, so that it would sit nicely on the bottom of the case. The battery I chose also has an in-circuit thermal cutoff, so if there’s a problem charging it, it will (hopefully) prevent serious damage/fire. I cut the “fuel gauge” board off of the cell, as I didn’t need it.

DSC_3025

DSC_3026

DSC_3021

For the Raspberry Pi, I removed the Audio Jack, Composite Jack and relocated the USB port. Being a Model A, it did not have the Ethernet jack or second USB port. I soldered wires onto the respective areas to pull the signals I needed. Take care when soldering to the Composite Video pads, as it’s easy to damage the Pi’s composite output with too much heat. For the audio, I routed the Audio Jack output direct to the headphone port, as well as to the amplifier board. Since I did not have a “switched” variety headphone jack around for this project, I came up with the following arrangement. When booting, the Pi runs a program to check the state of the 3 Cap Pads. If they’re all HIGH, it will boot into “Headphone Mode” and drive the Shutdown pin on the amplifier board, freeing the headphone jack. For the speakers, I stuffed a set of Macbook (3Ohm) speakers into the area where the old GB speaker used to be. I tied them to the outputs on the amp board.

I trimmed down the GPIO pins down to half height, and soldered the Common Ground PCB and OUTPUT pins (from the cap-sensors) to their respective BCM GPIOs. I then cleaned up the wiring with a couple of wire ties, and routed the wires as best I could.

DSC_3033

DSC_3036

DSC_3035

And, that’s it!

As far as software goes, running on a Model A means that running RetroPie 2.0+ is out of the question (as ES 2.0 is apparently more graphically intense, and requires a 256/256 GPU split). I loaded RetroPie 1.10 onto a high speed SD card, and shimmed in my custom bits of software to glue everything together. Cave Story runs great! 😀

 Post-Mortem:

When shaving the case down to fit the LCD, I neglected to do something about the standoffs for securing the two halves of the case together. This lead to complications at the very end of the project, because there was no reliable way to join the halves together. I fixed this by hot gluing a bolt down in two corners of the case. I then fed a machine screw up into the case, and into the bolt. My screws ended up being the perfect length to pull the bolt, without going all the way through. It hurts the project’s aesthetics, as it’s clear the halves no longer join seamlessly, but it has an acceptable amount of mechanical strength.

The Capacitive Sensors are HIGH when active, and LOW when dormant. The opposite is true for the Common Ground Button PCB, which (when the internal pullups are activated) are HIGH when dormant and LOW when active. This lead to complications using Retrogame (the Adafruit C utility used to convert the physical button presses into keyboard events), as the ‘always-active’ buttons would pin it. I’m in the process of writing a program that is compatible with mixed button conditions, and will update this post when I push it to my git.

DSC_3042

 

 

 

Project I-Love-Lamp: Adafruit Qualia + Lamp

Hi dere, internet.

It’s me, the human embodiment of a baloney sandwich, at it again.

DSC_2989

Recently, one of my favorite sites in the whole Multiverse, Adafruit, released a new product called the Qualia Board! If you haven’t heard, this little board makes it easy to use your iPad Retina (3/4) screen, as a secondary monitor! That’s 2048×1536 resolution on a ~10 inch panel. Pretty fantastic.

I purchased one of the bareboards and got to work. (There’s also this awesome kit, if hand rolling is not your thing. The kit is pretty rad all on it’s own.) The idea is, to take the iPad screen, mount it in an iPad shell, and mount the iPad shell onto a lamp base! I did something similar in one of my previous projects with a broken Nexus 7. I really am happy with my little N7 Lamp, so I decided to give it another shot with something a little bigger.

Parts:

Adafruit Qualia Board

iPad Retina Screen

Hampton Bay Architect’s Lamp (22 in. Matte Black)

Display Port (Full Size) to MiniDisplayPort (It MUST be DisplayPort, you cannot use a converter.)

12V-9V 1A Supply

I used: iPad 1 Back Panel

(You could probably do better with an iPad 3 Back Panel, but I couldn’t easily find one for cheap enough.)

Machine Screws:

8x 2x8mm

2x 3x12mm

2x #3 Flat Washers

12x #2 Metric Hex Nut

2x #3 Metric Hex Nut

Tools:

Grinder/Dremel Tool

Power Drill with various bits

Needlenose Pliers

Philips Screwdriver (or a flat, whatever head you chose for your machine screws)

Sharpie

Sheet of 8×11 Paper

 

The Plan:

First thing’s first. Take your drill, choose the appropriate size (one size larger than the silver rivets holding the lamp head to the arm), and drill out those pesky rivets. Snip and pull the AC cord out from the body of the lamp arm.

DSC_2970

DSC_2971

 

DSC_2972

 

Next, place your Qualia board onto the 8×11 sheet of paper. Trace it with the Sharpie. The ribbon cable for the screen will exit the LCD to the left middle of the iPad backing, if you have it mounted horizontally, so you have to cut it a whole to run it to your Qualia board. Trace a smaller rectangle inside the one you made when tracing your Qualia board, about 75% of the original size. This will be the template you use to cut the whole in your iPad backing. I completely botched this part of mine, and cut the hole too big, so I added some perfboard to mount the Qualia to.

DSC_2977

DSC_2978

Be sure to add some insulating material between the Qualia and the iPad backing. It’s conductive aluminum, and will potentially short it, otherwise. Test fit your iPad screen into the backing, make sure the ribbon can reach the board easily. It should not be bent in a strange way, or it can be damaged. It’s very easily broken, so be careful when handling the ribbon cable. Mark the 4 holes of the Qualia on the iPad backing (using your 8×11 sheet), and drill them using a #2+ drill bit. Mount the Qualia using 4x of your 2x8mm machine screws and the corresponding bolts.

Place your 8×11 sheet up to the end of the lamp arm, and mark the paper for the two oval holes. Use this as a template to drill the two holes in your iPad backing, where you’d like the arm to mount. I chose dead center (because the arm can go portrait/landscape). Use a #3+ drill bit. Place the 2x 3x12mm screws through the end of the lamp arm, through the iPad backing, put on the 2x #3 flat washers, and then thread on the #3 nuts on both screws. Make sure these are secure.

Now, place your iPad screen atop the 8×11 sheet of paper. Mark the 4 holes for the mounting bracket. Double check once more that the ribbon cable from the screen reaches and plugs in properly. Now, place your paper atop your iPad backing, and drill out the 4 mounting screw holes. Same drill bit that you used for the Qualia mounting points. Put your other 4 2x8mm screws through the backing, thread a single nut on each screw. Now, place your iPad screen onto those 4 bolts. Put another single nut on each screw to secure the screen in place. Connect your screen ribbon cable.

DSC_2979

DSC_2980

Plug in your DP and power cables, and run them down the arm. I secured mine with zip ties. Just make sure you leave the appropriate amount of slack on the cables, so that the arm can flex properly, or you’ll limit your motion.

DSC_2991

DSC_2986

Kapow! Done!

 

Post-Mortem:

I love that this thing articulates. My at-home desk is a very small table, and previously I did not have enough room for a second monitor. I’m addicted to having one thanks to my work-desk, so this totally beats that problem. It’s a neat little gadget. It could be a lot nicer looking if you used a donor broken iPad 3/4 as your shell, but I only spent 15$ on the iPad 1 backing, which is pretty cool for a sweet piece of a aluminum like that. Same goes for finding a 10 inch capacitive touch panel to place over the screen, but… that’s not that easy.

 

Project BlackBook: Return Of The Backlight

This project has been hiding on the back-burner for a while, but I finally had some time recently to complete it.

 cat /dev/urandom | hexdump, because The Matrix.
cat /dev/urandom | hexdump, because The Matrix.

A couple months ago, I found myself with a dilemma. As a favor to a friend, I traded them a perfectly working 2009 MacBook Unibody 13 Logic Board, for one with a broken headphone jack (jack snapped off inside, physical damage to the connector) and problems with the keyboard controller. It also had a busted fan.

Replacing the broken components isn’t fun for me, as it stretches the limits of my soldering ability. Surface mount, fine pitch for the keyboard controller, and deep through hole for the headphone jack, make for irritating replacement. Earlier model MBPs had the keyboard controller and trackpad controller built onto a single board (the trackpad itself), and then connected to the logic board via a dedicated USB connector. There were additional pins for the power button, but that was pretty much it. Newer models (Multi-Touch Trackpad 2008+ Models) have the trackpad completely separate, with the keyboard controller positioned on the logic board itself. The keyboard backlight is driven by a WLED driver similar to the LCD backlight in those models, with maximum brightness measured at 18V. The LEDs are wired in series. This design remained constant between the Pre-Unibody and Unibody designs, with the only difference being the Unibody designs contain more LEDs in the chain. Both systems have a separate connector for the KB backlight. Here is a link that describes using the Pre-Unibody trackpad and keyboard as a USB device, which I used to find the pads on my 17″ top case.

I decided the best solution to the logic board problems was to build a Pre-Unibody keyboard (with the controller board) into the body of the Unibody system, and place a USB sound card inside some free space. Measuring out everything was quite fruitful, as I found that both have a recessed area for the keyboard, with the Pre-Unibody keyboard pan being only slightly thicker. The Unibody system is designed with some pretty tight tolerances, so there isn’t too much room for mistake. With that, I began the conversion.

For the rest of the article, I’ll write up U as Unibody, and PU as Pre-Unibody. I’m sure you’re just as sick of reading it, as I am of writing it. (Also, all of these pictures are out of chronological order. Sorry.)

First, I measured out the area of the PU top case to cut out. I left myself a seam of the original palm-level part to work with. I was using a 17″ PU MBP top case as my donor, so I had a lot of spare material in case of a mistake.

DSC_4288
DSC_4285
DSC_4289

Once I cut the pan free, I placed it against the U top case, and measured out where to cut the hole. As I mentioned earlier, the U case has a recessed area in the body for the keyboard, so this was my target area for the new one. The tapered edge of the recess was used as my general guide for the cut.

After this was one, I pulled the keyboard wireframe out of the U top case, and placed in the PU keyboard pan. Using duct tape, I joined the two together by placing strips across the body longways. I then poured clear epoxy into the seam. The duct tape kept the epoxy from running, and gave me a nice smooth seam on the front, with minimal running.

DSC_4295
DSC_4291

Some curing time later, I sanded the epoxy down to a nice (pretty) smooth finish. I used a test motherboard to see how the fitment was. I found that I needed to grind some of the epoxy down to get the board to fit. After some fancy-footwork with the Dremel, the board fit like a charm.

DSC_4322

The thickest area of contiguous free space inside the system is believe it or not, the hard drive bay. At first glance, it seemed to me as though the best area for the extra electronics was going to be the area where the optical drive previously resided. But, it isn’t. There’s much more vertical space where the hard drive is mounted, for a variety of reasons… So, that was where I cut the hole for the relocated USB port and new headphone jack.

DSC_4533
DSC_4563
DSC_4577

I purchased an 8 dollar optical drive slot hard drive mounting bracket, and hacked it to pieces. The HD fit snugly inside the optical drive area, and after some shaving, there was even a little room left over.

DSC_4578

Rather than spend any more money on this system, I reused a 2007 MacBook fan as the main fan. Since the fan mount is reversed on these models, I had to mount it upside down. This was a problem for airflow, so I drilled holes in the bottom cover. They were haphazardly drilled, and I’m ashamed at how ridiculous it looks, but, it does the job. I also made the rubber feet much taller in the back using Sugru, which did wonders for my temperatures.

IMG_2141

Time for paint! I wish I had the facility to anodize the aluminum of the body, because I’d be all over that. But, I don’t, so paint it is. It’s a shame Apple has yet to release a “Black Edition” of any of the Unibody line, because they’d be pretty.
I thoroughly sanded the main layer, but did not remove all of the aluminum coating on the U top case. The lid I left stock.

DSC_4560

I painted both the U top case, and the bottom cover, with two coats of Krylon All-Surface Matte Black spray paint. The coat is reasonably durable, and the Krylon has been resistant the torture of my backpack so far. I would get automotive clearcoat if you really want your paint to last.

DSC_4559

Using hotglue, I replaced the right speaker, and mounted the subwoofer to the center support rail. The left speaker needed to be shaved down significantly in order to fit in it’s original position between the logic board and the keyboard pan. I sealed the holes with hot glue (the body of the speaker is hollow for improvement in bass response).

I stripped apart a powered 4 port USB hub that I had (A nicely designed one with a regulator circuit) and cut off the connectors. I soldered a ribbon cable to one of the root ports on the logic board to feed the hub, and then the sub devices were wired onto the hub. I added a USB sound card, a 16GB USB flash drive (case removed), the Trackpad/Keyboard Controller for the PU keyboard, and then wired the last to a female USB port I mounted to the U top case. I mounted the female port using epoxy. You can see in one of the photos, I didn’t properly clamp the port the first time, and it was slanted. I removed it, and had to repoxy it.

DSC_4580

I wanted the original KB backlight to work, but I also wanted to try backlighting the trackpad and the ports. I took the LED panel from underneath the original Unibody keyboard, and cut the diffuser down to just slightly larger than the trackpad. I soldered wires onto the ribbon, wired those in series with the PU’s KB backlight LEDs, soldered them to another ribbon, which was then connected to the logic board. (Whew. That was a mouthful.) For the ports, I wired 3.0V fat SMD LEDs in parallel (with an in-line resistor) to the 5V feed of the PU KB controller. The LEDs are secured with hot glue. I used the hub for the 5V source, so that if there is any short of sorts – the hub will protect the root port from being damaged. The root port on the logic board has two beads of hot glue inside the port, so that I cannot plug anything into it.

Testing LED Lit Port Theory
IMG_2137

DSC_4579

The PU keyboard controller had a limited area where it could be mounted, as the ribbon cable for the PU KB is short. I chose to place it underneath the battery, which is a very tight fit with the trackpad backlight. However, both the PU keyboard controller and backlight panel are very thin, so while it’s tight, there is no adverse pressure on the battery. There is no room on top of the battery for the PU keyboard controller.

DSC_4320
DSC_4572
DSC_4577

 

Since I cut out the supporting circuit for the power button, there was no way to turn the system on. On every MacBook, there’s a set of pads that can be used to boot the system without the keyboard. For the 2009 Macbook Pro Unibody 13 Inch logic board, these two pads are located next to the trackpad connector. Here is a high res photo. The pads are highlighted in blue. I mounted a large push button on a piece of perforated board underneath the power button, and wired this to those pads. The button is now recessed a bit, due to the difference in height, but I think this ended up being a benefit.

DSC_4335
DSC_4593

That’s about it. The port LEDs are always on, which does drain a bit more battery than without, but they’re tiny LEDs, so the difference is minimal. Since the TP and KB backlights are wired in series, the fading effects and brightness control still work as they did originally. I wish that the trackpad backlighting effect was more pronounced, but it’s subtly nice. The keyboard is nice to type on. I like the PU style better than the chiclet-style on the U-models for typing, but definitely not for cleaning. The 16GB flash drive is loaded with my Lion ESD Drive, and a seperate partition for my special system images/testing Linux distros, etc. The USB sound card is a $10 job I picked up at a local electronics store. Here‘s a tip for switching your sound output device from the menu bar in OS X, which makes using the USB sound device less cumbersome. I painted over the IR eye, status LED, and battery status LEDs on the case, so… I don’t have those. If you’re more diligent than I, you can pop the little plastic diffusers out before painting. I completely removed the HD ribbon to the logic, to save space in that area. I used way too much tape, and the ribbon cable I chose for the USB was too thick. I think the contrast of the black vs. the silver looks awesome. Overall, I’m very happy with how it looks. It’s an one-of-a-kind eye catcher.

Eventually, I plan on adding a hardware serial port using a USB->TTL converter and a 3.5mm jack. Adding effects to the port LEDs using a microcontroller, and adding more LEDs for the mouth of the optical slot.

There are more photos of the process in the gallery. Now, for the finished shots.

 cat /dev/urandom | hexdump, because The Matrix.
cat /dev/urandom | hexdump, because The Matrix.

DSC_2171  DSC_2191 DSC_2193 DSC_2194 DSC_2197 DSC_2200 DSC_2204 DSC_2207

(TL; DR: I built the keyboard from a Pre-Unibody MacBook Pro into a Unibody MacBook Pro 13. I also added a USB hub, a USB sound card, USB flash drive and relocated an active USB port to the area adjacent to the hard drive bay. The ports and trackpad have also been backlit, and the original keyboard backlight works as well.)

How To Ruin A Perfectly Good Lamp With A Nexus 7

Hi Friends!

DSC_4424

I hope you’ve all had the opportunity to enjoy your favorite food recently. (I tried to come up with an alternative friendly greeting. I think I nailed it.) This post could alternatively be called “What To Do With Your Nexus 7, When You Crack The Screen”, but, I’m weird.

ANYWAY! (As most of these posts start off) I was browsing eBay a couple months ago for a secondhand Nexus 7, and I learned some things.

  • Once you crack the screen on a Nexus 7, the digitizer will completely stop functioning. (In most cases, but perhaps not all… N7 users can chime in here?)
  • Replacement digitizers are really expensive. ($60+, and I saw as much as $160+ for some.)
  • Due to these facts, people were selling their tablets at what could only be described as “mega-balls cheap”.

Most of my queries turned up an average unit price for an 8GB cracked screen N7 of $50. I managed to snag one at $45 shipped, which is a fantastic price for the specs this tablet carries. Just now, the lowest price I could find was $60. There’s some amount of luck involved. Just to quickly recap the N7s specs:

  • Quad-Core Tegra 3
  • 1GB of RAM
  • ~8GB of Storage
  • Wifi + Bluetooth
  • USB Host/USB OTG
  • Built-In Battery, Charger
  • Audio Out
  • Unlockable Bootloader

So, basically… features that you’d pay a sizable amount more for an equivalent ARM SBC. And, the icing on the cake is that this will run: Ubuntu 13.04, Android 4.2.2, and Ubuntu Touch. I’m sure there’s more that I’m leaving out, but for all my intents and purposes these will do just fine. Out of the box Android 4.2.2 will allow you to use a keyboard and mouse with your N7, provided you have a USB-OTG cable.

I’m sure if you’re trying this out, you’ve realized the problem. In order to efficiently use your N7 with an external keyboard and mouse, you need to prop it up on something. If you’re using it in your lap, it’s falling over a lot, and you’re probably wanting to crack the screen more out of spite. DON’T DO IT, FRIENDO.

Instead, this cute $20 lamp can help you create a new friendly desk (immobile) robot. You’ll be the TALK OF THE TOWN, let me tell you.

Hardware Disclaimer:
If you ruin your Mom’s favorite lamp with this hack, you’ll be in big trouble. Don’t do anything silly. If you drill holes in your $1,000,000 Persian Rug, I cannot help you. I take no responsibility for your actions if you’re following this tutorial, and CERTAINLY NOT IF YOU’RE NOT FOLLOWING IT, since I spent all this time writing these instructions, for you to just IGNORE ME, GAH!

Parts:
Hampton Bay Architech Lamp (Matte Black) – $20
Nexus 7 – Cracked Screen – ~$40 – $60
Dremel with Metal Cutting Discs
Wire Cutters
USB A->B 6FT
USB OTG Cable
Soldering Iron
USB Hub
Philips Screwdriver
Needlenose Pliers
Flat-Head Bolts+Nuts+Crush washers
5V Supply (or hopefully, the Nexus 7 Charger)
Drill+Bits

Steps:

1. Unbox poor defenseless Lamp. Attach to base. Promptly break out your Dremel and metal cutting discs, saw off the two rivets that connect the lamphead to the springy-body. Be careful to leave the silver bracket intact, as you’ll be using that for the N7. Once the head is loose, you have to take pieces of the body apart to remove the AC cable. You might be able to get away with chopping it up, and tugging on the cable until it comes free… But, to save yourself some busted knuckles, I suggest you do it the slow way.
DSC_4418

DSC_4419

2. Your lamp will now refuse to do anything but spring completely upright, as there’s no weight to counterbalance the springs. Measure out where you’d like to mount your N7. I measured to what is roughly the center of my tablet, and made marks on the backplate that correspond to the holes on the silver bracket of the lamp body. Remove your backplate, (You should be able to stick something along the seam and pry it off, it snaps right off, no screws.) and drill the holes. The holes should be the about size of the flat-head bolts you selected. The washers will make up the play, so don’t sweat it if they’re a little loose. Also, don’t drill through the NFC coil, or any of the antennas. That’s important.

DSC_4420
DSC_4421

 

3. Thread the washers onto the bolts, and the bolts through the silver lamp-body bracket. Put the bolts through the holes you drilled in your backplate, and secure the backplate with the nuts. Tighten them fully. Use your Dremel to grind off excess bolt, as that’ll press against your N7’s battery/motherboard if left there. Clean dust thoroughly, then apply a dab of hot glue on one of the nut faces, against the backplate. Cover the nuts with electrical tape, (Hahahahahahahaha… Sorry, sorry.) so they don’t short anything out.

DSC_4422

4. It should look something like the above. ^ Now, snap in your Nexus 7! Congratulations, you’ve made yourself a cute little Pixar-lamp-buddy.

DSC_4424

DSC_4436

Software Disclaimer: Look, I hate writing these, but if you brick your device, you’re on your own. These instructions are in no way all-encompassing, or perfect. There is a lot of assumed knowledge. If you need some advice, email me. I’m always happy to help.

Now, you’re at a crossroad. There’s a lot of software routes to take, and I’ll in no way cover them all. I’m sure you’ll also wondering why I listed all of that USB cable stuff in the Parts section. Let’s start with Android, since that’ll be the default. If you fancy it, you can follow the steps here to flash CyanogenMod, unlock your bootloader and root your tablet. I will not cover CyanogenMod steps, which differ (slightly different kernels), but the general concepts will apply.

The conundrum about this setup is that it’s currently impossible to use a keyboard/mouse and charge your tablet at the same time. The N7 will boost it’s battery power to the USB OTG port while it’s in host mode, which means it cannot be accepting current for the charger. This awesome person named Timur created a kernel for the stock Android 4.2.2 setup that will allow you to charge and host devices at the same time. You can find it here. You want the one for “Fixed Installation”.

You’ll need to unlock your device’s bootloader before you can flash the USB+Charging Kernel. For this, you’ll need fastboot. Here are the instructions for unlocking your device’s bootloader, courtesy of Ubuntu. For Mac and Linux, here is a page that hosts the fastboot binary – you can find it in the zip for your respective OS. You don’t have to run that silly shell script if you don’t want to “install” the binary, you can just invoke it directly.  If using Linux, you may also find it in your respective package repository, which is a better option.

Unpack Timur’s USB+Charging Kernel for Android 4.2.2 ZIP (Make sure you are running 4.2.2….), and grab the boot.img file. Boot your tablet into fastboot mode (following instructions on Ubuntu’s Wiki.), and connect the microusb cable to your Linux/OS X machine.
Now, issue the following command (this assumes that fastboot is in the PATH and the boot.img is in the current directory):

fastboot erase boot && fastboot flash boot ./boot.img

Once fastboot reports success, you can reboot your tablet. It should boot up just fine, and look exactly as before, but now, if you go into your About Tablet menu, your kernel version will be “3.1.10-gdb06546-dirty Timur-USBhost-FI-2013-01-29@hexa #27”. Success!

If your tablet goes into a boot loop, or doesn’t boot at all… Don’t panic. (42) Google has the stock Android images and instructions on how to flash them, here. “Fastboot mode” can always save you if you nuke your device, but… just be careful. And, don’t EVER pull power on your device while a flash is in progress. I should also warn you, flashing kernels/ROMs from the Internet carries some risk, as you can never be fully sure what changes were made. (Unless you diff the source yourself… Good luck with that.) But, I’ve tested Timur’s kernel, and it works as expected.

Timur’s explanation page shows you how to wire your N7 so that you can use the hub and charge it at the same time (with the modified kernel.) It also goes into some more detail about what is meant by “Fixed Installation”. The wiring diagrams are in the “Using An USB Hub” section. I’ve noticed that there are times when I’ll need to replug the USB OTG connector to get the hub to recognize the connected devices again. It’s somewhat fragile, but generally, it works as it should.
DSC_4541

DSC_4542

DSC_4543

DSC_4544

Wrap-Up:

My N7 runs Spotify/Clock duties at my desk, and thanks to the lamp arm, can be positioned right above my screens. The lamp arm also swivels, so you can use it in portrait and landscape mode! The USB subsystem will occasionally be confused when returning from sleep, which will require a replug. In your Settings, under Developer Options, there’s an option called “Stay Awake”, in which the screen will not sleep while the system is charging. Be sure to enable “Day Dreaming” aka “Android Screensaver’ though, to prevent any chance of burn-in. That’s about it! It’s a great little machine for extra-desk stuff. The sky’s the limit in terms of apps, THE WORLD IS YOUR OYSTER! (This is also awesome for video chats. Just saying.)

DSC_4552_small