EmbeddedRelated.com
Forums

How to protect signals from MCU

Started by pozz April 26, 2019
On Friday, April 26, 2019 at 3:38:48 PM UTC-4, Rob Gaddi wrote:
> On 4/26/19 11:41 AM, gnuarm.deletethisbit@gmail.com wrote: > > On Friday, April 26, 2019 at 1:19:09 PM UTC-4, Rob Gaddi wrote: > >> On 4/26/19 12:56 AM, pozz wrote: > >>> I need to connect some signals (around 10) coming from an MCU to another > >>> MCU/logic IC far away round 1 meter. They are on different PCBs (and > >>> different metallic cases). The connectors between the units will be > >>> standard D-SUB. > >>> > >>> I don't know if it's safe to route signals from MCU directly to D-SUB > >>> connector on the same PCB, 1 meter cable, D-SUB connector and finally > >>> the destination IC. > >>> > >>> I know the protection could be as simple as a series resistor (cheap > >>> solution) to differential driver or photocouplers (high cost and space). > >>> > >>> I was thinking to convert the signal from the MCU to open-drain by a > >>> simple transistor (the signals are mono-directional). However this > >>> negates the logic, so I need to negate again on the destination PCB (or > >>> in the firmware). > >>> > >>> What do you use as an affordable solution? > >>> > >> > >> A meter with nominally the same grounds? That's nothing, especially if > >> you have a signal ground in the D-Sub bundle as well. I'm still a big > >> fan of never taking CPU pins straight to the connector for ESD reasons, > >> but that's largely because if something is going to be my sacrificial > >> part I'd like it to be something easily replaced. > >> > >> You could use the RS-232 translators MK recommended, but honestly I'd > >> say even that's overkill. How about just cheap digital buffers? 74LVC > >> family works great for either 3.3 or 5V logic, and in my experience is a > >> very hard family to kill. Get something with a Schmitt trigger for the > >> receive side. Lots of people sell 74LVC3G17; I tend to use the > >> identical NL37WZ17 from On Semi. 3 buffers to a can for 9 cents. > >> > >> If you really did want to go with something more hardened, like an > >> RS-485 differential-type thing, then since you're going from MCU to MCU > >> I'd figure out how to communicate the same information by going faster > >> over fewer wires. You could do a fully differential SPI link (MOSI, > >> MISO, CLK, and CS) on 4 pairs + 1 ground = 9 wires and you're still in > >> an D9. But again, probably overkill. > > > > I never bring anything outside the box without ESD protection. My favorite is Schottky diodes to the power and ground rails. Replacing any part on the board from ESD is a PITA. Compared to adding ESD diodes to each input *and* adding a buffer chip, seems like using an optoisolator on each input is not a big deal. > > > > If you really like, but the LVC logic (and most discrete logic) has ESD > diodes to those same rails already. > http://www.ti.com/lit/ds/symlink/sn74lvc3g17.pdf gives 2kV human-body > and 1kV charged device for any pin. It's been a good long while since > I've seen any CMOS parts without inherent ESD protection, just for the > manufacturing process, outside of screamingly high-speed stuff where > every picofarad fraction counts.
Yes, they have some level of protection. I've just never trusted the real world to limit to the spec for testing. Some environments can generate massive static shocks. If I bites my hand, I bet it will wipe out a buffer chip. There is a reason why the manufacturing process is held to anti-static protection levels. The chips need to have some protection to survive being handled by the machinery. -- Rick C. -- Get a 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
On Fri, 26 Apr 2019 10:35:05 +0200, pozz <pozzugno@gmail.com> wrote:

