FIT0441_Brushless_DC_Motor_with_Encoder_12V_159RPM - jimaobian/DFRobotWiki GitHub Wiki
This is a new brushless DC motor with the added bonus of a built-in motor driver - this means it doesn't need any external motor drivers and you can connect it to an Arduino directly!
The motor comes with direction control, PWM rotational speed control and frequency feedback output. It is suitable for miniature-sized mobile robotic platforms. With the motor speed feedback signal, it is useful in cyclic control systems.
- Operating Voltage: 12V
- Motor Rated Speed: 7100-7300rpm
- Torque: 2.4kg*cm
- Speed: 159 rpm/min approx.
- Reduction ratio: 45:1
- Signal cycle pulse number: 45*6 (Each cycle outputs 6 pulse)
- Control mode:
- PWM speed control
- Direction control
- Feedback pulse output
Label |
Name |
Description |
1 |
black |
POWER- (GND) |
2 |
red |
POWER+ (12V) |
3 |
yellow |
FG frequency feedback output |
4 |
white |
PWM Control, 0-5V |
5 |
blue |
Direction Pin: |
Here is a example how to use this motor, Just follow the guide, and you will get it work.
### Requirements |
First, prepare the following hardware and software.
-
Hardware
- UNO x1
- Motor x1
-
Software
- Arduino IDE V1.6.5 Click to Download Arduino IDE
### Connection Diagram |
After the hardware, the module is connected with the UNO in the following diagram.
- Open the Arduino IDE and copy the following code to the IDE. Select your board's serial port and the board type (e.g. Arduino UNO) and upload the sample code.
- Open the Serial monitor.
- Enter a number between 0 and 255 to set the motor's speed. (0: Maxmum speed; 255: Stop)
- The code will alternates its rotation direction every 5 seconds.
int i = 0;
unsigned long time = 0;
bool flag = HIGH;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(10, OUTPUT); //PWM PIN 10 with white line
pinMode(11, OUTPUT);//direction control PIN 11 with blue line
}
void loop() {
// put your main code here, to run repeatedly:
if (millis() - time > 5000) {
flag = !flag;
digitalWrite(11, flag);
time = millis();
}
if (Serial.available()) {
analogWrite(10, Serial.parseInt()); //input speed (must be int)
delay(200);
}
for(int j = 0;j<8;j++) {
i += pulseIn(9, HIGH, 500000); //SIGNAL OUTPUT PIN 9 with white line,cycle = 2*i,1s = 1000000us,Signal cycle pulse number:27*2
}
i = i >> 3;
Serial.print(111111 / i); //speed r/min (60*1000000/(45*6*2*i))
Serial.println(" r/min");
i = 0;
}
If you have any questions or cool ideas to share, please visit the DFRobot Forum |
buy from dfrobot store or dfrobot distributor list