Building smart WiFi enabled bathroom scale

2014-02-13 09:19 | Categories: In English, Projektai, Užrašai

wifi_scale_tThere are several wireless scales on the market but none of them implements functions I like (or overpriced). This scale logger is attempt to build wireless scale from existing components like Carambola 2 and USB IR Toy and, of course, scale with remote indicator. Implemented purely on Python this project enables gathering, sending and displaying weight data to any service you like or even build one yourself.

 

 

About

This is only framework and final solution is “to be done”. This project is based on Maxim 29-66SH bathroom scale. Data is captured from scale via USB IR Toy.v2 with no invasion to scale itself. Testing was done on regular PC and project can be easily copied to Carambola 2 (install python and couple of libraries, setup connectivity and you are ready to go).

Maxim 29-66SH

Maxim 29-66SH bathroom scale

2

Tools involved to make standalone wireless scale

Features I’d like to implement are:

  • Auto individual recognition
  • Data uploading to database for future analysis
  • Graphing
  • Weekly/Monthly analysis
  • Email/SMS reminder if individual has not weighted for several days
  • Means to set and seek goal

Protocol hints

logic

Waveforms from logic analyzer

 

  • Data range is [15:33] encoded as integer data in 100*grams
  • Status [13:15].
  • At the beginning it looks like packet synchro bits
  • At the end looks like 7 bit checksum

Code

Code is hosted on Github. There are several files in the project.

  • save_timing.py – reads raw values from USB IR Toy and saves to text file
  • analyze.py – analyses txt files saved earlier
  • ir_scale_utils.py – data conversion routines
  • weight.py – reads data from scale and presents value on the screen.
  • app.py – Python tornado server application
  • index.html – internal html file tornado serves. (replace websocket ip address inside)

In order to read weight data only few lines of code are necessary:

Demo video

  1. conor
    2014-02-25 22:53
    Reply | Quote | #1

    Hi, nice project – I was wondering if you could explain how you went about the decoding – is it a binary PWM signal? what did you use for a logic analyzer – hardware or software?
    thanks,

  2. Saulius Lukšė
    2014-02-28 07:43
    Reply | Quote | #2

    Hi Conor, it’s a binary even decimal encoded signal. Tools – own brain mostly :)

TOP