On Sunday 12 September 2021 17:49:43 Alan Condit wrote:

> I built a new controller for my 9x20 lathe using a 5i25/7i76 combo. I
> thought I had everything working but I still can’t get the spindle
> working correctly. I have a 1.5hp PMDC treadmill motor that I am
> controlling with a Cycletrol-150 DC controller. The am using the
> analog out from the 7i76 to replace the potentiometer to control the
> spindle speed. I have a 100 slot encoder with index (homemade) on the
> spindle.
>
> The spindle starts under LCNC control but I am not getting an “at
> speed indication” at above about 100rpm. The motor sounds like is is
> running at a steady speed but the Spindle Speed indicator fluctuates
> wildly. I am suspicious of the spindle encoder. Before I was just
> running it as a 100 count counter with index and it worked fine. I
> can’t figure out in PNCConf how to set up a spindle counter with index
> for the 7i76.
>
> Questions:
> Is it likely that my encoder is the problem?
> I don’t know how to adjust the detectors to be out of cycle by 90°?
> Any helpful hints? Should I just go back to the 100 slot counter?
> Should I replace my whole homemade encoder with a real commercial
> spindle encoder?

getting proper quadrature out of homemade stuff is a bear with 4 sore 
paws. I know, I done it about 3 times now. I would in your shoes do this 
which has worked really well here.

How many "gear shifts" do you have between the motor and the actual 
spindlle? You could probably do more than 2, but thats all the gears I 
have on my g0704. I have tally switches on that knob that tell linuxcnc 
what, if any, gear it is in. I have a sibgle screw glued to the side of 
the drawbar cap that is read by an ATS-667 hall effect device for the 
once per turn "index signal" to an encoder. Prowl ebay and get a cheap 
1000 line encoder for a $20 bill, and spin it with the back of the 
spindle motor shaft. It will be way to fast to get thru the average 
BoB's opto stuff, so you'll have to use one of the encoders in the 5i25, 
which can do that fast a signal or hack the BoB to remove them.  Feed 
the same encoder you are feedingthe index into with the outputs of this 
encoder
.
Not knowing the gear ratio in either gear, I hacked up a counter in hal 
that starts counting pulses from an encoder on the back of the spindle 
motor, counting them for 100 turns of the spindle as seen by the 
ATS-667, and freezing the count so you can read it with a hal-meter. 
Divide that count by 100 and you have the "SCALE" value for that gear. 
Repeat for the other gear. then use the tally switches and a mux to feed 
the correct SCALE into that input to linuxcnc. For my g0704, that scale 
is a hair over 7,000 in high gear, and a different hair over 14,000 in 
low gear. And with that high a scale, quantization noise flat 
disappears, allowing very high pid Pgain values, 20 or more for 
extremely stiff spindle speed control. I use the PICO pwm-servo amp, and 
the only time I can tell the spindle is loaded really heavily is when 
the iron in the motor starts squeaking as that 9.7 amp motor is being 
throttled at around 18 amps by the pwm-servo.  Thats about 2 hp from a 1 
hp rated motor, but its had 6 years to complain and hasn't, not even 
asking for fresh brushes. 

When you are ready, let me know and I'll pm you my hal files and such so 
you can cherry pick and use what you want.

Take care now Alan.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to