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

asked Dec 20, 2014 at 18:31
\$\endgroup\$
2
  • \$\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\$ Commented Dec 20, 2014 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\$ Commented Dec 20, 2014 at 19:07

2 Answers 2

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.

answered Dec 20, 2014 at 19:17
\$\endgroup\$
1
  • \$\begingroup\$ Thanks I must have forgotten that bit I remember reading about it now. \$\endgroup\$ Commented Dec 20, 2014 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.

answered Dec 20, 2014 at 19:12
\$\endgroup\$
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.