Shop OBEX P1 Docs P2 Docs Learn Events
I-Crib Total Home Control and Automation - Page 3 — Parallax Forums

I-Crib Total Home Control and Automation

13»

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-09-18 14:08
    @Loopy Byteloose

    I have misunderstood what you meant by wireless. I was thinking more along the lines of Xbee or Bluetooth to connect a sensor located where wired or IR would be difficult or impractical. Most definitely would not want the system directly accessible from a wireless internet connection. At the very least it should go through a secure system.

    We also seem to be discussing different levels of the control system as well. I am currently looking at the hardware (bus, sensors,and actuators) and the software required to control the hardware.

    I agree that a hard wired system would be the best solution. A 4 conductor cable could provide power and data connections to all the nodes. For my own use I am thinking of using CAT5 with one pair for data and the rest for power if required.

    As far as the hardware layer is concerned Profibus and BACnet both use RS485 as one of the options. With RS485 the driver chips actively drive the +/- lines high and low. While CANbus is similar in that it uses two balanced lines, those lines use pullup/pulldown resistors for CANL/CANH respectively. This gives CANbus an advantage in arbitrating bus access where there are multiple masters on a bus. Either one could be used, and both could work with the same software.

    As far as choosing between bus protocols go I think that all 3 (Profibus, BACnet, and CANbus) are more complicated than is needed for a home control setup. A simpler master/slave protocol would be more appropriate for this.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-18 21:15
    Well, Bluetooth and XBee can also be snooped and deceptive input could be provided. Also both are rather expensive when compared to installing a node on a RS-485 network, Canbus or without.

    The reason I prefer IR is that the transmission and reception are limited to within one room. Wireless goes through walls and outside the home perimeter. At some point, you are open to mischief or just conflicts from other Bluetooth or XBee devices. One geeky teenager for a neighbor could amuse him/herself by sending false input on a random basis. Early on, Bluetooth gained a rather notorious reputation as allowing cell phones to be easily hacked. I have no knowledge about XBee's security features. But I feel that the automation should not be subject to flying out of control from any source.

    CANbus's added advantage of arbitrating the RS-485 line is significant. Otherwise, when a data collision occurs, messages just get lost. To me, that is NOT adequate automation. A CAT5 cable is 4 twisted pairs, right? If is fine for CANbus or other RS-485. While the data only needs one twisted pair, the others can be doubled or tripled up to provide more power over a long distance at a given voltage; besides it is very cheap to buy. Another alternative is to provide two twisted pairs - one for critical CANbus and a second for "not so important" CANbus, while the rest is power. This is done in automotive where the engine and transmission functions are sometime separated from the rest of the automotive controls.

    I like BACnet's scheme and think it provides some good design goals as far as the kind of software objects required. Profibus and CANbus seem to NOT be able to work together, it is one or the other.

    I do have to admit that my scheme is rather ambitious. But, I have in mind the kind of network that could accommodate a home of any kind and any size.

    That includes a rather large array of HVAC choices as there are lots of different kind of HVAC installed out there. In fact, a lot of America just has heating and ventilation without AC or just heating. In my own situation, I have AC only with a room fan, no heating. Some buildings have heaters in every room, others have central heating, and some building can either passive solar, active solar, or both. Given all the situations, a complete automated solution would likely require multiple sensors and multiple controls. And while temperature and humidity sensors are specific to HVAC, additional ambient lighting sensors and weather condition input may be shared by other aspects of the home automation.

    I don't expect one to jump into a complete complex design. By using the CANbus, one might slowly add systems and respective nodes as a need is identified. Every new node can be give a valid identity and polled to affirm it is up and running properly.

    For one system, like HVAC - you probably don't need CANbus. In fact Parallax has published a Propeller text that has a very good HVAC system for a ducted system that controls on a room by room basis. I think it just uses RS-232, but RS-485 in that context is a quite simple alternative. See "Programming and Customizing the Multicore Propeller Microcontroller" Chapter 11, The HVAC Green House Model.

    Still, I am not after providing just one automation system, but a network that can be revised and added to. It is not uncommon for a CANbus system to have 70 or more nodes sharing that humble twisted pair in a satisfactory manner. And CANbus is being used in aviation for fly-by-wire technology. So it seems quite robust. There is a related development project called CANopen that I believe is public domain.

    I have been thinking about this project for several years now in an on and off basis, so it might be quite a bit for someone else to comprehend. But lighting, HVAC, security, weather, pool control, and even the front and back doorbells could be included. It is supposed to be comprehensive. And if one must pull wire, it is best that it is only required to be done once and allows for changes to evolve over a period of years.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-19 23:04
    I agree that IR has the advantage of being more secure and less expensive to implement than XBee or Bluetooth. I would only consider using one of them if IR or hard wiring were not practical. Do keep in mind though that any room with windows would also be susceptible to having the IR hacked.

    At the hardware (driver chip, data bus, and signal) level RS485 and CANbus are not much different. Both drivers use differential signalling and can often share the same network bus. Take a look at the LT1785 driver. It can be used for RS485, RS422, and CANbus.

    Currently BACnet over RS485 seems to be the dominant choice for commercial/industrial building automation (HVAC, Access Control, Security, Lighting) but there is no reason the CANbus hardware layer could not be used in place of RS485.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-20 01:26
    Yes, BACnet seems to have had the vision to create objects specific to building automation. Thsi is a Pro, or the real benefit. The Con is that using a standard may be more hackable, less secure than a one-off system created in CANbus. I leave it to the buyer to choose.

    XBee or Zigbee seem to offer more security and have less exposure to hacking. Yes, IR might be snooped from a window, but Bluetooth might be snooped through a wall at 100 feet. See below for my reasoning in Design Guidelines. From electric garage door openers, to wireless home phones, to Bluetooth, to Wifi - the consumer has had a long, long history of wireless gadgets that claimed security, but really failed. Radio waves radiate in every direction and can thus be easily located and hacked. With a wired network, one has to locate and break into the wire.

    Here are some additional thoughts, due to the Title of the thread mentioning "TOTAL Home Control and Automation" with a focus on the word TOTAL>

    Home Automation Design Guidelines.

    First, Home Automation and Control should be as secure and private as the home without any automation.

    Second, Home Automation and Control should offer better ways to conserve energy consumption throughout the home.

    Third, Home Automation and Control should permit well-integrated passive solutions into the system and not only provide for active solutions. (This is somewhat a logical extension of the second guideline.)

    Fourth, Home Automation and Control should permit local factors to be integrated and exploited so as to offer greater economical benefits (Some sites often advantages of more sun, more shade, wind for ventalation, and so on.)

    ~~~~~~~

    I do admit that is all a rather broad mandate, but it can be managed. And it adds a great deal of appeal to Home Automation and Control if it is a comprehensive solution.

    Just consider what the major energy uses of a home really are.

    1. Heating - obviously rooms, but also significant amounts for heating water, food preparation, clothes drying, and heating swimming pools.

    2. Cooling - again obviously rooms (in the right season), but also refrigeration and freezing of food in storage.

    3. Air circulation - control of humidity is just as much about creating air movement as about temperature control. And heat that accumulates on the ceiling is actually a waste when temperatures drop below freezing.

    4. Water - pumping for sump pumps and irrigation can be significant and often forgotten portions of an energy bill.

    5. Lighting - actually, a rather small part of the overall cost of energy, but requires a lot of changes to accommodate people according to their choice of activity and their movement throughout the home - all of which are rather spontaneous.

    6. Miscellaneous - everything else that I've not mentioned.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-20 16:51
    The BACnet standard was created specifically for building automation so it's no surprise that it has it has objects for that application. I agree completely with your comments regarding the security of the various communications media but I am not too concerned about that aspect. As for standards making systems more easily hacked, this is a valid point, but that risk is greatly outweighed by the ability to share hardware and and software. There are also various ways to minimize the risks involved.

    The network data can be encrypted using a relatively simple algorithm.

    Settings for parameters such as temperature and humidity can have reasonable limits imposed on them. Commands to go beyond those limits should be logged and ignored.

    PIR sensor data and security system status can be used to determine if the house is occupied. If it is not occupied there is no one to give override commands so any such commands should be logged and ignored.

    I like your Home Automation Design Guidelines. They summarize a lot of my thoughts in a clear and concise manner.

    Your second, third, and fourth guidelines are the reason I proposed a very modular approach to this. You can pick or create modules to fit the type of system you need.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-21 08:06
    @kwinn
    I will be doing much more reading about BACnet - either to incorporate its best attributes into a CANbus network or as a complete replacement. At this point I am running out of things to say about a Total Home Automation and Control system. This may be a last post for a while.

    What I want to clarify is the Passive/Active nature of the systems involved. I'll use the hot water heater as an example because it is a big energy user and often poorly managed.

    Passive measures do not require automation. For a hot water heater, this would include adding extra insulation in order to reduce heat loss, possibly flow restriction to limit consumption of hot water (I really hate these), and solar hot water heating.

    Active measures would be reducing the hot water heating cost by not heating water to a ready state on a 24/7 basis. After all we spend about 8 hours at home sleeping and for 5 days of the week we are away between 8 to 10 hours. Why have the thermostat provide the only control and assure water is ready for periods when nobody is home?

    Consider that a good blend of active and passive can work out a big energy savings and justify some of the cost of automation. Given that the sun is up in day time only (quite obvious) and that much of the hot water usage is too early or too late to take advantage of solar water heating, the solar energy can be used to provide standby hot water while the conventional heater is shut down during day time hours. With additional scheduling, an electric water heater might only operate when prices of electricity on the grid are at lower rate. And it is likely you can downsize your conventional water heater to a smaller unit.

    So this might get you thinking equally about passive modifications to your home as well as automation. Not everything can be solved with a micro-controller. Insulation is one best passive installations for saving money, but there are others. And bear in mind I have just discussed the solar water heating as a separate system. It can cross over to have radiant hot water heating in the floor of the home, or just in certain areas - like the bathrooms, which people tend to dislike using electric heaters because of potential shock. Even if the rest of the house is icy cold during winter months, a toasty warm bathroom floor is a wonderful thing and if it is a low cost addition, it is just more wonderful.

    In any event, this also shows how each home becomes pretty much a unique project as something available locally may offer a very good solution. where in other places it won't. Solar water heating requires sun. It seems that even in snow country, one gets a lot of sun due to glare from the snow, but in rainy Seattle, it may not offer up as much savings. Passive solar homes have been able to provide as much as 95% of the heating in locations across the USA (I have a book by John Reynolds that was written and published on a HUD grant many years ago), so the question what needs to be automated becomes quite secondary in such contexts.

    Whatever youall do, it is your I-Crib and you have to decide what you want and what you can afford to do. But not all of it is wire, hardware, and software - there is a vast corpus of energy frugal home design information that is available to you.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-22 21:05
    graffix wrote: »

    Nice if you have Bill's budget to play with. Also high on hype and short on technical information. This thread was more about what would be feasible for an average home and home owner along with the potential monetary and energy savings. Any energy savings would also result in environmental benefits.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-22 21:21
    @Loopy Byteloose, Re "....This may be a last post for a while.

    Mine also. I think we have said about all there is to say without doing some development work. I agree there are many areas where energy efficiency can be improved by looking at the overall energy use in a home. The exact details will vary depending on the location and climate. I would like to investigate things like using heat from an air conditioning condenser to preheat domestic hot water, motorized blinds to allow or prevent sunlight from entering a room, heat recovery ventilators and flues, etc.

    There are a lot of things that can be done to improve our energy efficiency but I think a lot of those things have to be automated to gain much benefit from them. Most people do not have the time, discipline, or inclination to do these things day in and day out.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-23 05:46
    I dug into my bookshelf and I have a copy of "The First Passive Solar Award Homes" by the US Dept of Housing and Urban Development. Jan 1979.
    It provides a lot of need-to-know info about the use of solar - including how to determine the available sun at any location across the USA and the average 'degree days' to determine how much heating and cooling would be required to achieve a comfort zone. It even has a passive solar dog house design that works.

    The point is that the book includes successful designs from all over the USA with solar energy contributing over 90% of the heat in many of the nations coldest climates. Not much automation except fans.

    Of course, you may wonder why I have carried this book over so many years and all the way to Taiwan, but that's another story. There are solutions out there that have been successful for decades without micro-controllers. I had originally thought John Reynolds was involved in the publication of it, but now I see he was not. There are 162 houses documented in it, including places like Colorado (with 92% solar heating), Maine (71%), Minnesota (93%) and Vermont (63%). Not all of these are new construction, quite a few retrofits.

    And the Japanese make a unit for solar cooling of A/C from hot water accumulated on roof tops. I think it is Hitachi and they make them nearby in PingDung, Taiwan. But they seem to be on a larger scale than single dwelling. A patent for solar ice making was issued in the late 1800s as well.

    Life in 2050 for me will be non-existent or sitting in a nursing home at 103.
  • RS_JimRS_Jim Posts: 1,768
    edited 2011-09-23 09:05
    The paper behind this thread would make for an excellent addition to home automation!


    http://forums.parallax.com/showthread.php?134690-OMG!-QuadCopter-Catches-PingPong-Balls
    jim
  • kwinnkwinn Posts: 8,697
    edited 2011-09-24 10:07
    Well, so much for my previous post being the last one for a while.

    @Loopy Byteloose

    I know that solar heating does not require the use of microcontrollers to work well but their use can enhance overall efficiency and comfort. If some energy savings can be gained without the use of a microcontroller or other electronics, by all means, go for it. Any energy saving is good.

    Let's not forget this thread also includes “Total Home Control and Automation” as part of the title, and that would be difficult to accomplish without a uC. Additionally, this thread is in a forum that is all about microcontrollers, robotics, and automation, so how can we possibly leave them out.

    @RS_Jim

    Here is a link to the paper. I have not had time to read it yet so I do not know if it includes the math involved. http://www.eecs.berkeley.edu/~aaswani/proc_brite.pdf

    Lots more information available by googling “Learning-Based Model Predictive Control”
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-25 03:13
    That paper mentions a 'control computer' with link to the internet. So it seems that one would at least have to have a BeagleBoard to provide that portion of the design. Now that I have begun to understand SSH, I suspect a secure Wifi link could be established as well.

    I wonder how this would work along with my proposed 'state machine'. Are you always going to allow the computer to predict, or can you override by declaring parameters?
  • kwinnkwinn Posts: 8,697
    edited 2011-09-25 15:46
    Secure is a relative condition. With enough resources to draw on any encryption can be overcome. For our application any one of the freely available encryption packages should be enough to keep the script kiddies and hacker wannabes at bay. What possible reason would anyone with serious resources have to hack our home automation system?

    I would certainly want to have an override. Virtually no software is bug free, and with a complex algorithm there is always the possibility that a bad input or program state would result in an output that could cause some harm.
  • RS_JimRS_Jim Posts: 1,768
    edited 2011-09-26 06:50
    Lots more information available by googling “Learning-Based Model Predictive Control” .
    Now why didn't I think of that! For the internet connection and "control computer" why would the spinnernet not work?
    JIm
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-26 09:22
    Lots of things work and the Spinnernet is indeed one of them for an internet connection. Much depends on how much you want to build and how much you want to buy. And what you really want to learn - Spin, Java, Linux, and so forth.

    Security is an ongoing process in the computer world. It keeps changing. I prefer to have a hardwire moat with the choice of unplugging the internet it there is a fear or a problem. But others really want their automation to allow them to manage and monitor from afar. So different goals call for different solutions.

    Ironically, a dial up modem and Secure Shell protocol via modem might be more secure these days as hackers are not looking for these kinds of openings - they are too busy with new technology.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-26 17:29

    Ironically, a dial up modem and Secure Shell protocol via modem might be more secure these days as hackers are not looking for these kinds of openings - they are too busy with new technology.

    Excellent point. It could also be simpler to implement. Personally I would be looking for some form of remote access and control, but I would be quite happy with a simple text interface.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-28 00:10
    Something has been nagging in the back of my mind about a learning computer for home automation and control.

    There are really two modes of learning involved.
    1. to reconcile goals of the overall home environment
    2. to identify and anticipate the needs and wishes of individual occupants.

    The second item is interesting in that it requires that the computer identify all the individuals in the home and to keep track of where they are and what they are doing at all a time - but allowing for some privacy.

    The learning software provided in the above examples just learns to handle one objective in a very sophisticated manner in real time. I am not sure this is the type of learning that is required.
  • graffixgraffix Posts: 389
    edited 2011-09-28 17:26
    http://www.ml-class.org/course/auth/welcome I started watching this last night
    Stanford machine learning
  • kwinnkwinn Posts: 8,697
    edited 2011-10-02 22:31
    Here is another home automation and protocol to consider.

    http://www.hqpower.eu/downloads/Velbus_ProtocolSummary.pdf

    It uses RS232 for the hardware level communications but there is no reason something a bit more robust like CANbus or RS485 could be used.
Sign In or Register to comment.