Using RC control for brushed motors

General discussion of using Roboclaw motor controllers
pglau
Posts: 6
Joined: Sat Mar 11, 2017 4:51 pm

Using RC control for brushed motors

Postby pglau » Sun Nov 12, 2017 9:21 pm

I'm attempting to connect to a 15A Roboclaw via RC control.

I'm set to "RC Mode 1" (One flashing light when checking Mode) and "TTL Flip Switch" for the Setting.

When I send a sweep of "servo" from -1.5 to 1.5 the motor only seems to run in one direction. In fact it seems like when I send RC "+1" the motor is stopped (I read voltage = 0) and then comes up to full speed at a setting of -1.5 (I read full voltage on motor channel)

Is there a way so that the motor runs full speed one direction at 1.5 and then full speed the opposite direction at -1.5 with 0.0 = stopped?

I'm assuming it must be some setting I've not set correctly. (I'm very new to RC, so this may be obvious to somebody with experience.)

Thanks in advance for your help.

User avatar
IMC Support
Posts: 718
Joined: Thu Feb 26, 2015 9:45 pm

Re: Using RC control for brushed motors

Postby IMC Support » Mon Nov 13, 2017 10:33 am

RC mode defaults to autocalibrate the signal. If you are programmatically generating RC pulses you should enable MCU mode. This disables the autocalibration.

Autocalibration looks for the intiial incoming pulses and uses them to set the zero(middle) point. You program is probably starting at either -1500 or 1500us pulse widths so the zero is getting set at one end or the other, hence the reason it will only drive the motor in one direction.

pglau
Posts: 6
Joined: Sat Mar 11, 2017 4:51 pm

Re: Using RC control for brushed motors

Postby pglau » Tue Nov 14, 2017 7:32 pm

Thank you. Setting it to "TTL Flip and MCU Enabled" seems to have helped. The motors now run in the forward and backward direction.

When I send -1 or +1, I get full voltage output in both directions. (In my case, this is about 7.4v +/-)

Setting '0' stops the motors as expected.

However I'm not getting linear results when adjusting between 0 and 1 vs -1 and 0.

For example, if I set +0.3 pulse I get 3.84v on both motor channels. If I set it to -0.30 pulse I get 3.08v

Likewise for +0.40 pulse = 5.01v and -0.40 pulse = 4.25v. The motors run at distinctly different speeds between the + and - pulses of the same values.

Is this expected behavior?

Thanks again for your help.

User avatar
IMC Support
Posts: 718
Joined: Thu Feb 26, 2015 9:45 pm

Re: Using RC control for brushed motors

Postby IMC Support » Wed Nov 15, 2017 10:24 am

When MCU mode is enabeled the pulse width range is constant. So 1520us is stopped(eg 0). +400us to -400us is the range.

Also note that some motors run better in one direction than the other. The commutator may be shifted slightly so it works best in one direction which can cause results like you are seeing.

Also you will need to expand on what you mean by the numbers in your post. I expect you are using some command but you dont say what. For best results you should check your actual pulse widths with a scope to see what is really being generated.

pglau
Posts: 6
Joined: Sat Mar 11, 2017 4:51 pm

Re: Using RC control for brushed motors

Postby pglau » Thu Nov 16, 2017 6:19 pm

Thank you for the information, I am using the roboticape servo commands on Beaglebone Blue which are expressed in a normalized manner between -1.5 = 600us to +1.5 = 2400us. I think think this might explain the discrepancy.

I've adjusted my code to send raw pulse widths (rc_send_servo_pulse_us) instead of normalized and it seems much closer to the numbers you describe.

Thanks for the help.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest

cron