-
Automating the DoorBell via Moteino
04/15/2015 at 12:42 • 0 commentsI've added my doorbell to the Moteino Framework!
That means I can:- observe/count/graph when the doorbell is used
- get notified when someone rings it if I am not at home (email, SMS etc)
- play a sound when I am in my lab where I have a hard time hearing the chime (did I hear it or not? should I go upstairs to check? nah… I'm too lazy busy for that)
- ring the bell if I want to, *remotely* from your mobile device (why not right? just detecting is too boring)
Below is a schematic of what a typical wired door bell circuit looks like, and also a photo of what it looks like in my house. The dotted green rectangle is the circuit that I have physical access to – pictured next to it in my basement (and I don't have a back door button):
I have a single button (front door) and probably most houses do. So I only care to inject my solution for that front door button. There is typically a 16VAC transformer powered from mains that activates the chime when the switch is pressed. So there are a few issues to solve in order to tap into this circuit, detect button presses and also being able to control it via Moteino:
- Power our circuit from the 16VAC doorbell transformer. This is a good exercise to create a DC power source from an AC source. We'll use a simple half wave rectifier to achieve this
- Detect when this 16VAC current flows through the wire coming from the outside button. When the button is pressed, the chime will ring and our circuit detects the AC current and outputs a digital HIGH for the Moteino input pin that monitors it
- Make the Moteino "press" the door bell button when it receives a "RING" wireless message
Getting DC from a 16V-AC source and also detecting AC current on a Moteino digital pin are probably the most interesting problems to solve for this project. We can use a H11AA1 chip to detect AC zero-cross, and then manipulate that signal with a transistor and capacitor to get a constant logic "HIGH" that we can read on a Moteino pin (that will detect when the doorbell push button is pressed). Here is the H11AA1 output and the resultant logic HIGH after adding a transistor+cap to invert and smooth the signal:
Here is the whole schematic and installed circuit:
And a graph of doorbell events on the yet-to-be-released Moteino Gateway Interface:
To see the details I explain the build step by step in the detailed blog post.
-
New ATXRaspi R2.6 with reboot function
03/09/2015 at 14:25 • 0 commentsThe new ATXRaspi R2.6 (or R2.5 marked with blue dot) brings reboot functionality in addition to the shutdown function present since inception. See video above for a complete review and demo.
The differences are the following:
- to reboot: hold the button pressed for at least 0.5s and and less than 2s. The button backlight will dim once the reset threshold is met. Release the button and ATXRaspi will emit a 500ms HIGH pulse on the SHUTDOWNsignal pin. It will then blink the button backlight for up to 1 minute while waiting for the Pi to reboot and the BOOTOK signal to be restored by the shutdowncheck script (to become HIGH again).
- to shutdown – nothing changes: hold the button at least 2s. As before, the button backlight pulses slowly while the Pi shuts down. Once the shutdown is complete and BOOTOK signal goes LOW, ATXRaspi waits a few more seconds and cuts power off to the Pi.
The shutdownchecksetup.sh install script was updated to support the reboot function and is backward compatible with all previous ATXRaspi revisions. Here's a photo of the required wiring to the GPIO and an example wiring of the chrome button offered at the LowPowerLab shop:
-
SwitchMote2x10A
03/02/2015 at 21:11 • 0 commentsI've released some new SwitchMote kits after some requests by different users of SwitchMote. All SwitchMotes are wireless AC actuators, some designed to replace conventional light switches for the purpose of automating household light switching. Specifically there is a new dual 10A relay SwitchMote (and PSU):
There is a new assembly guide for this specific variant posted here. Here are some photos if it assembled and compared to the original SwitchMote:
The SwitchMote guide page has been updated to include these new variants and the SwitchMote sketch was updated to support the new dual relay SwitchMote 2x10A.
-
New SwitchMote1x30A
02/20/2015 at 21:19 • 0 commentsI designed a new type of SwitchMote, it's a PSU that can drive heavy AC loads of up to 30A through the 30A-250V onboard relay. It can of course be controlled wirelessly when mated with a Moteino. Here are the components required for assembly:
-
MightyBoost R2
02/20/2015 at 21:14 • 0 commentsMightyBoost is now at revision 2, it now comes in glorious ENIG finish.
Some minor issues were addressed. Here is a diagram with everything you need to know about it: -
Pick & place assembly
02/06/2015 at 14:28 • 0 commentsShort video time lapse of pick & place assembly of MoteinoMEGA panel:
-
New WeatherShield
01/30/2015 at 17:00 • 0 commentsI was not happy with the performance of sensors like DS18B20 which were not only expensive for the limited functionality and accuracy they offered but also cripplingly slow (taking 1 second to read temperature, seriously Dallas?!).
So I created a new WeatherShield to measure temp/humidity/pressure accurately while also being very low power and very fast, now available to source assembled from here. These are highly accurate I2C temperature/humidity (Si7021) and atmospheric pressure (BMP180) sensors. Credit goes where it's due – this was inspired by this forum post and its author mr. A, but it's somewhat different than the one presented there. There is a sample sketch to read the data from this shield, and I will follow up with schematics and more details as they become available.Some of the features:
- –40°C to +85 °C temperature range, 0-100% humidity range(Si7021).
- Best of all these sensors are very low power
- The Si7021 has an active conversion consumption of 150uA and standby of 60nA, and BMP180 ranges between 3-12uA in active mode and 0.1uA in standby.
- Fast sample times, far superior to sensors like DS18B20 which require along ridiculous sample reading time of up to 1s. By comparison Si7021 requires about 4-10ms sample conversion time depending on reading resolution (8-14bit)
- The shield can be stacked on/under a Moteino (not a MoteinoMEGA)
- Small prototyping area where you can add a little circuit, connect it to the Moteino pins through thin hookup wire
- BMP180 also gives temperature readings that are pretty good but it is primarily an atmospheric pressure sensor, and Si7021 has a magnitude better accuracy for temperature
- Onboard P-mosfet driven VIN/battery monitor. This is a VIN-4.7k+10K-GND voltage divider that can be enabled by setting A3 to OUTPUT LOW and reading the VIN voltage on A7, then disabling it to save power by setting A3 to INPUT (HighZ which disconnects any battery drain through this circuit).
These boards come at a price and instead they are precision sensors for serious weather monitoring enthusiasts and offer a set of features which makes them very battery/remote monitoring friendly and along with Moteino they can make a very small battery operated node.
Enjoy,
-Felix -
LaserCut Case for the Pi Gateway
01/30/2015 at 16:56 • 0 commentsNOTE: This post is also published here on my blog (more details/photos).
Bulk made enclosures are useful when you just want basic underwear on your Pi but what if you need to put something else in there and it won't fit? I've built a Pi enclosure for my home automation gateway before but it was just 3 layers of acrylic to hold everything together, turned out nice. In this post I will show another example enclosure for a Pi gateway.I am finishing up a separate project where I needed to put a Pi gateway in an elegant enclosure along with an ATXRaspi+power button, and a Moteino. This guide can be used as a guide to build a RaspberryPi+ATXRaspi+Moteino setup that can all live together in a nice box to serve as an internet gateway to your Moteino or other wireless Internet Of Things network. Here is what goes in the box:
The ATXRaspi provides power management through an illuminated power button – really nice to have when you want to physically turn the unit ON/OFF without a need to log in, both these along with the short uUSB cable can be sourced at the LowPowerLab webshop. The Moteino acts as a wireless gateway and connects to the Pi through jumper wires. Power is provided via a 2.1mm jack from an external 5V-0.7A old phone charger.
The size of the box was predetermined after fitting the outlines of the components in CorelDraw. I then use makercase to design the basic shape of the box with slotted fingers based on the predetermined dimensions. I then import that SVG rendering into CorelDraw X5 and add the cutouts while doing my measurements. I used a DXF drawing of the Pi to find my mounting holes positions and create the cutouts for the ethernet/USB/HDMI/power button and power jack. I use digital calipers to measure everything and determine size of new cutouts. The design files of the end result are uploaded to this github repository. Here's what the final drawing looks like:
I then cut the outlines in thin cardboard that mimics the thickness of the acrylic and do a fitting test. Most often the sides with cutouts need some fine adjustment and I end up having to cut them 2-3 times before they come out perfect:
When everything fits perfectly I move on to cutting real acrylic which is not really expensive at 12x24sheet@$12+S/H but I'd rather make the mistakes in cardboard which I have unlimited supply, this works well and actually the cardboard is sturdy and allows me to hold the Pi with screws and fit everything with tape as if this was the real case. You will notice in the above blueprint I have several color layers, some of which don't get sent to the laser cutter. For the acrylic I used black opaque for all sides and the bottom, and grey translucent for the top to allow seeing the LEDs.
I first make the cuts in acrylic that has the protective lining, that gives nice clean cuts. The cuts are made with a 0.075mm laser kerf adjustment (via makercase website) which will result in a tight fit case once completed, that doesn't require screws or tape. Of course you can always reinforce it with some transparent tape or weld some of the sides with WeldON #3 acrylic cement. I then fit the electronics using plastic screws and nuts, but any metal ones should work as well. I did not use any standoffs under the PCBs. I then take off the lining and perform any engraving, in this case a nice Pi logo and some text. Engraving takes a much longer time than cutting so this is another reason to leave that for a second round. I etched the logo and text at 500mm/s speed and 30% power, that gives a nice uniform and shallow engraving. The outline of the raspberry in the logo is too thin to etch so I made it cut that outline at 50mm/s speed and 15% power so it would be a very thin shallow cut, comes out as a nice discrete outline. I added some rubber standoffs on the bottom of the unit:
So there you have it, a simple guide to make your own case. Photos don't do it justice, I think it actually looks better in reality. You can adjust the CAD/DXF to fit your own electronics along with the Pi, or use the given version to fit an ATXRaspi and illuminated power button. Enjoy.
-
GarageMote R2
01/30/2015 at 16:50 • 0 commentsThere is a new revision of GarageMote. Here's what this new revision consists of, and a few photos to show it assembled/installed:
It is mostly the same as before, but it includes the following new or changed features:
- R2 kit comes with new unipolar hall effect magnetic sensors; the pinout is the same but these sensors can detect both north/south poles of a magnet, hence easier to install without having to orient the magnet a certain way for detection.
- R2 kit includes magnets (rectangular ); these are better than round magnets that I've personally used before. My opener belt stopping point is a little variable so the length of the magnet helps keep the fixed sensor "in range" to avoid the sensor missing the magnet and trigger an UNKNOWN status.
- R2 kit includes a 1×8 screw terminal for easy mating with the provided cat5 cable
- R2 kit includes a momentary button between GND and D3 – no code released for this (yet) but this can be used to add a function to your GarageMote – like SYNC-ing with a SwitchMote so you can open/close your garage from a SwitchMote button, how cool is that!
- new 2.1 barrel jack for optionally powering the unit from an external 2.1mm jack power supply, commonly available on ebay or at major online electronics retailers
You can find the new kit in the online webshop. The assembly/programming/usage is published here.
-
Final Motion-OLED Prototype
09/28/2014 at 16:13 • 0 commentsI've enhanced my Motion-OLED Moteino project and added a few more features to the already existing ones:
- a general purpose button which is wired to interrupt 1 (pin D3) of the Moteino. This is useful to wake it up from sleep and respond to whatever command you have it do. For instance, I've programmed it to browse through past received messages from the wireless network, or it can be used to access a user menu where you can choose different modes of operation.
- The OLED can display anything you want. I like to keep the OLED mote in the kitchen area where it provides a hands-free alternative method to check the "snail mail". The periodic messages received from across the street (thanks to the powerful and very small RFM69 transceiver) are displayed on the OLED with the last time the mailbox was opened, very convenient.
- The ON-OFF slide switch can cut power from the LiPo battery, which in my case is a 1300mAh which lasts about 3 days with the OLED kept ON and the transceiver in RX mode all the time to listen for messages.
- The USB port allows easy programming from the Arduino IDE and also charges the battery in about 2.5 hours when fully discharged.
- A buzzer allows you to hear when a messages is received, or to alert you when mail is delivered, a garage door opens, a light turns on, etc.
- And of course, the same PCB/kit can be used as a low power motion detector by inserting a PIR sensor instead of the OLED display, quite versatile.
- I've discovered thinner acrylic makes for very nice cases that are easier to assemble and I might switch from thicker 3mm acrylic for such enclosures. Acrylic is found in many colors and shades which means these enclosures can be of many colors. Just look at a variety here.
- this kit will replace the current MotionMote kit and will also be usable as a mailbox notifier and standalone receiver for those who just need a motion or mailbox sensor and are not interested in the whole automation framework.
As of today I am still waiting for production PCBs to be delivered and tested, and once everything is confirmed ready to go I will post the details and sample source code for the OLED display shield. For now here's a sneak peek of what's coming: