Skip to main content

ethernet relay controller

I've been busy in the lab working on a network enabled relay controller for a new loudspeaker selector system.


Originally I was asked to make a control device similar to the existing one, a box with a display and a remote control to operate the system. However, PC's and LCD screens have become so cheep it would be a pity to spend money on a system with so little capabilities.

To keep development cost down I used a device server from lantronix, a simple PIC with serial port takes care of the rest. I also used for the first time a switched mode power supply (otherwise I would have to get rid of up to 4W with 24V relay power!). The rest of the circuit is rather straightforward, I use serial latches with power outputs and built in protection diodes to drive the relays.

Using the device is very simple, just set up a socket connection and send a command:


SET OUTPUT
Sxx
xx is output number in range [01 .. 24]
returns status

RESET OUTPUT
Rxx
xx is output number in range [01 .. 24]
returns status

RESET ALL
R00
resets all outputs that are not locked
returns status

REQUEST STATUS
?
returns output buffers in asciihex
example: if output is 01000000 00000000 01110000
status will be 400070
REQUEST LOCK STATUS
!
returns lock register in asciihex
example: if output is 01000000 00000000 01110000
status will be 400070
SET LOCK
Lxx
xx is output number in range [01 .. 24]
lock status is saved in flash memory
returns lock status

RESET LOCK
Uxx
xx is output number in range [01 .. 24]
lock status is saved in flash memory
returns lock status

TOGGLE OUTPUT
Txx
xx is output number in range [01 .. 24]
returns status
SET DEVICE ID
Dxx
xx is number in range [01 .. 99]
no reply, use version command to check
COPY STATUS TO FLASH
C
copies current output to flash memory
replies with status
VERSION
V
returns device id and firmware version
format: [xx]-[version number]


references
lantronix xport
TI PT78ST153

Comments