Hi friends recently i bought a servo driver along with a motor from robokits i ve given the connections as given in the manual... i tried to send commands to it through my arduino diecimila tx pin but for some reason am not able to get it to work... somebody pl help me... thanx in advance... the program am using is
I purchased the same motor driver/controller from Robokits. I couldn't get the N1 command to work either. So, I emailed the company and they responded promptly with the follow example:
/Example for running Mitusmi Drive commands using Arduino/
void setup() {
Serial.begin(38400); // Setting the serial Baud Rate to 38400.
}
void loop()
{
Serial.print("N1 129330 10000"); // N1 Command ( N1 Position_Count Speed) // Set the position count and speed according to the motor and encoder used.
Serial.print("\r"); // Carriage Return
delay(8000); // delay to reach the mentioned postion.
Serial.print("N1 0 5000");
Serial.print("\r");
delay(8000);
}
Apparently, you need to have a single space between the N1 and position number. In the documentation it shows no space. Confusing the issue, the P command works with no space. The documentation is extremely poor, but the driver/controller is great! As I learn more, I will post here.
Have anyone got it working well with all the commands ?
Can someone suggest me how to just start and stop the motor atlest using those commands . Its been almost 5 days i am working with these things but nothing seems going right for me.
In the documentation they have said about Torque control mode under loading . Any idea how this can be done ?
I bought couple of PID controllers. Just curios in case anyone has been able to run using those command given in documentation supplied by Robokits. Appreciate reply/
Connect the motor to RKI-1576 (GND, VCC, EN A, EN B, M-, M+) . Connector 2 per the datasheet
Connect 12V Power supply to the adjacent power port.
On the Connector 1 side, connect the TX0 to Arduino Pin 1, RX0 to Pin 0, VDD to 5V powerpin, GND to GND of powerpin of Arduino.
You may want to changed the Arduino USB Driver’s baud rate to 38400 (from 9600).
Key in the following code into your Arduino IDE.
void setup() {
Serial.begin(38400); // Setting the serial Baud Rate to 38400.
}
void loop()
{
Serial.print(“N1 19840 1000”); // N1 Command ( N1 Position_Count Speed) // Set the position count and speed according to the motor and encoder used. //Serial.print(“P 10”);
Serial.print("\r"); // Carriage Return
delay(5000); // delay to reach the mentioned postion.
Serial.print(“N1 0 5000”);
Serial.print("\r");
delay(5000);
}
Click on the Serial Monitor and Change the bottom right drop box to show this : “Carriage Return” and “38400 baud”.
Switch on the 12V power supply and Connect your Arduino to Computer. Upload the above code. Open the Serial Monitor and Type P 1000, P 19840, P 9820 … and you should see your motor moving.