Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoder precision, poor in atmega328 #59

Open
DrStein99 opened this issue Feb 1, 2019 · 2 comments
Open

Encoder precision, poor in atmega328 #59

DrStein99 opened this issue Feb 1, 2019 · 2 comments

Comments

@DrStein99
Copy link

Between the two interrupts available to count the quadrature signals on Atemga328, it is really too much work for this device. I found by adding a quadrature decoder component between the encoder and arduino, i was able to get precision from the highest speed at 24 volts tested with flauhauber micro geared motors with 512 point encoders. These motors were pulled from factory pick and place machines from a wafer production lab.

A quadrature signal simply sends too much information for arduino to keep up with, and have enough time left over to be useful for anything else, and struggles for timing to drive pwm accel curve for the output. With the decoder, it divided the encoder rise and fall edges and produced a common step and direction signal that the 2 interupts had time to handle.

I can not remember which one of the books I have my notes in for the project, after I find it I can show you the part # and some more facts of the test results.

I appreciate your work on the s curve calculation. i was trying (and failing) so much with it myself.

@DrStein99
Copy link
Author

Ok I found my book. I used hc7474 flip-flops. The quadrature decoder components were ls7183 ls7184. but I only found them in SMD and they were expensive. The hc7474 cost about nothing. I use them every time I had a hand-encoder wheel for menu on an LCD interface, since the code seemed to bug out and skip without using the flip flops. It wound up work out great on the encoder reader project I tested.

@misan
Copy link
Owner

misan commented Feb 3, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants