Smart Home Design

Hello, I'm thinking about smart home design, how whole system should work.

I noticed there are 'one module/main computer', for whole house rooms. But if that main module fails - functionality is disabled for every room.

Due this, I'm thinking to have such design: each room has it's own node. All nodes connects to one, main computer, and that computer receives info/sends commands to specified nodes.

By the way, all sensors would be wired-up.

So, node would be like single Arduino Zero or use STM32F1... for more ADC's channels. You could connect like 16 sensors(STM32F103 has 16 ADC channels) to each node: light, fire/smoke detector, PIR, .., and so on.

And the main computer... Probably Arduino Due won't have enough juice for it(big LCD, like 7" or even 10" screen), so it could be like Raspberry PI. Also, it could have GSM module, and of course it would be connected to internet.

Communication between nodes and main computer would be using RS485. It would be a 4-pin wire from each node to main computer(RS485 TX/RX, VCC(12V), GND).

In case main computer fails, each node can function without it(control light by light sensor, turn on something at specified time and so on). All you have to do is provide non-interrupted power supply to each node.

For power supply, it could be: one primary, and another secondary. If primary fails, secondary turns on. If electricity is gone, there is another battery backup, to keep whole system alive for couple of days. (It wont control your lights of course, thats just for each nodes and their sensors to be in standby mode. Although it would display temperature in every room and other things, that aren't controlled by power mains.)

So, what do you think? Any suggestions to improve such design? Thanks.

Hi, That kind of distributed system makes a lot of sense. That is the approach for many large automation systems.

Arduino MEGA would be good for each room controller; low cost and 16 ADC and multiple serial ports for the RS-485.

Some RS485 info HERE:

Info on the MEGA and other boards HERE:

But you're talking about a LOT of hardware and software details for a system like that!

Besides the availability, my imagination limits me on the other benefits. Seems like if power to house is out, I'm not worried about auto dimming lights?? Pc outage solved by batts and pc failover?

If you did distribute, be fun to have some other benefits not possible with central controller. Roaming room profiles? Room specific environmentals taken into account? I dunno.

terryking228: Hi, That kind of distributed system makes a lot of sense. That is the approach for many large automation systems.

Arduino MEGA would be good for each room controller; low cost and 16 ADC and multiple serial ports for the RS-485.

Some RS485 info HERE:

Info on the MEGA and other boards HERE:

But you're talking about a LOT of hardware and software details for a system like that!

Well, that was just an example with Zero or STM32F, Mega should be fine aswell.

FullOfBadIdeas: Besides the availability, my imagination limits me on the other benefits. Seems like if power to house is out, I'm not worried about auto dimming lights?? Pc outage solved by batts and pc failover?

If you did distribute, be fun to have some other benefits not possible with central controller. Roaming room profiles? Room specific environmentals taken into account? I dunno.

Thats the point, each node can function properly without central controller. Mainly, central is required to control each node remotely(phone, etc) when you're not at home or outside and too lazy to walk inside and change there. Also to send status via GSM/Mail if any node has detected any gas/fire/water/electricity leak.

As for power supply, let's say we have situation like this: power is out, nobody is at home and one node has detected a water leak. Since it has a 12V backup supply from battery, central sends a SMS or mail to me, that water leak has been detected. I could turn off water supply.

uBiT: I noticed there are 'one module/main computer', for whole house rooms. But if that main module fails - functionality is disabled for every room.

This is the most unfortunate "M$ Windows" mentality.

Arduino programs, adequately written, are not going to "crash" (and there are mechanisms provided for handing glitches such as power dips). Arduinos used for the critical functions, you should essentially be able to forget about that consideration, but your (separate) GUI interface may be a concern mitigated by simply manually re-booting it if it fails.

Paul__B: This is the most unfortunate "M$ Windows" mentality.

Arduino programs, adequately written, are not going to "crash" (and there are mechanisms provided for handing glitches such as power dips). Arduinos used for the critical functions, you should essentially be able to forget about that consideration, but your (separate) GUI interface may be a concern mitigated by simply manually re-booting it if it fails.

I have a wonderful laser printer/scanner/fax. that will not turn on past some error that the scanner section does not work. I have more than a few computers that will not turn on, power supply issue, motherboard issue, hard to know because it will not turn on. my coffee post is off by hours each day. with all the electronical bits that fail around us almost daily, I have a hard time believing that electronics do not fail. granted, microsoft DESIGNS in failure, but that is mostly to keep competitors guessing

dave-in-nj: I have a hard time believing that electronics do not fail.

Oh, they do fail, but that's either due to aging, which is unlikely to ever be a problem for low power applications like microcontrollers, or due to wrong handling. The latter one would only become worse if multiple nodes are involved.

The reasons why Windows-system fail, why a printer throws errors, and why a smart home system could fail are very different.

lg, couka

Okay, since the topic is same and I dont want to create new thread, I'm bumping this one.

A few details changed:

  • Using CAN Bus instead RS485
  • Using STM32F103RBT6 for each node
  • There will be 20 inputs, ADC/PWM already included
  • There will be 2 AC 230V 50Hz Dimmer outputs
  • There will be 5 relays, controlling AC 230V 50Hz mains.

I've started to draw schematic and I divided it into 2 parts: high side(where will be AC 230V stage) and low side(controller and so on).

So far I've made:

|500x336 |500x342

I'm planning to add JTAG connector. Probably I should add zener diodes 3.3V for protecting controller inputs.

Anyway, anyone has got any improvements/changes that I could do?