Configuration

General discussion of using Roboclaw motor controllers
IagoMonroy
Posts: 6
Joined: Sat Feb 22, 2020 8:29 am
Configuration

Post by IagoMonroy »

Hello there:

I´m trying to build up an autonomous differential robot. My question is: Which configuration should I adapt? A controller for the two front wheels and another controller for the two rear wheels or a controller for the wheels on the left side and another one for the wheels on the right side?

Thank you.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Configuration

Post by Basicmicro Support »

I'd recommend one for front and one for back if you want 4 wheel independent control.
IagoMonroy
Posts: 6
Joined: Sat Feb 22, 2020 8:29 am
Re: Configuration

Post by IagoMonroy »

Hello, it's me again:

How should I configure my software? Right now I have only one roboclaw_driver, should I duplicate it?
And what about messages and all this stuff?

Thanks.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Configuration

Post by Basicmicro Support »

You can make a simple 4 wheel rover with a single Roboclaw. Both left motors on one motor channel and both right motors on the other channel.

Autonomous doesn't necessarily imply motor encoders(eg you could be autonomous with just a gps module) so you will need to tell me if you or plan to use motor encoders? Note even with encoders you will almost certainly need other sensors, preferably a complete IMU. Wheels slip so basing all movement off the encoders is almost certain to fail for an autonomous robot.

Please describe you planned rover in as much detail as you can.
Konkurs101
Posts: 7
Joined: Tue Oct 20, 2020 9:43 am
Re: Configuration

Post by Konkurs101 »

Yes, you'll need to be able to account for terrain differences, unless you're only going to let your rover drive over a perfectly flat surface. It has to be able to detect something unpracticable on its path (a steep grade, an unmovable obstacle, water...) and, possibly, to find a way to deal with it.
Even if you're just doing experiments inside, that rover has to be able to find its way through a simple set of obstacles like a slalom course.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Configuration

Post by Basicmicro Support »

Even with a perfectly flat surface you cant assume your measurements are perfect. The narrow the tires are the better but even then there are differences in from one wheel to the next and the with of the wheel is still non-zero. Every defect and ever difference in movement(catching one edge of a tire or the other) will cause error in absolute position measurements. Some external method of correcting for these errors is basically required. Walls on a maze for example, or gps as stated in a previous measage. Anything that can correct periodically for the actual position can be used but pure encoder readings from wheels will have enough error to lose accurate positioning within seconds in most cases.
IagoMonroy
Posts: 6
Joined: Sat Feb 22, 2020 8:29 am
Re: Configuration

Post by IagoMonroy »

Hello, it´s me again:

I am currently having some issues with the ion studio and a Roboclaw 2x45A.
First of all, when I try to do autotune,the software freezes. I've already tried some of the possible solutions that you suggested in other post of the forum (inverting encoders and tuning manually) but the motors seems to be uncontrolled. Even if I sync both of them, they sepparately first and then together...

Then, I tried to manually introduce values to the PID and then move the scroll bar but some whistle went out from the roboclaw. Can you helpe me? I´m kinda new to this stuff and I´m a bit lost.

Thank you.


Update:

I realized that the issue is related to the second channel of my 2x45A Roboclaw. I have 4 motors and I tried to autotune every one of them with the roboclaw and the result is always the same, channel 2 freezes MotionStudio and a tiny whistle coming out from the roboclaw. May this be due to some electronic issues inside the controller or should I try the filtering solution that you gave to other colleagues in the forum?

Update 2.0:

It seems to be an E-Stop after autotuning the motor of the channel number 2.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Configuration

Post by Basicmicro Support »

Adjust the current blanking window on Motor 2. A false over current can cause the autotuner to freeze.

Values between 8 and 10% are usual.
IagoMonroy
Posts: 6
Joined: Sat Feb 22, 2020 8:29 am
Re: Configuration

Post by IagoMonroy »

Exactly the same, motor continues running and it doesn't stop after pressing autotune (5.3% before - 8.5% now).

In fact, right now, it does the same in both motors.

Update: the 2x45A controller doesn't seems to save the settings for some reason even if I write and save them.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Configuration

Post by Basicmicro Support »

All Roboclaw have the current blanking setting. They all use the same firmware with modifications for current limits. Make sure after you set it you click Write Settings under the Device menu.

Failing with a false over current would stop the motors. If you motors continue running in autotuning it is usually because the encoders are not being read correctly(eg the encoders are not connected or running reverse relative to the motor. We do try to detect the latter case but it doesnt always work.

Make sure you can read the encoders chaning using the PWM Settings screen(run the motor forward and backwards and make sure the encoder readings look reasonable.

Post Reply