Noise on digital input from external board

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

I am trying to use an external interrupt on INTO to detect the falling edge of a 100Hz/5V square wave. The square wave is generated from a board with its own power supply and ground which is separate from my target board. The boards are connected with a single lead (5") and a series resistor.

If I look at the output of generator on a scope with probe ground attached to the generator boards ground, the signal is clean and stable. When I connect the signal to my target board (INT0 pin of the AVR) and look at the signal at that pin with probe ground connected to the target board ground, it has alot of noise.

This noise is strong enough to cause false edge detection by the avr and generation of unexpected INTO interrupts.

Any ideas on where this noise is coming from or how to deal with it? I tried a 0.1uF capacitor to ground, but it was not enough to make edge detection work correctly.

Ben

FYI, I am a hobbyist and my electronics knowledge is self learned (i.e. limited)

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

Do you have the grounds of the two boards connected together?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

ka7ehk wrote:
Do you have the grounds of the two boards connected together?

No I don't. Should I?

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

Absolutely. I think that you will find the noise to be minimal after you do that.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

So if I was reading signals from 10 other boards/sources, all 11 (target included) would have to share grounds?

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

BTW, yes connecting the grounds did resolve the noise problem, thanks.

Can connecting the grounds cause any problems, given that they have separate power supplies?

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

It can cause problems in certain situations. Opto couplers are then used.

Leon Heller G1HSM

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

oecben wrote:
Can connecting the grounds cause any problems, given that they have separate power supplies?

In addition to the above, I thought I'd offer up a bit of an explanation. The reason that this isn't generally a problem is that circuits usually care only about the difference in potential between a given signal (or other voltage) and ground, and don't actually care where ground itself is.

This works a lot like the fact that the difference in height between your head and your feet is the same regardless of whether you're standing on the floor, or on a ladder. By connecting the grounds, you're just insisting that they be at the same "height". It's like lining people up on the same floor -- it makes measuring their relative heights a lot easier, but doesn't change how tall they are.

If you're not holding your grounds at the same level (or at least at some specific relative level) then they're "floating" relative to one another, and all kinds of things can move them around -- hence the noise you observed.

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

Whether or not connecting the grounds is a problem depends on how each power supply deals with its OWN power source. IF they are isolated (typically with a transformer), then you can connect all the grounds together and everyone is happy. If two or more are not isolated, you will have problems.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!