1

I wanted to test the performance of MAX485 drivers. I set up one driver and one receiver 2-3 meters apart. A 100 Hz square wave was being sent down the line. Roughly in the middle of the cable I put a high voltage coil (similar to ones found in taser guns) to generate interference from sparks. I tried various cables and shield/ground configurations but this is not important since I wanted to see how the MAX485 itself can cope with interference.

The results were disappointing as can be seen from the print screens. The MAX485 was not capable of minimizing EMI noise to an acceptable level, that is, to a level that would not change the current logical level. From the images can be seen that a spark induced EMI on the high state would easily pull it down for long enough to trigger a false interrupt (possibly more than one). A funny side note is that the scope's built in math function manages better results.

It seems that using a MAX485 balanced line offers no benefits - presumably I am doing something wrong, but what? I was expecting way better results.

The measurements were taken at the receiver side:

  • 485 pin A: yellow
  • 485 pin B: violet
  • 485 pin RO: light blue
  • Scope math A-B: dark blue

enter image description here enter image description here enter image description here

Scope probes are ground referenced (dc -).

Blaž Umek
  • 93
  • 6

2 Answers2

3

In the second scope shot, I'm not sure the chip's output isn't switching.

Most likely what you are measuring is EMI picked up by the scope probe cables themselves, not the output of your chip.

Instead of probing just the chip's output, also probe its GND pin right at the chip. This trace should display a nice, flat zero volts. If it does not, and it is picking up as much noise as the other traces, then your measurement setup is the problem.

You can only proceed to probing the chip's output once your setup properly measures 0V as 0V...

EDIT:

After all the probe was 1 meter away from the spark. Anyway, where do I connect the probe ground (alligator) when probing ground?

The probe's ground wire and alligator clip make a loop antenna which will pick up lots of noise from the ESD discharge. Try closing the ground alligator clip on the tip of the probe, just let it sit there probing nothing at all, and discharge your zapper at the usual distance. I bet you'll get a strong signal on your scope.

Also, as drtechno says, there is a ground loop between your probe, your scope (which is earthed) and through the power supply you use for your experiments, and finally to your board. Also a significant proportion of your spark's current will go through the scope probe's GND wire, since it has to go through somewhere to go back to Earth (or to your zapper). This will add lots of noise to your measurements.

In order to correct this, you either need a proper differential probe (best solution, but expensive) or you can hack it by using batteries to power your board, which kinda breaks the ground loop... although some current will still flow through the shield of the scope cable (that depends on how your zapper works, if it's like a stun gun then current won't loop back to Earth though).

Anyway. The best solution would be not to use a scope, for example if you have a microcontroller or other programmable device on the receiving board, you can program it to check if it detects a change in output from your chip or not.

Failing that, I'd solder a coax to the board, slip a big ferrite core on it, and plug that into the scope with a BNC, with the cable's shield soldered directly to the ground plane, and a 50R as source termination. First connect your 50R "probe" to the ground plane too, and run the experiment, try to guesstimate how much noise you get instead of a flat "0V". After this you solder the 50R resistor to the signal you want to probe, and remember that if you observe the same amount of noise as before, it is a measurement artifact. Only if you observe a lot more noise, then you can conclude that something's happening... That's a hack, but you should at least be able to see if the chip's output changes level or not.

