I'm trying to figure out how to control the speed of a 12V DC motor with an arduino and a 12V battery.
I want to split the «power» and «control» parts of the circuit so the Arduino and sensors receive only 5V.
So far, this is what I've tried :
I am able to control the speed of the motor by changing the PWM of pin 3 on the Arduino. This opens the NPN transistor (BUF654).
The problem is that the speed of the motor doesn't change enough.
From 0% to 50% PWM on pin 3, the motor is stalled.
Above 50%, the motor is nearly reaching its maximum speed.
I wonder if I would be able to have a linear variation :
0% - 10% : very slow
10% - 20% : slow
20% - 50% : normal speed
50% - 80% : fast
80% - 100% : RELEASE THE KRAKEN!
Here are the voltage and current the motor draws when using only a battery, or the previous circuit :
+----------------------------+---------+--------+
| Directly on 12V battery | 12.7 V | 61 mA |
+----------------------------+---------+--------+
| Arduino circuit (100% PWM) | 12.47 V | 60 mA |
+----------------------------+---------+--------+
| Directly on 9V battery | 9 V | 54 mA |
+----------------------------+---------+--------+
| Arduino circuit (60% PWM) | 9 V | 52 mA |
+----------------------------+---------+--------+
What have I done wrong? Could the problem come from my motor?
No comments:
Post a Comment