Controlling AC outlets with SwitchMote

Sometimes you need to remote control an AC outlet that powers something (like a heater or a light or motor etc). There are different IoT solutions out there  like the PowerSwitch Tail which allows hooking up your arduino/IoT device of choice and control 1 outlet.

Naturally, having created the SwitchMote kit, and after being asked in the forums if this could be modded/used to control AC outlets, I made a quick video of how to implement an AC outlet switch-box using a SwitchMote 2x10A, allowing control of 2 independent outlets with local button control as well as visual feedback via the status LEDs of the SwitchMote.

Attic fan tests: 1 week of data

A quick update to the attic fan cooling experiment (check the previous post to read about the setup). I ran the fan for a few days in a row, from around noon to 5PM, at which point the HVAC kicked in until late into the evening. There were some HOT days and some WARM days, with a hot day with PM showers which produced some interesting data. from the WeatherShield sensor motes in the attic and the master bedroom below it. Here’s conceptually how an attic fan is supposed to work, in theory:Benefits of an attic fan

My cheap fan I installed in the attic hatch draws 85W on the high speed and uses ~0.45kWh for a 5h run time), not bad. Here’s the temperature graph after several days with different weather conditions, read on for explanations.Notice the huge temp swings of the attic, and the relatively small changes in the master below it.  July 29th was the HOT day with PM showers and moderate wind which cooled down the attic. I also had the fan going but the rain/wind cooled the attic quickly through the built in soffits and vents. On the rest of the days the fan did a good job of chopping the “hotbergs” tips off, they look like mouse bites :). To be more effective it has to be started soon after the sun starts to blast the roof around 10am. The master temps were zoomed in for more detail. Here are the humidity measurements: Continue reading

Laser Etching SMT Stencils Tutorial

etchedstencils_main

If you make PCBs and have any SMT components you likely need an SMT stencil to apply solder paste and then bake everything in an oven to reflow the paste. I’ve previously written an extensive tutorial on how to etch metal stencils from soda can material, still very popular, dirt cheap to make and pretty quick once you get a feel for it – it produces very high and extremely durable metal stencils. I’ve been literally using chemically etched soda can stencils thousands of times making Moteinos before I moved to stainless steel commercial stencils.

In this blog post I want to show you my new method that I’ve been using since I’ve purchased a laser cutter from china. It’s using the laser to etch stencils out of transparency plastic (mylar). Chances are that you already have membership or access to a local workshop or hackerspace where a laser cutter is available, so you can give this a try. The trick is to balance the power vs speed of the laser at that sweet spot where it won’t burn the plastic or over/under etch the pads. And for those really wondering why in the world I don’t order from OSHStencils (not affiliated with OSHPark) or similar affordable online services – some of it is explained in the video but mainly because instead of waiting a few days I can do it in 5 minutes, and the flat mylar allows making letter sized stencils. Don’t get me wrong, I support and use the OSHPark PCB service but I prefer to etch my own stencils on the fly on my laser, it’s really convenient and allows for errors and retries without another few days of waiting. Plus, I can do in mylar what they can’t in thin curvy kapton.

If laser etching is not an option for you, read below for another alternative method that yields great stencils from plastic transparency mylar. Continue reading

GarageMote WeatherShield Upgrade

Now that WeatherShield is available to take high accuracy temperature, humidity and pressure measurements, it’s time to spread it around the property and watch the trends. I’ve already posted an example of upgrading my mailbox notifier project to include the WeatherShield. In this post I want to show my GarageMote upgrade to add a WeatherShield (WS), this was another quick evening project for today.

The garage is an interesting place to measure that data since it sits in between the house and the bitter winter cold or torrid hot summer. Would have been nice to have this data when I insulated my garage doors to see how effective that was.

The new GarageMote R2 includes an extra row of pins that are linked to the Moteino top header, which can be used for any general purpose, add more stuff to your GarageMote. This is perfect since WS‘s relevant pins are all on that same side. I had a prototype WS that I chose to stack on top of the Moteino, so male headers get soldered below, but you could also flip it over and have it be side by side the Moteino with headers on top. I shield the bottom of the WS with electrical tape, and soldered a pair of long pin headers with the longer side on the bottom of the WS.

