I have an atmega16 that interfaces to a motor with a quadrature encoder sensor. Turns out the frequency of the pulses are much more than my little 4Mhz can handle (the micro does other things as well!) As a result, the motor control isn't very accurate, nor does it react very fast. SO.. I'm looking for either a quadrature decoder IC that can take the load off (will calculate position/velocity and interface to a host micro via serial/parallel bus), OR, a beefy microcontroller with built- in decoders (and pwm output). 32-bit with lots of GPIO is ideal if going the microcontroller route.
Recommendations for a Quadrature Decoder IC or MicroController
Started by ●July 30, 2008
Reply by ●July 30, 20082008-07-30
benn wrote:> I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!) > As a result, the motor control isn't very accurate, nor does it react > very fast. > > SO.. I'm looking for either a quadrature decoder IC that can take the > load off (will calculate position/velocity and interface to a host > micro via serial/parallel bus), OR, a beefy microcontroller with built- > in decoders (and pwm output). 32-bit with lots of GPIO is ideal if > going the microcontroller route.Quad counters are less common Peripherals than they should be. A CPLD is often the solution, and can count very fast. I think the xmega may have mentioned a Quad mode - not sure of their sample status. -jg
Reply by ●July 30, 20082008-07-30
"benn" <benn686@hotmail.com> wrote in message news:33157349-c306-4837-a17c-23a8d245bfa3@u12g2000prd.googlegroups.com...> I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!)Are you sure? How do you read the quandrature signals? If you use a Pin Change Interrupt on both signals, it appears to me that you can very quickly check which way the motor turns and in- or decrement a counter. In assembly of course. Shouldn't take more than a couple of microseconds on an ATmega. Meindert
Reply by ●July 30, 20082008-07-30
"benn" <benn686@hotmail.com> wrote in message news:33157349-c306-4837-a17c-23a8d245bfa3@u12g2000prd.googlegroups.com...>I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!) > As a result, the motor control isn't very accurate, nor does it react > very fast. > > SO.. I'm looking for either a quadrature decoder IC that can take the > load off (will calculate position/velocity and interface to a host > micro via serial/parallel bus), OR, a beefy microcontroller with built- > in decoders (and pwm output). 32-bit with lots of GPIO is ideal if > going the microcontroller route. >Hello Benn, Look at ST Cortex High Density parts: fits your spec quite well, has quad decoders, motor control timer stuff, reasonably large RAM and Flash, 144 pin parts if you neeed a lot of IO. I hope they work OK because I have just designed one into a new project but the boards are not built yet (about 2 weeks away). Michael Kellett www.mkesc.co.uk
Reply by ●July 30, 20082008-07-30
On Tue, 29 Jul 2008 23:18:06 -0700 (PDT), benn <benn686@hotmail.com> wrote:>I have an atmega16 that interfaces to a motor with a quadrature >encoder sensor. Turns out the frequency of the pulses are much more >than my little 4Mhz can handle (the micro does other things as well!) >As a result, the motor control isn't very accurate, nor does it react >very fast.You haven't mentioned much about your situation, such as the motor's rate, the number of A/B transitions per revolution, etc. You might be okay with what you have, but just need to think more closely about the details to make it work cleanly. Hard to do anything more than accept your conclusion, though, without more info.>SO.. I'm looking for either a quadrature decoder IC that can take the >load off (will calculate position/velocity and interface to a host >micro via serial/parallel bus), OR, a beefy microcontroller with built- >in decoders (and pwm output). 32-bit with lots of GPIO is ideal if >going the microcontroller route.There is (or was) an expensive HP part that I've used in the past, as well, the HCTL-2020. It is designed for the purpose and works well, but you pay for it when you find it. A separate micro would be cheaper, I think, but you've have to code it up. I'll leave the do-all micro recommendations to others. Jon P.S. I've handled motors running at 250 RPM (actually, I controlled the motor speed, too, and 250 RPM was the max), coupled to optical encoders with 10000 A/B transitions per rotation (medical pumps.) There is a cam attatched to the motor, so there was also analog conversion of that and a real time graphics display set up to display the home and certain key pulses other than A and B, along with the cam height, so that the workman could adjust the optical encoder relative to the cam shaft to calibrate the motor while spinning (requirement.) I mapped the timing in a hand-drawn paper diagram before attempting the coding. By the time I was writing code (and I did use assembly for some critical parts of it), I'd already resolved the mechanism to use and knew it was sufficient.
Reply by ●July 30, 20082008-07-30
benn wrote:> I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!) > As a result, the motor control isn't very accurate, nor does it react > very fast. > > SO.. I'm looking for either a quadrature decoder IC that can take the > load off (will calculate position/velocity and interface to a host > micro via serial/parallel bus), OR, a beefy microcontroller with built- > in decoders (and pwm output). 32-bit with lots of GPIO is ideal if > going the microcontroller route. >If you can use the SPI port, try the LS7366 quadrature counter. I have used this on my micromouse: http://www.micromouseonline.com/blog/tag/ls7366/ I use a dsPIC but it will work just fine with the AVR. Very easy to use and almost certainly fast enough. Data sheet here: http://www.lsicsi.com/pdfs/Data_Sheets/LS7366R.pdf Pete Harrison www.micromouseonline.com
Reply by ●July 30, 20082008-07-30
"benn" <benn686@hotmail.com> wrote in message news:33157349-c306-4837-a17c-23a8d245bfa3@u12g2000prd.googlegroups.com...>I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!) > As a result, the motor control isn't very accurate, nor does it react > very fast. > > SO.. I'm looking for either a quadrature decoder IC that can take the > load off (will calculate position/velocity and interface to a host > micro via serial/parallel bus), OR, a beefy microcontroller with built- > in decoders (and pwm output). 32-bit with lots of GPIO is ideal if > going the microcontroller route. >Basic interfaces & interface + counter ICs here: http://www.usdigital.com/products/interfaces/ics/ Cheaper than the old HP offerings.
Reply by ●July 30, 20082008-07-30
You might look at: http://www.rabbit.com/products/rio/ "benn" <benn686@hotmail.com> wrote in message news:33157349-c306-4837-a17c-23a8d245bfa3@u12g2000prd.googlegroups.com...>I have an atmega16 that interfaces to a motor with a quadrature > encoder sensor. Turns out the frequency of the pulses are much more > than my little 4Mhz can handle (the micro does other things as well!) > As a result, the motor control isn't very accurate, nor does it react > very fast. > > SO.. I'm looking for either a quadrature decoder IC that can take the > load off (will calculate position/velocity and interface to a host > micro via serial/parallel bus), OR, a beefy microcontroller with built- > in decoders (and pwm output). 32-bit with lots of GPIO is ideal if > going the microcontroller route. >
Reply by ●July 30, 20082008-07-30
On Tue, 29 Jul 2008 23:18:06 -0700 (PDT), benn <benn686@hotmail.com> wrote:>I have an atmega16 that interfaces to a motor with a quadrature >encoder sensor. Turns out the frequency of the pulses are much more >than my little 4Mhz can handle (the micro does other things as well!) >As a result, the motor control isn't very accurate, nor does it react >very fast. > >SO.. I'm looking for either a quadrature decoder IC that can take the >load off (will calculate position/velocity and interface to a host >micro via serial/parallel bus), OR, a beefy microcontroller with built- >in decoders (and pwm output). 32-bit with lots of GPIO is ideal if >going the microcontroller route.Luminary, dsPIC and other chips have QEI interfaces. The Luminary ones have some extra features for speed measurement, IIRC. Many DSPs have them as well... motor control is one of those crossover areas. LSI makes some stand-alone counter chips, or you could use a CPLD or FPGA. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by ●July 30, 20082008-07-30
On Tue, 29 Jul 2008 23:18:06 -0700 (PDT), benn <benn686@hotmail.com> wrote:>I have an atmega16 that interfaces to a motor with a quadrature >encoder sensor. Turns out the frequency of the pulses are much more >than my little 4Mhz can handle (the micro does other things as well!) >As a result, the motor control isn't very accurate, nor does it react >very fast. > >SO.. I'm looking for either a quadrature decoder IC that can take the >load off (will calculate position/velocity and interface to a host >micro via serial/parallel bus), OR, a beefy microcontroller with built- >in decoders (and pwm output). 32-bit with lots of GPIO is ideal if >going the microcontroller route.I had exactly the same problem a while ago - the quadrature output was much faster than my micro could keep up with (even if it wasn't doing anything else!). I successfully used the Agilent (now Avago) HCTL-2022 decoder chip. Very fast & accurate and no "gotchas" (from memory - ymmv). Here's the URL for the datasheet - good luck. http://www.avagotech.com/assets/downloadDocument.do?id=1780&Source=SearchResultPage