Trouble running absolute and quadrature encoders on same Roboclaw

Questions about using encoders with the Roboclaw product line
rymnd
Posts: 4
Joined: Fri Nov 16, 2018 10:02 pm

Trouble running absolute and quadrature encoders on same Roboclaw

Postby rymnd » Fri Nov 16, 2018 10:19 pm

I'm having trouble running 2 motors, one with quadrature encoders, and the other with a potentiometer on the same Roboclaw 2x7A.

Motors:
- Pololu 37Dx73L gearmotor
- Actuonix linear actuator with potentiometer

Wiring matches examples given in the documentation: Quadrature encoder is hooked up to ENC1A and ENC1B, linear actuator potentiometer is hooked up with resistor such wiper pin is hooked up to ENC2A.

With this default setup, in Ion Motion Studio I can read the quadrature encoder just fine, but the analog input doesn't change. It typically starts off at 0 or 2047. When running the motor with quadrature encoder, the encoder 2 value will sometimes jump. I have double-checked with a multimeter that the analog voltage output from the potentiometer is reading as expected.

Even more confusing, if I check the option to swap the encoder, I now can only read the analog input, and the encoder 1 value for the quadrature encoder no longer works.

I have reproduced this behavior on multiple Roboclaw 2x7A boards and multiple sets of Pololu and Actuonix motors with the same results. Any suggestions on how else to debug?

User avatar
Basicmicro Support
Posts: 1041
Joined: Thu Feb 26, 2015 9:45 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby Basicmicro Support » Mon Nov 26, 2018 10:26 am

Have you set the encoder mode for Enc2 to analog/absolute? It defaults to qaudrature and from your description is sound like it is still set to quadrature mode.

rymnd
Posts: 4
Joined: Fri Nov 16, 2018 10:02 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby rymnd » Wed Nov 28, 2018 2:54 pm

Yes, the encoder modes are set appropriately for each actuator.

User avatar
Basicmicro Support
Posts: 1041
Joined: Thu Feb 26, 2015 9:45 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby Basicmicro Support » Thu Nov 29, 2018 10:12 am

The reason I ask was because you sepcifically said this in your post, "With this default setup, in Ion Motion Studio I can read the quadrature encoder just fine, but the analog input doesn't change. " And since the default setup does NOT have the encoders set to absolute mode I needed confirmation.

What firmware version do you have installed?

Whan you checked with a multimeter what was the analog output voltage over the full range of motion?

I will setup an analog pot and test this. It will probably be sometime tomorrow morning before I can do that though.

rymnd
Posts: 4
Joined: Fri Nov 16, 2018 10:02 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby rymnd » Thu Nov 29, 2018 7:11 pm

No rush, and no problem. I double-checked and re-did my test cases just in case I did something stupid, but got the same results. Here are my details in full:

Hardware connections:
- quadrature encoder and gearmotor connected to M1 and Enc1
- potentiometer and linear actuator connected to M2 and Enc2

Potentiometer voltage output reads between 0.78V and 1.298V when probing Enc2A and Enc2 ground (-). I never have any issues running either motor through the PWM settings panel. The Enc2 +/- pins are supply 5V as expected.

Ion Studio Configuration 1 (as I would expect it to be set up):
- Encoder 1 set to Quadrature, Encoder 2 set to Absolute, Encoder Swap checkbox NOT selected
- I can read quadrature encoder output through M1 Encoder only. M2 Encoder doesn't change.

Ion Studio Configuration 2:
- Encoder 1 set to Quadrature, Encoder 2 set to Absolute, Encoder Swap checkbox selected
- I can read absolute encoder output through M2 Encoder only. M1 Encoder doesn't change.

Ion Studio Configuration 3 (just messing around):
- Encoder 1 set to Absolute, Encoder 2 set to Quadrature, Encoder Swap checkbox NOT selected
- I can read absolute encoder output through M1 Encoder only when commanding M2 (which is my linear actuator with the potentiometer connected to Enc2). M2 Encoder doesn't change.

Ion Studio Configuration 4:
- Encoder 1 set to Absolute, Encoder 2 set to Quadrature, Encoder Swap checkbox selected
- I can read quadrature encoder through M2 Encoder only when commanding M1 (which is my gearmotor with quadrature connected to Enc1). M1 Encoder doesn't change.

Seems like there's crosstalk somehow? I can always set it such that I can read either encoder, but not both at the same time. The boards are using firmware version 4.1.26 as updated by Ion Studio when I first connected them.

User avatar
Basicmicro Support
Posts: 1041
Joined: Thu Feb 26, 2015 9:45 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby Basicmicro Support » Fri Nov 30, 2018 10:10 am

Donwload and install Basicmicro Motion Studio. As I said in my last message Ion Studio is no longer supported. Please confirm the problem still exists in 4.1.27 firmware(included with Motion Studio).

rymnd
Posts: 4
Joined: Fri Nov 16, 2018 10:02 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby rymnd » Fri Nov 30, 2018 10:40 am

Just re-tried it w/ firmware updated to 4.1.27 and using BasicMicro Motion Studio. Same behavior as before.

Only additional change I noticed is that when I swap the encoder channels in software, which (somehow) allows me to read the absolute encoder but not the quadrature, the absolute encoder value will drop down momentarily whenever I stop running the linear actuator corresponding to the absolute encoder.

User avatar
Basicmicro Support
Posts: 1041
Joined: Thu Feb 26, 2015 9:45 pm

Re: Trouble running absolute and quadrature encoders on same Roboclaw

Postby Basicmicro Support » Tue Dec 04, 2018 10:00 am

Thanks for the update. We had a pot go bad on our absolute encoder test setup so it will be a couple days before the replacement comes in. Please email support@basicmicro and we will email you back once the parts come in and we have run the tests.


Return to “Velocity and Position Control”

Who is online

Users browsing this forum: No registered users and 4 guests

cron