Javadoc link
Setup

RoboClaw Motor Controllers

A family of motor controllers which support a wide range of loads.
On a control level this motor controller is very similar to the Sabertooth motor controller.

It has similar ways to control it too.  You can use a usb cable to plug a raspi, tablet or other computer directly to it.  Windows requires a driver to be installed (Windows Driver) from ionmc download page, but the documentation says Linux & Mac will auto load a native driver which will work.

After loading the windows driver I installed the Ion Studio.  It seemed like a well designed (closed source) C# application. It has graphs and counters of position and velocity.  It would be nice to make a similar interface in MyRobotLab.  But something which can control timing & multiple motors ... like this UI + ServoOrchestrator.

 

This is what the documentation said about connecting via USB :

When RoboClaw is connected, it will automatically detect it has been connected to a powered
USB master and will enable USB communications. USB can be connected in any mode. When
the Roboclaw is not in packet serial mode USB packet serial commands can be used to read
status information and set configuration settings, however motor movement commands will not
function. When in packet serial mode if another device such as an Arduino is connected to S1
and S2 pins and sending commands to the RoboClaw, both those commands and USB packet
serial commands will execute
 
There are 4 modes of control just like the Sabertooth
  • RC Control
  • Analog
  • Simple Serial
  • Packet Serial

We will implement Packet Serial for control just as it was done in Sabertooth, since it is the protocol which offers the maximum amount of functionality.

I just re-read the Sabertooth motor control and it appears that Sabertooth supports multiple addresses just like the RoboClaw.  I'll have to consolidate the interfaces.

Wiring diagram for a single RobotClaw.  The MCU could also be a tablet, raspi or other computer with a USB cable the usb port on the controller.

Here multiple RoboClaws could be wired up on a serial line or USB cable.

 

 

 

 

TODO - video of control
TODO - how to set PID and QPPS
TODO - finish script
TODO - auto-tune

MCG Brushless Servo Motor / Encoder 
Serial 13DCME2443-4 (24 VDC)

Renco Encoder 77822-192
(color seems right, but pin numbers in pdf are wrong)

Wires :

Optical Switch
red +5v, blue gnd, yellow home signal - hooked to S4

Motor
red +24v and black gnd

Encoder

Red +5v goes to pin 3 on LM339D chip
black gnd goes to pin 12 on LM339D chip
yellow EN1 toward heat sink
blue EN1 toward edge of board

Velocity Autotune
P - 29221
I  - 7721
D - 0
QPPS - 56118
Deadzone - 500
MaxPos - 10000000

PID
Velocity tuning first to set QPPS
PID Tuning

Example of Values 
 

 

References :

 

Example code (from branch develop):
# TODO: Implement this script fpr
roboclaw = runtime.start("roboclaw","RoboClaw")...

harland

6 years 1 month ago

I am ready to try it when the service is posted

thanks!

Example configuration (from branch develop):
!!org.myrobotlab.service.config.RoboClawConfig
listeners: null
peers:
  serial:
    autoStart: true
    name: roboclaw.serial
    type: Serial
type: RoboClaw