Setting up 5i25+7i85+8i20
25 Mar 2018 19:45 #107838
by PCW
Replied by PCW on topic Setting up 5i25+7i85+8i20
In any case you will need speed feedback, sure how that will work with just hall effect
sensors
sensors
Please Log in or Create an account to join the conversation.
25 Mar 2018 21:07 #107846
by andypugh
It would probably work quite well if the bldc component had a velocity output. But that is something I forgot to add.
A ddt on the angle data ought to work, except that it wraps every rev.
So probably a little hal component would be needed
Replied by andypugh on topic Setting up 5i25+7i85+8i20
In any case you will need speed feedback, sure how that will work with just hall effect
sensors
It would probably work quite well if the bldc component had a velocity output. But that is something I forgot to add.
A ddt on the angle data ought to work, except that it wraps every rev.
So probably a little hal component would be needed
Please Log in or Create an account to join the conversation.
25 Mar 2018 23:48 - 25 Mar 2018 23:49 #107861
by blazini36
May sound silly but can't the signal fromnone hall sensor pin be connected to the encoder component to provide a velocity? It's been a while since I messed with hal
Replied by blazini36 on topic Setting up 5i25+7i85+8i20
In any case you will need speed feedback, sure how that will work with just hall effect
sensors
It would probably work quite well if the bldc component had a velocity output. But that is something I forgot to add.
A ddt on the angle data ought to work, except that it wraps every rev.
So probably a little hal component would be needed
May sound silly but can't the signal fromnone hall sensor pin be connected to the encoder component to provide a velocity? It's been a while since I messed with hal
Last edit: 25 Mar 2018 23:49 by blazini36.
Please Log in or Create an account to join the conversation.
25 Mar 2018 23:56 #107866
by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20
Yes, you can use the output from 1 (counter mode) or 2 (quadrature mode) hall sensors into the encoder component, but the duty-cycle isn't quite right so some smoothing would be needed.
Please Log in or Create an account to join the conversation.
26 Mar 2018 00:31 #107868
by blazini36
Replied by blazini36 on topic Setting up 5i25+7i85+8i20
I didn't think quadrature would work since the hall sensors are not at 90 degrees.
By smoothing, do you mean something like the lowpass filter?
I assume Ill want to dump this into the motion controller, " => motion.spindle−speed−in"?
By smoothing, do you mean something like the lowpass filter?
I assume Ill want to dump this into the motion controller, " => motion.spindle−speed−in"?
Please Log in or Create an account to join the conversation.
26 Mar 2018 00:37 #107870
by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20
Yes, I meant lowpass. And each pair of halls does a sort-of quadrature, enough to determine direction. They just have uneven timing so a velocity based on them will be noisy.
You don't actually need to send the velocity to motion on a milling machine. The point of having it is to use it with a PID component to get closed-loop velocity control.
You don't actually need to send the velocity to motion on a milling machine. The point of having it is to use it with a PID component to get closed-loop velocity control.
Please Log in or Create an account to join the conversation.
01 Apr 2018 15:15 #108213
by blazini36
Replied by blazini36 on topic Setting up 5i25+7i85+8i20
Using the hall sensors with the encoder component for a velocity feedback seems to work well. I would expect to see 16 counts from the 2 hall sensors in x4 mode but I see 12 per revolution so I have the encoder scale at 12. Lowpass gain of .01 seems to give a smooth velocity.
I am having alot of trouble with the PID loop. I can get it decent when the max output is limited to 2(amps), when I raise it to 7 I can't get the speed to come down. One thing I read suggests when tuning the PID, you should set I and D to 0 and raise P until the output oscillates, then I until the oscillation stops. I assume by "oscillate" it means starts making minor corrections when it's at speed. and not swinging between positive and negative values.
I seen PCW mention in another post that I and D should be left at 0 until it's close and only use P and FF0 until then, I have not tried this yet. I'm pretty sure I had to backdown on P because the motor would bang back and forth between hall counts when stopped. Looking at the docs, it says " the deadband should be set slightly more than one-half count". Does this actually mean .5 which is 1/2 of 1 count, or 6 which is 1/2 of counts per rev?
I am having alot of trouble with the PID loop. I can get it decent when the max output is limited to 2(amps), when I raise it to 7 I can't get the speed to come down. One thing I read suggests when tuning the PID, you should set I and D to 0 and raise P until the output oscillates, then I until the oscillation stops. I assume by "oscillate" it means starts making minor corrections when it's at speed. and not swinging between positive and negative values.
I seen PCW mention in another post that I and D should be left at 0 until it's close and only use P and FF0 until then, I have not tried this yet. I'm pretty sure I had to backdown on P because the motor would bang back and forth between hall counts when stopped. Looking at the docs, it says " the deadband should be set slightly more than one-half count". Does this actually mean .5 which is 1/2 of 1 count, or 6 which is 1/2 of counts per rev?
Please Log in or Create an account to join the conversation.
01 Apr 2018 16:09 #108215
by PCW
Replied by PCW on topic Setting up 5i25+7i85+8i20
For a spindle where the PID command is velocity and the PID output is torque,
you mainly want P and I
FF0 makes sense if the PID input and output are velocity but that's not the case with a torque mode drive.
Tuning a velocity loop is going to be tough with such poor (hall effect only) feedback, unless the spindle inertia
is quite high relative to the torque
you mainly want P and I
FF0 makes sense if the PID input and output are velocity but that's not the case with a torque mode drive.
Tuning a velocity loop is going to be tough with such poor (hall effect only) feedback, unless the spindle inertia
is quite high relative to the torque
Please Log in or Create an account to join the conversation.
01 Apr 2018 17:27 #108220
by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20
And for a spindle I would expect to be using I more than P. (The output of the P-term is zero when at the setpoint, but clearly 0 Amps won't give you a steady speed. Whereas it does give you a fixed position in a position loop)
Please Log in or Create an account to join the conversation.
01 Apr 2018 17:55 #108221
by blazini36
Would it be better to use the spindles drilled disk for feedback than the hall sensors on the motor? It's a single photo interrupt sensor so no quadrature, and the disk only has 4 holes but theyre more consistently spaced than the 2/3 hall sensors. It'll be a bit before I get the parts to add the differential encoder to the motor so one of these will have to do for now.
Replied by blazini36 on topic Setting up 5i25+7i85+8i20
For a spindle where the PID command is velocity and the PID output is torque,
you mainly want P and I
FF0 makes sense if the PID input and output are velocity but that's not the case with a torque mode drive.
Tuning a velocity loop is going to be tough with such poor (hall effect only) feedback, unless the spindle inertia
is quite high relative to the torque
Would it be better to use the spindles drilled disk for feedback than the hall sensors on the motor? It's a single photo interrupt sensor so no quadrature, and the disk only has 4 holes but theyre more consistently spaced than the 2/3 hall sensors. It'll be a bit before I get the parts to add the differential encoder to the motor so one of these will have to do for now.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.265 seconds