Transforming Your MacBook Trackpad into a Digital Scale: The TrackWeight App

In an innovative development, Canadian developer Krish Shah has introduced TrackWeight, a macOS application that repurposes the Force Touch trackpad of MacBooks into a functional digital weighing scale. This application leverages the pressure-sensitive capabilities inherent in Apple’s trackpad technology, enabling users to measure the weight of objects directly on their laptops without the need for additional hardware.

Understanding the Technology

The Force Touch trackpad, a staple in MacBooks since 2015, is designed to detect varying levels of pressure, allowing for nuanced user interactions. By harnessing this feature, TrackWeight interprets the pressure exerted by objects placed on the trackpad and translates it into weight measurements. The process involves placing a finger on the trackpad to maintain capacitive contact while gently resting the object to be weighed. The application then processes the pressure data and displays the corresponding weight in grams.

Development and Calibration

Shah’s development of TrackWeight was facilitated by the Open Multi-Touch Support library, created by Takuto Nakamura. This library provides access to detailed touch data, including position, pressure, angle, and density, which are typically concealed within Apple’s private APIs. Utilizing this resource, Shah was able to extract and interpret the necessary data to measure weight accurately.

Calibration of the application was achieved by placing the MacBook on a conventional digital scale and comparing the readings obtained from TrackWeight with those of the digital scale. Shah reported that the pressure data from the system was already labeled in grams, simplifying the conversion process. He noted that the application could handle objects weighing up to 3.5 kilograms with reasonable accuracy.

Practical Applications and Limitations

While TrackWeight showcases the versatility of the Force Touch trackpad, it is important to recognize its limitations. The requirement for continuous finger contact means that weighing objects without maintaining this contact is not feasible. Additionally, metallic items may cause false readings unless a non-conductive material, such as paper or cloth, is placed between the object and the trackpad. The physical dimensions of the trackpad also restrict the size of objects that can be weighed, and placing excessively heavy items on the trackpad could risk damaging the laptop.

Availability and Usage

TrackWeight is available as an open-source project under the MIT license and can be accessed on GitHub. To utilize the application, users need a MacBook equipped with a Force Touch trackpad (models from 2015 onwards), running macOS 13 or later, and Xcode to build and run the app. Notably, the App Sandbox must be disabled to allow the application to access low-level hardware data.

It is crucial to understand that TrackWeight is intended for experimental and educational purposes. Shah emphasizes that the application is not designed for critical or commercial use and should not replace traditional digital scales for precise measurements.

Conclusion

The introduction of TrackWeight highlights the potential for innovative applications of existing hardware features in MacBooks. By transforming the Force Touch trackpad into a digital scale, Shah has opened new avenues for exploring the capabilities of Apple’s hardware. However, users should approach this application as a proof of concept rather than a replacement for dedicated weighing devices.