Noise protection

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to connect switches to AVR micro. The switches will at a distance of about 15 to 20 metres. A cable will run from switch plate to AVR micro.
Do I need to worry about noise riding on the switch input and causing AVR malfunction? There will not be any mains wires running close to the cable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You asked:

Do I need to worry about noise riding on the switch input and causing AVR malfunction?

Short Answer: Probably

Longer Answer: It depends on many factors. You need to explain the application in more detail.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Prevention is better than cure
use shielded cable and ground the shield at one end.

P.Ashok Kumar

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, noise can be a problem with a cable that long.

For sure, use a shielded cable You can use the shield as the ground leg of the switch circuit. This will reduce or eliminate capacitive coupling. But, not magnetic coupling. If the wire runs close to a motor or transformer, you could be in for major problems. In that case, use a shielded twisted pair.

Also, use some protective diodes so ESD will not kill your micro.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim,

Many thanks for your advice. I have looked around for some information and made a section of the diagram that is attached here with. Considering the VIL max to be 0.2 VCC, I have placed R12, R13 and C1 to take care of rising times. BAT54S is for ESD protection. R14 is added (could be of lower value) so that if the contact resistance of switch wears out, it will be useful.

I hope things are ok. Any comments please

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would put the pullup on the other side so you wouldn't create a voltage divider on the input. Or maybe it's something you need.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

systemteqavr,

1. I agree, shielded cable is a must for this application as others have indicated.

2. I am assuming that all of your "switches" are "long-term" mechanical closures, and there are no short pulses involved. E.g. toggle switches and perhaps finger activated momentary push buttons.Correct?

3. Your 10K pull-up is way to weak for this application which will have up to 60 or 70 feet of wire dangling from a hi-Z CMOS input. You need a considerably stiffer (lower value) pull-up resistor to quash any capacitevely coupled voltages in the cable wire.

This is where the shield will be effective. It will "block" capacitively coupled voltages in the connecting wire. But you will still want to have that wire held firmly in place by a low resistance/impedance. Soemthing on the order of a few hundred ohms.

There is a simple experiment you can perform to understand the nature of the interference. First, connect a 20 meter piece of wire to a scope probe and stretch the wire in various directions around your shop. Note the waveforms on your scope and their magnitude.

Second, Connect a 20 meter piece of shielded cable to your scope. Inner conductor to the scope tip, shield to the scope's chassis (assuming it's connected to Earth Ground. You will see that the waveforms are significantly reduced.

Third, going back to the plain unshielded wire, connect various resistors between the scope tip & wire end and the scope probe's ground clip. You will see that as the resistance gets lower, the waveforms drop in amplitude.

In all of these situations move the wire to

Also, connect an extension cord to a wall outlet. Do not power anything with this extension cord. Move the extension cord around the plain wire and the shielded wire in different orientations and closeness. Observe the waveforms on your scope as you do this.

Once you perform these simple experiments, which should take you less than 30 minutes to perform, you will have a much better understanding of what you are up against with a 20 meter wire and the degree to which the simple remedies of a stiff pull-up resistor and/or a shield will help alleviate the potential problems.

A further point: if you were to take this whole experiment to an "unelectrified" locale, such as your back yard or crop field, you would observe an entirely different situation. All of the waveforms would be vastly reduced in amplitude, perhaps to the level of non-existance. The "enemy" is mostly the electric power wiring and power equipment which is ubiquitous in our modern world.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let's not forget lightning , ESD and rf from the likes of cell phones.
A bat54 is better than nothing. A tranzorb/transil is better suited. Something like a SA5.0

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A diode like BAT54 is good for low energy "noise", not sufficient for higher energy like lightning or even ESD. It depends very much on what you expect the noise source to be,

Another significant source of bad operation is magnetic coupling. Common sources are large motors, AC relays, solenoids, and such. Best protection is to avoid the sources plus twisted wires.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A diode like BAT54 is good for low energy "noise", not sufficient for higher energy like lightning or even ESD. It depends very much on what you expect the noise source to be,

Another significant source of bad operation is magnetic coupling. Common sources are large motors, AC coil relays, solenoids, and such. Best protection is to avoid the sources plus twisted wires.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net