How can i control 8 relays with a serial port ?

I want to control 8 relays with the serial port.

2 Answers

  • Gary B
    Lv 7
    1 decade ago
    Favorite Answer

    You would need a Serial to Parallel Converter, or some kind of microntroller-controlled device that would accept serial information and convert it to 8-bit parallel. you also need high voltage or high drive current capabilities to handle relays.

    By entering "serial to parallel converter kit" into BING, I found almost 2 MILLION entries, and there are several of what you seem to need in the first 25 entries!

  • 1 decade ago

    Discrete-logic way:

    Connect a UART (possibly via an appropriate line receiver) to the serial port. Connect an octal latch to the data outputs of the UART, so that whenever a valid byte is received, the data at the UART outputs is latched. Drive each relay from one of the latch outputs by means of a transistor.

    Microcontroller way:

    Connect a PIC microcontroller with 8 or more outputs, with appropriate firmware (which you will have to write yourself) to the serial port (possibly via an appropriate line receiver). Drive each relay from one of the PIC outputs by means of a transistor.

    Off-the-peg way:

    Buy a ready-made device (or, if you feel a little bit adventurous but not quite adventurous enough to design the hardware and write the firmware from scratch, a kit of parts [including ready-etched PCB and pre-programmed PIC] to build such a device) from an electronics store.

Still have questions? Get your answers by asking now.