Skip to content

Fridge Setup

Elizabeth Adams edited this page Oct 3, 2019 · 4 revisions

Place the empty refrigerator on top of the two Wii Balance Board and plug the AC adapter from the battery pack into a wall outlet. Run the wiiboard_test.py script from a terminal on both of your Raspberry Pi's to get the base weight of the refrigerator.

$ sudo python wiiboard_test.py
Discovering board...
Press the red sync button on the board now
Found Wiiboard at address 00:23:CC:2E:E1:44
Trying to connect...
Connected to Wiiboard at address 00:23:CC:2E:E1:44
Wiiboard connected
ACK to data write received
83.011212 lbs
82.962819 lbs
83.165323 lbs
83.068293 lbs
83.182738 lbs
82.981102 lbs

The measurements are a bit noisy varying +/- .25 lbs. To get the base weight of your refrigerator, allow the script to run and take several measurements. Each measurement output is really 500 measurements (or whatever you changed the WEIGHT_SAMPLES variable to in the script). Add together the weight from both Wii Balance Boards to get your total fridge weight. Write down your refrigerator's base weight, this will be used later.

Fill your refrigerator up with as many bottles as you have (do not mix wine and beer bottles and soda cans because they have very different weights; we are making the assumption that each bottle has approximately the same weight). Observe the average weight of the refrigerator plus the additional bottles. Subtract the base weight of the refrigerator from the full weight and divide this weight by the number of bottles in the refrigerator. This is the average weight of a bottle. I measured an average weight of 1.266 lbs for each bottle using 30 beer bottles. Write down your measured average bottle weight.

We have everything we need to detect the number of bottles of beer in our refrigerator. Next, let's add a couple of important sensors to our refrigerator and then put it all together.

<< Wii Balance Board - Initial State >>