Robot Claw and Ardupilot Mega (ATMega2560)

Hello there! :slight_smile:
I’m trying to get rid of the “dead bandwidth” problem of the servos because strong winds cause my actuator to shake inside the range in which the servo doesn’t respond (that´s the “dead bandwidth”). I am building a stabilized camera platform :smiley: .

So I thought I could buy some dc motors with encoders and use the RoboClaw with them.

The problem is that I don’t use the Arduino UNO, I need to use the Ardupilot mega (ATMega2560 based) instead :unamused: . So I was wondering if it is possible to use the RoboClaw libraries with it or not.

If that is not possible, I could use the RC servo PWM input that the RoboClaw has to control the speed of the motors. The problem is that I need the motors to be drift free :exclamation: , I need to be able to know how to get the motor back to position 0 (for example) with high precision. As I won’t get encoder feedback if I use PWM, that might be impossible to do. Of course that I can compute where the motor “should” be inside my micro controller and work with that, but then the RoboClaw has to do exactly the same even if something blocks the motor temporarily.

Does anybody know what I could do? :question:

Thanks a million!!! :mrgreen:

Correction: When I wrote PWM, I meant PPM

Hello,

We have not tried using the RoboClaw or its library on the Arduino Mega, but it should probably work fine, although you might have to change the pins the example programs use for software serial communication. (They at least compile fine for the Mega 2560).

- Kevin