Author Topic: Noisy atMega1280 Input pin  (Read 2600 times)

0 Members and 1 Guest are viewing this topic.

Online MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Noisy atMega1280 Input pin
« on: November 06, 2011, 04:20:54 pm »
i programmed arduino mega to become logic analyzer here but one problem. when i connect directly the DDS digital output to atmega pins configured as input, the DDS analog signal shown in DSO become so noisy, the DDS signal is not high freq stuff, only around few KHz to few Hz, the noise is high frequency stuff 0.5-1Vpp. i thought when a mcu pin configured as input, it will become high impedance and very low loading to the source generator? so i dont get where this noise is coming from. i thought it will be blocked in and out of the mcu since hi-Z connection. how i connect the arduino and DDS is shown below. should i add extra filter or components before feeding in the arduino chip? if yes please advice personally or provide links. thanks.


« Last Edit: November 06, 2011, 04:37:02 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: Noisy atMega1280 Input pin
« Reply #1 on: November 07, 2011, 03:55:00 am »
Few ideas...

0.5-1V p2p is pretty large so its probably something simple, like a grounding issue.

Do you get noise when the signal connection is made or does the noise appear even before then when the cables ground connection is made?

Move your DSO probe ground clip to the arduino ground. (if its not there already). If your measuring the signal with reference to a ground point that is far away from the arduino (like mains earth) you will probably see lots of ground noise.

Try powering the circuit from something that's isolated. eg, if it's getting power from usb try an laptop running on battery.

Check you have the pin pullup disabled. When a pin is set as input it will only be highZ if the pullup is disabled (pretty sure its off by default but i'm not too sure about the arduino environment).

Double check you don't have some other code that's accidentally switching the port to output sometimes. As that would look like high frequency noise if it's happening in your main program loop. You could check this by putting the scope on the input pin without anything connected except a 10k resistor to arduino ground and another 10k to vcc. That will show if the pin is being accidentally switched to output or pullup enabled, (it should be half rail all the time).

Some pins have other functions, check your not trying to use one of these other functions as it might be changing the pin to output.

Also if you can post a better pic of your signal with and without this noise we might be able to tell what kind of noise it is and where its from.
« Last Edit: November 07, 2011, 04:10:12 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Noisy atMega1280 Input pin
« Reply #2 on: November 07, 2011, 12:25:06 pm »
ok i spotted the problems. 1st and major, is when i'm tired, lack of sleep and motivation and ready to bed while posting this thread. 2nd, the green stuff at far left in the picture (connected to FG output) and my DIY 1/10X probe (with DIY yellow ring and white clip), should not be there. long ground loop also slightly contributed to the noise. the mentioned noise is shown below.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf