Go Down

Topic: Controlling the speed of a dc motor? (Read 1 time) previous topic - next topic


Yes, that is exactly the same but without the direction control and without potentiometer.
Be sure to get all polarities correct and also be sure you have the right components.
If you do not hve the exact same components as described in those schematics (either one of them), report back here to ask about differences.
Ofcourse you will have to tell us what parts you do have.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html


I have 2n3904 transistors (if that matters) and everything else. Do I need to use a resistor before the transistor? How will it effect it?


Can those 2n3904's handle the current needed by the motor?

The resistor on the base limits current. The idea is to select a base resistor, given the motor current, such that the transistor will be driven into saturation.  That's a fancy way of saying that the transistor is really, really on and can't get any more on if it tried.

At the same time you don't want to try and draw more than the max per-pin current out of the MCU drive pin.


So i set up everything as that example, but with a 2k resistor, a 9v battery, a 2N3904 transistor(also an NPN so it shouldn't matter) and instead of a potentiometer for PWM I'm using a button that increases the value by 15 each time it's pushed.

Nothing happens until the value gets to 255 then it kicks on. Any thoughts that may help me?

I could post the code but I don't think that's where the problem is.


So, no code and no schematic?
Good luck.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up