Roboclaw 2X15 getting too hot in PID mode

Questions about using encoders with the Roboclaw product line
User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby Basicmicro Support » Mon Jul 02, 2018 9:02 am

Also, one last thing. Please post the code you were using to test with so I can run it.

George
Posts: 12
Joined: Fri Jul 01, 2016 6:05 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby George » Mon Jul 02, 2018 10:02 am

// sample code to test roboclaw controller
//See BareMinimum example for a list of library functions

//Includes required to use Roboclaw library
#include "RoboClaw.h"

RoboClaw roboclaw(&Serial1, 10000);

float constP = 100.0;
float constI = 1;
float constD = 0.0;
//const QQPPS = 7200 rpm * 2048 PPS(encoder) * 4 = 120 r/sec * 2048 *4 = 983,040 max
int constQQPS = 950000;


int motorSpeed = 0;
int motorAccel = 50000;

//use default roboclaw serial settings
#define address 0x80

int pwm1 = 10;
void setup() {
//Open roboclaw serial ports
roboclaw.begin(38400);
Serial.begin(9600);
}

void loop() {

uint8_t status1, status2, status3, status4;
bool valid1, valid2, valid3, valid4;
uint16_t Temp1;
uint32_t Speed;
int16_t pwm1;
int16_t pwm2;

//set roboclaw
roboclaw.SetM1VelocityPID(address, constP, constI, constD, constQQPS);
roboclaw.SpeedAccelM1(address, motorAccel, motorSpeed);

// ramp up speed on the motor
while ( motorSpeed < 850000) {
motorSpeed = motorSpeed + 50000;
roboclaw.SpeedAccelM1(address, motorAccel, motorSpeed);
Serial.print("SetSpeed:");
Serial.println(motorSpeed);

int sum_speed = 0;
for (int j = 0; j < 20; j++) {


for (int i = 0; i < 10; i ++) {

Speed = roboclaw.ReadSpeedM1(address, &status1, &valid1) ;
sum_speed = sum_speed + Speed;
delay(100);
}

Serial.println(sum_speed / 10);
sum_speed = 0;

}
}


// slow down the motor
while ( motorSpeed > 60000) {

motorSpeed = motorSpeed - 50000;
roboclaw.SpeedAccelM1(address, motorAccel, motorSpeed);
Serial.print("SetSpeed:");
Serial.println(motorSpeed);

int sum_speed = 0;
for (int j = 0; j < 60; j++) {


for (int i = 0; i < 10; i ++) {

Speed = roboclaw.ReadSpeedM1(address, &status1, &valid1) ;
sum_speed = sum_speed + Speed;
delay(100);
}

Serial.println(sum_speed / 10);
sum_speed = 0;

}
}

Serial.println("End loop");
//stop motor
pwm1 = 0;
motorSpeed = 0 ;
roboclaw.SpeedAccelM1(address, motorAccel, motorSpeed);


//cool down the controller and motor
for(int i = 0; i < 6; i++){
delay(10000);
Serial.print("Delay ");
Serial.println(i *10);
}
Serial.println("End delay");



}

George
Posts: 12
Joined: Fri Jul 01, 2016 6:05 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby George » Mon Jul 02, 2018 10:18 am

Hi,

Thanks a lot for testing the motor and controller setup that I sent you.
Our application requires us to run the motor up to 6500 rpm (887467 pps with our quadrature encoder) outside in high heat (up to 110 deg F). We typically run about 25-30 tests about 10 minutes in duration each with 2-5 minute setup in between tests. On most of our tests we run only up to 4000rpm but it is important to to able to run at 6500rpm for some applications and we'd like to design for that. Most of the time we increase the motor speed in linear fashion at about 100 rpms per second ( so about 10 seconds to increase speed about 1000 rpm) but we also have applications where we need to go from 0 to 6000 rpm in about 5 seconds so it would be great to be able to design for that since our battery bank can provide that much power. Previously I used a pwm drive of my own design with high power MOSFETS (IRF3703) and never had an issue with power delivery but I like your solution since it includes PID controller. I am willing to try the controller you are suggesting as long as you are pretty sure it would work reliability since that is most important.

User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby Basicmicro Support » Tue Jul 03, 2018 9:19 am

The maximum current rattings on the Roboclaw assume a 25C ambient temp. At 44C you are cutting out about 1/3rd of your continuous current range and peak has dropped to about 45 amps on a 2x30A controller.

For high temp operation I recommend moving up one model to give yourself more room.

On my test setup I found a top speed of 850000pps using 24v. Using velocity PIDs you really should never try to hit 100% speed. The reason for this is there is now no room to compensate for errors below the requested speed(eg you are no longer regulating the motor speed). Depending on the load( how it may change) and the motor you may want to only use 80 or 90% of the maximum speed when running a PID.

I'll run your test code, probably tomorrow, and see if I find any problems.

George
Posts: 12
Joined: Fri Jul 01, 2016 6:05 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby George » Tue Jul 03, 2018 10:23 am

Hi,

Thanks for the advice. Can you possibly test the setup with your Solo 60 controller? If it works well I'd like to purchase one for additional testing since it seems like one of the best options from you.

Thanks

George
Posts: 12
Joined: Fri Jul 01, 2016 6:05 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby George » Tue Jul 03, 2018 11:53 am

Hi,

Please try running the controller in the bridged mode since that is how I was running it when it failed. I'd like to use bridged mode if it is reliable since that should double current handling capability of the controller.

Thanks

User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Roboclaw 2X15 getting too hot in PID mode

Postby Basicmicro Support » Thu Jul 05, 2018 9:03 am

I will be able to test a Solo60 with it next week sometime.

I will test bridged mode as well. Note that when using bridged mode if you update the firmware or reset the settings(either from the buttons on the controller or by packet serial command) and/or disable the bridged mode you can/will damage the controller if it is still wired for bridged mode.


Return to “Velocity and Position Control”

Who is online

Users browsing this forum: No registered users and 2 guests

cron