How to Make Your Own Smart AC
mlauter.github.io
mlauter.github.io
Sometime in the late 80's, I worked in a lab where we needed to heat an assembly to a certain temperature, while turning off the heat during data collection to minimize stray magnetic fields. I thought, a sensor, controller, and a relay. The process delivered a lot of power to the heater, due to a necessarily short duty cycle (heating in between data points).
Guess how relays fail -- open or closed?
Guess how experiments melt.
The relay failed closed. There was probably an inductive kick in the system because it was fed by a Variac. It got so hot that it melted the solder in the vacuum joints, and set us back a month.
Since then, I have always considered any system where a single fault failure can result in the uncontrolled release of power (electrical, heat, steam, momentum, hydraulic, etc.) to be dangerous.
One of my techniques is to incorporate two controllers with different set points, so the second controller only operates as a backup. I usually wire the second controller so that it shuts down the system altogether if its set point is reached. Another technique is to design the system so it can survive running uncontrolled at full power indefinitely, but that often results in massive over-design.
Now the question: I suggest taking a long hard look at your design, and answer what could happen if: 1) The relay gets stuck in either position. 2) Your code causes the same to happen. A possible measure for the air conditioner is to set its built-in thermostat to a temperature just below your intended operating point. That way, if the relay gets stuck, the a/c will go to a reasonable temperature and just sit there. Even if you conclude that it's safe after all, you will have done a useful analysis that should become a habit.
I don't want to be a wet blanket, but I'm somewhat of a safety freak due to my early experiences.
Also, the specs for that relay don't necessarily apply to inductive loads such as motors.
One thing to add here is that often times in household HVAC system the thermostat relay doesn't handle the current for the heating/cooling element. Rather, it is the on/off relay for the main relay inside the heating/cooling device.
At the very least, thinking through a failure mode analysis is a good mental exercise -- especially for folks who are accustomed to living in the world of pure software.
There are relays designed to control motors, and designs for the circuit surrounding the relays to prevent the arc. In the case of solid state relays, every one I've ever seen fail, failed shut.
I've been looking at home automation solutions and I want to make my own - I want to be able to control every switch and socket in my house, so I'd need very inexpensive nodes. I was thinking small microcontrollers (like the ATtiny85) with a one-way RF module plus a relay. I'd like to keep each node under $10 if possible. Then I'd have one (or more?) Raspberry Pi-like nodes that would broadcast commands to the nodes.
My main problem is: how would I power the modules that would control switches? I want to avoid a power brick running to the nearest socket at all costs, and a battery is a pretty bad solution. Any ideas?
Except that this method is not a good idea to control lights and sockets. This sort of setup is unreliable and has all sorts of limitations. It's basically the X10 of the 1990's, reimplemented poorly. Of course there are all sorts of alternatives that have been developed, like ZWave and Zigbee. But they're not DIY projects.
For 10$ or under, you can buy an off the shelf 433 mhz setup from cheap suppliers.
There are literally thousands of people who try to build their own, and the result is usually of the quality as described in the linked article. What this woman is doing (turn AC on and off through cutting off power) will wreak havoc on her AC as it will turn off all the circuitry AC's have to gradually control temperature. She notes this as a 'todo' in her description, which is roughly equivalent to saying 'yeah I build this soap box car and I ran it down the hill, now all I need is to put in pedals and then I can go off racing Nascar'. Uh, no, not even close.
Look, I see the appeal in building something yourself, but not in something that is both as simple and ill-functioning as this - what's the point of building something badly that you can buy COTS from any hardware store for only slightly more than what she spend on this thing? Internet-enabled remote controls for AC's can be bought for 75$ or less, and they interface with the circuitry of the AC directly and let you control temperature set point, fan movement and everything else without putting undue stress on the machine.
> what's the point of building something badly that you can buy COTS from any hardware store for only slightly more than what she spend on this thing?
Tinkering. Hacking. Learning.
> turn AC on and off through cutting off power) will wreak havoc on her AC
I don't know alot about AC's (I generally eschew them), but there is one line in the article:
Make sure that your AC is always set to be ‘on’, we’re bypassing the air conditioner’s normal on/off control system.
I can't image they've got a complicated startup sequence if they've got an "always-on" setting? Or am I wrong?
You can also build your own wifi controlled outlets using sparkcores like in this tutorial[1]. That author addressed your question about powering the modules that control the switches by "stripping apart an old USB power adapter, and soldering up AC wire from the power cable as well as an additional two wires to the back of where the USB port was soldered to the board on the +/- power pins."
Googling around you can find other sites like [2] for building your own controllers. But to be honest if you're looking for a whole home solution that's reliable and safe it's probably best to use some pre-bought kit for that purpose like Insteon - but I could defintely be wrong. Good luck!
[1] https://www.hackster.io/daniel0524/building-a-wifi-outlet [2] http://www.openhomeautomation.net/
http://www.homedepot.com/p/Leviton-Decora-15-Amp-Combination...
Low cost, long enough range and not wired can be a bit tricky. If you are ok replacing sockets, putting an adapter in, replacing switches etc you can get the features you want, but probably not at your desired cost point. Those solution would steal a bit of power from the 110 lines. If you are trying to hack something with some relays, I would suggest a sleepy radio, plus a thing called a latching relay. A latching relay allows you to connect/disconnect without continuously applying power and instead only applying power when changing the configuration. Still though, the batteries are going to be a pain once you start using anything electromechanical or radios unless you are really careful at each step.
Making a Smart Water Heater utilizing the existing hot water system in our homes would be very useful as well, and I would like to know if there are any efforts in this area.
There could be two ways (independently) that energy could be saved:
1) The water level in the tank could be varied by time depending on various parameters
2) The temperature level of the water could be varied by time as well. ( Keep it above freezing throughout the night, and trigger the heater at 5 am so that when I get to my shower at 6 am, I have hot water).
What you could do is use a second electric water heater as feeder tank to the primary one, and only raise the setpoint above vacation-idle when electricity prices drop very low or below zero (if you're in an area that offers real-time electricity pricing).
The issue would be balancing the need for cold water to make the AC efficient and this being any use for heating up the water. Maybe with a larger smart tank that can vary the levels of water, or a secondary tank with pre-warmed AC water which can then be used by the hot water tank.
There's a startup (sensibo.com) that's building a full HW/SW solution for controlling and monitoring IR-operated air conditioners.
(full disclosure: I'm friends with the founders and backed their indiegogo campaign)
Putting part of such a project to $SHAREDHOSTINGSERVICE however, that's were I'd stop.
Then again, more sensitive stuff floats around on the intertubes.
(Also, not serving it by yourself feels like stopping halfway, and not in the hackers-do-take-shortcuts-way).