This allows stacking of the WS on top of the Moteino using the female header that I soldered to the empty side header on GarageMote, the extra length headers are clipped off the top of the WS. I then install it back onto the door opener as before. GarageMote is permanently powered so it can afford to leave the transceiver in RX mode which is also necessary to listen for commands from a browser or mobile device (OPEN, CLOSE etc). That means it can also listen for wireless programming tokens, in fact the GarageMote sketch was always programmed that way so if a firmware change is needed it wouldn’t need to be disconnected, but instead reprogrammed wirelessly. The new revision of the GarageMote sketch is updated to include the WS code for periodic reading/reporting of the sensors data (which is excluded by default, and can be enabled by uncommenting the #define WEATHERSHIELD directive).

The resulting data arriving on the gateway looks like this:

F:4397 H:41 P:29.42

where F is fahrenheit degrees in hundreds (divide by 100), H is humidity in % and P is atmospheric pressure in inHg. The data is reported every 5 minutes, enough to get a pretty good resolution in a place that doesn’t expect large sudden fluctuations. Graphing and logging will be added later when I enhance the Gateway stack. For now this just serves as a quick demo and example of how WeatherShield can be used. Enjoy!

Mailbox Notifier Upgrade #3

As I explained in my lipoly+freezing=failure post, I ran into a snag with the brand new Lithium Polymer battery operated MotionMote that serves as my mailbox notifier. It discharges quickly after being exposed to the cold for a while, it seems like below 30F it goes downhill and then falls off the cliff and dies around 24F (-4C). After a recharge the cycle repeats, every time dying a little faster which means cold damages them permanently. So being tired of this nonsense I wanted to give alkalines a try and also wanted to add a WeatherShield to the mailbox, if it’s out there why not report temperature, humidity and pressure as well in addition to telling me when the mail is delivered.

UPDATE: the LiPoly batteries are still working great above freezing and will provide a compact and longer lasting charge than a 3xAAA pack. In the spring time I switch to a LiPoly because it lasts longer and I can charge it directly from the onboard USB of the MotionMote PCB. In the winter I go back to alkalines because they survive in the deep freeze.

The first step was to solder the weather shield on top of the Moteino, only 7 pins are soldered after being raised a little: GND, VIN, 3.3, A7, A5, A4, A3. The bottom of the WeatherShield was insulated with a piece of electrical tape to avoid any shorts.

Then I added the new battery – a 3xAAA holder with older batteries. I needed 3x of them to get above 4V so there’s some head room for the voltage regulator on the Moteino and the PIR sensor which was modified to allow running into much lower voltages. I could have soldered the battery holder wires directly to the MotionMote PCB but I had some spare female JST connectors and I added that to make it easy to remove later if needed. I took the measurements to lasercut another box that will fit this.
With the help of previous box designs I was able to get the dimensions and hole alignments right the first try. The box blueprint is published here for those that might find it useful. Here’s everything after test fitting:

Velcro goes on the back and the Moteino antenna protrudes from a hole in the box through a short cut in the velcro. The wire antenna also goes out the mailbox through a tiny hole. The slots in the side allow air to go in for better humidity readings.
After some minimal coding, the mailbox notifier sketch is altered to do the WeatherShield readings. The new sketch is published in the same repo. The new mailbox is now smarter and it gives all the following readings:

LO:4h1m BAT:4.36v F:3475 H:37 P:29.32

where LO is last open elapsed time,  F is fahrenheit in hundreds (divide by 100), H is humidity in %, and P is atmospheric pressure in inHg. It’s also running happy after being buried in the last winter storm. In the morning when the sun hits the mailbox directly the temperature can rise 20-30 degrees above the real temperature, but otherwise throughout the day it’s pretty stable and comparable to WeatherUnderground, when it’s overcast it’s often within 1 degree of WU but I am aware there are multiple factors that can influence a temperature reading in such a location. Humidity and pressure readings are also very stable and rise very deterministically.

Lasercut strip feeder for your pick & place

Got pick & place? Cool.
Got cut strips components but no strip feeders? No? Then this post is for you.

Problem: You need to assemble a small run of boards in your pick and place and buying full reels of parts makes no sense, instead you get a low count in cut strips. Strip feeders cost a lot, and they are not very special, just cold dumb metal. Of course, the manufacturer will sell you high quality feeders machined from aluminum/steel, but placing components from cut strips that already have pockets spaced evenly sounds like a very easy problem right? I mean you could just stick them on a cardboard with double sided tape and then teach the machine the first+last and it figures out the rest. That works but it’s a pain when you need to reload – you have to re-teach the machine since you won’t stick it exactly in the same place, you’re almost better off placing by hand.

Solution: So let’s make a strip feeder. I have lots of components that are less than a full reel (exotic resistors, transistors, crystals, caps, mosfets etc). Most of these are 8mm and 12mm tape, rarely 16mm. So it would be perfect to have a strip feeder that can be placed in a fixed position in the machine. To reload you just cut the pre-determined length, feed it through and align the first pocket to a marker on the side, reset component count for that row, and machine already knows where to continue, quick and easy. Continue reading

SwitchMote – one step closer to reality!

Just got another batch of SwitchMote and SwitchMote Shield PCBs from OSHPark the other day and I put one together for a test run. In the meantime Kris K has suggested I try another type of cover for SwitchMote. I think his idea was great and today I lasered a few of these covers that are meant to fit in the cutout of a regular rectangular light switch and they turned out very nice. This way people could replace the light switch and keep the original cover, or upgrade to a rectangular cutout cover (HomeDepot has all sorts of light switch covers, even paintable if you’d like to blend them with the wall color). The acrylic is also available in different colors from different sources but for now I’ll go with the usual white I’ve been using before.

The button caps come in different colors so I got a few samples to try out. I think blue, red, yellow and white should cover most needs. The green I found was pretty washed out, didn’t really like it, but I’ll keep looking. Here are a few build photos, and more in my flickr SwitchMote set:

More people started asking when this will be available. I’m already producing custom versions of this and I’m trying to get as much testing done as I can. It is mains power stuff so I’m taking this seriously. This 3rd prototype of SwitchMote includes a varistor and trace fuses for added safety against transients and overloads. I need to develop the firmware stack for this and think of how I want SwitchMotes to interact with each other. The SwitchMotes will need to be wirelessly re-programmable when the need arises so users would not have to disconnect it from the wall when they want to update it. But I want SwitchMote to be pretty autonomous. I will install and try a few on my own, planning on replacing some 3 way switches and some outside lights I’d like to turn ON/OFF from the master bedroom. Fingers x-ed. But so far so good, all the buttons work, the LEDs glow nicely in the dark and are very visible even from a distance, and mechanically the unit is pretty much where I want it to be. This setup should fit easily in any standard switch box.

Will follow up with details on progress, stay tuned!

Wishing a very Happy Holidays Merry Christmas and a Happy 2014 to everyone reading this blog!

So you can’t afford a $200 lightbox?

I’m going to try to break the blog silence with something worthwhile your precious reading time, my dear reader. There’s much to blog about and what’s going on at LowPowerLab but for now something simple.

I like to take nice pictures, it’s like giving candy to the eye. Because the images convey presentation. And good presentation is a paradigm of quality. Look at a good blog with crappy pictures – you will read but won’t be terribly impressed, right? Look at a less an average blog with great pictures and you will instantly follow it.

Until recently I took all the blog pictures on my white work desk but lately that’s gotten dirty from all the stuff I do on it but I’m too lazy to get everything off and add a coat of white paint, that’s for another day when I’m awfully bored. So I started using blank sheets of paper under the subject, that worked pretty nicely, but every shot took a few minutes to setup and get the right light and angle on the tripod so the light wouldn’t bounce too much off the ceiling etc, what a paaaain 8-( … OK – so looking around the web yields the typical results you will find on any product – cheapo lightboxes made of fabric, for around $30-$50, the nicer ones are $100-$200 or even more. I like to spend the extra buck on the nicer thing, but finding it impossible to spend that much on something as simple as a light box I thought – doh … how hard can it be to make one? Continue reading

Laminator dimmer hack for PCB or stencil toner transfer

This post will walk you through a dimmer enhanced laminator mod that allows an alternative method to transfer toner to PCBs or metal stencils.

The clothing iron transfer method works pretty well to make metal stencils. But for larger stencils it might not be so feasible, and a lot of people reported that they could not get a consistent transfer with their irons, maybe because not all behave the same. I have to say there can be lots of potential points of failure in this process. It’s a lot of trial and error, and my stencil tutorial was meant to help with eliminating some of those failures that I’ve gone through. I decided to try the laminator mod to see how that works compared to the iron. Continue reading

Reflow oven insulation

My reflow oven is very low tech. I haven’t modified it at all and even so I’ve been using it to reflow thousands of PCBs ever since LowPowerLab started.

It has top and bottom elements, but the heat does not distribute evenly, understandably so – you can see through it. Sometimes PCBs that were on the inside edge would take longer to reflow. Air escapes in several different places all over the oven enclosure, especially on the bottom front and back:

It’s time for a small improvement, adding some basic insulation in an attempt to stop air flow, keep the heat in and hopefully make it more evenly distributed. Continue reading