0
\$\begingroup\$

I've been having a hard time finding a solution to this problem.

I recently ordered a 5 Volt 2Amp AC to DC switching power supply from adafruit.cc

When I connect my Arduino's analog sensor to the ground of my switch mode power supply my Arduino detects that it's oscillating.

I thought the voltage on the ground pin would always be 0 and not oscillate. The power supply on the Arduino does this properly. Why am I having this issue with the switching power supply and is there any way to to make the circuit have a consistent ground?

EDIT: Links to info http://arduino.cc/en/Tutorial/AnalogInput https://www.adafruit.com/products/276

I don't know how useful that analog input info will be I'm more of a programmer.

ground pin oscilloscope capture Arduino schematic

\$\endgroup\$
  • \$\begingroup\$ And maybe a schematic of how you're wiring it up? It sounds to me like you're not doing what you think you are. I have my suspicions but I'd like you to confirm them with a schematic before I post an answer. \$\endgroup\$ – Majenko Dec 20 '14 at 18:43
  • \$\begingroup\$ okay posted a picture of it. The pin on the bottom of the barrel jack is hot/positive and the on on the side is neutral or useless I don't really know. \$\endgroup\$ – Gabe Dec 20 '14 at 19:07
1
\$\begingroup\$

Yes, @SHG is right, and you confirmed my suspicions.

The analog input measures the voltage difference between the arduino ground and some point above arduino ground.

You can only measure relative to the Arduino's ground, not measure some other point in another circuit.

You have to connect the ground of the Arduino to the ground of the remote circuit in order to get any form of meaningful signal. In your case you would basically be measuring the Arduino ground since they would both be connected together.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Thanks I must have forgotten that bit I remember reading about it now. \$\endgroup\$ – Gabe Dec 20 '14 at 19:21
0
\$\begingroup\$

You have to measure a voltage difference between two points here it looks like you are trying to measure by only connecting one pin? That wire sure makes a nice antenna though.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.