CAD CAM EDM DRO - Yahoo Group Archive

Re: Encoder on spindle question

Posted by KalleP
on 2011-07-28 13:22:26 UTC
Hi Ron,

Hope the breakout board was the culprit.

If you need an accurate phase you will need to use a 1:1 encoder and
locked speed as mentioned by Dave for threading.

If the index (or A/B) pulses are a bit narrow you can square them up
with a divide by 2 circuit (clocked D-type flip flop or the low bit
on a binary counter) This will make the reading of the pulse
reliable in software. The parallel port only has one interrupt
typically implemented on the ACK pin and in the past I have seen
this implemented as edge and level sensitive and on either edge on
various boards so I would not rely on that feature too much without
testing.

Jitter is most likely to be due to low sampling rate.

Unless you have an unlikely analogue A/B output encoder (used by
specific controllers for interpolation between the steps for special
applications) then it should have clean digital signals and
debouncing should not make any difference.

A DMM may also read false frequency on the index signal because of
the low duty cycle and squaring up this signal should give
consistent results there too.

Kalle
--
Kalle Pihlajasaari
Johannesburg, South Africa

> > > If I use the index, Mach never sees it. If I use either channel, the
> > > index light (on the diagnostics page of Mach3 turn) will pulse slowly.

> > > I am guessing the pulse width is too narrow for mach to read. My


> > Adding a counter won't help, it will still not set the phase of the
> > index pulse. Add a single pulse per turn encoder and it MAY work, but
> > for it to work either the spindle must be a closed loop system (for
> > constant speed) or be massive (so it doesn't change speed as the tool
> > contacts the work.)
> >
> > Dave 8{)

> Fixed. Sort of. I found that the pin I was using on the C-10 breakout
> board was bad. I switched to pin 13 and it's working. I was able to use
> any output of the encoder to send pulses to Mach3, but the numbers were
> way too high. I then used the pulley setup as a programmable divider to
> get the numbers in the ball park. There is still some jitter in the
> readout. Maybe noise? I played with the debounce settings to no avail. I
> really didn't think the encoder output would need debouncing, anyway.

Discussion Thread

Ron Thompson 2011-07-26 11:33:41 UTC Encoder on spindle question David G. LeVine 2011-07-26 18:24:34 UTC Re: [CAD_CAM_EDM_DRO] Encoder on spindle question Ron Thompson 2011-07-27 07:05:45 UTC Re: [CAD_CAM_EDM_DRO] Encoder on spindle question KalleP 2011-07-28 13:22:26 UTC Re: Encoder on spindle question Ron Thompson 2011-07-28 13:41:05 UTC Re: [CAD_CAM_EDM_DRO] Re: Encoder on spindle question