Encoder question.

Questions about using encoders with the Roboclaw product line
Post Reply
Denver
Posts: 13
Joined: Mon Oct 02, 2017 3:36 am

Encoder question.

Post by Denver » Wed Dec 13, 2017 2:16 am

Hi,
I have finally progressed to the encoder side of things and have run into a problem. The encoder I would like to use is not reading

https://www.ebay.com.au/itm/Rotary-Enco ... 4b14c3183e

I have tried a different style of encoder although I would prefer not to use this type for mounting reason and it appears to work except I loose connection when doing the auto tune.
Question 1 - Why could I be loosing connection with the second encoder when trying to auto tune ?
I don't loose connection on pwm screen no matter what I do.
Question 2 - Any ideas why the first encoder will not work ? If I need something like a pull up resistor could you please put up a diagram of how to connect correctly as now that I have finally got this far I don't want to stuff anything up.

Many Thanks

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

Re: Encoder question.

Post by Basicmicro Support » Wed Dec 13, 2017 10:26 am

The encoder you linked to probably needs pullup resistors to function properly. Usually when an encoder supports a range of voltages it requires pullup resistors. The documentation for the encoder should show how pullups should be connected but basically you connect a 1k-10k resistor from each encoder signal line to the 5v on the Roboclaw. The lower the resistor is the harder it will pull so it will be less suseptible to noise. The encoder documentation should recommend the correct resistor value or range of values that can be used.

The connection problem during autotuning may be due to motor noise crashing the USB connection. You may need to use a USB cable with a ferrite choke(looks like a barrel near the end that plugs into the Roboclaw). The autotuner can put much higher transient loads on the motor than the PWM screen is capable of which could explain why you dont see any problem when manually running the motor.

Also the autotuner will fail and possible lock up if the encoder is not working properly. Make sure the encoder increases in value when the motor is moving forward(forward can be determined by running the motor in the PWM settings screen and moving the motor slider UP).

robg
Posts: 8
Joined: Mon Aug 07, 2017 11:48 pm

Re: Encoder question.

Post by robg » Wed Feb 14, 2018 7:46 pm

Thanks IMC support!

Just came across this forum note ,10K pullups installed on the encoder outputs and works perfectly.
On a full swing of the worm drive motor has a total range of 6447, it's pretty accurate +/- 2
Is there a method to store the position value if power is unexpectedly lost on roboclaw?

Thanks,

Rob.

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

Re: Encoder question.

Post by Basicmicro Support » Thu Feb 15, 2018 9:42 am

No. There is no method to automatically store the position of the incremental encoders on power loss.

In general this is pointless since external forces could move the encoder while powered off causing the value to be incorrect. The only way garunteed to work would be a battery backup that powered the encoders constantly. This is how the expensive industrial systems work but that is outside the scope of our product line currently.

robg
Posts: 8
Joined: Mon Aug 07, 2017 11:48 pm

Re: Encoder question.

Post by robg » Fri Feb 16, 2018 11:39 am

I guessed as much but thanks anyway.

Having worm drives not so much of an issue in my application.

Post Reply