2 months ago •
Have you ever left the house and had that little voice in your head say “Did I remember to turn off the stove?" Or maybe you're concerned about a loved-one living independently. With LoFi, you can eliminate needless worry.
Here is an example application where LoFi wirelessly monitors a stove using an adjustable heat detector. The steel casing is magnetically mounted so that it is out of the way, but does not require permanent installation.
You can see this in action towards the end of the Semifinals video.
Contactless temperature sensors provide an opportunity to instrument major appliances without opening or altering them. It is possible to connect a wireless transmitter to the LEDs on a modern oven display to determine if the stove is active. However, a less invasive technique is to simply measure the temperature externally using infrared.
The Melexis infrared sensor (MLX90614) sees -70C to +380C. It is as simple as aiming the sensor at the stove top and measuring the temperature. LoFi transmits changes in the analog value, and can trigger transmissions on either those changes or a digital trigger pin.
The Melexis thermal sensor can be read with either I2C or PWM (app note). LoFi is designed for analog inputs. To convert the Melexis PWM output to analog, attach a 10 kilohm resistor and 0.1 μF capacitor to the output pin.
For user friendliness, I wanted an adjustable “on" threshold and an indicator light. Because only one input pin is needed by LoFi, it would have been cheapest, smallest, and easiest to modify the code to have LoFi's ATtiny chip perform the comparison operation and light the LED with the spare pins.
For the sake of being a purist, I instead chose to create an interface board containing a comparator, so that LoFi would still be considered 'stock'. That is, this was an opportunity to document a solution for people that aren't comfortable with programming.
The TLV3702 was chosen because it works down to 2.5 volts. C2 and R2 convert the IR sensor PWM to analog. R3 is the adjustment threshold for determining when the stove is 'on'.
Below is the implementation of the circuit. Again, the comparator is only necessary if you don't want to modify the LoFi source code.
There are a wide variety of interesting things to monitor in a home. With LoFi, the price is low enough to make it affordable.
2 months ago •
A wireless mailbox notifier lets you know when the postal mail has arrived in your mailbox. This can be particularly helpful if your mailbox is not immediately adjacent to your front door.
The mailbox notifiers I've seen usually rely on
detecting when the mailbox lid is opened (hall effect sensor or tilt switch) or when a person approaches (motion sensor). Those are fairly successful methods -- but I didn't want to repeat what other people have already done. Also, those methods don't take into account
whether mail is waiting or instead the homeowner simply triggered the lid sensor by anxiously checking
their empty mailbox.
Instead, I'd like to check for the presence of something in
the box. A hacked postal scale would be highly effective, but would be awkward
to fit. So, I'm going to use a reflected sensor: emit infrared light and
measure the amount that returns. A white envelope or glossy magazine reflects significantly
more light than an empty box. And, because LoFi transmits analog values, a
threshold doesn't need to be tweaked between 'detect' and 'non-detect' states.
Here's the schematic: (which is attached to LoFi)
The 22 kilohm resistor forms a voltage divider with the
phototransistor. A change in light (either due to sunlight entering due to the
box being opened or due to reflection off of mail) changes the conductance of
the phototransistor, and thus the division of voltage. That voltage is fed into
a LoFi input.
Two infrared emitters (LEDs) are placed in series with a
current-limiting resistor to provide a light source. The second emitter is
powered for 'free', as it simply uses power that otherwise would have been burned
off in the resistor. On average, about 20 mA will flow.
Twenty milliamps will drain the battery pack in less than a
week! I thought LoFi was supposed to be low power?
LoFi has a pin that provides GND only when the sensors are
being read. Thus, when LoFi is sleeping (98% of the time), the emitters are off. Therefore, the AA pack will last years.
For the case, I found some small plastic jars with colorful screw-on
lids (Amazon B00523WBK2). This is attached with yellow Sugru.
HOW WELL DOES IT WORK?
As you can see below, the infrared reflective sensor detects
mail very well. Over time, it will be interesting to see what different bunches
of mail look like. “Either we just received a ton of mail, or one very glossy white
I'm not sure why the detection increases slightly over time when staring at mail.
Either the mail is settling or the phototransistor has both a fast and slow
component to its detection properties. Perhaps it follows a curve like a capacitor?
I did encounter one issue, which is that 433 MHz transmitter
was completely shielded inside the metal box. I managed to snake the antenna
out one of the bottom drain holes, after enlarging the hole slightly with a drill. Fair
warning, you may need to seek permission from your spouse and homeowners
association. ; )
2 months ago •
The gateway listens to one or more senders and passes the data to a PC, or via WiFi to the intranet/Internet. This allows you to collect data locally or with a server.
The gateway consists primarily of an Atmel ATmega328
microcontroller that reads the 433 MHz receiver and writes to the FTDI
serial cable and CC3000 Wi-Fi board.
Below you'll find the schematic. It begins with Schottky diodes for reverse battery protection and to allow multiple power source to be connected at the same time without affecting each other. This is followed by PPTC self-resetting circuit breakers for overcurrent protection. Finally, a Zener diode provides overvoltage protection. Because most people will only own one gateway, the extra cost of those protection parts is not a significant amount compared to an overall system.
Notice that most of the pins are not connected to onboard
components. Because the purpose of this board is to route messages, most of the
pins lead to external connectors. Many spare pins are available, as this chip
was selected for its speed, RAM, and surface-mount package.
You can examine the PCB and Gerbers in the LoFi-PCB-Layouts.