Hi people of this forum! You are all very talented and I hope you could shed light on the following issue:
I have smart home automation equipment that I would like to control from an Arduino.
Take this 12 Channel Relay module as an example
It can get 12 loads connected to the 12 channels that it has.
This module can be controller with serial communication via a Protocol called Smart-BUS (proprietary documented protocol)
When connecting a Smart Panel that I have to the bus, the smart panel can be programmed via a special application to turn on/off specific channels. This smart panel is using the Smart-BUS protocol as well.
The company documented the protocol so it can be used by developers
What I would like to do is to make an Arduino behaves like a Smart Panel and to be able to control the 12 channels module from the Arduino, something like this:
(Click here for enlarged image)
This is written in their website regarding the Smart-BUS protocol:
"Smart-BUS ®" is a patented Protocol (Patent No: 201110123081.0) Based on "Advanced RS485" 64 Bits Communication. This 2-Way Smart-BUS Communication Protocol was Designed Mainly for Home Automation Industry and thus many call it today "SmartHome-BUS" or Simply "S-BUS".
S-BUS Operating Voltage:
The S-BUS Engine can work at wide Voltage DC Range between 8-32Volts. And is considered Green as it consumes between 20-32mA per device during operation. The S-BUS uses 4 Wires (2-Pairs): one Pair for Data Communication and the other for Power. The Smart-BUS has Also Several Lines of protection like: Reverse Polarity Protection, Short Circuit protection, Overload Protection, Overheat protection, and other..
(Link to page is here: Smart-Bus (S-BUS) Technology : Home Automation)
Another thing I found in their protocol documentation is this:
- RS232 & RS485 commutation:
9600bps,11bit: initial , 8 data bit, efficacy bit, stop bit
initial is Start bit and efficacy is Parity bit. In total 11 bits.
(Link [here](http://smarthomebus.com/dealers/Protocols/SMART-BUS Protocol V1.4.pdf) [page 4])
So, I understand that the actual communication of their S-BUS protocol is over RS-485 serial communication
I know there are ICs for doing RS-485 communication and there are Logic Level shifters
How should I combine these, in order to connect the Arduino which works on 5V, to these smart devices that requires **8-32 **Volts, base on their documentation
My end goal is to write Arduino code such as:
Serial.print(PROTOCOL_COMMAND);
which will send the command to the 12 channels module.
Another thing I did as part of the research is connecting an oscilloscope to the D+ and D- of the Bus, then I clicked on a button on a Smart Panel that I have. This is what I managed to capture:
As the protocol states [here](http://smarthomebus.com/dealers/Protocols/SMART-BUS Protocol V1.4.pdf), the first two bytes should always be 0xAAAA.
0xAA is 10101010 in binary. LSB is 0. It seems that this is actually what is being sent.
If I analyze it correctly, the only gap in my understanding is at the physical layer, which is how to make Arduino to be able to send the bits, and not what bits to send, as this part of the protocol I managed to understand well.
Any help about connecting the Arduino to the Bus and being able to send / receive data without damaging the Arduino, would be highly appreciated!