Timeline for Quadrature encoder - Most efficient software implementation
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 15, 2024 at 13:44 | vote | accept | JMaravalhasSilva | ||
| Mar 13, 2018 at 20:55 | history | edited | JMaravalhasSilva | CC BY-SA 3.0 | added 416 characters in body; deleted 97 characters in body; added 41 characters in body |
| Mar 13, 2018 at 20:29 | history | edited | JMaravalhasSilva | CC BY-SA 3.0 | Added test results |
| Mar 9, 2018 at 9:42 | comment | added | user76844 | On that level i am sure i already have it done... | |
| Mar 9, 2018 at 9:40 | comment | added | TonyM | @GregoryKornblum, but you could simply detail and explain the method plus areas of concern and how to resolve them, like we do on this site. C'mon, it's really not that big a problem at all. I've done a good few of these and they've worked first time and every time. Can I ask did you understand all the reasons for the problems you had? Sounds like you had more trouble than I'd expect. | |
| Mar 9, 2018 at 7:45 | comment | added | user76844 | Sorry, it's impossible without specification. How many axes in the system? Control requirements? Anything? You know, garbage in, garbage out... | |
| Mar 9, 2018 at 7:43 | comment | added | TonyM | @GregoryKornblum, oh, good :-) Can you revise your answer with an actual recommended solution, rather than just lots of "do's and don'ts" comments. They read as quite heavy-handed. If you know what needs to be done, best to show that rather than post a stream of dark warnings. Thanks. | |
| Mar 9, 2018 at 7:36 | comment | added | user76844 | @tonym oh yes! This is exactly what I want! | |
| Mar 9, 2018 at 7:33 | comment | added | user76844 | You will waste much more if you don't do it right. Mcu with qep are cheap and available. TI, NXP, Microchip, ST, you name it... | |
| Mar 9, 2018 at 7:32 | comment | added | TonyM | @GregoryKornblum, you want a denouncer? :-) | |
| Mar 9, 2018 at 7:31 | comment | added | JMaravalhasSilva | Sure, I agree with selecting appropriate components for the right situations, but microcontrollers are cheap, and this implementation is light on CPU resources given it's just shuffling a few bits around every once in a while. It also scales easily given that you could check multiple channels in the same interrupt. Also, one may need a specific microcontroller for a given application that doesn't have a quadrature decoder (or only has one and you need two? etc), in which case using a decoder IC or a PLD is a waste of money given that a microcontroller can do this easily. | |
| Mar 9, 2018 at 7:13 | comment | added | user76844 | You havr to select appropriate components, no way to escape that. Three encoder interfaces are common. If you need more, like a dozen, use a small pld. Otherwise you are going to create a chimera. | |
| Mar 9, 2018 at 7:11 | comment | added | JMaravalhasSilva | @GregoryKornblum I will edit the question to make it clear that I mean microcontrollers and not FPGAs. Also, sure a lot of microcontrollers have a peripheral to handle this, but a lot also don't, which is why I'm posting this question. Not only that, what if you were to control multiple motors with the same microcontroller? | |
| Mar 9, 2018 at 7:11 | comment | added | user76844 | Ok, but LPF is still required. | |
| Mar 9, 2018 at 7:09 | comment | added | JMaravalhasSilva | If you poll the signals at a constant frequency, even if your motor stops right near the edge of one of the channels, you will just oscillate between 2 states, which is fine, because as soon as the motor moves away from that position, the next iteration will have no problems knowing in which state you are. If you were to implement this using interrupts and the motor stopped in the same way, the CPU would register a bunch of state transitions so fast that it might lose some. | |
| Mar 9, 2018 at 7:05 | comment | added | user76844 | Besides, in a microcontroller there should be quadrature encoder peripheral, and the op seems to be talking about fpga. | |
| Mar 9, 2018 at 7:01 | comment | added | user76844 | Why no need for denouncer? | |
| Mar 9, 2018 at 6:51 | history | answered | JMaravalhasSilva | CC BY-SA 3.0 |