Go Down

Topic: Analog input gets noise from power supply (Read 1 time) previous topic - next topic

Grumpy_Mike

Quote
This is the circuit I have:

I had imagined that the diode was in series with the resistor. Anyway it is not right as it limits the low voltage you can achieve.

If it were me I would take the second circuit and swap it around with the emitter to ground and the collector to the input with the resistor pulling up to 5V. That is the way I always do it.

Your power supply should not be having such an effect and normally when this happens is because the impedance of the input to the analogue inputs is too high. When this happens you also find that one input appears to affect the others.

Magician

How long wire to sensors? Shielded cable? May be it would make a difference to put a cap close to inputs.

kivig

This might be irrelevant but while trying to put multimeter to anything I could imagine I got slight electric shock touching Arduino ground and PSU case. I tried measuring voltage across ground and case - probes produce sparks from time to time, the voltage jumps for a second and backs to 0V, but a few times, probably having bad contact, I was able to get stable 86V reading. Only thing arduino is connected to is PC through USB and there seems to be no voltage measuring PSU case to USB cable shell or any of it's leads directly.
Voltage seems to jump for a split second if measuring AC mains to PSU case, no sparks. Absolutely nothing between PSU output +/- and it's case.

kivig

#18
Jun 14, 2012, 12:46 am Last Edit: Jun 14, 2012, 12:51 am by kivig Reason: 1

How long wire to sensors? Shielded cable? May be it would make a difference to put a cap close to inputs.

Cables are about 20cm, non-shielded. How big cap could be of use? On the sensor or Arduino side?

kivig


Your power supply should not be having such an effect and normally when this happens is because the impedance of the input to the analogue inputs is too high. When this happens you also find that one input appears to affect the others.

Actually I didn't see any interference between inputs, it just seemed logical that current could flow back through another input's resistor and affect it, not much of course.

Docedison

Does this PSU have a transformer in it or is it a switcher type? What is the scale of the voltages shown in the oscillograms? 20V/div - 2V/div - .2V/div. If it is as I suspect a scale of .02V/div the noise is normal and an artifact of the measurement setup rather than real noise. Or the results of the radiated magnetic field inducing voltage in the test setup wiring. The setup I describe below will answer why there might be noise from "Clean sources" as well.
For Example... consider an Uno connected to a computer and an external good clean 1A 9V out switching PSU
With my test board I measure 100mV -1V of Noise on the PSU + rail or output with a Tektronics 2213 oscilloscope. Unsatisfactory PSU ? NO it is ground common mode voltage or the slight difference in the Grounds between my O'scope and my Computer. The Proof for me is to disconnect the computer from the Uno leaving the PSU to power the Uno. 0 volts PSU noise is measured when the computer is disconnected.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

kivig

#21
Jun 14, 2012, 12:58 am Last Edit: Jun 14, 2012, 01:02 am by kivig Reason: 1

Does this PSU have a transformer in it or is it a switcher type? What is the scale of the voltages shown in the oscillograms? 20V/div - 2V/div - .2V/div. If it is as I suspect a scale of .02V/div the noise is normal and an artifact of the measurement setup rather than real noise. Or the results of the radiated magnetic field inducing voltage in the test setup wiring. The setup I describe below will answer why there might be noise from "Clean sources" as well.
For Example... consider an Uno connected to a computer and an external good clean 1A 9V out switching PSU
With my test board I measure 100mV -1V of Noise on the PSU + rail or output with a Tektronics 2213 oscilloscope. Unsatisfactory PSU ? NO it is ground common mode voltage or the slight difference in the Grounds between my O'scope and my Computer. The Proof for me is to disconnect the computer from the Uno leaving the PSU to power the Uno. 0 volts PSU noise is measured when the computer is disconnected.

Doc

I wish I had an oscilloscope :) Hope to get one soon.
Those are readings from the Arduino analog input in scale of 0 to 1023 abstract units :)
I buffer them for consistent delay, then output through serial monitor and put into OpenOffice Calc, then insert->chart :) Otherwise numbers are quite unobvious.

Magician

Quote
Cables are about 20cm, non-shielded. How big cap could be of use?
Oh, it's short. Probably you don't need caps after all.
I'd investigate this issue you have with a sparks . Definitely something wrong with electrical side. Are computer and PSU connected to the same outlet? Can you measure voltages between cases PC and PSU? Does PSU has 2-wire or 3-wire cable?

Grumpy_Mike

Quote
Actually I didn't see any interference between inputs, it just seemed logical that current could flow back through another input's resistor and affect it, not much of course.

Not quite getting that, how do you thing that could happen.

kivig

#24
Jun 18, 2012, 08:30 am Last Edit: Jun 18, 2012, 08:49 am by kivig Reason: 1

Oh, it's short. Probably you don't need caps after all.
I'd investigate this issue you have with a sparks . Definitely something wrong with electrical side. Are computer and PSU connected to the same outlet? Can you measure voltages between cases PC and PSU? Does PSU has 2-wire or 3-wire cable?

Yes, PSU is the same outlet and it shows 0V between cases. But it wasn't once that I got about 50-100V on my fingers from computer case, though theoretically it's grounded. Something definitely wrong there.


Not quite getting that, how do you thing that could happen.

I meant something like this:

There's ground somewhere behind output anyway, so it should draw something. Though a bit later I understood that analog input impedance would render this current practically nonexistent.

After rewiring things the way you suggested:

Everything works great! Noise stays within 3 units even under substantial load on PSU.
What's more, now because I'm not limited to minimal resistance of phototransistor, I get almost full range readings (~23-1023)
Thanks a lot! Connecting other way around seems so simple and logical once try it, but somehow wasn't obvious.


Here's output at 250-500RPMx8

Go Up