Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

10 channel contact closure multiplexing circuit

Status
Not open for further replies.

RadioDan

New Member
Hi All,

I am hoping someone will be able to give me some assistance with the design of a circuit I need to carry out urgently for a project I am involved with at work.

I have been out of the electronics design world for a few years now and are a little rusty with my design skills.

Basically, I need to send the status of 10 switches (simple on/off contact closure) multiplexed serially down 1 wire. At the other end I need a circuit to re-create the 10 contact closure outputs ready to interface to another circuit (open-collector outputs are fine)

I don't require anything fast - this is for a control panel for a paging system. However, one or all of the switches may be operated at any one time, so the circuit needs to cope with this.

In addition, I need this circuit again to operate in the opposite direction down (ideally) the same wire. This is so I can light any one or all of 10 led's mounted on the same panel as the switches. If I have to use another wire for this (so 3 in total, 2+GND) that would be OK.

Are there any dedicated chips available to perform this function, or would the solution be say a PIC micro controller? I have looked at some chips used for encoding keypads in remote-control handsets, but they are not suitable. The cable in question would be a piece of cat5, about 50m in length.

Any pointers and/or help with a circuit design/PIC code would be much appreciated since I am a little stuck!

Thanks, Dan
 

Electronworks

New Member
Have you tried a DTMF telephone IC? DTMF works on the principle of plotting a telephone keypad on a row and column grid. Press one button and you activate a row and a column tone (dual tone, multiple frequency).

You could transmit the combined sound over one cable quite easily. And you can get dedicated DTMF decoders at the other end.

not sure what you want to happen if 2 keys are pressed and I am not sure how the DTMF chips filter out this, but it is a place to start
 

crutschow

Well-Known Member
Most Helpful Member
A UART could possibly be set up to do that without a µP but they only have connections for 8 inputs and you need 10.

The easiest may be just to use a PIC to scan the switches and send the data out one of their serial I/O pins. Sharing a single line for I/O is difficult so I would suggest a separate line for each giving a total of 3 lines.

A DTMF chip is fine for sending and receiving one of 12 signals, but it can not send a combination of them. You could scan the switch positions with a 10:1 multiplexer into the DTMF transmitter chip. Then you would need some method of synchronizing the scan with the demultiplexer at the receive end. You could use the * or # DTMF tone as a start-of-scan sync indicator.
 
Last edited:

crutschow

Well-Known Member
Most Helpful Member
Use a couple 74HC165, load the swtich status in parallel and shift out each bit through your single wire. On the receiving side, use the same parts to shift in the status and read out in parallel. Use the extra cells for stop and start bits.

https://www.electro-tech-online.com/custompdfs/2009/09/cd74hc165.pdf
For that scheme you would need to send a clock down a separate line. Thus you would need 4 lines: 2 data lines (one in each direction), one clock line, and common.
 

BrownOut

Banned
Not necessarily. You can use a remote clock that's running at the same freqeuncy, and started/synchronized with the arrival of data. Capture the data in the middle of the period. Any decent clock will drift little in 12 - 16 cycles. A simplex scheme can use the same wire for both directions. I would, however, recommend the "wire" be a twisted pair, or a coax.
 
Last edited:

crutschow

Well-Known Member
Most Helpful Member
The tradeoff is the complexity of having two clocks and a synchronizing circuit to detect the start bit and capture the data in the middle of the period (similar to a UART) versus an added clock line.
 

BrownOut

Banned
Yeah, what I'm proposing is a light weight UART. The clock can be a simple triggered circuit, so no other logic is needed. A real UART would work too, mabye better. Often, when I have a task like this, I'm working in silicon, so I can make anything I want, and I save area by making something simple, like this.

PS: I just re-read the OP post. He wants to use cat5 cable. In that case, he can send a clock signal along with the data to simplify.
 
Last edited:

Nigel Goodwin

Super Moderator
Most Helpful Member
PIC each end, two core cable only, bit of programming - job done. It's simple enough to send data down the cable both ways as you have total control of both ends.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top