>Il 26/04/2019 10:18, gnuarm.deletethisbit@gmail.com ha scritto: >> On Friday, April 26, 2019 at 3:56:09 AM UTC-4, pozz wrote: >>> I need to connect some signals (around 10) coming from an MCU to another >>> MCU/logic IC far away round 1 meter. They are on different PCBs (and >>> different metallic cases). The connectors between the units will be >>> standard D-SUB. >>> >>> I don't know if it's safe to route signals from MCU directly to D-SUB >>> connector on the same PCB, 1 meter cable, D-SUB connector and finally >>> the destination IC. >>> >>> I know the protection could be as simple as a series resistor (cheap >>> solution) to differential driver or photocouplers (high cost and space). >>> >>> I was thinking to convert the signal from the MCU to open-drain by a >>> simple transistor (the signals are mono-directional). However this >>> negates the logic, so I need to negate again on the destination PCB (or >>> in the firmware). >>> >>> What do you use as an affordable solution? >> >> There is the issue of protection, but also of the signal reaching the other end without corruption. When working with two boxes, powered separately and possibly on different AC power circuits, > >In my case, the two units have a different AC/DC PSU,
If this is a SMPS, the mains filter Y-cpacitors will pollute the PE conductor and chassis with high frequency noise.
>but are plugged to >the same mains AC line.
If the power supplies had been powered by separate mains sockets and TN-C wiring convention had been used (a common PEN conductor), the chassis would also have some mains and low harmonics causing voltage differences between chassises.
>Moreover they are metallic chassis mounted on >the same rack, so with a good ground connections.
With TTL only 0.4 V noise margin, not much ground pollution is needed to cause havoc.
>you need different levels of protection depending on the amount of noise >and ground differential you may see. When connecting two separate >chassis it is a good idea to isolate with optical circuits to provide >the best protection. >> >> Optocouplers are not really high cost. I think they are about a buck or two per channel. You will need to drive around 5 mA per channel which most MCUs can do from a number of IO pins. > >Could you suggest some opto parts? > > >> If your signals are low speed > >yes, they are > > >> you might be able to use differential signalling through resistors for isolation, but it is still potentially subject to upset if the voltage between the box grounds is higher than the common mode range of the devices. If the units are not plugged into the same outlet and even if they are, surges can create large voltage differences between the two box grounds. Optos are recommended. > >Differential signalling means doubling the number of wires in the >cable... I would prefer other solutions
With about 10 signals, the 9 point variant is too small. The 25 pin variant would carry easily 10 differential signals. Are you perhaps thinking about a 15 pin three row VGA style connector ?
On 4/27/2019 03:34, upsidedown@downunder.com wrote:
> On Fri, 26 Apr 2019 10:35:05 +0200, pozz <pozzugno@gmail.com> wrote: > >> Il 26/04/2019 10:18, gnuarm.deletethisbit@gmail.com ha scritto: >>> On Friday, April 26, 2019 at 3:56:09 AM UTC-4, pozz wrote: >>>> I need to connect some signals (around 10) coming from an MCU to another >>>> MCU/logic IC far away round 1 meter. They are on different PCBs (and >>>> different metallic cases). The connectors between the units will be >>>> standard D-SUB. >>>> >>>> I don't know if it's safe to route signals from MCU directly to D-SUB >>>> connector on the same PCB, 1 meter cable, D-SUB connector and finally >>>> the destination IC. >>>> >>>> I know the protection could be as simple as a series resistor (cheap >>>> solution) to differential driver or photocouplers (high cost and space). >>>> >>>> I was thinking to convert the signal from the MCU to open-drain by a >>>> simple transistor (the signals are mono-directional). However this >>>> negates the logic, so I need to negate again on the destination PCB (or >>>> in the firmware). >>>> >>>> What do you use as an affordable solution? >>> >>> There is the issue of protection, but also of the signal reaching the other end without corruption. When working with two boxes, powered separately and possibly on different AC power circuits, >> >> In my case, the two units have a different AC/DC PSU, > > If this is a SMPS, the mains filter Y-cpacitors will pollute the PE > conductor and chassis with high frequency noise. > >> but are plugged to >> the same mains AC line. > > If the power supplies had been powered by separate mains sockets and > TN-C wiring convention had been used (a common PEN conductor), the > chassis would also have some mains and low harmonics causing voltage > differences between chassises. > >> Moreover they are metallic chassis mounted on >> the same rack, so with a good ground connections. > > With TTL only 0.4 V noise margin, not much ground pollution is needed > to cause havoc. > >> you need different levels of protection depending on the amount of noise >> and ground differential you may see. When connecting two separate >> chassis it is a good idea to isolate with optical circuits to provide >> the best protection. >>> >>> Optocouplers are not really high cost. I think they are about a buck or two per channel. You will need to drive around 5 mA per channel which most MCUs can do from a number of IO pins. >> >> Could you suggest some opto parts? >> >> >>> If your signals are low speed >> >> yes, they are >> >> >>> you might be able to use differential signalling through resistors for isolation, but it is still potentially subject to upset if the voltage between the box grounds is higher than the common mode range of the devices. If the units are not plugged into the same outlet and even if they are, surges can create large voltage differences between the two box grounds. Optos are recommended. >> >> Differential signalling means doubling the number of wires in the >> cable... I would prefer other solutions > > With about 10 signals, the 9 point variant is too small. The 25 pin > variant would carry easily 10 differential signals. Are you perhaps > thinking about a 15 pin three row VGA style connector ? >
There are also two row DB-15 connectors available from many parts suppliers. - Best wishes, --Phil pomartel At Comcast(ignore_this) dot net