Hello Guest it is March 28, 2024, 01:30:03 PM

Author Topic: PoKeys57CNC, spindle speed measurement jumps like hell  (Read 5098 times)

0 Members and 1 Guest are viewing this topic.

PoKeys57CNC, spindle speed measurement jumps like hell
« on: March 18, 2017, 08:12:16 PM »
Hi folks,

I'm new to the forum, but got a decent (and probably not easy to solve) issue: I've got a PoKeys57CNC and just converted my lathe from an parallel port interface. For spindle speed measurement, I use a CNY 37 with an index disc, directly mounted on the spindle. This setup worked quite well with the parallel port interface so far (including threading on my lathe under mach3).

Now, after re-wiring everything, I've got signal levels from on the output of the CNY 37 between 0.04 V (low) and 2.3 V (high). It is wired to the index input to the PoKeys57, Pin 13 (Encoder I). Those signals look quite nice on the oscilloscope, right frequency. When looking at the PoKeys diagnostic screen, Pin 13 is turned on and off when turning the spindle by hand - fine so far. I've configured the spindle speed measurement in the Plugin configuration as "Index (lathe)" with 1 tick per rev. Threading support is turned on. Spindle feedback ratio is set to 1

Now to the strange thing: When (and only when) the spindle is turned, at exactly each pass of the index hole, the measured and in the DRO "True RPM" displayed value for the true spindle speed jumps like hell between totally arbitrary and quite large values. That is true for all rpms from nearly DC (turning by hand) to its max speed of 2000 rpm.

Those speed measurement values are so large that when turning with constant surface speed, the axes of the lathe always run at full speed - which for sure is no option for working with it.

Anyone got a good idea how to solve this jumpy behavior of the index? I've got already a low-pass-filter infront, but that does not help.

Attached are some pics, also a youtube video: https://youtu.be/7k_iY3MVh2Y

With best regards,
    Carsten
Re: PoKeys57CNC, spindle speed measurement jumps like hell
« Reply #1 on: March 22, 2017, 05:59:17 PM »
I just want to document the solution to everyone. Obviously, it was an EMC problem in my control box. Steps to the solution:

1. Increase the ultra fast encoder filter setting in the mach4 plugin settings to 100.
2. Add a (~22 kHz) low-pass filter to the CNY37 output.
3. Add a Schmitt-Trigger behind the filter.

Attached is the schematic, which will do the job and give a very stable spindle speed measurement.

Regards,
    Carsten
Re: PoKeys57CNC, spindle speed measurement jumps like hell
« Reply #2 on: April 09, 2017, 02:47:06 PM »
Hi Carsten.  I'm designing a control for a mill, and thinking a lot about EMI and ground loops.  You've gone after both of those with your optocoupler and low pass filter.  I'd bet the Schmitt trigger wasn't crucial, but certainly doesn't hurt! When I looked at the scope traces, It seemed to me like there was a halo effect, and that maybe it was high frequency noise... I'm thinking you might be seeing EMI from the VFD.??  Although you did say it was bad when you turned the spindle by hand.... Hmmm.

Anyway, great to see a real-world noise problem, and an effective solution. Nice work and thanks for sharing it.

Ray 
Re: PoKeys57CNC, spindle speed measurement jumps like hell
« Reply #3 on: May 02, 2017, 11:25:17 AM »
Maybe you can help. I'm having a problem with the same type of thing. I've got the pokeys57cnc and everything works on my lathe; just didn't have the encoder yet. So I hooked up an encoder from CNC4PC yesterday and setup the pokeys plugin. My encoder is 500PPR so I set that. I don't always get a value of '0' when the spindle is off, but when it's on, no matter what the RPM is it reads something in the 10,000-11,000 range. It's not consistent it jumps all over the place. It doesn't ever stay in one number range it's constantly changing like in your video.

Now I haven't used the shield wire of my encoder, but I'll try that when I get home. I'm a novice with electronics so I'm not sure I understand what you did to yours.