DC Motor Jerky Rotation

249 views
Skip to first unread message

Dav Lemberg

unread,
Dec 18, 2018, 12:22:58 AM12/18/18
to LINOROBOT

Hi everyone,

I'm getting some very strange behavior from the front right DC motor. Below is a video of what is going on followed by some more info..


I'm currently at step 2.3.1 Driving the robot in the Linorobot wiki. The above video shows what happens when I try to move the robot. Doesn't matter what movement key I use, the right front motor freaks out as soon as I press a key. When I release a movement key the two rear motors stop, the front right motor continues to freak out and the front left motor very slowly turns. Seems like the only thing that stops the freakout is if I reboot the machine or hold down a movement key. When a movement key is held down, the robot drives. Again if I release a key, freakout.

I've traced every wire twice, checked the motor driver with an extra one and checked the motor with a couple extra motors I've had. Voltages look good across all the components. I believe it's getting enough power. I'm missing something somewhere.

Anyone have any ideas what the problem might be?

DC Motors: Faulhaber 2342L012CR Gear 64:1 Encoder 12CPR
Micro Controller: Teensy 3.2
Robot Computer: Odroid XU4

lino_base_config.h (bottom part of file was omitted)
#ifndef LINO_BASE_CONFIG_H
#define LINO_BASE_CONFIG_H

//uncomment the base you're building
//#define LINO_BASE DIFFERENTIAL_DRIVE // 2WD and Tracked robot w/ 2 motors
// #define LINO_BASE SKID_STEER      // 4WD robot
// #define LINO_BASE ACKERMANN       // Car-like steering robot w/ 2 motors
// #define LINO_BASE ACKERMANN1      // Car-like steering robot w/ 1 motor
#define LINO_BASE MECANUM         // Mecanum drive robot

//uncomment the motor driver you're using
#define USE_L298_DRIVER
// #define USE_BTS7960_DRIVER
// #define USE_ESC

//uncomment the IMU you're using
#define USE_GY85_IMU
// #define USE_MPU6050_IMU
// #define USE_MPU9150_IMU
// #define USE_MPU9250_IMU

#define DEBUG 1

#define K_P 0.6 // P constant
#define K_I 0.3 // I constant
#define K_D 0.5 // D constant

//define your robot' specs here
#define MAX_RPM 120               // motor's maximum RPM
#define COUNTS_PER_REV 768       // wheel encoder's no of ticks per rev
#define WHEEL_DIAMETER 0.10       // wheel's diameter in meters
#define PWM_BITS 8                // PWM Resolution of the microcontroller
#define LR_WHEELS_DISTANCE 0.400  // distance between left and right wheels
#define FR_WHEELS_DISTANCE 0.330   // distance between front and rear wheels. Ignore this if you're on 2WD/ACKERMANN
#define MAX_STEERING_ANGLE 0.415 // max steering angle. This only applies to Ackermann steering



dingo erz'rt

unread,
Dec 18, 2018, 2:53:51 PM12/18/18
to LINOROBOT
so, no matter what motor you use, it's the same bahaviour?

and what does it do if you upload a simple motor test to the teensy?

Dav Lemberg

unread,
Dec 18, 2018, 3:08:22 PM12/18/18
to LINOROBOT
Yes, same behavior when I rotate the motors.

I found the the bottom link for running a DC motor on teensy. Is this good for a test or is there something better?

http://little-scale.blogspot.com/2017/05/teensy-36-basics-using-dc-motors.html?m=1

dingo erz'rt

unread,
Dec 18, 2018, 3:53:59 PM12/18/18
to LINOROBOT
which motor driver do you use?

find an arduino example for <your motor driver>

Dav Lemberg

unread,
Dec 18, 2018, 3:57:50 PM12/18/18
to LINOROBOT
Reply all
Reply to author
Forward
0 new messages