error led blinks 8x, not in the user manual

General discussion of using Roboclaw motor controllers
Post Reply
Posts: 3
Joined: Thu Sep 14, 2023 3:20 pm
error led blinks 8x, not in the user manual

Post by zdwiel »

The following reliably occurs on my Roboclaw 2x45 when rapidly increasing duty cycle request:

- The status starts at 0, everything OK.
- Then it moves on to code 1073741824, which is 0x40000000, and not in the user manual
- After 70ms, the error code switches to 0x40011000
- After 10ms, it then switches to error code 4096. The current measurement just prior to code 4096 is 36.43 amps which is the highest value over the entire sequence. The current limit is set to 60 A and I am polling current measurements at 100 hz.
- At this point the error light begins to blink 8 times and then pause, 8 times then pause, etc.

2 Questions:

1) what code error code 0x40000000 mean?
2) what does 8x blinks mean?

Neither of these are described in the manual. I understand over current limit error if the current goes over 60 A in the 10 ms between when it reports 36.43 amps and over current is detected. Would still like to understand the other error codes though.
Posts: 3
Joined: Thu Sep 14, 2023 3:20 pm
Re: error led blinks 8x, not in the user manual

Post by zdwiel »

After running a few more experiments, there is a potentially related problem which is that even when I set max current to 60A, I frequently get max current errors at around 35A or 40A. I have the motors freely turning and controlled via a 0.25 hz sin wave. It will run for a few minutes and then stop with a motor 1 current error and 8x blinks on the LED. I'm logging the current use in this sin wave and it's only ever hitting maximum 40A so I have no idea why it would be getting max current limit. I am also logging board Temperature 1 and Temperature 2 and neither goes about 38C.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Updated Error/Warning Blink codes. Not yet updated in the user manual

Post by Basicmicro Support »

Updated Error and Warning bit masks.
#define ERROR_NONE 0x00
#define ERROR_ESTOP 0x01
#define ERROR_TEMP 0x02
#define ERROR_TEMP2 0x04
#define ERROR_MBATHIGH 0x08
#define ERROR_LBATHIGH 0x10
#define ERROR_LBATLOW 0x20
#define ERROR_FAULTM1 0x40
#define ERROR_FAULTM2 0x80
#define ERROR_SPEED1 0x0100
#define ERROR_SPEED2 0x0200
#define ERROR_POS1 0x0400
#define ERROR_POS2 0x0800
#define ERROR_CURRENTM1 0x1000
#define ERROR_CURRENTM2 0x2000
#define ERROR_MBATLOW 0x4000

#define WARN_NONE 0x000000
#define WARN_OVERCURRENTM1 0x010000
#define WARN_OVERCURRENTM2 0x020000
#define WARN_MBATHIGH 0x040000
#define WARN_MBATLOW 0x080000
#define WARN_TEMP 0x100000
#define WARN_TEMP2 0x200000
#define WARN_S4 0x400000 //HOME, LIMITF, LIMITR
#define WARN_S5 0x800000 //HOME, LIMITF, LIMITR
#define WARN_OVERREGENM1 0x40000000
#define WARN_OVERREGENM2 0x80000000

0x40000000 is a Regen overcurrent warning. During this warning deceleration is limited to reduce regen current. This would not cause a blink error code.

0x10000 is a Over Current warning. During this warning the motor is free wheeled to reduce current. This is done actively so the average current remains at or below the current limit set.

0x1000 Is a Over Current ERROR. This happens if the current in a single cycle(1/20000th of a second excedes 200% of the maximium current limit set. This causes a 9 blink error and shutsdown the motor channels(both). Please double check your blink count.

A 8 blink count would be caused from a Position Error which could only trigger if you have set the Position Error Limit setting and are using Position control.

This assumes you are using the latest firmware.

Please provide a description of your setup(motor models/specs, battery/power source etc). The more infor the better, for example how everything is wired can effect noise.

Changing the speed/power smoothing with a sign wave input(are you using analog inputs or converting that into a RC pulse or sending packet serial commands) shouldn't cause any massive current spikes so unless your load is high this could be a noise problem.

Please list any settings changed you have made that are not the defaults. That may help determine the problem as well.

Also, are you basing the current draw on the Roboclaw readouts or from a current clamp meter of your own(or something similar)? If the later the current at the power source/battery is almost never the current at the motor(only when duty is at 100%). For example if the current at the battery if 40 amps and the duty is 50% the motor is pulling 80 amps. If Duty was 25% the motor is pulling 160amps etc...
Posts: 3
Joined: Thu Sep 14, 2023 3:20 pm
Re: error led blinks 8x, not in the user manual

Post by zdwiel »

Thanks for the error/warn messages.

As for your questions:

- We are using the latest firmware
- motor specs: 24V custom brushed motors. They consume about 170 W with no load, 900 W fully loaded. We don't have winding resistance/inductance measured yet
- battery power specs: 24V 80A power supply + LiPo battery with 50 A continuous, 250 A peak rating
- we are controlling the RoboClaw via USB (packet serial) with a USB isolator between the computer and roboclaw. We plan to switch to UART once we like how they are running, but want to work out these bugs before taking the time to do that
- current draw is all from RoboClaw readouts being sampled at 100 hz. I understand power supply current and motor current will be different
- qaud encoders are used for both motors

Since posting, we have tested with other 2x45a motor controllers to see if the problem was unique to this particular board. Turns out it is unique to this one board. However the other boards have different problems. All boards were tested on the same rig so computer, power supply, battery, motors, etc are all identical:

- 1 has the problems listed above
- 1 works fine on channel A, but not B (even if we swap motors)
- 1 works fine on channel B, but not A (even if we swap motors)
- 1 works fine on both channels, but has a high pitch whine that none of the others do
- 1 works fine 1 channel, but the other channel can only move in one direction

When we took one of the heatsinks off of a board where an entire channel wasn't working, the FET had clearly burned up with solder sprayed nearby on the board and on the thermal pad.

In all of these cases where the channel doesn't work, it never works, right from the start, fresh from the box.

Post Reply