Home automation with a view to conserving energy is an interest of mine and I have been compiling some information in the areas outlined below. Perhaps this list could be used as a starting point for the catalog.
Home Automation System Modules
Access control:
PIN
RFID
IR
Internet/Text messaging
Biometric
Alternate Energy:
Biomass
Geothermal
PV Systems
Wind
Communications Network:
Wired RS485, RS422, RS232, Other
Wirelsss RF
Wireless IR
AC Power Line
Ultrasonic
Communications Protocol:
As simple as possible
Heating Ventilation Air Conditioning:
Standard Gas/Oil/Electric
Biomass
Active Solar
Passive Solar Motorized dampers
Lighting:
X 10
Low Voltage Latching relays
Security:
Interior: PIR and door/window switches for intrusion detection
Interior: PIR for automated lighting
Exterior: PIR for automated lighting and possibly intrusion detection
Smoke, Fire, CO, Gas, Flood/moisture sensors
I have been doing some looking about, and the X10 power wire hardware layer is really much more primitive than I expected. Without pulling new wires, this leaves wireless. X10 wireless was kind of spotty but lookee what I found over at sparkfun: http://www.sparkfun.com/products/10253 That's about USD$10 for a complete Bluetooth node. That suggests Bluetooth, thanks to the commodity SMD assemblies, might be cheap enough to serve as the backbone of a home automation network. This would have many advantages, not the least of which being that devices capable of joining it are already ubiquitous.
Biomass? That would be methane from animal waste or alcohol from fermentation of vegetable matter, wouldn't it?
A little far fetched for home automation, but then again if your home is a pig farm - maybe not. I have a friend in Thailand with a pig farm and has accumulated methane generating mechanical power for cooling the pigs. Not yet anything for conversion to electrical power, but I must say that I have visited him and the whole scheme is rather large and rather stinky.
Fermentation of alcohol is another interesting alternative. But the good old USA has the ATF that may come to your door. Again, it all depends on what your definition of a home is. Do you have a steady supply of sugar cane?
Maybe one cow for everyone,is a little much.We have some gov grants toward green energy-methane is one.Farms have an oder yes but with a digester its captured and put in a double walled tank outer wall is filled with water I think.Ive also seen something on new generators to power a home off a gallon of water a day.It does some electrolosis on the water and burns the hydrogen and oxygen as gas for the home.The electrolosis equipment was still pricey due to a rare element that was costly to refine.Over time the price was to drop considerably.Its becoming really common we have had a methane digester where I work for like 10yrs.They even have a google sponsored methane thing that is at the local land fill.
From what I saw, 100 pigs provide an adequate source for a methane digester. In Thailand, they used a rubber bladder about 25 feet long by 12 feet wide. All that powers a modified Nissan automotive engine of about 1800cc, nothing very large. But not really enough for creating surplus power to put on the grid. The method drives the engine which drives large fans for cooling the pigs and an evaporative water wall adds to the cooling.
The benefit is that the pigs grow faster and stay healthier when they are not subject to excessive heat.
As you can see, 100 pigs in their own housing and a digester begin to take some serious space. I doubt if one cow would do much. I don't thing the stink is escaping from the digester - it is just a pig farm with 100 pigs that stinks. The whole building for the pigs is on a hillside and the stalls can be washed down from top to bottom. All the run off goes into the digester.
You also have the noise from the engine to deal with.
Alternatively, Germany heavily subsidized solar energy the results have been that it is installed just about anywhere. And now, we are beginning to identify architectural features that create steady high winds for localized harvesting.
Bio-methane has several problems. First is very low pressure: 1-2 psi. This means that fuel lines are large, like 2" plastic pipe. Second, it is very wet. Third, it needs to be scrubbed for SO2 in order to not damage the engine. That is usually done with an inline tank full of steel shavings. And fourth, it is very high in C02, that reduces the heat content of the fuel by as much as 50% of what you can get from a pure, high pressure methane fuel. Many farmers have gone to using a combined diesel/methane engine to get real power and reliability out of bio-methane. But the investment is roughly 10 times that of a modified Nissan AND you need 10 times the animals to justify the costs. Pretty soon you don't have any neighbors, except for pigs. And you are still buy diesel. BTW, eventually someone has to clean out the digester, right? ewe.................
In sum, there is a real advantage to visiting and observing something in use. I learned about the latching relay system when working in a large warehouse that wanted to replace all their florescent ballasts to conserve energy. The light switches look as if they are 110 volt, but they are entirely a low voltage system. There is an outfit --- Douglas Lighting Controls, which provides complete ready panels for 24 relays and with the low voltage power supply builtin. All UL and NEMA approved.
Biomass? That would be methane from animal waste or alcohol from fermentation of vegetable matter, wouldn't it?
A little far fetched for home automation,....Do you have a steady supply of sugar cane?
Maybe the goal could be switched from "selling energy to the grid" to "sustaining a small family"? Biomass doesn't necessary have to be limited to powering HVAC
I think it should be built-in to the home when they construct it.
That's a really good idea, but around here it is not something that a builder "does", it might end up being a very expensive add-on.
I wonder what kind of gig it would be to install the automation wiring on new construction? Is there even any "standard" to follow to anticipate future needs?
If there isn't a specific set of systems to be automated, its hard to define installation for appropriate controls.
Maybe the first step of the "catalog" is to discuss the systems to be automated, and the control options?
Installing at time of construction would be a nice way to go.
prof_braino brings up a very good point about local builders, and I'll add a side note about the Code. In places where Code approval is necessary it doesn't matter whether a method is better, it isn't permitted unless it is in the Code. And different standards apply to residences and businesses. I can imagine people being very reluctant to allow an installation that is so unusual a normal electrician might not understand it.
And this brings me to prof_braino's point; about 10 years ago my parents had a house custom built in a small Mississippi town. They wanted a modern place and had the money to pay for it, so they specified steel studs instead of wood -- nobody would take the job. Oh, they're in the code and even available because of industrial construction, but none of the industrial builders wanted to build a house and none of the residential builders wanted to mess with the steel studs. So no steel studs. This phenomenon erased several other features they wanted, simply because contractors didn't want their men to have to learn a new technique for one job. They did get the metal roof, but one of the workers fell off it in the process of installing it. (He survived.)
So even if you're buildinga new house you may find yourself starting with 110V series taps to the light switches just because you can't find an electrician who will do anything else. If you want it to have a chance to become popular, best to work with what nearly everybody is already going to have.
I included biomass because it is a viable source of energy for rural homes and businesses, and could be used to generate heat and electricity for urban areas. It includes methane from animal and human waste, fermentation of alcohol from vegetable matter, conversion of plant and animal products to synthetic crude oil, and use of lumber/paper mill waste (tree bark, sawdust, etc.) to produce heat and electricity.
I am also quite familiar with and impressed by the simple elegant design of the Douglas Lighting Controls. They use latching relays that only require power when switching and are rated at 20A 347V. The low voltage switches use 24VAC and use 2 diodes to send the negative or positive half cycle to switch the relay on or off. Several relays can be controlled by one switch or one relay can be controlled by several switches.
@tonyp12
I agree 100% that the best time to install the wiring and such for home automation is when they build it. The same would also be true of of alternate energy installations.
My previous house was in a new subdivision and had all the wiring for a home security system along with wiring/pipes for a central vacuum done while it was being built. Made for a much neater and far less expenive job.
@prof_braino
That's a really good idea, but around here it is not something that a builder "does", it might end up being a very expensive add-on.
This would most likely be a job for a subcontractor. It makes sense to contract out low volume and specialty work that does not go into a large percentage of homes.
I wonder what kind of gig it would be to install the automation wiring on new construction? Is there even any "standard" to follow to anticipate future needs?
If there isn't a specific set of systems to be automated, its hard to define installation for appropriate controls.
There are standards and standard products in the commercial and industrial building automation arena. Some of those standards and products could be applied to home automation systems and some would be overkill.
Maybe the first step of the "catalog" is to discuss the systems to be automated, and the control options?
Absolutely! I would suggest we start with the HVAC and lighting system since these are where the greatest savings in money and energy can be made.
@localroger
Re: Contractors, the Code, and local Building Departments. These are the biggest obstacles to any advancements in improving home construction. It may be possible to have an engineer approve the plans in order to get them accepted by the building department but that can be expensive, and still leaves you with the problem of finding a contractor to do the actual work.
Many, many years ago, I majored in Architecture at the University of Oregon and we were presented with a new class by a professor -- called Mechanical Equipment of Buildings. He, John Reynolds, also authored what was then considered a ground breaking text by the same title.
He did much early work proving passive solar is feasible for residential housing. So the current 4th edition might be an interesting reference to this topic. Nonetheless, the idea of home automation might best be divided into fundamental systems and 'goodies' that people want to pimp out their crib. We might even coin a new phrase - 'I-crib'.
And Sweets Architectural Catalog, which has now morphed into Sweets Network may be very useful for locating solutions already in the marketplace for just about anything architectural.
Maybe the first step of the "catalog" is to discuss the systems to be automated, and the control options? Which is exactly the point of the thread.HVAC and Lighting Systems then.
@Loopy Byteloose "I-Crib" Is awesome LOL
I-crib is really groovy idea. I suggest changing thread title to "i-Crib Total Home Control and Automation" or such.
BUT, we start crossing the line from micro controller / software engineering to residential construction engineering, which is out of my scope. At this point, I can only verify that requirements are quantifiable and testable. (Which I will do if you guys think is would be helpful). I know "about" this stuff, but I would not want to have somebody's kid or granny fry because I made a stoopid oversight about wiring.
Do we need to bring a residential design architect to the discussion, or does one of the current participants have this background?
I am having trouble with what some of youall consider a 'home' in the term home automation.
Please try to get a grasp of the scope and scale of this.
We get into systems that are far beyond the scale of a normal person with a normal home. That was why I challenged 'bio-mass'. It really is an enterprise component with serious capital outlays that only a working farm can afford. (Don't get me wrong, I like automated working farms and am in love with greenhouse climate control, but this is not about that.)
I am NOT trying to limit homes to something like 3 bedrooms, 1 1/2 baths, and 2000 square feet; but I think that the primary purpose should be places that are 'on the grid' and have people working outside the home for an income.
If you take a look at Reynold's text, Mechanical Equipment of Buildings:4th ed; you will find he also covers material and issues well beyond the 'home' context. But he does seem to separate his discussions of them so that solutions can be found that are appropriate to the context of a dwelling.
Youall are welcome to take communal ownership of the "I-crib" or "I-Crib" as a project name or identity. It is fun and I am not attached to fame or glory or greed as far as Parallax Forum stuff is concerned.
And yes, there has been a PERSISTENT DILEMMA in the world of micro-controllers that anything fun soon moves over to include the 'electro-mechanical' world. But don't be too narrow, or there just isn't any room for fun. Each of us can promulgate his own idealized "I-Crib". I certainly have my own biases that I am not about to let go of -- others have theirs. But we might buzz back new creativity at those Arduino people with the Parallaxians and their I-Cribs. (What do I need a shield for, I want an I-Crib.)
A confession - I dropped out of the UofO architecture program because I couldn't see how I'd ever make money at it. (All successful modern architects seem to have one thing in common, they married into a rich and powerful family)
Nonetheless, I eventually did become a Licensed General Contractor in Oregon and built homes as well as restaurants and other commercial structures until 1983 (when construction went bust due to a 20% prime rate). In the past, I often provided free home design services if I was hired as the contractor. Similarly, I'd drew plans for anything that required a building permit as part of the package for working with me. Other construction project experience included nuclear reactors (Hanford Area, Washington State); major office buildings in San Francisco as a journeyman carpenter; and major building foundations in the San Francisco Bay Area as a Cost Estimator and Bid Negotiator.
In other words, my weakness is the electronic hardware and software coding side of all this.
When I posted my list it was not my intention or expectation that all or even most of the items would be considered for inclusion. They are folders used by me to accumulate information on those topics, and was intended as a list to select items of interest from. On the other hand, I see no reason to exclude any of them if there is some interest shown.
My personal interests are in the use of passive and active solar systems and automating HVAC, lighting, and security to maximize energy savings and maintain a comfortable and safe home environment.
One is for HVAC and possibly security, and the other(optional) is for Power generation/distribution.
Of course, they need to be able to 'talk' to each other, via a well-defined protocol(Power may issue a 'Low power situation' message, causeing the HVAC to shut down 'non-essentials', a 'Limited throughput' to make the HVAC select(priority scheme?) which units runs when.(First washer, then the fridge gets a boost, the dryer, later on, the freezer gets power. ), or a 'Low cost' to indicate that any waiting tasks(washing, drying, recharging of large batteries and so on) can be done.
The HVAC can signal that it's in a 'Low usage' cycle so that the Power unit can dump excess power to a 'secondary storage', or even deep-cycle batteries to reclaim capacity. (If the battery tech supports something like that? May as well assume that some types have that requirement)
Alternate methods of storing power is 'heated salt' (solar power systems sometimes use large tanks of salt and generates electricity by pumping in water for steam),
a large tank of water higher up... ('fast response' power plants use lakes in the mountains... In times of low power demands they pump water into the lakes, then dump it through turbines when the grid 'spikes'. No reason why a 'scaled down' system shouldn't work for a home power system?)
Lage banks of batteries, of course...
Portable electrically powered units.(Maybe not your iPod, but consider the battery for your drill, the leaf-blower, hedgetrimmer, tractor or electric car...)
and yes, it's possible to build an electric tractor. In fact, battery weight isn't a problem on tractors... and if you have two or more detatchable packs that you can easily swap between... The problem here is how to let the system 'know' for how long these devices will be available to 'borrow' power from before they're needed next, and how much can be taken out.
I love both your ideas and comments (Kwinn - GadgetMan)and will try to use as much as we can.While there is much to be considerd for communication and power.I think we should focus on things like what else needs communication and power.Like I heard someone say I'd like to be able to draw a tub full of hot bath water to just the right temp.On my way home from work.Now we need stuff for that.Simple the mechanics can be done.Moving on...Some modular design should be used.
@kwinn
Your list is a good one. I just was worried that the scope of things was getting too large and moving away from home automation into other concerns.
@gadgetman
There is a tendency to think that one centralized system is good. In many cases, it means a failure or a need to pull the system off line drives everything down - not really a good outcome. Multiple controllers that are tasked to one aspect apiece might be more useful. I suppose that centralization of data gathering (in the form of logs of activity) might be a useful research tool to find out what people really do as compared to what they think they want is a useful methodology. But we already manage multiple layers of systems in our home environment without any automation. For instance, when I leave open a window; I am thinking of security, of the near-term weather, of the interior climate control, noise either going out or coming in, and providing fresh air. All this happens without any automation.
So this all leads to the possibility of creating a non-automated environment with extensive data gathering as a first step toward useful automation. I suspect this has been long ignored as data gathering used to be expensive. For this, I am thinking of something like the LInux-based BeagleBoard because I can have it acquire data in a centralized location, with low power, and I can do a lot of the Log work in a shell script language. Data can be fed into it via RS232, LAN, or by other means. And best of all, data can be easily offloaded to be reviewed on any computer.
@graffix
Modular design already exists in many cases if you just look at what is out there in electro-mechanical control. But this may not be the modularity that you conceive of in your own mind. I am beginning to think I need to write up a paper that explains my own ideal I-Crib according to my own personal preferences and then have other critique it for feasibility. It we all did that - with an open mind, some new conclusion might be made. This is conceptual stuff, not the kind of work that is done with solder, components, and IDE. That would come later.
And for everybody,
I really don't think we need a residential architect to grasp all this. We aren't starting from scratch with a piece of bare ground and a building budget. I don't think any of us will be moving walls or adding additions to their homes via this. The main skill set is that which is more akin to a handyman/remodeller. And even then, the majority of us are not going to reinstall window frames or add significant features to a building. I have personally been living in a one room plus bath dorm room in Taiwan for 17 years now. That is my I-Crib as it is, but there are ideas and ideas applied to gadgets that would make it all so much better. In my case, I really don't need a security network. The hallways and the front door already have a security camera system that the landlord provided. And I can't automate lighting by breaking into the existing wiring as it isn't my building. So I am thinking more of an IR network and a data gathering computer as the starting points. Eventually I could add more sensors and features as I see what the data is omitting. From that, I can begin to see the kind of things that I'd love to further develop. I do admit that I have immediately omitted X10 as I just don't have a lot of confidence in it.
So I guess I have to write something presentable to defend my own preferences. That all may better be done in Parallax's 'Blog Space'.
What you described for more self automated control of a window is good thought also like how it would be identified by the security and HVAC systems as it should be.When one configuration counter acts or inhibits another system there should be an alarm of some kind.Like you have the ac on and the window open.By self automated I mean the ability to sense rain and close itself in an auto mode.
Id like to hear more on your thoughts of useful automation.
I just fear I might have to write a book. I have already mentioned Reynold's text. The first edition was inspiring and the 4th edition only seems to have gotten much better. And I spent a lot of time in the UofO Architecture library looking at Sweets Catalog.
Here is a practical personal example.
It would be easy to separate HVAC and security by having all the windows NOT open, or at least providing an ample alternative source for injecting fresh air. It might even be more acceptable as the fresh air could have dust and humidity removed prior to being brought into the home. My biggest problems here are dust and humidity as my air flow comes in a window and goes out a door. I've managed to get the humidity under control by keeping the A/C at 27 degrees C on a 24/7 basis and running a second fan on the opposite side of the room. But I can't filter all the dust (Kaohsiung is a rather dust town, steel mills and petroleum refineries).
At 27 degrees C, the dew point seems to keep the humidity at about 30%. So running the A/C is a brute force solution. If the temperature goes up, the humidity in the room creeps up to 70%, the walls get wet and slimy, and my books begin to mildew.
Due to other factors in my building. It is almost as cheap to run the A/C 24/7 and have the humidity under control as it is to only run it when I am here. But that gets into a lot of thermal facts and the shady location of my room.
As you begin to see, there is a trade off between the physical building, the kind of systems employed, and degree of control imposed. In some cases, you have to enhance all three in order to get the best results.
I really don't think we need a residential architect to grasp all this. ... I don't think any of us will be moving walls or adding additions to their homes via this.
OK, fair enough, that's your opinion. Here is the basis for my suggestion: I DID need a residential architect on my project, and I DID move walls. This is very common. And because we strictly adhered to code and safety requirements, and common sense, nobody died when we had an electrical malfunction. Previous owners had done dangerous things, like running wires through the attic without conduit, "swapping" neutral lines, and wiring light sockets with extension cord wire. "Quick and cheap fix before the sale" is also very common. The electrician I hired fixed everything he found in the course of renovation, but he missed a swapped neutral (the circuits were not on adjacent breakers). This is also very common, mistakes and oversights get made every day. There was no issue until we needed to replace a faulty outlet, when the breaker was switched off, and the other breaker was left on (we did not cut power to the entire house to change a single outlet), a ground fault outlet failed and burned. All the fire and debris were contained in the conduit box, only the smell got out, alerting us that there was a (potentially fatal) issue.
I agree that there are situations where more than one controller system may be needed, but for a small home, apartment, or small business, a system based on a single Propeller chip could be a perfect solution. Temperature and humidity change slowly so there is no need for rapid response in that area. Automated lighting needs a fairly rapid reaction to sensors but very little processing (PIR detects person in room – turn on lights in room. No motion detected in room for X minutes – turn room lights off.). The security system (intrusion detection, fire, flood, freeze alarm, power outage, etc) may require rapid response and somewhat more processing for an event, but even that is well within the Prop's capability.
@All
At this point my approach is to split the system into individual modules, ideally each running in it's own cog. This approach has the benefit of splitting the software into well defined functional areas and allowing the sensor data to be shared by the various areas. The PIR sensors for example could be used for intrusion detection when the home is unoccupied, and for lighting when the home is occupied.
Module 1 – Data Collection: Uses objects from the OBEX (74HC165, I2C, MCP3208, Multiple Serial Port Driver, IR, etc.) to gather data from the various sensors, format the data, and store it in an array in hub ram. This data is used by all the other modules.
Module 2 - Control Output: Uses objects from the OBEX (74HC595, I2C, Multiple Serial Port Driver, IR, etc.) to output commands to various systems. This module is used by all the other modules to control the devices they are responsible for.
Module 3 – Access and Security: Monitors the sensor data stored in hub ram for intrusions, power outages, high/low temperature, flooding, smoke, fire, etc. and performs appropriate action based on occupancy status.
Module 4 – HVAC: Monitors internal and external temperature and humidity readings, controls furnace, humidifier, heat exchanger, blowers, motorized blinds, etc, and selects the most economical method of maintaining the current set temperature.
Module 5 – Lighting: Monitors PIR and light level sensors and turns on lights in that area if required.
Module 6 – HID: Input settings (temperature, humidity, actions, etc.) that controls the system behavior. This could be a text file stored on an SD card.
Module 7 – Data Logging: Logging of events, average readings, faults, etc. to SD card or other destination.
@Prof_Braino
I suspect that a good architect is rather hard to find. 95% of US construction doesn't include one and the would like to charge a 10% fee on the total cost of a project. Small projects just can't afford one. But more important is a good electrician - maybe a good plumber and a good builder as well.
Regarding the topic of fire hazards and electrical, the great majority of failures are contained inside junction boxes and it is very important to use them. In San Francisco, it is most often necessary to put everything in steel conduit, but in Oregon, they pretty much accept ROMEX wiring between boxes. Primarily that is due to a building code rating by the degree of risk of loss by fire. It pretty much is an insurance company thing, not an engineering requirement.
But the electrical box, not only offers protection from fire - it is also pretty much the modular for putting in switches and controls, even when low voltage. So learning something about how to install 'remodel boxes' (the ones that you can just fit in a hole in the wall board) may be helpful.
But if you buy a fixer-upper with dire need for correcting improper wiring, it is a bit beyond home automation. If the bum that previously owned the home didn't know anything and just used the cheapest and most cosmetic means of wiring, it is all 'buyer beware' - unless there is something in your real estate transaction and title insurance that certifies the safety of all the existing electrical. In many parts of the USA, rural agricultural buildings - not occupied by people - are exempt from building permits and electrical inspection. Or at least they used to be.
Still, the smoke and odor from a fire can often be the worst and most persistent part of fire damage. So it is very important to avoid it at all cost by good wiring practices and expert guidance. Oregon used to allow aluminum wiring and I suppose one could be unlucky enough to buy an all aluminum wired home. It has now pretty much been abandoned as the aluminum oxides at the junctions and switches and outlets are constantly failing in a dramatic way. They had a protective gel that was supposed to prevent it, but it just didn't last.
@kwinn
I need to think about your Module approach. There is nothing specifically wrong with it and it is a good working hypothesis, but I am considering other things - like adding an IR sensors and a latching relay controlled by a PIC to my overhead lighting. In that way, I can take a univeral remote control - use the TV side to control the TV - and use the VCR side to control lighting throughout the room. So you see, there would be an IR sensor, relay, and microcontroller installed where ever I have a light to switch on or off. Of course, the Propeller could provide another IR transceiver set up as data gatherer and an override.
What would happen to the wall switch? I'd either remove it to permanently supply the IR sensor and microcontroller OR I'd leave it in place as an override means to shut down the circuit (though I suspect this would only be a temporary need.)
Nothing wrong with your approach. For the living space you describe and taking into consideration the fact that it is a rental it may be the best way to go. Even for a home that you own it may be better to replace switches lights, receptacles, etc. with modules controlled by IR commands. In many cases it is far more cost effective than rewiring the home. No reason (other than being somewhat forgetful) that IR input and output could not be included in the modules.
@All
I missed posting the “Control Output” module in the original post and have added it. With Loopy jogging my memory I will also go back and add IR to the Data Collection and Control Output modules.
In case anyone is wondering at my choice of module division, it is so that all of the modules except Data Collection and Control Output can be written without any consideration as to how the input is acquired or the output is controlled. If the HVAC module reads the temperature variable and finds it higher than the set point it sets the AC ON variable to ON. It does not care if the temperature reading or AC ON command is sent by serial data, I2C, IR, RS485, morse code, or smoke signals. Receiving data and outputting commands is the job of the Data Collection and Control Output modules respectively.
Next would be deciding the format of the data in and command out arrays. This would be deciding on a format for all the inputs and outputs for a typical home control system. For example PIR detectors would be binary. Either motion is or is not detected. Temperature would most likely be byte (8 bit) or word (16 bit) depending on whether an 8 bit or 12 bit adc is used. Since we are talking about values that are typically between -40 to +120 for farenheit, or -40 to + 50 celsius 8 bits would be more than adequate. Relative humidity (0 to 100%) would also be a byte variable.
For outputs the variables would typically be binary or byte. The furnace, AC, lights, or humidifier would either be on or off. Any fans or blowers would be on or off, or set to a specific speed (0-100% or 0-255) so would be byte.
Regarding HVAC, the measurement of humidity and temperature are directly related to dew point. So I suspect that some form of dew point calculation may be useful and informative. There are a lot on nasty and annoying things that can occur at hitting dew point. Water begins to condense on windows, some plants (like orchids) will suffer, mildew grows and 'dry rot' occurs, and this is also the source of 'sick building syndrome' or Legionarre's disease.
In other words, if you didn't know about dew point, it might help to review it. A/C equipment needs to have periods of running without cooling in dry ambient conditions in order to blow out accumulated crud that includes nasty bacteria. I even spray the intake of mine with a weak Clorox solution before doing so. It would be nice if this could be automated or at least scheduled for regular attention.
While I live in a sub-tropical climate where high humidity is a indeed problem; many of you live in areas where lack of humidity - especially during winter months - is a problem. So location and season variation need to be considered when programing. Extreme low humidity contributes to breathing discomfort, nose bleeds, and nasty static electricity build up.
Regarding my own vision of an I-Crib, I think 3 levels of network would work best and I am working toward that as a proto-type. I am not just working on IR links, but that happens to be the least developed area at this time.
Here is what I am thinking with the goal of not having to move once comfortable - and I mean not have to move out of a chair or not have to move to another room to monitor or control household issues and tasks.
1. Within any given room, an IR remote control allows the user to over-ride automation or tweak for specific needs. And to this end, I am working on a IR sensor/micro-controller/relay scheme that would allow lighting and other devices to have individual address identities and be powered from AC lines. The IR remote should work in all rooms and be able to be taken with you. It may be optimal to have the IR remote control working in conjunction with a PIR that senses the presence of people. Together, the over-rides could be enforced as long as the people are present; then when they leave, the PIR would trigger a return to default parameters.
2. Within the entire home, each and every room would have at least one CANbus node that would allow data to be passed on to a suitably located server (I mentioned that I was thinking of a Linux Based BeagleBoard) and that would be available on a local LAN and possibly the internet from afar via SSH connections (secure shell encryption). Data could be gathered from hardwire links or an IR sensor; control from afar could be passed via the same hardwire or IR transmission.
3. The CANbus network would not only gather data, but could also provide a link to control devices from afar and at multiple locations as it allows for multiple masters and slaves. Since it is hardwire and independent of the internet, it would provide a great deal of security and since it is low voltage/low power, it is both easy to install and to provide backup power. Also, the RS422 network it uses can extend to out building as 1 kilometer distances are no problem. All nodes can be polled so that an intruder can't destroy or add a hacking node with raising an alarm condition.
3a - individual micro-controller such as the BasicStamp, the Propeller, and others can easily work as needed with the CANbus via the MPC2515/MCP2551 chip set which is a simple SPI interface.
As you can see, I am not proposing specific microcontrollers - BasicStamps, Propellers, SXchips are all appropriate. If you need a master video terminal with keyboard, the Propeller is useful. If you need a singularly tasked slave, an SXchip or a BasicStamp maybe quite adequate. Much depends on personal comfort with any given device and what the configuration of an individual room requires. Incidentally, I already have made 20 circuit boards for CANbus nodes and populated about 5 of them for testing. Years ago, I had two up and running for months and driven by BasicStamps while connected over a coil of 100' of telephone wire without any failure. (They keep track of their failures.) They sent data back and forth at a rate of about 60 times a minute during that test.
I think this could be described as 'centralized automation with decentralized ability to spontaneously over-ride for transient periods'.
I am very wary of wireless, as it can be snooped and then hacked from outside. And I have read a lot of disappointments about X10 being rugged enough as a network. CANbus has the ability to manage collisions with arbitration when two or more devices try to send data at the same time. Each gets prioritized and can be resent automatically. X10 - as I recall - doesn't manage failures with any notification or attempt to resend. Also, I am quite wary of sharing a LAN as the main network for home automation. There is always the possibility that a rogue user starts fooling with devices. So the CANbus to internet (Via a Tini80DS410) bridge would serve as a firewall between all the CANbus elements and the LAN. A BeagleBoard would be present as a data accumulation server by recieving email from the TINI board. Unimportant devices - like table lamps - can be on the IR network; while critical devices can have more strict security on the CANbus while locked out of general over-rides
I suspect what I propose can use either a BeagleBoard or a TINI80DS410 as the CANbus to LAN bridge. You don't need both, but the set up would be quite different as the TINI80DS410 has CANbus installed and uses Java as a programing environment; whereas the BeagleBoard would need to have a CANbus interface fabricated from scratch, but programing could be in C, Python, or one of the many language supported in Linux.
I just happen to have a TINI80DS410; but haven't yet purchased a BeagleBoard.
Regarding PIR sensors....
While these are often solely linked to lighting, they can be used in a more comprehensive way to identify that people are present or have left the area. Personally, I would consider more comprehensive associating with several systems - Lighting, HVAC, Security, and communications. The only negative issue is if you have pets that provide false triggers to the PIR as they remain roaming a home while all the people are out. With pets, more thought about what they detect and in which zones they are most important would need to be considered. After all, they detect motion of any warm blooded animal.
By 3 levels of networking do you mean IR, wireless, and wired communications? If that is the case then we are on the same wavelength.
I like your idea of an IR link in every room. It should be possible to fit an IR link, temperature, humidity, and light sensor in a module that would fit in a single outlet/switch electrical box. Light fixtures could then be fitted with an IR link and PIR sensor to provide the room with a complete sensor suite for our purposes.
Most of my work has been in the industrial and building automation so I am familiar with Profibus, BACnet, Field Bus, etc. I have no experience with CANbus and my knowledge of it is minimal. I thought it was mainly used in vehicle systems.
FYI, while they share some of the same driver chips, RS422 is a point to point or multi drop standard (one driver, one or more receivers), RS485 is a true multi-point communications network (multiple drivers and receivers). While the Profibus and BACnet protocols can use several physical media for communications most installations I have been involved in use RS485.
Another consideration is that the sensors commercially available for this are almost all intended to be wired directly to a control system of some kind. That means adding a uC to the sensors to use them as part of a network. This is not much of an obstacle since there are very inexpensive uC's with built in ADC's and other I/O available, but they do need to work with the protocol in use on the system.
Sorry, but my 3 levels exclude wireless - just IR, CANbus, and LAN with possible link to the WWW. All wireless communication can be snooped without alarming the network and potentially hacked. Thus, it requires a higher degree of security and still remains a risk. I am all about keeping the home automation network protected with a rather strong moat.
Okay, CANbus is likely RS-485, not RS-422. A technical blunder on my part. I need to take a look at what Profibus and BACnet are, but I have studied and worked with CANbus and like it. One of the more interesting advantages of it is that by using an unusual crystal to clock all devices, it becomes yet even harder to break into from the outside, but its main protect is that there are just too many addressing options for a hacker to monitor in a reasonable time period. Are these others equally protected from snooping?
Right now I am pondering a 'state machine' approach to overall network operation. Here is a preliminary list of levels.
1. All systems off
2. 911 Emergency
3. No one at home
4. Pets at home in secured zone
5. Pets at home and wandering
6. People at home and active
7. People at home and retired for the night
8. Have system revert to all local and manual control (as if there is no automation - for emergencies, maintenance, and debugging)
We would likely need to have a few small data listings for the state machine. So an administrative menu would look something like this.
A. Add an occupant or guest
B. Remove an occupant or guest
C. Reboot to defaults
D. Configure a temporary activity (social event or one-time maintenance)
E. Configure regularly scheduled service calls (gardener/grounds keeper; pool maintenance; house keeping)
F. Add IR device and remote key code selection
Essentially, I have a strong preference to have all the administrative and programing modification to be made via an RS232 port and a dump terminal. The LAN would be able to do things in a limited fashion with an identified user properly logging in and it would send out email to gather data for research and improvement. But the core of the system would be fire walled by having only the one RS232 able to do all and everything.
CANbus with the MCP2515/MCP2551 chipset can work with all and any uC that can support SPI. Of course, there are some uCs that have CANbus build in and are very cheap for local nodes and some of these include ADC pins and internal crystal. The CANbus network requires one twisted pair for communication. So if you add another two wires in the same to power all nodes, there is a minimal amount of new wiring. Critical nodes (both master and slave) can have their own battery backup
Having said my position on wireless, I am wondering what other are proposing and why wireless is important. Is it a matter of using an IPad or some other specific platform. Or is it a desire to use wifi or another protocol?
My own preferences have led me to acquire hardware that may make me biased. So I am trying to keep the discussion open.
Comments
Home Automation System Modules
Access control:
PIN
RFID
IR
Internet/Text messaging
Biometric
Alternate Energy:
Biomass
Geothermal
PV Systems
Wind
Communications Network:
Wired RS485, RS422, RS232, Other
Wirelsss RF
Wireless IR
AC Power Line
Ultrasonic
Communications Protocol:
As simple as possible
Heating Ventilation Air Conditioning:
Standard Gas/Oil/Electric
Biomass
Active Solar
Passive Solar Motorized dampers
Lighting:
X 10
Low Voltage Latching relays
Security:
Interior: PIR and door/window switches for intrusion detection
Interior: PIR for automated lighting
Exterior: PIR for automated lighting and possibly intrusion detection
Smoke, Fire, CO, Gas, Flood/moisture sensors
A little far fetched for home automation, but then again if your home is a pig farm - maybe not. I have a friend in Thailand with a pig farm and has accumulated methane generating mechanical power for cooling the pigs. Not yet anything for conversion to electrical power, but I must say that I have visited him and the whole scheme is rather large and rather stinky.
Fermentation of alcohol is another interesting alternative. But the good old USA has the ATF that may come to your door. Again, it all depends on what your definition of a home is. Do you have a steady supply of sugar cane?
The benefit is that the pigs grow faster and stay healthier when they are not subject to excessive heat.
As you can see, 100 pigs in their own housing and a digester begin to take some serious space. I doubt if one cow would do much. I don't thing the stink is escaping from the digester - it is just a pig farm with 100 pigs that stinks. The whole building for the pigs is on a hillside and the stalls can be washed down from top to bottom. All the run off goes into the digester.
You also have the noise from the engine to deal with.
Alternatively, Germany heavily subsidized solar energy the results have been that it is installed just about anywhere. And now, we are beginning to identify architectural features that create steady high winds for localized harvesting.
Bio-methane has several problems. First is very low pressure: 1-2 psi. This means that fuel lines are large, like 2" plastic pipe. Second, it is very wet. Third, it needs to be scrubbed for SO2 in order to not damage the engine. That is usually done with an inline tank full of steel shavings. And fourth, it is very high in C02, that reduces the heat content of the fuel by as much as 50% of what you can get from a pure, high pressure methane fuel. Many farmers have gone to using a combined diesel/methane engine to get real power and reliability out of bio-methane. But the investment is roughly 10 times that of a modified Nissan AND you need 10 times the animals to justify the costs. Pretty soon you don't have any neighbors, except for pigs. And you are still buy diesel. BTW, eventually someone has to clean out the digester, right? ewe.................
In sum, there is a real advantage to visiting and observing something in use. I learned about the latching relay system when working in a large warehouse that wanted to replace all their florescent ballasts to conserve energy. The light switches look as if they are 110 volt, but they are entirely a low voltage system. There is an outfit --- Douglas Lighting Controls, which provides complete ready panels for 24 relays and with the low voltage power supply builtin. All UL and NEMA approved.
Maybe the goal could be switched from "selling energy to the grid" to "sustaining a small family"? Biomass doesn't necessary have to be limited to powering HVAC
http://gardenpool.org/
That's a really good idea, but around here it is not something that a builder "does", it might end up being a very expensive add-on.
I wonder what kind of gig it would be to install the automation wiring on new construction? Is there even any "standard" to follow to anticipate future needs?
If there isn't a specific set of systems to be automated, its hard to define installation for appropriate controls.
Maybe the first step of the "catalog" is to discuss the systems to be automated, and the control options?
Installing at time of construction would be a nice way to go.
And this brings me to prof_braino's point; about 10 years ago my parents had a house custom built in a small Mississippi town. They wanted a modern place and had the money to pay for it, so they specified steel studs instead of wood -- nobody would take the job. Oh, they're in the code and even available because of industrial construction, but none of the industrial builders wanted to build a house and none of the residential builders wanted to mess with the steel studs. So no steel studs. This phenomenon erased several other features they wanted, simply because contractors didn't want their men to have to learn a new technique for one job. They did get the metal roof, but one of the workers fell off it in the process of installing it. (He survived.)
So even if you're buildinga new house you may find yourself starting with 110V series taps to the light switches just because you can't find an electrician who will do anything else. If you want it to have a chance to become popular, best to work with what nearly everybody is already going to have.
I included biomass because it is a viable source of energy for rural homes and businesses, and could be used to generate heat and electricity for urban areas. It includes methane from animal and human waste, fermentation of alcohol from vegetable matter, conversion of plant and animal products to synthetic crude oil, and use of lumber/paper mill waste (tree bark, sawdust, etc.) to produce heat and electricity.
I am also quite familiar with and impressed by the simple elegant design of the Douglas Lighting Controls. They use latching relays that only require power when switching and are rated at 20A 347V. The low voltage switches use 24VAC and use 2 diodes to send the negative or positive half cycle to switch the relay on or off. Several relays can be controlled by one switch or one relay can be controlled by several switches.
@tonyp12
I agree 100% that the best time to install the wiring and such for home automation is when they build it. The same would also be true of of alternate energy installations.
My previous house was in a new subdivision and had all the wiring for a home security system along with wiring/pipes for a central vacuum done while it was being built. Made for a much neater and far less expenive job.
@prof_braino
This would most likely be a job for a subcontractor. It makes sense to contract out low volume and specialty work that does not go into a large percentage of homes.
There are standards and standard products in the commercial and industrial building automation arena. Some of those standards and products could be applied to home automation systems and some would be overkill.
Absolutely! I would suggest we start with the HVAC and lighting system since these are where the greatest savings in money and energy can be made.
@localroger
Re: Contractors, the Code, and local Building Departments. These are the biggest obstacles to any advancements in improving home construction. It may be possible to have an engineer approve the plans in order to get them accepted by the building department but that can be expensive, and still leaves you with the problem of finding a contractor to do the actual work.
He did much early work proving passive solar is feasible for residential housing. So the current 4th edition might be an interesting reference to this topic. Nonetheless, the idea of home automation might best be divided into fundamental systems and 'goodies' that people want to pimp out their crib. We might even coin a new phrase - 'I-crib'.
http://www.amazon.com/Mechanical-Electrical-Equipment-Buildings-Grondzik/dp/0470195657
And Sweets Architectural Catalog, which has now morphed into Sweets Network may be very useful for locating solutions already in the marketplace for just about anything architectural.
http://products.construction.com/
@Loopy Byteloose "I-Crib" Is awesome LOL
BUT, we start crossing the line from micro controller / software engineering to residential construction engineering, which is out of my scope. At this point, I can only verify that requirements are quantifiable and testable. (Which I will do if you guys think is would be helpful). I know "about" this stuff, but I would not want to have somebody's kid or granny fry because I made a stoopid oversight about wiring.
Do we need to bring a residential design architect to the discussion, or does one of the current participants have this background?
Please try to get a grasp of the scope and scale of this.
We get into systems that are far beyond the scale of a normal person with a normal home. That was why I challenged 'bio-mass'. It really is an enterprise component with serious capital outlays that only a working farm can afford. (Don't get me wrong, I like automated working farms and am in love with greenhouse climate control, but this is not about that.)
I am NOT trying to limit homes to something like 3 bedrooms, 1 1/2 baths, and 2000 square feet; but I think that the primary purpose should be places that are 'on the grid' and have people working outside the home for an income.
If you take a look at Reynold's text, Mechanical Equipment of Buildings:4th ed; you will find he also covers material and issues well beyond the 'home' context. But he does seem to separate his discussions of them so that solutions can be found that are appropriate to the context of a dwelling.
Youall are welcome to take communal ownership of the "I-crib" or "I-Crib" as a project name or identity. It is fun and I am not attached to fame or glory or greed as far as Parallax Forum stuff is concerned.
And yes, there has been a PERSISTENT DILEMMA in the world of micro-controllers that anything fun soon moves over to include the 'electro-mechanical' world. But don't be too narrow, or there just isn't any room for fun. Each of us can promulgate his own idealized "I-Crib". I certainly have my own biases that I am not about to let go of -- others have theirs. But we might buzz back new creativity at those Arduino people with the Parallaxians and their I-Cribs. (What do I need a shield for, I want an I-Crib.)
A confession - I dropped out of the UofO architecture program because I couldn't see how I'd ever make money at it. (All successful modern architects seem to have one thing in common, they married into a rich and powerful family)
Nonetheless, I eventually did become a Licensed General Contractor in Oregon and built homes as well as restaurants and other commercial structures until 1983 (when construction went bust due to a 20% prime rate). In the past, I often provided free home design services if I was hired as the contractor. Similarly, I'd drew plans for anything that required a building permit as part of the package for working with me. Other construction project experience included nuclear reactors (Hanford Area, Washington State); major office buildings in San Francisco as a journeyman carpenter; and major building foundations in the San Francisco Bay Area as a Cost Estimator and Bid Negotiator.
In other words, my weakness is the electronic hardware and software coding side of all this.
My personal interests are in the use of passive and active solar systems and automating HVAC, lighting, and security to maximize energy savings and maintain a comfortable and safe home environment.
One is for HVAC and possibly security, and the other(optional) is for Power generation/distribution.
Of course, they need to be able to 'talk' to each other, via a well-defined protocol(Power may issue a 'Low power situation' message, causeing the HVAC to shut down 'non-essentials', a 'Limited throughput' to make the HVAC select(priority scheme?) which units runs when.(First washer, then the fridge gets a boost, the dryer, later on, the freezer gets power. ), or a 'Low cost' to indicate that any waiting tasks(washing, drying, recharging of large batteries and so on) can be done.
The HVAC can signal that it's in a 'Low usage' cycle so that the Power unit can dump excess power to a 'secondary storage', or even deep-cycle batteries to reclaim capacity. (If the battery tech supports something like that? May as well assume that some types have that requirement)
Alternate methods of storing power is 'heated salt' (solar power systems sometimes use large tanks of salt and generates electricity by pumping in water for steam),
a large tank of water higher up... ('fast response' power plants use lakes in the mountains... In times of low power demands they pump water into the lakes, then dump it through turbines when the grid 'spikes'. No reason why a 'scaled down' system shouldn't work for a home power system?)
Lage banks of batteries, of course...
Portable electrically powered units.(Maybe not your iPod, but consider the battery for your drill, the leaf-blower, hedgetrimmer, tractor or electric car...)
and yes, it's possible to build an electric tractor. In fact, battery weight isn't a problem on tractors... and if you have two or more detatchable packs that you can easily swap between... The problem here is how to let the system 'know' for how long these devices will be available to 'borrow' power from before they're needed next, and how much can be taken out.
Your list is a good one. I just was worried that the scope of things was getting too large and moving away from home automation into other concerns.
@gadgetman
There is a tendency to think that one centralized system is good. In many cases, it means a failure or a need to pull the system off line drives everything down - not really a good outcome. Multiple controllers that are tasked to one aspect apiece might be more useful. I suppose that centralization of data gathering (in the form of logs of activity) might be a useful research tool to find out what people really do as compared to what they think they want is a useful methodology. But we already manage multiple layers of systems in our home environment without any automation. For instance, when I leave open a window; I am thinking of security, of the near-term weather, of the interior climate control, noise either going out or coming in, and providing fresh air. All this happens without any automation.
So this all leads to the possibility of creating a non-automated environment with extensive data gathering as a first step toward useful automation. I suspect this has been long ignored as data gathering used to be expensive. For this, I am thinking of something like the LInux-based BeagleBoard because I can have it acquire data in a centralized location, with low power, and I can do a lot of the Log work in a shell script language. Data can be fed into it via RS232, LAN, or by other means. And best of all, data can be easily offloaded to be reviewed on any computer.
@graffix
Modular design already exists in many cases if you just look at what is out there in electro-mechanical control. But this may not be the modularity that you conceive of in your own mind. I am beginning to think I need to write up a paper that explains my own ideal I-Crib according to my own personal preferences and then have other critique it for feasibility. It we all did that - with an open mind, some new conclusion might be made. This is conceptual stuff, not the kind of work that is done with solder, components, and IDE. That would come later.
And for everybody,
I really don't think we need a residential architect to grasp all this. We aren't starting from scratch with a piece of bare ground and a building budget. I don't think any of us will be moving walls or adding additions to their homes via this. The main skill set is that which is more akin to a handyman/remodeller. And even then, the majority of us are not going to reinstall window frames or add significant features to a building. I have personally been living in a one room plus bath dorm room in Taiwan for 17 years now. That is my I-Crib as it is, but there are ideas and ideas applied to gadgets that would make it all so much better. In my case, I really don't need a security network. The hallways and the front door already have a security camera system that the landlord provided. And I can't automate lighting by breaking into the existing wiring as it isn't my building. So I am thinking more of an IR network and a data gathering computer as the starting points. Eventually I could add more sensors and features as I see what the data is omitting. From that, I can begin to see the kind of things that I'd love to further develop. I do admit that I have immediately omitted X10 as I just don't have a lot of confidence in it.
So I guess I have to write something presentable to defend my own preferences. That all may better be done in Parallax's 'Blog Space'.
Id like to hear more on your thoughts of useful automation.
Here is a practical personal example.
It would be easy to separate HVAC and security by having all the windows NOT open, or at least providing an ample alternative source for injecting fresh air. It might even be more acceptable as the fresh air could have dust and humidity removed prior to being brought into the home. My biggest problems here are dust and humidity as my air flow comes in a window and goes out a door. I've managed to get the humidity under control by keeping the A/C at 27 degrees C on a 24/7 basis and running a second fan on the opposite side of the room. But I can't filter all the dust (Kaohsiung is a rather dust town, steel mills and petroleum refineries).
At 27 degrees C, the dew point seems to keep the humidity at about 30%. So running the A/C is a brute force solution. If the temperature goes up, the humidity in the room creeps up to 70%, the walls get wet and slimy, and my books begin to mildew.
Due to other factors in my building. It is almost as cheap to run the A/C 24/7 and have the humidity under control as it is to only run it when I am here. But that gets into a lot of thermal facts and the shady location of my room.
As you begin to see, there is a trade off between the physical building, the kind of systems employed, and degree of control imposed. In some cases, you have to enhance all three in order to get the best results.
OK, fair enough, that's your opinion. Here is the basis for my suggestion: I DID need a residential architect on my project, and I DID move walls. This is very common. And because we strictly adhered to code and safety requirements, and common sense, nobody died when we had an electrical malfunction. Previous owners had done dangerous things, like running wires through the attic without conduit, "swapping" neutral lines, and wiring light sockets with extension cord wire. "Quick and cheap fix before the sale" is also very common. The electrician I hired fixed everything he found in the course of renovation, but he missed a swapped neutral (the circuits were not on adjacent breakers). This is also very common, mistakes and oversights get made every day. There was no issue until we needed to replace a faulty outlet, when the breaker was switched off, and the other breaker was left on (we did not cut power to the entire house to change a single outlet), a ground fault outlet failed and burned. All the fire and debris were contained in the conduit box, only the smell got out, alerting us that there was a (potentially fatal) issue.
I agree that there are situations where more than one controller system may be needed, but for a small home, apartment, or small business, a system based on a single Propeller chip could be a perfect solution. Temperature and humidity change slowly so there is no need for rapid response in that area. Automated lighting needs a fairly rapid reaction to sensors but very little processing (PIR detects person in room – turn on lights in room. No motion detected in room for X minutes – turn room lights off.). The security system (intrusion detection, fire, flood, freeze alarm, power outage, etc) may require rapid response and somewhat more processing for an event, but even that is well within the Prop's capability.
@All
At this point my approach is to split the system into individual modules, ideally each running in it's own cog. This approach has the benefit of splitting the software into well defined functional areas and allowing the sensor data to be shared by the various areas. The PIR sensors for example could be used for intrusion detection when the home is unoccupied, and for lighting when the home is occupied.
Module 1 – Data Collection: Uses objects from the OBEX (74HC165, I2C, MCP3208, Multiple Serial Port Driver, IR, etc.) to gather data from the various sensors, format the data, and store it in an array in hub ram. This data is used by all the other modules.
Module 2 - Control Output: Uses objects from the OBEX (74HC595, I2C, Multiple Serial Port Driver, IR, etc.) to output commands to various systems. This module is used by all the other modules to control the devices they are responsible for.
Module 3 – Access and Security: Monitors the sensor data stored in hub ram for intrusions, power outages, high/low temperature, flooding, smoke, fire, etc. and performs appropriate action based on occupancy status.
Module 4 – HVAC: Monitors internal and external temperature and humidity readings, controls furnace, humidifier, heat exchanger, blowers, motorized blinds, etc, and selects the most economical method of maintaining the current set temperature.
Module 5 – Lighting: Monitors PIR and light level sensors and turns on lights in that area if required.
Module 6 – HID: Input settings (temperature, humidity, actions, etc.) that controls the system behavior. This could be a text file stored on an SD card.
Module 7 – Data Logging: Logging of events, average readings, faults, etc. to SD card or other destination.
I suspect that a good architect is rather hard to find. 95% of US construction doesn't include one and the would like to charge a 10% fee on the total cost of a project. Small projects just can't afford one. But more important is a good electrician - maybe a good plumber and a good builder as well.
Regarding the topic of fire hazards and electrical, the great majority of failures are contained inside junction boxes and it is very important to use them. In San Francisco, it is most often necessary to put everything in steel conduit, but in Oregon, they pretty much accept ROMEX wiring between boxes. Primarily that is due to a building code rating by the degree of risk of loss by fire. It pretty much is an insurance company thing, not an engineering requirement.
But the electrical box, not only offers protection from fire - it is also pretty much the modular for putting in switches and controls, even when low voltage. So learning something about how to install 'remodel boxes' (the ones that you can just fit in a hole in the wall board) may be helpful.
But if you buy a fixer-upper with dire need for correcting improper wiring, it is a bit beyond home automation. If the bum that previously owned the home didn't know anything and just used the cheapest and most cosmetic means of wiring, it is all 'buyer beware' - unless there is something in your real estate transaction and title insurance that certifies the safety of all the existing electrical. In many parts of the USA, rural agricultural buildings - not occupied by people - are exempt from building permits and electrical inspection. Or at least they used to be.
Still, the smoke and odor from a fire can often be the worst and most persistent part of fire damage. So it is very important to avoid it at all cost by good wiring practices and expert guidance. Oregon used to allow aluminum wiring and I suppose one could be unlucky enough to buy an all aluminum wired home. It has now pretty much been abandoned as the aluminum oxides at the junctions and switches and outlets are constantly failing in a dramatic way. They had a protective gel that was supposed to prevent it, but it just didn't last.
@kwinn
I need to think about your Module approach. There is nothing specifically wrong with it and it is a good working hypothesis, but I am considering other things - like adding an IR sensors and a latching relay controlled by a PIC to my overhead lighting. In that way, I can take a univeral remote control - use the TV side to control the TV - and use the VCR side to control lighting throughout the room. So you see, there would be an IR sensor, relay, and microcontroller installed where ever I have a light to switch on or off. Of course, the Propeller could provide another IR transceiver set up as data gatherer and an override.
What would happen to the wall switch? I'd either remove it to permanently supply the IR sensor and microcontroller OR I'd leave it in place as an override means to shut down the circuit (though I suspect this would only be a temporary need.)
Nothing wrong with your approach. For the living space you describe and taking into consideration the fact that it is a rental it may be the best way to go. Even for a home that you own it may be better to replace switches lights, receptacles, etc. with modules controlled by IR commands. In many cases it is far more cost effective than rewiring the home. No reason (other than being somewhat forgetful) that IR input and output could not be included in the modules.
@All
I missed posting the “Control Output” module in the original post and have added it. With Loopy jogging my memory I will also go back and add IR to the Data Collection and Control Output modules.
In case anyone is wondering at my choice of module division, it is so that all of the modules except Data Collection and Control Output can be written without any consideration as to how the input is acquired or the output is controlled. If the HVAC module reads the temperature variable and finds it higher than the set point it sets the AC ON variable to ON. It does not care if the temperature reading or AC ON command is sent by serial data, I2C, IR, RS485, morse code, or smoke signals. Receiving data and outputting commands is the job of the Data Collection and Control Output modules respectively.
Next would be deciding the format of the data in and command out arrays. This would be deciding on a format for all the inputs and outputs for a typical home control system. For example PIR detectors would be binary. Either motion is or is not detected. Temperature would most likely be byte (8 bit) or word (16 bit) depending on whether an 8 bit or 12 bit adc is used. Since we are talking about values that are typically between -40 to +120 for farenheit, or -40 to + 50 celsius 8 bits would be more than adequate. Relative humidity (0 to 100%) would also be a byte variable.
For outputs the variables would typically be binary or byte. The furnace, AC, lights, or humidifier would either be on or off. Any fans or blowers would be on or off, or set to a specific speed (0-100% or 0-255) so would be byte.
In other words, if you didn't know about dew point, it might help to review it. A/C equipment needs to have periods of running without cooling in dry ambient conditions in order to blow out accumulated crud that includes nasty bacteria. I even spray the intake of mine with a weak Clorox solution before doing so. It would be nice if this could be automated or at least scheduled for regular attention.
While I live in a sub-tropical climate where high humidity is a indeed problem; many of you live in areas where lack of humidity - especially during winter months - is a problem. So location and season variation need to be considered when programing. Extreme low humidity contributes to breathing discomfort, nose bleeds, and nasty static electricity build up.
Regarding my own vision of an I-Crib, I think 3 levels of network would work best and I am working toward that as a proto-type. I am not just working on IR links, but that happens to be the least developed area at this time.
Here is what I am thinking with the goal of not having to move once comfortable - and I mean not have to move out of a chair or not have to move to another room to monitor or control household issues and tasks.
1. Within any given room, an IR remote control allows the user to over-ride automation or tweak for specific needs. And to this end, I am working on a IR sensor/micro-controller/relay scheme that would allow lighting and other devices to have individual address identities and be powered from AC lines. The IR remote should work in all rooms and be able to be taken with you. It may be optimal to have the IR remote control working in conjunction with a PIR that senses the presence of people. Together, the over-rides could be enforced as long as the people are present; then when they leave, the PIR would trigger a return to default parameters.
2. Within the entire home, each and every room would have at least one CANbus node that would allow data to be passed on to a suitably located server (I mentioned that I was thinking of a Linux Based BeagleBoard) and that would be available on a local LAN and possibly the internet from afar via SSH connections (secure shell encryption). Data could be gathered from hardwire links or an IR sensor; control from afar could be passed via the same hardwire or IR transmission.
3. The CANbus network would not only gather data, but could also provide a link to control devices from afar and at multiple locations as it allows for multiple masters and slaves. Since it is hardwire and independent of the internet, it would provide a great deal of security and since it is low voltage/low power, it is both easy to install and to provide backup power. Also, the RS422 network it uses can extend to out building as 1 kilometer distances are no problem. All nodes can be polled so that an intruder can't destroy or add a hacking node with raising an alarm condition.
3a - individual micro-controller such as the BasicStamp, the Propeller, and others can easily work as needed with the CANbus via the MPC2515/MCP2551 chip set which is a simple SPI interface.
As you can see, I am not proposing specific microcontrollers - BasicStamps, Propellers, SXchips are all appropriate. If you need a master video terminal with keyboard, the Propeller is useful. If you need a singularly tasked slave, an SXchip or a BasicStamp maybe quite adequate. Much depends on personal comfort with any given device and what the configuration of an individual room requires. Incidentally, I already have made 20 circuit boards for CANbus nodes and populated about 5 of them for testing. Years ago, I had two up and running for months and driven by BasicStamps while connected over a coil of 100' of telephone wire without any failure. (They keep track of their failures.) They sent data back and forth at a rate of about 60 times a minute during that test.
I think this could be described as 'centralized automation with decentralized ability to spontaneously over-ride for transient periods'.
I am very wary of wireless, as it can be snooped and then hacked from outside. And I have read a lot of disappointments about X10 being rugged enough as a network. CANbus has the ability to manage collisions with arbitration when two or more devices try to send data at the same time. Each gets prioritized and can be resent automatically. X10 - as I recall - doesn't manage failures with any notification or attempt to resend. Also, I am quite wary of sharing a LAN as the main network for home automation. There is always the possibility that a rogue user starts fooling with devices. So the CANbus to internet (Via a Tini80DS410) bridge would serve as a firewall between all the CANbus elements and the LAN. A BeagleBoard would be present as a data accumulation server by recieving email from the TINI board. Unimportant devices - like table lamps - can be on the IR network; while critical devices can have more strict security on the CANbus while locked out of general over-rides
I suspect what I propose can use either a BeagleBoard or a TINI80DS410 as the CANbus to LAN bridge. You don't need both, but the set up would be quite different as the TINI80DS410 has CANbus installed and uses Java as a programing environment; whereas the BeagleBoard would need to have a CANbus interface fabricated from scratch, but programing could be in C, Python, or one of the many language supported in Linux.
I just happen to have a TINI80DS410; but haven't yet purchased a BeagleBoard.
Regarding PIR sensors....
While these are often solely linked to lighting, they can be used in a more comprehensive way to identify that people are present or have left the area. Personally, I would consider more comprehensive associating with several systems - Lighting, HVAC, Security, and communications. The only negative issue is if you have pets that provide false triggers to the PIR as they remain roaming a home while all the people are out. With pets, more thought about what they detect and in which zones they are most important would need to be considered. After all, they detect motion of any warm blooded animal.
By 3 levels of networking do you mean IR, wireless, and wired communications? If that is the case then we are on the same wavelength.
I like your idea of an IR link in every room. It should be possible to fit an IR link, temperature, humidity, and light sensor in a module that would fit in a single outlet/switch electrical box. Light fixtures could then be fitted with an IR link and PIR sensor to provide the room with a complete sensor suite for our purposes.
Most of my work has been in the industrial and building automation so I am familiar with Profibus, BACnet, Field Bus, etc. I have no experience with CANbus and my knowledge of it is minimal. I thought it was mainly used in vehicle systems.
FYI, while they share some of the same driver chips, RS422 is a point to point or multi drop standard (one driver, one or more receivers), RS485 is a true multi-point communications network (multiple drivers and receivers). While the Profibus and BACnet protocols can use several physical media for communications most installations I have been involved in use RS485.
In any case the more important aspect is the protocol for communicating the data over the hardware connection and the data itself. Do we use an existing protocol or come up with one?
Take a look at http://en.wikipedia.org/wiki/Profibus, http://en.wikipedia.org/wiki/BACnet, and http://en.wikipedia.org/wiki/Controller_area_network#Technology. None of the protocols would be described as simple to implement. Of the 3 protocols BACnet is at least aimed at building control so perhaps it should be considered.
Another consideration is that the sensors commercially available for this are almost all intended to be wired directly to a control system of some kind. That means adding a uC to the sensors to use them as part of a network. This is not much of an obstacle since there are very inexpensive uC's with built in ADC's and other I/O available, but they do need to work with the protocol in use on the system.
Okay, CANbus is likely RS-485, not RS-422. A technical blunder on my part. I need to take a look at what Profibus and BACnet are, but I have studied and worked with CANbus and like it. One of the more interesting advantages of it is that by using an unusual crystal to clock all devices, it becomes yet even harder to break into from the outside, but its main protect is that there are just too many addressing options for a hacker to monitor in a reasonable time period. Are these others equally protected from snooping?
Right now I am pondering a 'state machine' approach to overall network operation. Here is a preliminary list of levels.
1. All systems off
2. 911 Emergency
3. No one at home
4. Pets at home in secured zone
5. Pets at home and wandering
6. People at home and active
7. People at home and retired for the night
8. Have system revert to all local and manual control (as if there is no automation - for emergencies, maintenance, and debugging)
We would likely need to have a few small data listings for the state machine. So an administrative menu would look something like this.
A. Add an occupant or guest
B. Remove an occupant or guest
C. Reboot to defaults
D. Configure a temporary activity (social event or one-time maintenance)
E. Configure regularly scheduled service calls (gardener/grounds keeper; pool maintenance; house keeping)
F. Add IR device and remote key code selection
Essentially, I have a strong preference to have all the administrative and programing modification to be made via an RS232 port and a dump terminal. The LAN would be able to do things in a limited fashion with an identified user properly logging in and it would send out email to gather data for research and improvement. But the core of the system would be fire walled by having only the one RS232 able to do all and everything.
CANbus with the MCP2515/MCP2551 chipset can work with all and any uC that can support SPI. Of course, there are some uCs that have CANbus build in and are very cheap for local nodes and some of these include ADC pins and internal crystal. The CANbus network requires one twisted pair for communication. So if you add another two wires in the same to power all nodes, there is a minimal amount of new wiring. Critical nodes (both master and slave) can have their own battery backup
My own preferences have led me to acquire hardware that may make me biased. So I am trying to keep the discussion open.