TrackWeight: Turn your MacBook's trackpad into a digital weighing scale
106 comments
·July 21, 2025benoau
ashertrockman
If anyone happens to be using an iPhone 6S... http://touchscale.co/
hackmiester
This worked all the way up through the iPhone Xs.
jmb99
The single most irritating killed feature from Apple. Redesign half of their UI to rely on 3D Touch to make sense, then get rid of 3D Touch without redesigning the UI. Previewing links, moving the cursor, interacting with items, they’re all “press and hold until haptic feedback” instead of “quickly press hard and get immediate feedback.” Easier to accidentally trigger, slower to trigger on purpose.
cryptoz
You can use any phone with a barometer to make a scale. All iPhones since the 6, and all the Pixels, and Samsung flagships have one. You get a zip loc bag, blow some air into it, put your phone in running an app that shows the pressure in a big font (so you can see it through the ziploc). Then you put an object of known weight on it like a quarter (balanced carefully on top of the air-filled ziploc) and note the pressure change on the display. With that, I think the weight / pressure change scales linearly, so you can now weigh anything small that you can balance on the ziploc.
xsmasher
Wait, I know this one. You give the barometer to the superintendent if he tells you the height of the building.
Raed667
how about stacking the barometers ?
jbverschoor
Dropbox shouldn’t exist either bc we have rsync ;)
Nathan2055
The infamous Dropbox comment[0] actually didn't even cite rsync; it recommended getting a remote FTP account, using curlftpfs to mount it locally, and then using SVN or CVS to get versioning support.
The double irony of that comment is that pretty much all of those technologies listed are obsolete now while Dropbox is still going strong: FTP has been mostly replaced with SFTP and rsync due to its lack of encryption and difficult to manage network architecture, direct mounting of remote hosts still happens but it's more typical in my experience to have local copies of everything that are then synced up with the remote host to provide redundancy, and CVS and SVN have been pretty much completely replaced with Git outside of some specialist and legacy use cases.
The "evaluating new products" xkcd[1] is extremely relevant, as is the continued ultra-success of Apple: developing new technologies, and then turning around and marketing those technologies to people who aren't already in this field working on them are effectively two completely different business models.
[0]: https://news.ycombinator.com/item?id=9224 [1]: https://xkcd.com/1497/
nemosaltat
no affiliation whatsoever but the app PHYPHOX has access to basically all of your iPhone sensors and can show the information in real time and save it, even has the capability of running a local python server so you can access it from a web browser on the same network or tethered device.
kiddico
I'm adding this to my list of obscure tools I have in the back of my head
wanderingstan
My memory was that the weight API was made private because they didn’t want people using iPhones for drug deals.
hn_throwaway_99
I think this is neat, but only in a Rube Goldberg machine sort of way. The instructions are:
1. Open the scale
2. Rest your finger on the trackpad
3. While mainting finger contact, put your object on the trackpad
4. Try and put as little pressure on the trackpad while still maintaining contact. This is the weight of your object
That is, the pressure sensors only work if it detects capacitance, so you need to be touching the track pad (but not too much!!) while weighing something.
wanderingstan
This is a very clever hack, exactly the sort of thing that belongs on Hacker News.
namdnay
Could a small piece of conductive foam or some cleverly layered tin foil+paper work? So put the object on the shim (which has a known or even negligeable weight)
svnt
No, you need roughly a small human's worth of ground mass for most capacitive touch sensors to register a touch.
bigyikes
Tape a wire to the trackpad and hold the wire?
acct-litter-al
I once put some aluminum duct tape completely over the touch pad of an old laptop to see what would happen. Turns out it induced enough "eddy currents" to make the mouse move around the screen without me touching it--in a way, visualizing the currents!
I connected the foil to ground using a small strip of the tape to the ground metal of a USB port on the side and it disabled the touch pad.
acct-litter-al
Looking back, it would have been interesting to code up a program to record the movement of the mouse as a trail of pixels...
83
Could probably make a small stand with nubbins from touch screen pens as the feet.
ashertrockman
On iPhones at least a hack was to rest a metal spoon on the screen and weigh something in the spoon...
whycome
Can’t you get capacitance with a wet sponge? Like your typical dish cellulose sponge. You could make a small platform?
asimovDev
I remember drawing on my old iPad back in the day by shoving a wet q-tip into a BIC pen and using it as a stylus. I am sure something similar could be rigged here
dotancohen
I've used carrots and cucumbers as a capacitive stylus while wearing gloves.
It's the reason why I love Note and S Ultra phones - the stylus. I'm using it now.
linux2647
Sometimes you can get capacitance to be detected if you hover your finger just millimeters over the trackpad
ivanjermakov
> TrackWeight utilizes the Open Multi-Touch Support library by Takuto Nakamura to gain private access to all mouse and trackpad events on macOS. This library provides detailed touch data including pressure readings that are normally inaccessible to standard applications.
How can something be available as a library but not as a native interface? Swift does not expose that API?
bri3d
Mac OS has "Private Frameworks" - shared libraries that are used by the system but don't ship with headers by default. It's trivial to produce these headers from the libraries, and then make wrappers for them like OpenMultitouchSupport which is a wrapper for MultitouchSupport.framework.
anxman
But just to note, I believe you can't pass Gatekeeper/Notary if you use these APIs so it's not possible to sign the app
incanus77
This reminds me of how, twenty years ago, I used the PowerBook’s hard drive vibration sensor to rig up a seismograph to measure construction noise:
https://allthegooddomainsweretaken.justinmiller.io/2007/04/0...
dtgriscom
I wrote that software, called SeisMac. Someone figured out the Apple-private API for the Sudden Motion Sensor that parks your laptop's hard drive if it detects free-fall. Working from that, I wrote a free app that used the API to show three-axis acceleration graphs. I was proudest of the calibration utility, which had you tip your laptop on its side (with properly rotated dialogs!), and then on its screen.
People would send me recordings from all over the world (e.g. on a ship in the Drake Passage showing enormous surges). It was a lot of fun, and I even got an educational grant to improve it.
Big bummer when Apple switched to solid-state drives (well, a bummer for my one small reason...)
incanus77
Awesome, the name rings a bell now! Thanks for that.
CalChris
I used an iPhone as an air pressure recorder. There's an app for that; many actually. Anyways, the trunk gate on my car wasn't sealing and when it went over pavement joints on the highway it would slightly open and then close in quick succession which was nauseating. I showed the data to Tesla service and they (grumbled and) readjusted the trunk gate. The problem disappeared.
stockresearcher
I heard that IBM decided to move out of this building [1] because vibration due to the construction of the tower across the street kept destroying hard drives in their computing center.
mananaysiempre
Obligatory link to Brendan Gregg shouting at hard drives: https://www.youtube.com/watch?v=tDacjrSCeq4.
js2
Gosh I hope there are some lucky 10K seeing this today.
bitwize
Reminds me of the people who used their ThinkPad's vibration sensor to detect smacks on the machine, and rigged their X window manager to switch virtual desktops when smacked from the appropriate side, panning right when smacked on the left, and left when smacked on the right.
1bpp
this update breaks my case smacking workflow, please revert
incanus77
Oh, I vaguely remember someone hacking that for some sort of windowing back then on OS X!
akubera
The smackbook pro! https://www.youtube.com/watch?v=6uvQTTPr9Rw
mikpanko
Very cool. Curious: what is the minimum and maximum weight MacBook's trackpad can reliably measure this way?
pavon
I love this, such a creative hack, and the wonderful irony that it only works when one has their finger on the scale.
* Not legal for trade outside of Ankh-Morpork.
mig39
Very cool, Krish! Hi from Fort McMurray! I'm going to use this project as an example for a Computer Science class.
jahantech
This is exactly why normal people call us geeks "weird". Keep bringing on the cool stuff!
jordanmorgan10
Back when we had 3D Touch, there was UIForce which did this. I still lament the loss of 3D Touch to this day :-(
volemo
It was such a useful feature! I mourn it every time I try to save a picture from Google and iOS selects nonexistent text around it. :(
pmxi
This is clever! and potentially useful too.
Have you done any testing to determine how precise and accurate this is? I suspect their must be a lot of variance between laptops, since this isn’t an intended use case.
cluckindan
I would assume Apple hardware comes precalibrated. Homogeneity is everything for their product lines, down to individual calibration of screens and audio hardware. It would be weird to get a new laptop and have its trackpad feel different.
hbn
They have a setting for adjusting the pressure needed to activate a click.
I wonder if that affects this app at all.
mschuster91
> I suspect their must be a lot of variance between laptops, since this isn’t an intended use case.
Yeah and so it is for ordinary strain gauges aka load cells. You can either use a 2 point calibration (aka no load followed by known load) or if you want more precision a 3 point calibration.
qoez
Apparantely on safari there's touch strength so this should be possible to make for the web too, cool
ashertrockman
Somebody could use this as a starting point. http://touchscale.co/ You'd have to collect new data on touch strength vs. weight to get the regression parameters.
(If you do this, let me know and I can add it to the site above, and then we can both delight in the surprisingly large amount of unmonetizable traffic it gets.)
arm32
I must not use this for weed, I must not use this for weed, I must not use this for weed
dmd
Why not?
ThatMedicIsASpy
Weed can be sticky depending on the strain/harvest/cure time
arm32
The sticky icky would completely destroy my beautiful, black M3 MBP.
There used to be iPhone apps that did something similar -
https://www.theverge.com/2015/10/28/9625340/iphone-6s-gravit...