Hello Guest it is December 11, 2019, 09:45:20 PM

Author Topic: Need a little spindle encoder timing help  (Read 12698 times)

0 Members and 1 Guest are viewing this topic.

Re: Need a little spindle encoder timing help
« Reply #10 on: December 17, 2007, 10:14:55 PM »
Got the speed control issue under control , a simple jumper in the vfd to choose how the incoming signal is handled, Set it for 0-10 volts and I can now get the shaft rpm to closely match the speed I type in . WIll fine tune it tommorw.

Now just to figure out the erratic rpm readings from the encoder, The instructions for the encoder board on the cnc4pc site show two term (+and-) 5v power in to the board , the three term the optical imterupter hooks to , and then two term for the signal, one labled ground , the other labled signal. I have the 5v in tied to the same regulated 5v power supply I am powering the break out board with, the interuptor was pre wired , the signal term is tied to pin 15 on the breakout board and the grnd which is right beside the signal terminal is tied to one of the ground terminals on the breakout board .
he light on the spindle encoder board is lit when ever the disk is interupting the beam and goes out for just a brief second when the gap in the disk aligns with the optical semsor. I was thinking(guessing) since a ground terminal is on the encoder board right beside the signal terminal that it must be grounding pin 15 each time a pulse is generated. The encoder seems to work the same wether the gnd is hooked to that term or not, erratic readings that jump anywhere from 30 rpms to 10000.  When the slot is aligned with the pickup and the light is out on the encoder board the DRO reads zero with the spindle off, at any other point (optical signal interupted) it displays random speeds with the spindle off.
Apologies for the long winded description just want to be thorough in my description . As with most things I am sure I have something hooked up wrong or am overlooking something simple, just so much info to go thru

Offline DAlgie

*
  •  304 304
    • View Profile
    • Algie Composite Aircraft
Re: Need a little spindle encoder timing help
« Reply #11 on: December 18, 2007, 01:32:46 AM »
Make sure your encoder signal wires are far away from your power transformer windings if possible, the AC in the transformer will induce wild RPM readings.
       DaveA.

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #12 on: December 18, 2007, 04:01:20 AM »
This is a bit simple when you have spent all this time on it - have you tried changing the input terminal number.

Maybe that particular input is a bit duff (15 WAS the ERROR signal on the printer port). I would try one of the others and see if you are still getting the fault.(10 - 13).

At least then you will have eliminated one possible fault. The other possibility is that the input has internal pull up resistors. Get a meter on pin 15 and make sure the voltage changes cleanly from 0v to 5v - not the terminal on the breakout board, but the lead to the computer (unless, like mine there are no electronics on the BOB).

The only other thing is widen the slot. The input only needs one change of pulse every rev. so give it a good pulse. Your slot is less than 50th of the diameter. Spinning at say 3000 rpm - 50 revs/sec thats less than 1/2500 of a sec.

The only other thing I can think of - is there any stray light getting to the pickup by reflection.
Not me driving the engine - I'm better looking.

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #13 on: December 18, 2007, 04:30:47 AM »
If you have a pulley set with anything other than a ratio of 1. Mach will use that ratio. Make sure that you havent selected a strange pulley. 
If you call the max speed of your drive does the DC level on the control output reach 10v? I believe there is an adjustment for that on the board.

Tony

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #14 on: December 18, 2007, 04:34:54 AM »
Forget the last post _ your'e obviously getting on ok on that problem!

Tony
Re: Need a little spindle encoder timing help
« Reply #15 on: December 18, 2007, 08:21:13 AM »
this does raise a question I had about setting the pulley ratios, the screen where this is set looks different than the screen shot in the pdf file
When I bring up the pulley ratio window if 1 is entered in the ratio box I assume this means 1 to 1 or do I need to enter 1:1 . I currently have it set at 1 just to eliminate that variable

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #16 on: December 18, 2007, 12:00:59 PM »
Right, the number 2 assumes a 2:1 step down to the spindle. In closed loop with S=500 say and ratio set to 1, the spindle will run up to 500 and the true speed will read 500. With a ratio of 2 the motor will run up to 1000, but the true speed reading will be 500. This is to take account of sensors that are not on the spindle, but on the motor. If your sensor is on the spindle, the ratio should always be 1.

Tony
Re: Need a little spindle encoder timing help
« Reply #17 on: December 18, 2007, 12:05:11 PM »
well I am no farther along than I have been the past few days, last night I was able to get the motor to spin up within 50 rpms of what was called out , chose save settings , shut the computer down, when I restated this morning all the settings are the same but I have to put in speed values way higher than the actual speed the shaft turns at.

I currently have everything configured axactly like the pdf file at this url http://cnc4pc.com/Tech_Docs/C11-Multifunction_CNC_Board_Manual_Rev3.pdf
spindle step pin set to 14 , ports and pins/spindle setup use spindle motor is checked and step and direction motor is checked.
On motor config/spindle I have steps per set at 1000 , velocity at max and have tried pulse width between 1 and 5 .
With the volt meter attached to the analog out put on the c11 board going to my vfd I cant get anywhere near 10v max , with a speed callout of s3000 I am getting aprox 0.5 volts , with a speed callout of s50000 I can get 2.9 volts

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #18 on: December 18, 2007, 12:36:37 PM »
What happens if you disconnect the feed to the VFD & measure the voltage? I would expect it to rise a little, but not very much. (showing that the VFD is not loading the analogue output)
I suppose you haven't played with the spindle calibration function. That can produce weird results, I don't think it works very well, myself. Click on defaults just in case. It doesn't tell you its done anything, but I think it removes any 'calibration' corrections that are applied. I haven't been able to find where the corrections are stored so that I can verify it. I suppose they should be in the xml file, but I can't see them.
There is a readout just below true speed on the manual screen, make sue that this reads 100% by pressing the adjacent reset button. This gets set to some odd values sometimes and will give you an incorrect speed.

Keep at it, we'll get there in the end!

Tony
Re: Need a little spindle encoder timing help
« Reply #19 on: December 18, 2007, 01:15:24 PM »
I have that value on the screen set at 100%
I just hooked the meter to the analog out put and the voltages present are .02 volt higher when the VFD is disconnected . I changed the pulse width to 5 in motor/ spindle config , left # of steps set at 1000 as reccomended in the cnc4pc setup document . With the meter attached to the analog out put on the board I get .1 v at s500, .2 volts at s1000 , 1.9v at s5000 , 3. volts at s10000 which rises to 10.7 volts over 20 seconds , 5.9 volts at s20000 which rises to 10.7 over 10 seconds.  The motor wont start with a speed input of anything less than s2500 which outputs 1.02 volts to the vfd