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 » Thu Nov 12, 2020 3:15 pm

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: 1463
Joined: Thu Feb 26, 2015 9:45 pm

Re: 360° endless with quadro encoders (closed loop)

Post by Basicmicro Support » Tue Nov 17, 2020 7:01 pm

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 » Wed Nov 25, 2020 1:04 pm

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?

Post Reply