Dual RX50 Motor Driver w/Quadrature Encoder Decoder

Dual RX50 test program w/encoder feedback for MAVRIC-IB or MAVRIC-IIB.

Demonstration program only - this program commands the motors to spin up to full speed and back down, reversing, and repeat. This program can be used as the basis for advanced motor control using PID and other algorithms.

NOTES:

  • Uses locked anti-phase h-bridge drive

  • Full quadrature decoding supported, clocks at 4 times native encoder resolution

CONNECTIONS:

  • Motor 0 PWM : PORTB6 -> RX50 IN1 PWM

  • Motor 0 ENA : PORTD6 -> RX50 EN1 Enable

  • Motor 1 PWM : PORTB7 -> RX50 IN1 PWM

  • Motor 1 ENA : PORTD7 -> RX50 EN1 Enable

  • Encoder 0 Phase A : PORTE4

  • Encoder 0 Phase B : PORTE5

  • Encoder 1 Phase A : PORTE6

  • Encoder 1 Phase B : PORTE7

RX50 JUMPERS:

  • EN1-2 : installed

  • IN1-/2 : installed

Sample program is here.