• A more reasonable touchscreen controller IC

    Evan4 days ago 0 comments

    In my first project log, I had designed a PCB for interfacing with the touchscreen digitizer, based around Atmel's mXT2952, which was the only device I managed to find that had:

    • datasheets available
    • enough drive / sense pins for the iPad's screen (40 drive, 30 sense)
    • a reasonable minimum order quantity

    Unfortunately, the mXT2952 is a tiny 5mm x 10mm 162-pin BGA, with 0.5mm pitch. This is a tiny, tiny package, and they made it extremely dense -- many BGA chips have a few rows of pins, some blank spaces, then a few more rows of pins. To fit a trace between two pads, you need 3 mil traces and 3 or 3.5-mil spaces. To fit a via between four pads, you need vias that are less than 0.25mm diameter / 0.15mm drill. While there are some PCB manufacturers online that claim to have these specs, the cheapest I was able to find was about $150 according to their online quote form (others seemed to be $300 and up). When I engaged with the cheap one, they told me they couldn't actually do 0.15mm drill holes.

    So I sat on this problem for a while, thinking maybe I'd eventually bite the bullet and spend several hundred dollars on a more expensive manufacturer.

    The other night, I searched the web again for "capacitive touchscreen IC", and saw some results for the Goodix GT911 and GT9271. The latter is used in the Pinetab, and it's one of the first touchscreen controllers I considered. However, the GT9271 only has 32 drive / 20 sense pins - not enough for the iPad's touchscreen, and the GT911 has even fewer.

    Long ago, I had tried looking on the Goodix webpage about their touchscreen controllers, which indicates that they have controllers that should work for even larger displays. This page has zero links or product numbers on it, however.

    I searched around to see if I could find a full listing of all the ICs in the gt9xx family, and searched for every part number I found. Eventually I stumbled on the GT9110 and GT9113 (which seem to be nearly pin-compatible). Both of these have datasheets available online (not from goodix.com, of course), were available for purchase on AliExpress, and have a reasonable 0.4mm-pitch 88-pin QFN package.

    I've created a new PCB design based around the GT9113 (should work for the GT9110 also - some of the broken-out pins become NC on the 9110).

    As always, if you have any feedback, please let me know!

  • First prototype of soundcard, some breakout boards, 30-pin connector decision

    Evan6 days ago 0 comments

    After the last project log, I posted my soundcard board to /r/printedcircuitboard, which was very helpful. Probably the single most helpful suggestion was to AC-couple the headphone jack instead of DC-coupling it. (The TI codec I chose can DC-couple the headphone port -- it provides pins that can be driven at some common voltage above ground, which the left and right channels are referenced to.) This should prevent short circuits if the headphone jack gets plugged into something that shares a ground with the 30-pin dock. It also freed up two outputs on the codec (the HPLCOM and HPRCOM pins can be used as outputs instead of as common pins). These extra outputs meant I could get rid of the analog switches I was using to select whether the codec's line out pins would be routed to the speaker amplifiers or to some headers (eventually meant to route to the 30-pin connector.)

    I also started another Github project meant for breakout boards for the various connectors on the iPad's logic board. In particular, I've created breakouts for the AA03-S024VA1 connector (for the iPad's ambient light sensor) and the AXK770147G (which connects to the PCB that has the 30-pin connector and the wifi/BT radio).

    After first doing a simple breakout for the AXK770147G, I made a second version where I went a little overboard, with impedance-matched differential pair traces (probably silly, since I'm breaking out to 0.1" headers), and deduplicated power pins. (The AXK770147G has a tiny 0.4mm pitch, so to carry 2A of USB power, it uses 7 pins. A single header pin will work just fine.) I also tried to pay attention to the signal return path for all interesting signals.

    I've ordered these boards + a stencil for the soundcard. Hopefully everything works!

    I think I've decided to keep the 30-pin connector. I had been mulling the idea of replacing it with a pair of USB-C ports, which would feel much more modern, but I kinda like the idea of rescuing old 30-pin accessories from eBay. I'll aim to specifically support the Digital AV Adapter (HDMI out, though it might take DisplayPort inputs from the dock connector?), the Camera Connection Kit (USB-A port and SD card readers), and the iPad Keyboard Dock (which also has line out). The Universal Dock is also cool - it has line out and supports the infrared remote control that comes with the Apple TV.

  • The beginnings of the soundcard

    Evan02/12/2021 at 22:21 0 comments

    I'm not sure why I'm working on the soundcard now; sound is pretty low priority (below power, display, touch, network connectivity...), but the speaker and headphone connectors are close to the touchscreen connectors.

    Since my touchscreen controller is going to be expensive to manufacture, I'm going to have it on a separate PCB than the rest of the project. The board that has my audio codec will wrap around the touchscreen controller, since it needs to have connectors for the speakers, headphone/mic, and potentially send line out audio to the portrait dock connector.

    I haven't decided whether to keep the portrait dock daughterboard, which is a long, narrow PCB that goes from the connector labeled as "Portrait dock" above, and ends with the 30-pin connector at the bottom of the iPad. It also has the iPad's wifi/BT controller on it - a BCM4329 connected via SDIO, which does appear to be supported in Linux. I think Apple put the wifi/BT controller here because it minimizes the antenna cable lengths -- one is behind the screen in the bottom-left, one is behind the Apple logo on the back. If I keep it, I won't have to deal with anything RF. It might also be sorta fun to keep 30-pin connector compatibility, so I can use original iPad/iPod accessories to break out component video (which the RPi CM4 has, for some reason), line-out, USB, etc. On the other hand, scrapping the 30-pin connector and putting in some USB-C ports instead would open up some more modern possibilities: HDMI/DP output, USB PD, USB 3 speeds, Thunderbolt... Plus I wouldn't have to scrounge around eBay for obsolete dongles.

    Anyway, for now I've started designing a circuit with a codec from TI, a pair of class-D amplifiers for the speakers (also from TI), and some analog switches to allow me to route the line-out signal elsewhere. The codec also has ADCs that I can use for the internal and external (headphone) microphones.

    TI has some codecs that have almost everything I want: built-in class D amplifiers for speakers, built-in headphone amplifiers, additional line-out pins, but most of the good ones are WLCSP, meaning 0.5mm BGA or smaller, meaning expensive PCBs. I've opted for one of the QFN packages, which I should be able to lay out with the capabilities of cheap PCB manufacturers.

  • The big scary touchscreen connectors

    Evan02/03/2021 at 07:59 0 comments

    The biggest unknown to me when starting this project was how I was going to interface with the touchscreen. In general, all the other connectors on the logic board are some sort of standard signaling scheme, like analog audio, I2C, USB, SDIO, or LVDS. I've never worked with a capacitive touchscreen before, so I had no clue where to start. (I've never worked with LVDS before either, but I at least have an idea where I'd learn things about it.)

    A lot of my initial research began with the iFixit teardown for the iPad. In addition to information on how to get into the device, they've got all the part numbers for the various chips. They identify the TI CD3240A1 as the touchscreen controller, but my internet searches find nothing helpful about this. Other articles identify the BCM5973 as part of the touchscreen system. I can find distributors willing to sell me the BCM5973, but no datasheets or anything.

    Taking a different approach, I looked at what touchscreen controllers are available to buy on Digi-Key, etc. The easiest to buy controller family I found is the Microchip (Atmel) MaxTouch family, such as the MXT1664T3. (There are also some Cypress chips available on Mouser, but the publicly available datasheets for these are really just spec sheets, and lack any useful information on how to use the chips.)

    I also stumbled upon this blog post series over at Mike's Mods about trying to reverse-engineer the iPad 3 touchscreen digitizer. Not exactly the same product (for some reason the iPad 1's touchscreen has 102 pins.), but this does a pretty good job of explaining the way capacitive touchscreens work.

    Between the maxTouch datasheet and the blog post series linked above, I gained an understanding of how touchscreens work:

    There is a set of parallel wires going across the screen, and another set of parallel wires perpendicular to the first set. One set of wires are "transmit" lines, the other are "receive" lines. The controller will drive one transmit line at a time with some sort of AC signal, while measuring how much of this signal is capacitively coupled into each receive line. When a finger is near the intersection of a particular transmit line and a particular receive line, the capacitive coupling between those two lines will be different (less?) than if there is no finger present.

    Mike mentioned that he was able to find leaked schematics for the iPad 3, so I googled around for "iPad A1219 schematics" and was able to find a few sketchy-looking sites that have them. (I won't link them here since it's probably a copyright violation to share them.)

    From the schematic, we can learn the pinout of the touchscreen. Like the iPad 3, the iPad 1 has a 30x40 grid, with 40 transmit and 30 receive lines. Unlike the iPad 3, though, each receive line is brought back to two separate pins on the FFC connectors. (Except for MT_PANEL_IN<29>, which only ends up in one place for some reason.) 3 ground pins, 40 transmit pins, and 2x30-1 receive pins adds up to 102 pins, split across two 51-pin connectors.

    Here I've highlighted the receive pins in blue, the transmit pins in red, and the ground pins in green.

    Read more »