bobflux
  • 77,207
  • 3
  • 91
  • 222
  • I have not thought of that. After all the probe was 1 meter away from the spark. Anyway, where do I connect the probe ground (alligator) when probing ground? – Blaž Umek May 19 '19 at 14:25
  • To correctly measure the signal you use a special probe called a differential probe. That removes the ground referencing from the oscilloscope input. – drtechno May 19 '19 at 14:54
  • I've edited the answer. – bobflux May 19 '19 at 15:11
  • @peufeu, you were right! I used an ESP32 microcontroller for the test and the MAX485 actually performed quite good. Even with a simple speaker cable the spark has to occur in the very proximity of the wires to cause an interrupt on the pin. – Blaž Umek May 22 '19 at 06:44
  • Well done!..... – bobflux May 22 '19 at 09:03
  • This weekend I did another test: I used a 3144 hall sensor to drive an interrupt pin on an ESP32. 3144 and ESP32 were connected with a simple speaker cable; the power supply was from a battery at the ESP32 side. I again used a zapper as EMI generator. I first tested with MAX485 modules between 3144 and ESP32, then I tested without MAX485 (hall via cable directly to pin). The results are super strange: it is actually more robust WITHOUT MAX485 (false interrupts less likely to occur). I am totaly lost. – Blaž Umek Jun 03 '19 at 08:02
  • Perhaps your hall sensor detects magnetic fields from your zapper. – bobflux Jun 04 '19 at 00:51
  • Maybe the voltage spikes are just too high for the max485 to cancel the noise? I can easily generate 100s of volts in the wires. – Blaž Umek Jun 04 '19 at 19:39
2

You have to understand that the unbalanced referenced noise is rejected when its received deferentially in the balanced circuit. That is why the results of the difference of channel A to channel B rejects most of the noise. Then typically the waveform is cleaned up by running it through a photo coupler for dc isolation and then into logic gates.

Also, since this transmission line runs in balanced operation, the traditional scope input will not show the actual results of this type of transmission line. The reason why the differential scope probe was created was to allow normal oscilloscope to see these balanced transmission lines correctly. Because to correctly observe the signal, the test equipment's signal inputs has to be ground isolated. Because the circuit operation does not use a ground of any kind in the balanced signal line, it only uses the difference between the two signals lines exclusively. This is where balanced signal lines gain their noise immunity by rejecting and unbalanced common mode noise.

edit: The original poster requested me to add some info. So I added an application guide link that uses the rs485 technology that includes a simple explanation on the advantages of isolating the transmission line. Also some schematics on how some have addressed noise with this transmission technology. Using isolated rs485

Block diagram

multi-channel light dimmer

Image source: <Puff> percussive organ

SamGibson
  • 17,870
  • 5
  • 40
  • 59
drtechno
  • 1,116
  • 6
  • 8
  • So, in order to obtain a cleas signal from the max485 receiver, what must one do? Can you post a schematic that would combat noise successfully? – Blaž Umek May 19 '19 at 14:08
  • well, the way I seen it done in the application of lighting, those circuits use DC-DC isolated converters for the rs485 transmitter/receiver/transceiver chips. Because the transmission line's DC ground is not used in the signal path. Its only static shielding. In some commercial installations, this type of transmission line's shield is only grounded on one side, or a twisted pair wire is used instead of cable (typically seen in audio intercom, but does work in lower baud rate RS485 uses like lighting). They typically don't have these schematics online because of propriety methods and patents. – drtechno May 19 '19 at 15:12
  • So the ground need not be common to both chips anymore? Presumably this is how ethernet works? – Blaž Umek May 19 '19 at 18:33
  • Ethernet, rs485 are balanced transmission line connections. and like all balanced connections, they do not have a ground reference. Ethernet is typically transformer isolated, and the slower RS485 is usually opto-isolated. yes the ground, don't have to be common between any interconnect. This can come in handy if you are connecting devices that don't share the same common ground (like different buildings on different power mains) and might have voltage differences that can be measured between the grounds of the two buildings. – drtechno May 19 '19 at 18:55
  • I am sorry for the late reply but the complex schematic you posted scared me off :) It seems easier to just use a small microcontroller near the sensor and implement a reliable protocol in software. Besides, I have very limited space available. Anyway: why do you need isolation at all? Presumably only for safety reasons although something would still burn (the isolating element for instance)? – Blaž Umek Jun 05 '19 at 12:49
  • The application of using opto isolation is to protect your bus input device. I would encourage use of opto isolation especially on single chip designs, because there wouldn't be a 74hc245 (or the like) that can be changed out if it received an overload from static electricity, for example... – drtechno Sep 18 '19 at 15:28
  • Actually, I am using a TVS diode between A and B input pins, so any voltage difference above 6.8V is "shorted". Is my approach wrong? Thanks! – Blaž Umek Sep 19 '19 at 10:36