0
\$\begingroup\$

I'd like to create a hardware switch box using 32 toggle switches to control an RS485 device remotely over 2-wire cable. For example, toggle switch #2 turns on channel 2 on RS485. Toggle #8 activates channel 8, etc.

The remote RS485 device is about 100 feet away and has it's own 12v battery.

I'm guessing there may be a chip available that can do this. However I've been researching a couple of days and have not found anything useful. Can someone help put me on the right track?

\$\endgroup\$
  • \$\begingroup\$ Unless you use a special isolated RS485 then at least a 3 conductor cable is needed. The third conductor would be for ground. \$\endgroup\$ – vini_i Jul 10 '16 at 17:56
  • 1
    \$\begingroup\$ @vini_i. That would be for a common signal ground, not an earth ground. It keeps a common DC ref for the diff signals. \$\endgroup\$ – Sparky256 Jul 10 '16 at 18:12
  • \$\begingroup\$ If your looking for a simple protocol look up 'Modbus' on the web. It is a simple hexadecimal based scheme. Bit/Byte '0' is sync, byte 1 is control bits, byte 2 is node address, byte 3 is IC address, byte 4 is bit/byte address, byte 5 is data. \$\endgroup\$ – Sparky256 Jul 10 '16 at 18:28
3
\$\begingroup\$

RS485 channel 2 makes no sense. RS485 is a communications standard and doesn't care about the data content transmitted or what comes out of the RS485 interfaces so "channel 2" makes no sense in your question.

You need to state what the data and packaging is for this to be answered fully but, as a short answer use a regular MCU like a PIC and write some code that reads the 32 switches and outputs a serial stream (converted to RS485 format) that corresponds to the input serial stream requirements on the remote battery powered device.

\$\endgroup\$
0
\$\begingroup\$

RS485 is an electrical signalling standard, so it just describes a particular way of indicating both logic high and a logic low over a 3-wire cable.

The 'protocol' that's used specifies how the signalling standard will be used to convey data between two or more devices. Nearly all the protocols carry payload data in byte units, though there's few scattered about that don't.

It sounds like the device you're talking to uses some quite particular protocol but you don't give any details, so it's impossible to answer your question: is there a standard IC to encode and transmit switch positions in your device's protocol.

You could, as has been suggested, effectively produce your own converter IC, by using a microcontroller and writing your own software for it. But since you're specifically looking for a standard IC, I imagine that isn't something you feel capable of doing. And it is a fair-sized undertaking if you've not done anything like that before.

So, to start with, have you got some specific details of either the protocol or the target device you're looking to transmit to?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.