Reverse Engineering A Bathroom Scale For Automated Weight Tracking

Bathroom Scale

[Darell] recently purchased a fancy new bathroom scale. Unlike an average bathroom scale, this one came with a wireless digital display. The user stands on the scale and the base unit transmits the weight measurement to the display using infrared signals. The idea is that you can place the display in front of your face instead of having to look down at your feet. [Darell] realized that his experience with infrared communication would likely enable him to hack this bathroom scale to automatically track his weight to a spreadsheet stored online.

[Darell] started by hooking up a 38khz infrared receiver unit to a logic analyzer. Then he recorded the one-way communication from the scale to the display. His experience told him that the scale was likely using pulse distance coding to encode the data. The scale would start each bit with a 500ms pulse. Then it would follow-up with either another 500ms pulse, or a 1000ms pulse. Each combination represented either a 1 or a 0. The problem was, [Darell] didn’t know which was which. He also wasn’t sure in which order the bits were being transmitted. He modified a software plugin for his logic analyzer to display 1’s and 0’s on top of the waveform. He then made several configurable options so he could try the various representations of the data.

Next it was time to generate some known data. He put increasing amounts of weight on the scale and recorded the resulting data along with the actual reading on the display. Then he tried various combinations of display settings until he got what appeared to be hexadecimal numbers increasing in size. Then by comparing values, he was able to determine what each of the five bytes represented. He was even able to reconstruct the checksum function used to generate the checksum byte.

Finally, [Darell] used a Raspberry Pi to hook the scale up to the cloud. He wrote a Python script to monitor an infrared receiver for the appropriate data. The script also verifies the checksum to ensure the data is not corrupted. [Darell] added a small LED light to indicate when the reading has been saved to the Google Docs spreadsheet, so he can be sure his weight is being recorded properly.

16 thoughts on “Reverse Engineering A Bathroom Scale For Automated Weight Tracking

  1. I like the intelectual challenge of hacking the protocol…. that bit I get… but you could save yourself the trouble and just write what appears on the screen, down on a bit of paper.. or … my case, since I dont think I’ve weighed myself in the past year… I could just continue to not bother…. in the same way that I haven’t botherd to hook myself up to any of the array of “smart” technology watches that will monitor my health to the n’th degree for the rest of my days, thus upping my stress hormone levels, as I continually contemplate my inevitable demise.

    I’d rather go and walk the dog… which I suspect will both lower my stress levels and preserve my fitness to some degree (airborne polution and errant car/bus/truck drivers not withstanding).

    1. My Samsung S5 has the S-Health app, simu;ar thing, though I could buy a Bluetooth scale to also work with it (yeah, right!). It also records/tracks my pulse/stress levels, and more.

    1. Still error prone and messy. Also, you have to account for people moving the scale, different family members getting on it, or weighings that you don’t want to record because they were taken in different circumstances (e.g. with clothes on, different time of the day). Any automated solution will end up taking more time and effort than just making a note yourself.

      1. This I think is more like an experiment, but hacking an unencrypted IR transmission is more like a chore than real mindgame. I know a lot of people still can’t do it (not even bothered TBH), but if you plan to decipher something not using the standard consumer IR codes it could be useful as a starting point.

  2. I love it when the design department makes a sexy clear tempered glass product, then the legal department comes along and sticks CYA stickers on such beauty.
    Underwear on the outside!

  3. An app for this is monitoring a hobbyist beehive. It says a lot about behaviors and if a responce is needed from the amateur beekeeper for their or the bees’ benefit. WiFi is a plus. Weight at 1 or 2 minute very nice.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.