Electronics > Projects, Designs, and Technical Stuff

Making a standalone USB trackpad from Macbook Pro (mid-2012) trackpad.

(1/3) > >>

bob808:
Ever since I first used a Macbook with the Apple trackpad I always wanted to have that trackpad as a separate unit. After they released the standalone unit I couldn't really justify the price. So I decided to try and hack one when the opportunity comes.
Few days back a friend had a beer with his macbook pro (13" mid-2012). That turned out to be a bad idea, so I ended up with the broken laptop.
Looking at the trackpad itself, it doesn't contain any electronics, everything is on the motherboard. There's a CY8C24794 chip that deals with both the trackpad and keyboard. I think this chip has some firmware in it so I'm not sure you can use a new one.
If Apple would release official schematics then I might be able to do a better job at explaining what you need to do. But I'll try without it.
There's two series resistors between the chip's D+/D- lines and the USB mux. Easy to remove them and tap the signal for the chip. The chip needs 3.3V.
The trackpad connector has a 3.3V line and one 18V line. There's also a 5V rail that doesn't seem connected to the rest of the circuit, maybe used on some other trackpad models. I rushed through it and ended up using a 3.3V linear reg. After a closer look at the PCB I figured out there's a 5Vin regulator that outputs 3.3V directly to the rail the trackpad chip is on, and also passes 5V to the onboard 18V boost reg. So theoretically you could get away with just the connector wires, no other IC. I'll test this next time I get the chance, since I already removed a transistor so I can insert 3.3V into that rail, and I can't be bothered to put it back, the sucker is too small and has a weird footprint.
In the following photo you can see the transistor:



And in this photo a closeup of the pad behind the transistor (pink rectangle). Green is a GND pad that you can see unpopulated in the previous photo. Yellow is the 3.3V pad, where you inject the 3.3V from the external reg.



Apart from power I had to pull up one enable pin for the chip, and I also pulled down another SMC wake line, not sure if the last one is needed or not.
After I connected the USB cable I saw the system recognized it:
Bus 001 Device 006: ID 05ac:0252 Apple, Inc. Internal Keyboard/Trackpad (ANSI)
And seems to be working just fine. I didn't need anything else in Linux, two finger scroll works great!
In Windows 10 I first installed the Bootcamp trackpad drivers, so I don't know if it's working without them, or not. I suppose it should work without them as well.



After some careful consideration I decided I don't need the whole PCB so I performed an old medieval parting ritual:




All needed parts are on that part of the PCB, including the 5Vin reg that should give all the needed power rails. The only issue with it is that that IC is very close to the edge of the PCB where the parting ritual was applied. So you might clip some internal lines. I filed the PCB edge where it was cut, revealing I think around 12 layers. take care to not short anything, I just YOLO'd it.

I injected the 5V from USB into the input of the 18V boost reg. The input line has a small value resistor in series, I removed it and added a wire instead. Pink is the resistor I removed, green shows the possible pads you can tap into. That cap has one side on the input of reg.



And a photo of the chip itself that controls the trackpad/keyboard. Pink rectangles are where the USB data lines series resistors were located. I cut the traces going down so I wouldn't connect to the rest of the circuit, not needed if you can finely solder the wires on the upper pads of both resistors. Green is the enable pad for the chip, and yellow is where a low value resistor was. It connects the chip to the 3.3V rail. I initially removed that resistor, now I made a bridge across both pads and connected the enable wire on it.



All that's needed now is to design and 3D print a case for it. I also need to make a small PCB with the USB connector and the 3.3V reg. But theoretically I should have been able to only use the USB 5Vin, just that it's too late to go that route now for my board. The only downside of going that route is that more chips might be powered on the PCB, and that would enable more rails making for extra unneeded power consumption. Or you can remove the extra chips that are not needed, tho that's extra work.
The resulting board is much smaller than the trackpad itself, that should allow for a slim case design.



Forgot to mention that the keyboard works as well, but I'm not using it.
If anyone else wants to try this I will try and help and maybe post better pictures for all connections.

yuri624:
Hey mate, great job. I wish I had seen your post earlier. I did the same with the trackpad of a Macbook Pro 2010 (I think).

Does your trackpad work when you plug it into an Android device? You could really help me out if you tried, if possible.

Mine works everywhere... Windows, Linux, MacOS... native and in virtual machines. On my Samsung Galaxy S8 (Android 10), Lenovo P11 Pro Tablet (Android 11), desktop pc (Android-x86) the trackpad is just dead. When I use Android-x86 inside a virtual machine..... the trackpad works just fine including all gestures.

Thanks in advance for your time if you could test it. Cheers.

amyk:
You can definitely find the schematics if you know where to look. Apple didn't release them, but that doesn't matter for what you want to do.

As for not working in Android, that could just be because whatever drivers are available don't match closely enough.

yuri624:

--- Quote from: amyk on December 23, 2021, 02:38:48 am ---You can definitely find the schematics if you know where to look. Apple didn't release them, but that doesn't matter for what you want to do.

As for not working in Android, that could just be because whatever drivers are available don't match closely enough.

--- End quote ---

I do have the schematics (which helped in doing this in the first place).

The problem is that:
I take an Android-x86 image and boot off of it directly -> Trackpad dead (same on Android 10 + 11 devices natively)
I take the same Android-x86 image and run it in a VM -> Trackpad works with all gestures flawlessly

So the drivers are there. It's "Apple USB BCM5974 (Macbook Air and Penryn Macbook Pro) multitouch driver" in the file "bcm5974.c".
The sourcecode for the driver is here (and seems to be implemented since 2013): https://android.googlesource.com/kernel/goldfish/+/android-goldfish-3.4/drivers/input/mouse/bcm5974.c

bob808:
If I find the OTG dongle I'll try it out on my phone. Didn't yet get to design&print a case for it.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod