That sounds like you did not have a common ground between your DC power supply and the arduino ground. They need to be linked with a wire.
That sounds like you did not have a common ground between your DC power supply and the arduino ground. They need to be linked with a wire.