Asked — Edited
Resolved Resolved by Dunning-Kruger!

Sabertooth/Kangaroo With Different Motor/Encoder Combination

Since I know some of you have used the Sabertooth and Kangaroo I figured I would ask opinions.

I have decided on the Parralax Arlo base for my next robot chassis. I will use the caster's from parralax.

I will most likely be using the Sabertooth and kangaroo combination for motor controller/PID but I am not decided on this and open to suggestions.

I also find myself in a heated mental debate between the wheel/motor combination from parralax or the Zagros Rex motors and wheels combined with the Sabertooth/Kangaroo.

Item 1:

One of the key items for me is how well the encoders between the two different motor/wheel sets works with the Sabertooth and kangaroo.

Item 2:

The other item floating in my mind is the ground clearance between the two motor/wheel sets. It seems at least to me that the Zagros wheels would provide more ground clearing but since the base plate of the chassis provides stability to the base platform I am not really sure if using the Zagros motors are feasible.

Item 3:

Since I am going to build a body, arms and head on top of the base the torque and weight carrying ability is important.

Item 4:

I need to be able to control both the position and speed of the motors at the same time. For example example I should be able to have to robot move lets say 1 feet at a certain speed.

I know this is kind of an open ended questions but if anyone have used any of these wheel/motor combinations please provide your 2 cents as it relates to the items listed above.

I appreciate any comments or insights you guys can provide.


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#81  

Not the ezb, all of my subsystems are usb to the onboard computer.

PRO
USA
#82  

Ok, I'll check my hardware leftovers to replicate an example.

PRO
USA
#84  

David,

I've attached the Arduino Project which includes the DigitalWriteFast library.

Explanation: with an arduino uno/mini you have 2 interrupts: Interrupt 0 is attached to Pin 2 (used for the Left Encoder) Interrupt 1 is attached to Pin 3 (used for the Right Encoder)

Left Encoder: Phase A = Pin 2 Phase B = Pin 5

Right Encoder: Phase A = Pin 3 Phase B = Pin 4


#include "Arduino.h"
#include "digitalWriteFast.h"

#define SHOW_INTERVAL 1000

#define LEFT_ENCODER_INT    0 
#define LEFT_ENCODER_PINA   2
#define LEFT_ENCODER_PINB   5

#define RIGHT_ENCODER_INT   1 
#define RIGHT_ENCODER_PINA  3
#define RIGHT_ENCODER_PINB  4

volatile bool leftEncoderBState=0, rightEncoderBState=0;
volatile long leftEncoderTicks=0, rightEncoderTicks=0;
volatile long leftEncoderLastTicks=0, rightEncoderLastTicks=0; 

unsigned long nextShowMillis=0;

void setup()
{
  Serial.begin(115200);

  //Left Encoder
  pinMode(LEFT_ENCODER_PINA, INPUT);
  digitalWrite(LEFT_ENCODER_PINA, LOW);
  pinMode(LEFT_ENCODER_PINB, INPUT);
  digitalWrite(LEFT_ENCODER_PINB, LOW);
  attachInterrupt(LEFT_ENCODER_INT, LeftEncoderInterrupt, RISING);

  //Right Encoder
  pinMode(RIGHT_ENCODER_PINA, INPUT);
  digitalWrite(RIGHT_ENCODER_PINA, LOW);
  pinMode(RIGHT_ENCODER_PINB, INPUT);
  digitalWrite(RIGHT_ENCODER_PINB, LOW);
  attachInterrupt(RIGHT_ENCODER_INT, RightEncoderInterrupt, RISING);
}
 
void loop()
{
  if (millis() > nextShowMillis) 
  {
    nextShowMillis += SHOW_INTERVAL;

    Serial.print("Left Encoder: Ticks=");
    Serial.print(leftEncoderTicks);
    Serial.print(" Ticks p/sec=");
    Serial.print(leftEncoderTicks-leftEncoderLastTicks);
    Serial.print("\n");
    leftEncoderLastTicks = leftEncoderTicks;

    Serial.print("Right Encoder: Ticks=");
    Serial.print(rightEncoderTicks);
    Serial.print(" Ticks p/sec=");
    Serial.print(rightEncoderTicks-rightEncoderLastTicks);
    Serial.print("\n");
    rightEncoderLastTicks = rightEncoderTicks;
  }
}
 
void LeftEncoderInterrupt()
{
  leftEncoderBState = digitalReadFast(LEFT_ENCODER_PINB);
  leftEncoderTicks += leftEncoderBState ? -1 : +1;
}

void RightEncoderInterrupt()
{
  rightEncoderBState = digitalReadFast(RIGHT_ENCODER_PINB);
  rightEncoderTicks += rightEncoderBState ? -1 : +1;
}

TestQuadEncoder1.zip

#85  

Thank you. I have company coming over it seems so too many distractions right now. I will check it out hopefully after they depart my humble abode.

Thank you for putting this together. I have been doing some research on the topic of using the Fast Digital IO code project. Mainly just reading at this point, but am understanding why you would want to use it.

PRO
USA
#86  

No problem, try to hook both motors, full power (12V) and check the values, then switch off the left motor, and check if the right encoder ticks per second are more or less the same. This away you will know if you are losing ticks when both motors are up.

PRO
USA
#87  

I'm not familiar with Kangaroo, but it seems is a popular device.

Is straight forward the connection to EZB ? Why no plugin ? Or there's nothing to control/monitor via EZB ?

#88  

Its really easy to hook up. There are many different modes that it runs in. Most of them you just send a serial command. These commands can be quite different depending on the mode it is in.

There is a control for it under H-Bridges, but I think most send serial as needed.