[Help] New Project - Rebuild an Old CNC Machine
01 Sep 2013 09:29 #38338
by andypugh
I missed the point that this was just to control spindle speed. The solutions I suggested are very much too much for that simple task.
You can probably find a gear somewhere in the system that a gear-tooth sensor can work from to measure spindle speed. I bought 4 of these from an eBay seller (as I couldn't find them on RS or Mouser, oddly).
www.pico-systems.com/bridge_spindle.html
Replied by andypugh on topic [Help] New Project - Rebuild an Old CNC Machine
In my opinion the most simple (and less expensive) is really to use a lower count encoder, like PCW suggested.
I missed the point that this was just to control spindle speed. The solutions I suggested are very much too much for that simple task.
You can probably find a gear somewhere in the system that a gear-tooth sensor can work from to measure spindle speed. I bought 4 of these from an eBay seller (as I couldn't find them on RS or Mouser, oddly).
www.pico-systems.com/bridge_spindle.html
Please Log in or Create an account to join the conversation.
02 Sep 2013 19:56 - 02 Sep 2013 20:10 #38428
by EngEC
Replied by EngEC on topic [Help] New Project - Rebuild an Old CNC Machine
Great support from this community!
I have a really low budget, thats why I cant use that kind of solution andy
Instead of buying a new encoder, the CPLD seems like a great solution.
Nevertheless, before all of this I need to explain that I have an VSD-E driver (from Granite Devices), this driver controls the motor, he have an PID and everything. The question is, what is better:
Use this driver to control the motor (instead of the linuxcnc), or using the linuxcnc to control the motor (disabling the PID from the driver)?
Another thing, I've left the PWM control, because my driver needs an 3...5 kHz input frequency, and in order to have a great resolution (in the duty-cycle) I needed very high sampling frequency (min 500 kHz = max 2us for every sample), and the software cant handle this kind of speed
The solution I've seen is using ADC (HAL component) and using DAC (hardware component). A question, I havent seen anywhere, does ADC existis on HAL? (if so, can anyone explain or show an example?)
Great feedback people, after I conclude this I'll pay the next round!
I have a really low budget, thats why I cant use that kind of solution andy
a 1024 PPR encoder will have 4096 counts per turn using quadrature so ~600 RPM is about as fast as it can be tracked with the software encoder. Probably the simplest solution if you need to track higher speeds would be to swap the 1024 PPR encoder for a encoder with lower PPR, say 50 or 100 PPR. You can add hardware that will count the 1024 PPR encoder but this is probably overkill.
I do have CPLD code for a encoder divider that can divide the count by 2 to 64 (and stretch the index pulse appropriately) that could be used to lower the effective PPR of your existing encoder, if you are comfortable with CPLDs (a $2.00 part will do)
Instead of buying a new encoder, the CPLD seems like a great solution.
Nevertheless, before all of this I need to explain that I have an VSD-E driver (from Granite Devices), this driver controls the motor, he have an PID and everything. The question is, what is better:
Use this driver to control the motor (instead of the linuxcnc), or using the linuxcnc to control the motor (disabling the PID from the driver)?
Another thing, I've left the PWM control, because my driver needs an 3...5 kHz input frequency, and in order to have a great resolution (in the duty-cycle) I needed very high sampling frequency (min 500 kHz = max 2us for every sample), and the software cant handle this kind of speed
The solution I've seen is using ADC (HAL component) and using DAC (hardware component). A question, I havent seen anywhere, does ADC existis on HAL? (if so, can anyone explain or show an example?)
Great feedback people, after I conclude this I'll pay the next round!
Last edit: 02 Sep 2013 20:10 by EngEC.
Please Log in or Create an account to join the conversation.
02 Sep 2013 21:36 #38430
by PCW
Replied by PCW on topic [Help] New Project - Rebuild an Old CNC Machine
Are you saying that the spindle is controlled by the VSD-E?
In that case, its probably easiest to just use the encoder for
feedback to the VSD-E and drive the VSD-E with step/dir
In that case, its probably easiest to just use the encoder for
feedback to the VSD-E and drive the VSD-E with step/dir
Please Log in or Create an account to join the conversation.
03 Sep 2013 14:12 - 03 Sep 2013 14:12 #38445
by emcPT
What motor are you trying to control with the VSD-E? Not the spindle motor I presume, so there is some confusion here.
Please clarify.
Replied by emcPT on topic [Help] New Project - Rebuild an Old CNC Machine
Nevertheless, before all of this I need to explain that I have an VSD-E driver (from Granite Devices), this driver controls the motor, he have an PID and everything. The question is, what is better:
Use this driver to control the motor (instead of the linuxcnc), or using the linuxcnc to control the motor (disabling the PID from the driver)?
What motor are you trying to control with the VSD-E? Not the spindle motor I presume, so there is some confusion here.
Please clarify.
Last edit: 03 Sep 2013 14:12 by emcPT.
Please Log in or Create an account to join the conversation.
03 Sep 2013 16:12 #38449
by EngEC
Yes it is. My question was made because I dont know how important is to use feedback on the linuxcnc, like using linuxcnc to make a screw.
I know that in theory I should close the loop on the main controller, but is it really important or can I use a loop of "trust" for the linuxcnc? (trust that VSD-E is working just fine)
Yes I am using VSD-E controller for the spindle motor I've post earlier:
but instead of using PWM for the listed reasons, I've been working a solutions with you (experienced guys )
Replied by EngEC on topic [Help] New Project - Rebuild an Old CNC Machine
Are you saying that the spindle is controlled by the VSD-E?
In that case, its probably easiest to just use the encoder for
feedback to the VSD-E and drive the VSD-E with step/dir
Yes it is. My question was made because I dont know how important is to use feedback on the linuxcnc, like using linuxcnc to make a screw.
I know that in theory I should close the loop on the main controller, but is it really important or can I use a loop of "trust" for the linuxcnc? (trust that VSD-E is working just fine)
What motor are you trying to control with the VSD-E? Not the spindle motor I presume, so there is some confusion here.
Please clarify.
Yes I am using VSD-E controller for the spindle motor I've post earlier:
I have progressed with the machine, the hardware aint a problem now, but now I am asking some help with this awesome software.
I need to use PWM to control spindle, but I have a problematic situation, I achieve 3500 RPM with the motor, and have a differential encoder that turns 2 times that value, making the 7 kRPM. The problem is that the encoder is a differential encoder with index 1024ppr. Do I have a solution for the high-frequency? (I've read that the max frequency of the HAL encoder component is 10~50 kHz)
These PWM must be 50~95% (for CW) and 5~50% (for CCW), is there a component that I can use? [note: the 50% means that the motor is stopped]
but instead of using PWM for the listed reasons, I've been working a solutions with you (experienced guys )
Please Log in or Create an account to join the conversation.
03 Sep 2013 16:42 #38450
by andypugh
To perform a spindle-synchronised move LinuxCNC needs to know where the spindle is. This means that for threading there needs to be feedback from the spindle encoder to LinuxCNC.
I can think of ways round this, you could run the VSD-E in step-dir mode, and trust it to track exactly, then use the position command as the input to the LinuxCNC motion controller. But you would need to find a way to emulate the index behaviour of an encoder. I think this would be called an "interesting project" rather than a "recommended solution"
From a scan of the VSD-E manual it looks like it only offers a pass-through of the encoder signals. Some drives have a programmable divider built-in, so that the feedback to the controller can be at a lower pulse-rate. I think you will need to connect the encoder to the VSD-E whatever else you do.
What type of motor drives your spindle?
Replied by andypugh on topic [Help] New Project - Rebuild an Old CNC Machine
Yes it is. My question was made because I dont know how important is to use feedback on the linuxcnc, like using linuxcnc to make a screw.
I know that in theory I should close the loop on the main controller, but is it really important or can I use a loop of "trust" for the linuxcnc? (trust that VSD-E is working just fine)
To perform a spindle-synchronised move LinuxCNC needs to know where the spindle is. This means that for threading there needs to be feedback from the spindle encoder to LinuxCNC.
I can think of ways round this, you could run the VSD-E in step-dir mode, and trust it to track exactly, then use the position command as the input to the LinuxCNC motion controller. But you would need to find a way to emulate the index behaviour of an encoder. I think this would be called an "interesting project" rather than a "recommended solution"
From a scan of the VSD-E manual it looks like it only offers a pass-through of the encoder signals. Some drives have a programmable divider built-in, so that the feedback to the controller can be at a lower pulse-rate. I think you will need to connect the encoder to the VSD-E whatever else you do.
What type of motor drives your spindle?
Please Log in or Create an account to join the conversation.
03 Sep 2013 21:17 #38451
by EngEC
So, for threading I need the feedback?
I haven't yet worked with a rotary encoder, that's the real problem for me, because I don't know what is the output timing diagram. If the index just shows once per revolution I can calculate the spindle speed just by the index pin.
Any of these signals can lower their pulse-rate just by adding counters (hardware) to their pins. The only inconvenience is that the resolution will be lowered, but that aint a problem for my system.
[note: the encoder is external]
The motor is a 1.1 kW BLDC (135VDC) 1.5 HP (3500 RPM) with 2 inputs. The difference between the inputs demands the direction and speed of the motor.
[haven't yet measured the difference between the gears of the encoder and the motor, but if it is not 1:1 it'll be not bigger than 1:2]
Replied by EngEC on topic [Help] New Project - Rebuild an Old CNC Machine
Yes it is. My question was made because I dont know how important is to use feedback on the linuxcnc, like using linuxcnc to make a screw.
I know that in theory I should close the loop on the main controller, but is it really important or can I use a loop of "trust" for the linuxcnc? (trust that VSD-E is working just fine)
To perform a spindle-synchronised move LinuxCNC needs to know where the spindle is. This means that for threading there needs to be feedback from the spindle encoder to LinuxCNC.
I can think of ways round this, you could run the VSD-E in step-dir mode, and trust it to track exactly, then use the position command as the input to the LinuxCNC motion controller. But you would need to find a way to emulate the index behaviour of an encoder. I think this would be called an "interesting project" rather than a "recommended solution"
So, for threading I need the feedback?
I haven't yet worked with a rotary encoder, that's the real problem for me, because I don't know what is the output timing diagram. If the index just shows once per revolution I can calculate the spindle speed just by the index pin.
From a scan of the VSD-E manual it looks like it only offers a pass-through of the encoder signals. Some drives have a programmable divider built-in, so that the feedback to the controller can be at a lower pulse-rate. I think you will need to connect the encoder to the VSD-E whatever else you do.
Any of these signals can lower their pulse-rate just by adding counters (hardware) to their pins. The only inconvenience is that the resolution will be lowered, but that aint a problem for my system.
[note: the encoder is external]
What type of motor drives your spindle?
The motor is a 1.1 kW BLDC (135VDC) 1.5 HP (3500 RPM) with 2 inputs. The difference between the inputs demands the direction and speed of the motor.
[haven't yet measured the difference between the gears of the encoder and the motor, but if it is not 1:1 it'll be not bigger than 1:2]
Please Log in or Create an account to join the conversation.
04 Sep 2013 03:01 #38453
by emcPT
Replied by emcPT on topic [Help] New Project - Rebuild an Old CNC Machine
If you only want to make the spindle rotate "more or less" you do not need the feedback up to linuxcnc.
You can use only the feedback until the drive and you can use a large encoder resolution, because the drive will be able to use it.
Linuxcnc will then be "blind" and trust that the drive will do what he is asking. Normally this is ok for normal lathe work, except threading and other work where the axis move accordingly to the chuck position.
1.1Kw is probably too much for your drive and too low for a spindle lathe (only if it is really small).
I have 500cpr encoders, used, if you like.
You can use only the feedback until the drive and you can use a large encoder resolution, because the drive will be able to use it.
Linuxcnc will then be "blind" and trust that the drive will do what he is asking. Normally this is ok for normal lathe work, except threading and other work where the axis move accordingly to the chuck position.
1.1Kw is probably too much for your drive and too low for a spindle lathe (only if it is really small).
I have 500cpr encoders, used, if you like.
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.088 seconds