Author Topic: Quadrature encoder decoder chip.  (Read 5233 times)

0 Members and 1 Guest are viewing this topic.

Online firewalker

  • Super Contributor
  • ***
  • Posts: 1380
  • Country: gr
Quadrature encoder decoder chip.
« on: October 06, 2011, 06:43:28 PM »
Is there any chip for decoding quadrature encoders?

E.g.



When encoder at rest: Out-1, Out-2 to LOW.
When encoder CW: Out-1 pulsing according to the speed of turning the encoder.
When encoder CCW: Out-2 pulsing according to the speed of turning the encoder.


I know it can be done with an mcu (I have already implement it). I was wondering for a specific ic for the job.
Become a realist, stay a dreamer.


Offline buxtronix

  • Contributor
  • Posts: 25
  • Country: 00
Re: Quadrature encoder decoder chip.
« Reply #1 on: October 06, 2011, 10:11:50 PM »
The MAX7360 has a rotary decoder, but wont give the output you want (it is i2c).

You're probably better off implementing it in a small MCU, its easy to get it to run with
one chip and no external components. And probably cheaper. Unlikely that there is
anything that gives exactly what you want.

Online FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Quadrature encoder decoder chip.
« Reply #2 on: October 07, 2011, 01:11:24 AM »
Not sure I understand what you are after but the system you describe made in think 'mouse' as a first thought. A single axis of the mouse would give you what you need, or if you need two discrete channels then use both axis. Any good for you?
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG

Offline Zad

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: Quadrature encoder decoder chip.
« Reply #3 on: October 07, 2011, 05:11:17 AM »
Should be a pretty simple state machine. If you can't find a custom chip for the job then a PIC10 or 12 should be easy to configure.

Online firewalker

  • Super Contributor
  • ***
  • Posts: 1380
  • Country: gr
Re: Quadrature encoder decoder chip.
« Reply #4 on: October 07, 2011, 06:23:42 AM »
I have already made what I want with an AVR.

I was wondering if there was a chip just for the job that would be potentially cheaper.
Become a realist, stay a dreamer.


Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 517
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: Quadrature encoder decoder chip.
« Reply #5 on: October 07, 2011, 08:45:32 AM »
I have already made what I want with an AVR.

I was wondering if there was a chip just for the job that would be potentially cheaper.

You can get a PIC10F204T-I/OT for £0.38 from Farnell (1 off), I doubt if you'll find a dedicated chip cheaper than that.

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 3057
  • Country: 00
  • An EEE (Eternal Electronics Enthusiast)
Re: Quadrature encoder decoder chip.
« Reply #6 on: October 07, 2011, 05:22:28 PM »
I have already made what I want with an AVR.

I was wondering if there was a chip just for the job that would be potentially cheaper.

I don't think it will be cheaper, thats why it doesn't exist and they don't make it, its too expensive to design and produce such chip and probably will not sell either, this from chip maker's perspective.

Offline Hero999

  • Super Contributor
  • ***
  • Posts: 3368
  • Country: 00
Re: Quadrature encoder decoder chip.
« Reply #7 on: October 08, 2011, 04:10:28 AM »
The cheapest PIC is just over half the price of the cheapest AVR in RS Components: ATTINY4-TSHR costs £0.64 and the PIC10F200 costs £0.34.

The MCU you've used is probably overkill, use a cheaper one.

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 5601
  • Country: my
  • reassessing directives...
Re: Quadrature encoder decoder chip.
« Reply #8 on: October 08, 2011, 12:04:05 PM »
The cheapest PIC is just over half the price of the cheapest AVR in RS Components: ATTINY4-TSHR costs £0.64 and the PIC10F200 costs £0.34.
The MCU you've used is probably overkill, use a cheaper one.
i dont think attiny is overkill. i've done this exactly encoder with pic10f206, my limitation is it only can encode reliably up to ~100rpm. if i have 4x processing speed, it will be able to do up to 400rpm. this type of state machine is about speed, if your system got high rpm.

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 2021
  • "Don't turn it on - Take it apart!"
Re: Quadrature encoder decoder chip.
« Reply #9 on: October 08, 2011, 01:15:14 PM »
Have you tried the MSP430? Even the cheapest one can run at up to 16MHz with most instructions only using one cycle.
Electrical engineering would be a lot more fun if I looked like Tiffany Yep. As if it's not fun enough already...

In power electronics, transistors should ideally be either fully on or fully off, because a half-on transistor just makes a really poor imitation of Tiffany Yep...

Online firewalker

  • Super Contributor
  • ***
  • Posts: 1380
  • Country: gr
Re: Quadrature encoder decoder chip.
« Reply #10 on: October 08, 2011, 10:07:11 PM »
Well, the Attiny2313 was the first chip I found in my drawers with two external interrupts pins (there will be two quadrature encoders, and four outputs two for every encoder).

Alexander.
« Last Edit: October 08, 2011, 10:14:08 PM by firewalker »
Become a realist, stay a dreamer.


Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 2021
  • "Don't turn it on - Take it apart!"
Re: Quadrature encoder decoder chip.
« Reply #11 on: October 08, 2011, 11:51:53 PM »
Since its only task is to decode a quadrature encoder, try using polling instead of interrupts. On most processors, interrupts have a significant latency.
Electrical engineering would be a lot more fun if I looked like Tiffany Yep. As if it's not fun enough already...

In power electronics, transistors should ideally be either fully on or fully off, because a half-on transistor just makes a really poor imitation of Tiffany Yep...

Offline buxtronix

  • Contributor
  • Posts: 25
  • Country: 00
Re: Quadrature encoder decoder chip.
« Reply #12 on: October 09, 2011, 12:42:21 AM »
Indeed, if the only thing your MCU is doing is decoding this, then polling is the way to go. Interrupts only make sense if your MCU has to also do something else.

Any MCU should be able to decode these at thousands of RPMs, unless your routine is complex. I have a routine that has 3 lines of logic code (and immune to switch bounce). Thats a pretty tight loop.

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 5601
  • Country: my
  • reassessing directives...
Re: Quadrature encoder decoder chip.
« Reply #13 on: October 09, 2011, 01:12:17 AM »
Interrupts only make sense if your MCU has to also do something else.
or you want low powered (sleep), or there's not much rotation going on, like non continuous or only once a while in a day.
« Last Edit: October 09, 2011, 01:15:25 AM by Mechatrommer »

Online Rufus

  • Super Contributor
  • ***
  • Posts: 1766
Re: Quadrature encoder decoder chip.
« Reply #14 on: October 09, 2011, 02:01:50 AM »
my limitation is it only can encode reliably up to ~100rpm. if i have 4x processing speed, it will be able to do up to 400rpm. this type of state machine is about speed, if your system got high rpm.

Stating encoder rpm without stating encoder lines is completely meaningless. My rough estimate is a polled loop in a PIC10F2xx should be able to track about 1.5 million lines/minute.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf