Speed control of DC motor

I was looking at this tutorial for a PWM and it said to ask on the forums because the schematic was incorrect. Can someone tell me what is wrong/what the correct schematic is? Also, the motor I am using is a 1.5V motor, so what would I need to use to lower the Arduino's 9Vs down to 1.5V for the motor?

Look at these:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
and
http://www.thebox.myzen.co.uk/Workshop/Motors_2.html

Wow! I'd leave aside "wrong" and go straight for "incomprehensible".

Edit: That's the tutorial diagram that's incomprehensible.
Go with Mike's explanation - always.

So if I were to build the first circuit on the motors 1 page, I would be able to integrate a potentiometer as a speed control? Could anyone link me to a description/circuit diagram of this?
I have very little experience with circuits/electronics, so I am not sure how to do this.

If it isn't too much to ask, can someone make a circuit diagram of the potentiometer + motor isolation circuit?

Could you provide more details:

  • how you need to control it?
    a. PWM - programing way;
    b. Resistor - manually;
    c. Both.
  • why do you think you need galvanic / optocoupler insulation?
    Usually it's not necessary for small motors, especially when powered up from the same power source as arduino board powered.

Actually - that schematic in the tutorial doesn't look too bad; there should also be a transistor (and attendent base resistor, plus flyback diode) to control the relay instead of a direct connect to the arduino pin; that would control the direction (dpdt relay), and the other transistor controls the PWM and hence speed of the motor... Kinda a funky arrangement, but what else is wrong with it?

I am understanding very little of what you are saying. I have a motor designed for 1.5V (Type 260 motor). I want to be able to adjust the speed of it using PWM. I want the PWM to be controlled by a potentiometer. I feel that I need the insulation because I read that this type of motor isn't designed to work at more than 3V (arduino works at 9V if I have read correctly). And besides the motor not being designed to work at that voltage, I want the motor to be as slow as possible so I don't want the voltage higher than 1.5V anyway.

I have no experience in creating my own circuits, so if someone could post an image with a reasonable diagram, or attempt to explain it, I would appreciate it a huge amount.

O'K, schematic is attached. It would supply ~3V at maximum PWM=255.
If you set a constrain to PWM 0 - 128 (normal range is 0 - 255) in software, so you will have equivalent power supply 1.5 V. You, probably, would need a heat-sink for transistor if it heating too match.
Next, look at examples, how to read a pot and map it on output.

Example

Sets the output to the LED proportional to the value read from the potentiometer. 

 
int ledPin = 9;      // LED connected to digital pin 9
int analogPin = 3;   // potentiometer connected to analog pin 3
int val = 0;         // variable to store the read value

void setup()
{
  pinMode(ledPin, OUTPUT);   // sets the pin as output
}

void loop()
{
  val = analogRead(analogPin);   // read the input pin
  analogWrite(ledPin, val / 4);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}

Change to:

 analogWrite(ledPin, val / 8);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 128

and you done with it.

Thank you so much, this is exactly what I needed.

(arduino works at 9V if I have read correctly)

No you have not read it correctly. The arduino runs at 5V, if you feed it with 9V the regulator cuts it down to 5V. You need to feed the regulator with greater than 7.5V for it to work correctly.

analogRead values go from 0 to 1023, analogWrite values from 0 to 128

Have I missed something about only using half the PWM range?

He is limiting it to half the range because it is only a 3v3 motor.

Ah! Sorry - posted from my phone - couldn't read it properly.