9V DC Motor Speed Control

Hi there,

I was wondering if anyone could help me out with a minor issue that’s holding my project back quite a bit. I’m very, very new to electronics, so let me warn you of that.

I’m using the tutorial below to reduce the RPM on a small motor, but the RPM is way too high.

Materials:

  • 9 v battery
  • 9 v motor
  • 50k pot (also have 500 ohm)
  • 2N2222 transistor
  • 1K ohm resistor
  • Small diode reading 4001 424
  • Arduino Uno

Video (try to ignore music if possible):

Code:

int potpin = A0;
int val;

void setup() {}
void loop() {
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 225);
analogWrite(3, val);
delay(15);
}

Diagram:

Attached (does not include pot, which is included in video).

Everything is working as it should now that I have it set up, the pot is being read and the speed is reduced, except that I’m looking to slow it down to 0-10RPM. Is this even possible? Is it something I’m missing in the code? I’ve tried to alter “val = map(val, 0, 1023, 0, 225);” but it never seems to make any difference.

Thanks!

Please post your code . That website is unsafe. It's a phishing website.
Post your code if you want any help.

I’m so sorry, I wasn’t aware.

int potpin = A0;
int val;

void setup() {}
void loop() {
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 225);
analogWrite(3, val);
delay(15);
}

That was the code given on the site

Attached is the diagram also given

You probably can not slow down the rpm so slow.
What is the rpm at 9v ?
You can change the rpm, but don’t expect to get it to low, or to accurate (if there is a load on the motor it will differ from if there is no load).

If you want really low rpm, try a stepping motor. Or maybe a gear reduction.

Post any information you have about the motor ( photo)

the pot is being read and the speed is reduced, except that I'm looking to slow it down to 0-10RPM. Is this even possible? Is it something I'm missing in the code?

So you are saying that turning the pot knob up increases the speed , turning it down reduces it but the CCW pos (minimum speed position) is not slow enough ?

Try changing this:

val = analogRead(potpin);
val = map(val, 0, 1023, 0, 225);
analogWrite(3, val);

To this:

int val = 1
// val = analogRead(potpin);
// val = map(val, 0, 1023, 0, 225);
analogWrite(3, val);

or this:

int val = 2
// val = analogRead(potpin);
// val = map(val, 0, 1023, 0, 225);
analogWrite(3, val);