Electronics > Beginners
Signal integrity between boards question
rrinker:
Probably a stupid one, but here goes.
I have 2 projects that work together. Each contains a microcontroller. My original plan had 4 IO lines from one micro connecting over a relatively short distance to pins on the other board (with protection and pullup resistors and capacitors), say 99% of the time less than 1 meter. For simplicity I was going to use RJ45 connectors and UTP cable. 4 signals, pair each with a common so I'd have the common reference between boards as well as the signal. I didn't see any problem doing this. But a design change has me now needing SIX signals between boards. All signals are straight digital signals, either high or low, no analog here. I'm thinking pairing 2 unrelated, or even related, signals, where they both could be high, both be low, or be opposite one another, is such a good idea. Should I find a different way to do the interconnect, maybe a pair of 6p6c RJ12 and continue the signal paired with a ground approach, or maybe just use flat 8 conductor cable instead of twisted pairs> This is also not high frequency - if the signal state changes more than once per minute it would be a lot.
What says the collective wisdom of the EEVBlog? Besides "What is this guy thinking?" :-DD Perhaps I should have laid off the iced tea and just sleep on it (it's after 2am here) and see if I can remember why I should do one thing or the other.
xyrtek:
Google differential bus transceiver, so many options you probably have some on hand ;)
tggzzz:
--- Quote from: rrinker on December 31, 2018, 07:11:42 am ---Probably a stupid one, but here goes.
...
All signals are straight digital signals, either high or low, no analog here.
...
This is also not high frequency - if the signal state changes more than once per minute it would be a lot.
--- End quote ---
Those are three misapprehsions...
It isn't a stupid question.
Those signals are analogue; photon counting and femtoamp circuits are the "common" digital signals. What you have is analogue signals that are interpreted by the receiver and classified as 0 or 1 or something else. Ensuring the "something else" doesn't occur is what "signal integrity" is all about.
Whether or not it is "high frequency" doesn't depend on the number of transitions per second. The only thing that matters is the transition time, which is dictated by the transmitter logic family. If the transmitter is 74LVC1G* family, then your signal will have components above 1GHz. For experimental illustration of the theory, see
https://entertaininghacks.wordpress.com/2018/05/08/digital-signal-integrity-and-bandwidth-signals-risetime-is-important-period-is-irrelevant/
Lusu:
Since you do work with 2 micros... can't you use UART (serial), IIC or SPI to send the data? This way, for serial or IIC you need to transfer just 2 pairs (+GND and +VCC if needed):
* TX or SDA + GND on Orange/Orange-White (pins 1 and 2)
* RX or SCL + GND on Green/Green+White (pins 3 and 6)
* leaving pins 7 and 8 free for "PoE" (7 GND and 8 VCC)
* and 4 and 5 for whatever else you need(I yould use this configuration on pins instead of 1-2, 3-4 etc. because if someone plugs it by mistake in a switch/router -- because it is an "ethernet cable", nothing bad should happen)
If you use differential bus drivers, then you don't have GND on the first 2 pairs, but you can still transfer it on pin 7.
Edit: https://incentre.net/ethernet-cable-color-coding-diagram/, I usually use TIA/EIA 568-B standard
rrinker:
To clarify what I am doing, this is all model railroad related.
The one board, call that A, is effectively this: http://www.modelrailroadcontrolsystems.com/cpnode-version-2-5/ although I am building my own using an ATMega328p, not sticking an Arduino of some sort on it.
The second board, call that one B, is one I posted some time ago, which drives some servos. It too uses an ATMega328p.
B has 4 inputs, driven by outputs from A. Set position of servo 1, set position of servo 2, lockout of the local buttons for servo 1, and lockout of the pushbuttons for servo 2.
B has 2 outputs that will drive inputs of A. Position of servo 1 and position of servo 2.
There's a reason i want to stay away form multiplexers and other such things - board A is a general purpose IO board, exposing multiple IO pins (my version adds some MCP23S17 port expanders), A given board A may control 4 or 5 board Bs. As well as receive inputs from other sensor devices to detect track occupancy, and also drive LEDs that will be located in signals along the track. Board A has no logic - all it does is sent and receive the status of each input or output byte by byte back to the controlling computer program via RS485. The idea is to configure every board identically - address on the bus for the board As will be set by jumpers. Any board should be completely interchangeable, no custom code. This has already been done with the CMRI system which I am for the most part emulating, but frankly the existing hardware is much too expensive per IO pin, compared to what can be done with small micros and port expanders, combined with the low cost of getting PCBs from places like JLCPCB and PCBWay, which is why I am going the DIY route.
The use of RJ45 to interconnect A and B is not set it stone, I haven't laid out the PCB yet. I am using RJ45 and UTP to connect the pushbutton and LED panels - since there are 4 lines needed for each I can pair each with a ground. Most CMRI installations just use screw terminals and individual wires to link input sensors and output devices to the IO boards, so I have no problem doing that. When I only had 4 lines, all going the same direction, to worry about, the RJ45 approach seemed the easiest and neatest, in all cases respecting the standard ethernet pinouts to pair a signal with a ground, since a common reference between boards is needed anyway. The board A end of these cables was just going to be stripped out to wires anyway. Or use RJ45's for groups of 4 - another IO device I previous contemplated using use RJ12 for each group of 4 IO bits plus a +5 and ground.
Navigation
[0] Message Index
[#] Next page
Go to full version