Is thre any DRO encoders that connects to PC

A bit of math before claiming that, will reveal that even with a 20MHz RISC, you won't come much above 500kHz for a _single_ axis. To implement a quadrature-counter, you need a state-machine or you will count glitches. The int-routine will need about 20 cycles, the adding-routine (minimum width 24 bits) also 20. That are 40 cycles, so only

500kHz. If you have more than one channel, you can well need 50% more for the int-routine.

Nick

Reply to
Nick Mueller
Loading thread data ...

I was responding to a post where the poster estimated that a microcontroller would only be good to about 1mhz or so. I was merely pointing out how fast

1 mhz was compared to machines operating in inches per minute.

So at 500kHz we could only track 11,811 inches per minute, on .250" per revolution we need to limit the lead screw to 47,244 RPM. This doesn't seem like a limitation that justifies adding hardware. I would estimate that you could track 3 encoders, 10 micron per count, at 5,000 rpm per 4 TPI lead screw and still have over 50% of your processor left for buttons and display. Just doesn't seem like that bad of a limitation to me.

Reply to
Roger_N

That was my take as well. Anyone having a machine capable of those kinds of speeds is very likely going to be using commercial off-the-shelf electronics anyway.

Reply to
Don Foreman

So the answer goes to the one before you: No, it is not just a simple counter and a uC @ 1MHz will not count at 1 MHz. But certainly at 1 milli-Hz (SCNR, but you wrote that two times).

OK, so _I_ should have done some more math _before_ barking at you. Sorry!

11000 inches per minute are "reasonably" fast.

Nick

Reply to
Nick Mueller

What are the mfg. and numbers of those QE chips, Nick?

b

Reply to
buffalo

Karl,

If he doesn't take it, I would like to have it if I can get some more info on it.

Thanks

b.

"Karl Townsend" wrote in message news:4597a707$0$28821$ snipped-for-privacy@auth.newsreader.octanews.com...

Reply to
buffalo

There is one called LS7366 that I see in my schematic ... That mfg has other ones.

Nick

Reply to
Nick Mueller

I still maintain this won't work.

Consider what happens if the machine is sitting right on an A phase transition and subject to a little vibration. You will see the A phase oscillating, incrementing that counter, with nothing happening on the B phase. So of course you ignore that.

Okay, so what if the machine is progressing, and both counters are going up, A leading B, you interpret that is up counts.

But what if the machine vibrates on a B transition? Now you will have a few extra B counts, and B will appear to be leading A, so you will think you are going backwards while in fact you are just going forwards with noise.

Counting the phases will only work if you manage to poll it before the count exceeds a very small value (1 I think, maybe 2, but certainly less than four - half to think about that more), otherwise you will not track the encoder accurately.

If the micro was not quite fast enough to interpret the raw counts this might help "latch" the state slightly, though I suspect the overhead of interpreting it might cost more time than the extra allowance it adds.

Reply to
cs_posting

Noise and anomalous inputs can screw up any system unless the design spec defines what noise and anomalies must be tolerated and the implementation, whether hardwired or a SW algorithm, meets that spec. One might also say that uC's typically use flash memory nowadays, which may start "forgetting" after a decade or so while hard-wired logic doesn't have that issue -- providing no failures occur among the considerably more numerous solder joints and chips. And so on.

Let's move back from specifics a bit to the basic hdwe vs uC question. An all-hardware implementation is essentially a sequential state machine because the essence of QE is the time sequence of four possible states described by two binary inputs: 00, 01, 10 and 11. A microcontroller can emulate (be) a state machine. A solution comprised entirely of digital logic chips would be considerably faster than a uC state machine -- but a similar state machine implemented in a 20 MHz RISC low-end uC would be way plenty fast enough for this application and would use fewer chips.

Both approaches can work (or not), each approach has its advantages. Use whichever suits you best!

Reply to
Don Foreman

It is done all the time, Nick, and it works well. OTOH, there are custom chips, or use a couple CMOS "Glue" chips for a few cents each to convert the quadrature outputs to a direction line, and pulse outputs. The first circuit I saw for this was over 40 years ago. It was used to count how many people entered and left a room. It was built with DTL or RTL logic.

Reply to
Michael A. Terrell

I think we both agree how QE works and how it is decoded. I still think, that for a serious metrological application in a tool machine, only quadrature-counters have their place. Albeit, looking into a Mitutoyo digital micrometer screw, they do use just a uC to count the pulses from a QE. But they also give a maximum speed that is really low (not for a micrometer).

My point was, that Don oversimplified things (and went wrong).

Nick

Reply to
Nick Mueller

Thanks.

Reply to
buffalo

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.