| Electronics > Projects, Designs, and Technical Stuff |
| Long cables... |
| (1/3) > >> |
| guimtl:
Hi, I'm trying to figure out how to solve bellow design issues before I try physically. I want to monitor switches that are far apart from each other, with preferably only one MCU; something like this; each square has tree switches with common ground, I know I'll have a problem with noise and long cables if using only GPIO and I'll be missing IO as well... --- End quote --- I thought I could use i2c multiplexers like the MCP23017, but I know I2C don't like long cables, it's not made for that.. so adding a PCA9615DP or similar to have long Ethernet cable instead of straight i2c would solve the long cable issue. Right now, I'm here; --- End quote --- reading the first pages of the spec it says << which is transparent to the SMBus/I²C-bus protocol layer >> so I'm guessing I could use similar topology and still be able to multiplex and use Interrupts for any switches changes. it would be bellow maximal of 8 MCP23017 and still <transparent> for my readings. 1. I guess I would need to add filtering(ferrite/opto) for each switches reading right before entering the multiplexer... (really needed ?) 2. could all this be powered from the MCU ... that would be battery powered! :) 3.3v 3. is this crazy? doable? any suggestions? |
| Siwastaja:
Switch as in physical switch, detecting pressing? Such physical switches are trivial, because the data rate is inherently ridiculously low - just filter the shit out of it! Any attempt to use an IO expander with digital communication protocol makes it less robust, until you hit an actually robust (differential) protocol, as you have correctly noted. If the amount of wire is not a problem, why won't you consider just wiring the buttons to the IO? If you lack IOs, pick a larger device, or use any standard IO expanders locally on the same board with the MCU. Since the switches are floating devices which consume no power, you won't have IO level or ground shift issues; since they are slow, you can RC filter them (think about 1k-10k in series, then 100n ceramic right between the IO pin and ground - this is a great ESD filter combination as well!) |
| Richard Crowley:
1) Custom PC board circuit for each node. 2) Cheap, small microcontroller to sense the local inputs (switches) in each node. 3) Assignable address for each node. DIP switches, solder pads, or whatever. 4) RS-485 protocol between the nodes 5) Two (or three?) RJ-45 jacks on each node board to allow daisy-chaining the nodes. 6) Cat5 cable between the nodes. Dirt-cheap, widely available. 7) Use one pair of the cable for balanced/differential data, and all the other conductors to distribute power. 8 ) Send 12V power into the daisy-chain of nodes so that there will be sufficient voltage down at the far end to regulate down to 5V (or 3.3V or whatever) 9) ROBIN network protocol: http://bdmicro.com/code/robin/ |
| guimtl:
kind of switches, looking for open circuit. I like the simple way of multiplex near the MCU and use long wires + filtering. I may have over worried about the long wires and noise pickup in the 'switches' for filtering I was suggested by a friend something similar: --- End quote --- placed right at the entry of the cable in my box... and use one like this for each IO. |
| guimtl:
wow, that's a bit more complex solution than I planned. :o of course, all boards will be custom. and I'm still in the early phase of planning/design. I'll take a look at ROBIN for sure. but if I can keep it simple as @Siwastaja suggested, then I'll probably stick with that... |
| Navigation |
| Message Index |
| Next page |