Friday, 22 February 2013

8 Relay Control Board over RS485


I was wanting to accomplish a devastating relay board with as many features as possible and today was the start.

Premise:
This is a 8 channel relay board operating on a RS485 protocol and can be considered as a SLAVE Unit in the RS-485 network. This has a maximum of 16 addressable settings , which means you can connect upto 16 such boards in a given network with unique address.

DATA structure to be followed to communicate with this board is , you send in ASCII the following value : AT+ADDR+CMD+PARA
·        “AT” in capitals is a prefix to initiate attention of the SLAVE units on the network. This is important to filter out noise from a valid data transmission start. Should be in capital
·         ADDR , obviously stands for ADDRESS of the Slave unit that has been set. The max. allowable address to address the relay board would be 16, Should always be in 3 decimal notation
·        CMD , is the Command code you send to the SLAVE unit. Should always be in 3 decimal notation
·        PARA , is the extra parameter that would be required. Should always be in 3 decimal notation
·        Followed by a carriage return (Chr,13)

The total length of the DATAGRAM to be sent should not be less or greater than 11 characters excluding CR (Carriage Return) code

I further list down the possible protocol that could be used to communicate with the Relay Board. The top rows of the protocol summary are generic commands that , I feel, are enough to offer good control of the relay board on a given network. Some advance commands, to be executed with care and knowledge, are highlighted in orange, Command highlighted in yellow is a meta command and should be executed with extreme care.


PROTOCOL SUMMARY
ADDR
CMD
PARA
RESPONSE
XXX
1
0
TOGGLES RELAY1
XXX
2
0
TOGGLES RELAY2
XXX
3
0
TOGGLES RELAY3
XXX
4
0
TOGGLES RELAY4
XXX
5
0
TOGGLES RELAY5
XXX
6
0
TOGGLES RELAY6
XXX
7
0
TOGGLES RELAY7
XXX
8
0
TOGGLES RELAY8
XXX
10
0
TURN OFF RELAY1
XXX
11
0
TURN ON RELAY1
XXX
20
0
TURN OFF RELAY2
XXX
21
0
TURN ON RELAY2
XXX
30
0
TURN OFF RELAY3
XXX
31
0
TURN ON RELAY3
XXX
40
0
TURN OFF RELAY4
XXX
41
0
TURN ON RELAY4
XXX
50
0
TURN OFF RELAY5
XXX
51
0
TURN ON RELAY5
XXX
60
0
TURN OFF RELAY6
XXX
61
0
TURN ON RELAY6
XXX
70
0
TURN OFF RELAY7
XXX
71
0
TURN ON RELAY7
XXX
80
0
TURN OFF RELAY8
XXX
81
0
TURN ON RELAY8
XXX
100
0
TURN OFF ALL RELAYS
XXX
101
0
TURN ON ALL RELAYS
XXX
102
0
INVERSE RELAY OUTPUTS
XXX
105
XXX
CONFIGURE YOUR RELAY OUTPUT ACCORDING TO PARA VAL
XXX
125
521
RESET THE BOARD TO FACTORY DEFAULT
XXX
250
0
ACK BIT DISABLE (DEFAULT)
XXX
252
0
SENDS STATUS REPORT
XXX
253
0
SENDS FIRMWARE VERSION
XXX
254
0
SENDS PRODUCT ID
XXX
255
255
BOARD RESET/RE-START

I would like your candid feedback on the features of this relay board. This board can be used in various configuration, but that’s another whacky brain storming session we could have. See, as a user , how you could benefit from this board, if you planned to use it in your project or around your home/office.

As I see it , it has vast opportunity, I would discuss, this in a different mail, with you.

I want to freeze the feature of this board with this development and your suggestion.