I have bought a CQRobot Metal DC Geared Motor w/Encoder with Metal Mounting Bracket -12V/40RPM /80Kg.cm
From the specs:
This is a Gear Motor w/Encoder, Support 6V and 12V working voltage, for Projects Such as Robot, Custom Servo, Arduino and 3D Printers.
- No-load Speed: 6V - 20 RPM / 12V - 40 RPM (Plus/Minus 10%).
- Locked-Rotor Torque: 6V - 46Kg.cm / 12V - 80Kg.cm.
- Rated Torque : 6V - 11.5Kg.cm / 12V - 20Kg.cm.
- Wiki: http://www.cqrobot.wiki/index.php/Metal_DC_Geared_Motor_w/Encoder_CQGB37Y001
The schematics suggested
The nodeMCU has this pinout
I used this nice class from OutOfCheeseError to control the motor.
1 | from machine import Pin, ADC, PWM |
1 |
|