How to protect signals from MCU

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?

Reply to
pozz
Loading thread data ...

There is the issue of protection, but also of the signal reaching the other end without corruption. When working with two boxes, powered separately a nd possibly on different AC power circuits, you need different levels of pr otection depending on the amount of noise and ground differential you may s ee. 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 tw o per channel. You will need to drive around 5 mA per channel which most M CUs can do from a number of IO pins.

If your signals are low speed you might be able to use differential signall ing through resistors for isolation, but it is still potentially subject to upset if the voltage between the box grounds is higher than the common mod e 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 t he two box grounds. Optos are recommended.

--

  Rick C. 

  - Get a 1,000 miles of free Supercharging 
  - Tesla referral code - https://ts.la/richard11209
Reply to
gnuarm.deletethisbit

In my case, the two units have a different AC/DC PSU, but are plugged to the same mains AC line. Moreover they are metallic chassis mounted on the same rack, so with a good ground connections.

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.

Could you suggest some opto parts?

yes, they are

Differential signalling means doubling the number of wires in the cable... I would prefer other solutions

Reply to
pozz

vineri, 26 aprilie 2019, 10:56:09 UTC+3, pozz a scris:

If you can safely connect the logical GND of one board with the other's, th en it's safe. You should allocate one wire just for that. Ground loop? Mayb e, usually not a problem in the case. If you don't know if it's safe to connect the two GND, well, the answer is: you should know. But if you really don't know (however, you seems to know what power supply are there), then use opto-isolation. You need opto only o n one side, where you get an isolated GND. You'll then be able to connect t he isolated GND with anything, - the GND of the other board in this case.

Are you really concerned of the safety of the MCU (afraid of burning?) or j ust about the safety of the signals? Plain wires at 5V or 3.3V can veeeery easily pick up all kind of noises. The solution is sometimes converting the signal to an RS485 pair. Only that it doubles the wires. I have seen many times this solution used even internal to the same device (more than one board, but in the same cabinet on the same power supply).

I had once a situation: One of my board sitting on the back side of the cab inet needed a display on the front door of the cabinet. I used 3 wires, 5V levels (and another two to send the 5VDC supply) and the display had only s hift registers (HC595). This was a very noisy cabinet controlling big motor s. Very noisy. A shielded 5-wire cable (one meter) was not enough. The disp lay (a 7-seg digits display) was flickering badly all the time. The solutio n was to conduct the cable around a ring ferrite bead - the solution usuall y seen on old VGA cables, but even on some USB cables as well. The shield w as even not neccessary. Just five discrete wires with a ferrite ring.

Reply to
raimond.dragomir

Why not use RS232 level shifters at both ends, cheap, they come with

15kV static protection and multiple drivers in each package. The big signal levels, input thresholds and hysteresis will give you a certain amount of ground shift tolerance while keeping single ended.

Ad's ADM560/561 look possible (4 tx, 5 rx but no esd protection) or Exar SP3243EBEA (3tx, 5rx, 15kv protection)

Loads more on offer with just about every feature you could imagine.

MK

--
This email has been checked for viruses by AVG. 
https://www.avg.com
Reply to
Michael Kellett

On 2019-04-26 pozz wrote in comp.arch.embedded:

If your signals are really slow (sub kHz) and you don't want a high drive current, have a look at darlington output optocouplers. The 4N32 should be below $0,50 in small quantities (25+).

Up to a few kHz you could use cheap transistor output optos, like the HCPL-817, ~ $0.25. But these require more drive current and/or more sensitivity on the receiver side.

If you need faster, go for the digital output ones. The 6N136 is usable to a few 100kHz, ~ $1.00. And there are of course much faster ones (Mbaud types), but the cost goes up.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail) 

Those who don't know, talk.  Those who don't talk, know.
Reply to
Stef

If he chases milliseconds and not microseconds he needs nothing more than some RC filtering at 1 meter with plain TTL levels. He said the boards had low impedance common ground, clearly his inputs are high impedance MOS inputs - unless he manages to get some TTL parts (who knows, may be he has a time machine...). So if his speed can tolerate say a 1k/1uF RC there is nothing more he would need.

Dimiter

====================================================== Dimiter Popoff, TGI

formatting link
======================================================
formatting link

Reply to
Dimiter_Popoff

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.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com 
Email address domain is currently out of order.  See above to fix.
Reply to
Rob Gaddi

r

.

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 t he 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 i s not a big deal.

--

  Rick C. 

  + Get a 1,000 miles of free Supercharging 
  + Tesla referral code - https://ts.la/richard11209
Reply to
gnuarm.deletethisbit

If you really like, but the LVC logic (and most discrete logic) has ESD diodes to those same rails already.

formatting link
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.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com 
Email address domain is currently out of order.  See above to fix.
Reply to
Rob Gaddi

her

e).

or

f
,
C
a
e
U

in

rite 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 inp ut *and* adding a buffer chip, seems like using an optoisolator on each inp ut is not a big deal.

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 mas sive static shocks. If I bites my hand, I bet it will wipe out a buffer ch ip. There is a reason why the manufacturing process is held to anti-static protection levels. The chips need to have some protection to survive bein g handled by the machinery.

--

  Rick C. 

  -- Get a 1,000 miles of free Supercharging 
  -- Tesla referral code - https://ts.la/richard11209
Reply to
gnuarm.deletethisbit

If this is a SMPS, the mains filter Y-cpacitors will pollute the PE conductor and chassis with high frequency noise.

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.

With TTL only 0.4 V noise margin, not much ground pollution is needed to cause havoc.

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 ?

Reply to
upsidedown

There are also two row DB-15 connectors available from many parts suppliers.

- Best wishes,

--Phil pomartel At Comcast(ignore_this) dot net

Reply to
Phil Martel

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.