[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.
It’s a bit awkward for all parties involved if someone is waiting right outside the bathroom door. This system helps to alleviate that issue by letting the next user know when the loo is available. [Akiba] has been working with the folks at Loftworks, a design company in Tokyo, to get the status beacons seen above up and running.
The staff is mostly women and there is just one single stall women’s toilet on each of the three floors. The boxes above represent the three stalls, using colored light to indicate if a bathroom is available or in use. Detection is based on a PIR motion sensor in each stall. They communicate back with the display units wirelessly, which initially presented quite a problem. The doors on the bathroom are steel, and when closed they effectively block communications. The 900 MHz radios used in the system are on the 802.15.4 protocol. But they can be set a couple of different ways by moving resistors. Each came configured for the fasted data throughput, but that’s not really necessary. By changing to a slower configuration [Akiba] was able to fix the communications problems.
We remember seeing a similar bathroom indicator in a links post some time ago.
At first we thought that [Brandon Dunson] was writing in to tell us he’s too lazy to fix his bathroom fan. What he really meant is that simply replacing the unit isn’t nearly enough fun. Instead, he developed his own bathroom fan trigger based on stinky or humid air conditions. He didn’t publish a post about the project but we’ve got his entire gallery of build images after the break.
The initial inspiration for the project came from a twitter-connected fart sensing office chair. Hiding behind the character display you can see the MQ-4 methane gas sensor which he picked up for the project. But since there’s also a shower in the bathroom he included a humidity sensor with the project. Both are monitored by an ATmega328 which averages 10 readings from each sensor before comparing the data with a set threshold. If the sensors read above this level a relay turns on the bathroom fan.
Don’t be confused by the small DC fans seen above; [Brandon] is still using a proper exhaust fan. These are just used to help circulate the air around the sensors so that low-hanging smells will still trigger the system. This has got to be the perfect thing for a heavily used restroom.
Continue reading “Bathroom fan that switches itself on when it gets steamy or smelly”
[Casainho] wanted to track his body weight using an app on his Android phone. He just needed a way to get the weight readings onto the device automatically. He ended up adding Bluetooth to a bathroom scale and hacking the app to grab data from it.
The scale which he hacked is a digital model, which makes it possible to read the weight data if you know what you’re doing. [Casainho] already completed a weight logging scale hack which stored the data on an SD card. So this was a recreation of that project but with a Bluetooth module for the output rather than the card for storage.
Now you can buy WiFi enabled scales, but that’s not nearly as fun as a hack like this. Plus one of those will cost you around $200 and the hardware for this version came it at only $75. It includes an LPC2103 dev board, $6 Bluetooth module, character display, batteries, and misc. supplies. The software end of the hack was helped greatly by the fact that the Android apps which [Casainho] is using are both open source.
Adding this board (translated) to your bathroom fan will turn it into a smart device. It’s designed to automatically shut off the fan after it’s had some time to clear humidity from the room. It replaces the wall switch which normally controls these fans by converting the fan connection to always be connected to mains. The board draws constant power to keep the ATtiny13 running via a half-wave rectification circuit. A single LED that rises from the center of the PCB lights up to signal that the fan is in operation, but it is also used as a light sensor, similar to the LED communications hack from a couple of days ago. When the lights go on in the bathroom the microcontroller will turn on the exhaust fan via a Triac. It will remain on until the light level in the bathroom drops.
There’s an interesting timing algorithm that delays the fan startup, and varies the amount of time it will stay on in the dark depending on how long the bathroom lights were on. This way, a longer shower (which will build up more humidity) will cause the fan to remain on for the base of five minutes, plus one minute longer for every two minutes the bathroom was in use. Pretty smart, and quite useful if your bathroom sees high traffic from several family members.
Solving the age old problem of… wait, what problem are they solving? These students at UC Berkeley have built a toilet paper dispenser prototype. Not only does it meter out an exact amount for you, it will fold it and cut it as well. They mention this being the perfect accessory for a high tech bathroom, and we can agree. To be serious though, in public places, metering out limited amounts of toilet paper at a time could possibly result in major cost savings. We think the next prototype should have different preference settings such as; wadded, folded, or wrapped around your hand. Anyone else’s mind suddenly filled with unpleasant imagery?