Pages: 1 [2]   Go Down
Author Topic: Analog input gets noise from power supply  (Read 1154 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33984
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 29
Posts: 2590
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: June 13, 2012, 05:51:09 pm by kivig » Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--> 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

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley Hope to get one soon.
Those are readings from the Arduino analog input in scale of 0 to 1023 abstract units smiley
I buffer them for consistent delay, then output through serial monitor and put into OpenOffice Calc, then insert->chart smiley Otherwise numbers are quite unobvious.
« Last Edit: June 13, 2012, 06:02:07 pm by kivig » Logged


Montreal
Offline Offline
Faraday Member
**
Karma: 29
Posts: 2590
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33984
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: June 18, 2012, 01:49:04 am by kivig » Logged


Pages: 1 [2]   Go Up
Jump to: