360° endless with quadro encoders (closed loop)

Post your own projects using Roboclaw motor controllers
Post Reply
apointner
Posts: 2
Joined: Thu Nov 12, 2020 2:47 pm
360° endless with quadro encoders (closed loop)

Post by apointner »

Hi there!

I like to buy the MCP2206 Dual 200A, 60VDC Advanced Motor Controller.
But i have question about the control scripting:
I like to know if there is already a solution for 360°position controlling (endless), using Feedback from a quadro encoder (with index).
To explain the problem: The TTL Input Signal goas from 0 rad to 6,28 rad, so the actuator follows right turning from 0 to 360° - fine.
But when the TTL Input gets over 6.28 rad it is 0 rad again! So the actuator follows the signal and turns left (with fullspeed) to meet the 0 rad - and this is wrong.
Instead the controller must note the "turnover" and add a value of 6.28 rad to maintain correct position e.g. +380°.

I use a analog 5V absolute Sensor at the moment:
https://youtu.be/QI70pLFY7gQ
But this comes along with many problems, so i like to change to the MCP2206.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: 360° endless with quadro encoders (closed loop)

Post by Basicmicro Support »

By quadro I assume you mean quadrature encoder? If yes, keep reading.

With quadrature encoders as long as you zero it somewhere you can then use it as an endless(> 360 degree) encoder. HOWEVER you will lose your position when you power down. That is why you need to zero the encoder each time you turn on the system. Eventually you will reach the limit of the internal counter(signed 32 bit value). If you have a system that will actually get there you will need to do something to correct for it, eg re-zeroing the encoder.
apointner
Posts: 2
Joined: Thu Nov 12, 2020 2:47 pm
Re: 360° endless with quadro encoders (closed loop)

Post by apointner »

Thanks very much your answer indeed!
I don't think i'll overshot the 32Bit.
But some questions:
I perform a 4x 360° right roll - let's say +36000 encoder pulses.
Then stop rolling und i shut down the system.
After restart i think the encoder always lost the last pulse value.
And so should the system should be zero again, right?
Which doas not mean the system is re-centered (in my case zero is 0°)!
Can i use the a index pulse from the encoder to re-center after restart?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: 360° endless with quadro encoders (closed loop)

Post by Basicmicro Support »

Quadrature encoders are incremental encoders. That means without power everything goes back to 0. So yes, if you power down and power back on the encoders will read position 0 even if you were at 36000 when you powered down.

Post Reply