RC control of a 2x7a in analog mode.

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: RC control of a 2x7a in analog mode.

Post by Basicmicro Support »

1. Dont confuse RC/Analog control with Quadrature/Analog encoder feedback. They are two separate things

2. The pot on the retracts will be used as the encoder feedback. The limits of the travel can be set using the min and max position settings in IonStudio. You will need to wire the pot up so it has a 0v to 2v swing preferably. Anything more than 2v is clipped internally and if you have a smaller range you lose position resolution.

3. Once you have everything wired you need to manually test the system in Ion Studio. Do not change the control mode to Analog yet(leave it at Packet serial). In General Settings set the encoder mode for the motor to Absolute. Then use PWM Settings to manually move the retracts up and down(carefully of course). When the motor slider is moved UP the enocder value for that motor should increase. If it does not you need to invert the encoder channel, reverse the motor in software OR manually changing the wiring so it does increase when moving the slider UP. Obviously moving it DOWN should cause the enocder position to decrease.

4. Carefully determine the minimum and maximum position values for the encoders. Enter these values in the Position Settings window.

5. You need to determine an approximate QPPS value for the encoder. This value is the maximum enocder count change per second for your setup. If your retracts are slow enough you can determine this experimentally. If they are too fast for that you will need to determine it based on the gearing and maximum RPM of the motor. If you need help with this part I suggest you call in to support so we can help you calculate it.

6. You can use the autotuner to tune for PD(recommended position PID mode for something like this) or you can manually tune the P and D settings. I is not necessary in most cases when using POTs as feedback.

7. Once you have tuned things and can move the retracts up and down using the position slider you need to save the settings(Device Menu).

Post Reply