Hi
I have a school project where we need to control a dc motor of robot with a arduino and shield, but i'm new to arduino and can't figure out how to control the torque of a dc motor with an arduino.
The problem is that I would like to use a DC motor where I reduce the rpm wich would result in a increase of torque, as is seen in the graph.
But how do you describe this in your sketch, I used the code below.
#include "DualVNH5019MotorShield.h"
DualVNH5019MotorShield md;
void setup()
{
Serial.begin(115200);
Serial.println("Dual VNH5019 Motor Shield");
md.init();
}
void loop()
{
int i = 380;
md.setM1Speed(i);
Serial.print("M1 current: ");
Serial.println(md.getM1CurrentMilliamps());
}
But when you set te value low (so low speed) then you should have a high torque and low speed, when you set the value high then you would have a low torque and a hight speed.
but when we test this with the motor then you see that the torque is at its highest when the value is the highest and then also the speed is at it's highest.
And when you decrease the value than the speed is lower but also the torque is much less.
BTW we use at school an adjustable power source for the motor shield, and when we only use this power source and not the arduino with shield then torque increase when the rpm decreases as decribed in the graph
My question is how can I get a high torque with a low speed (rpm) as described in the graph using my arduino mega 2560 and pololu vn5019 motor shield ?