Problem Controlling a 4.5v DC motor with Arduino Uno

Hey all,

I was following this tutorial on how to run a DC motor using the PWM out on an Arduino:

http://luckylarry.co.uk/arduino-projects/arduino-control-a-dc-motor-with-potentiometer-and-multiple-power-supplies/

I followed the tutorial but can't get it to work. Everything's running fine on the arduino end, so I checked the circuit with a multimeter, and when I turn the pot about 3/4s of the way up, it goes up to about 1.5v. If I turn the pot all the way up, it actually goes back down. I should mention that the tutorial is for a 6v motor, and I'm trying to power a 4.5v motor (it's in a toy). I just used 3 AA's instead of 4. Not sure if this is causing the problem.

Figured it out. Silly mistake--didn't realize that the motor power supply and arduino have to share a common ground.

Here's a little intuition you would benefit from perhaps: A circuit is called a circuit because current goes round it.

If two circuits are connected by one wire rather than two, there isn't a circuit, no current is going to flow - they are not able to communicate. Its taken implicitly everywhere in electronics that there is a ground return for all signals.

Thus the OneWire bus uses two wires, the TWI (two wire interface) uses 3 wires really...

(Actually this is a slight over-simplification, since connecting two circuits with only one wire might involve a flow of current, but only for an instant as they reach a common potential - I've also glossed over capacitive coupling)