- Posts: 257
- Thank you received: 128
Optimum Optimill MH50V CNC conversion
2 years 1 month ago - 2 years 1 month ago #309831
by Unlogic
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion
This is how the cabinet looks now with the 4th servo driver installed.
As always when modifying the cabinet with expensive electrical components the first power on was a bit scary. However there was no magic smoke but instead I was greeted with the most horrible fan noise I've ever come across.
I promptly removed the new servo driver and popped off the side cover to find two small 40x40x15mm 24v fans rated at no less than 11 000 rpm!
I made a short term fix for now and soldered in a 80ohm 3w resistor for each fan to bring them down to 15v.
However they are is still far from quiet so I'll be monitoring the temperature of the spindle servo drive and see if I can get away with installing quieter fans.
Before I turned my attention to the configuration and HAL changes required for the new servo driver to work I replaced the keyboard attached to my control panel.
I had previously been using a full size keyboard but some functions in Probe Basic like selection of multiple lines in the editor (normally done with shift + arrow up/down) doesn't work without a mouse so I opted for a new old stock Microsoft All-on-One Media keyboard instead.
This keyboard is slightly vintage in IT terms but it has some features which I liked such as a dedicated left mouse button on the left side of the keyboard and touchpad which actually moves down when you click on in. This simplifies the use of the touchpad with gloves on.
To make sure that the keyboard stays in place while in use while at the same time be simple to remove when necessary I attached it with magnetic tape this time.
As always when modifying the cabinet with expensive electrical components the first power on was a bit scary. However there was no magic smoke but instead I was greeted with the most horrible fan noise I've ever come across.
I promptly removed the new servo driver and popped off the side cover to find two small 40x40x15mm 24v fans rated at no less than 11 000 rpm!
I made a short term fix for now and soldered in a 80ohm 3w resistor for each fan to bring them down to 15v.
However they are is still far from quiet so I'll be monitoring the temperature of the spindle servo drive and see if I can get away with installing quieter fans.
Before I turned my attention to the configuration and HAL changes required for the new servo driver to work I replaced the keyboard attached to my control panel.
I had previously been using a full size keyboard but some functions in Probe Basic like selection of multiple lines in the editor (normally done with shift + arrow up/down) doesn't work without a mouse so I opted for a new old stock Microsoft All-on-One Media keyboard instead.
This keyboard is slightly vintage in IT terms but it has some features which I liked such as a dedicated left mouse button on the left side of the keyboard and touchpad which actually moves down when you click on in. This simplifies the use of the touchpad with gloves on.
To make sure that the keyboard stays in place while in use while at the same time be simple to remove when necessary I attached it with magnetic tape this time.
Last edit: 2 years 1 month ago by Unlogic.
The following user(s) said Thank You: tommylight, besriworld
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Platinum Member
-
Less
More
- Posts: 327
- Thank you received: 92
2 years 1 month ago #309832
by besriworld
Replied by besriworld on topic Optimum Optimill MH50V CNC conversion
Good job!
The following user(s) said Thank You: Unlogic
Please Log in or Create an account to join the conversation.
2 years 1 month ago #309845
by Unlogic
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion
The configuration and HAL changes ended up taking over a day to figure out but in the end I managed to get spindle soft ramp up and ramp down in place along with encoder based RPM and actual spindle load displayed in Probe Basic.
I've attached my config files for Probe Basic in this post (note that the custom_tool_change.ngc file has to go in the subroutines folder). In this post I'll highlight the areas which were hardest to figure out. Hopefully Google picks them up this post so that other people searching for the same things find this post.
Here is current wiring schematics for reference:
I started with modifying my AXIS configuration using Pncconf. It has been virtually fool proof for generating configuration changes before but the values it generated when selecting a servo spindle in step/dir mode were for some reason not really spot on and it took me a while to figure what was going on as I was getting error about MAXVEL being too high right out of the box.
Currently I'm using the following values in the INI file for the spindle and the encoder:
The new spindle servo has a maximum RPM of 6000 rpm but I've set the limit at 4500 until I have replaced the spindle bearings.
The acceleration values are set very low to ensure a smooth ramp up/down as the servo motor has a lot of torque and makes a very violent starts otherwise.
I carefully matched the polarity for the differential encoder signals from the servo drive to the Mesa 7i96S board but for some reason I still hade to invert the encoder scale otherwise it was reading rotation in the wrong direction. It should also be noted that if you have for example a 1000 pulses per revolution (ppr) quadrature encoder the ENCODER_SCALE value set in the INI file needs to multiplied by four.
The 2kw Delta B3 servo drive for the spindle servo came with a default setting of 2500 ppr setting but I reconfigured it to 1250 ppr instead as 10 000 pulses per revolution felt a bit overkill.
I left the PID settings completely stock but as I'm using a close loop servo I'm not sure that PID should even be enabled as the drive handles that and even triggers a fault if there is too much deviation between the commanded position and the actual position.
When it came to the HAL file I had previously picked up on the fact that the stepgen on the Mesa board used to control the spindle should be enabled by machine-is-on and not spindle-enable as otherwise it would cause very abrupt stops of the spindle when using a servo.
Pncconf correctly generated the following line in my case:
However I was still getting very abrupt spindle stops which I tracked down to the following line in the HAL file:
That line controls the enable signal sent to the servo drive, without it the servo drive immediately stops.
I wanted the servo drive to ramp down slowly when stopped and then disable the drive so that I can rotate the spindle by hand when changing tools etc. I the end I solved this by using the great example posted by pippin88 in this thread ( forum.linuxcnc.org/10-advanced-configura...ep-dir-servo-spindle ).
With these values set the spindle enable signal remains active for an additional 3 seconds when the spindle stop signal is given which allows the spindle to ramp down softly according to the values set in the INI file.
When I had the spindle working properly with both ramp up and down I turned my attention to the user interface of Probe Basic.
In order to get the actual spindle RPM from the encoder to work the following line had to be added to the post gui file, in my case the custom.hal.
Getting the spindle load bar to work took only the following 3 lines.
The really magic part in those lines is the scalemax parameter which I would never have guessed existed or figured out how it worked if it wasn't for a few excellent posts from PCW on this forum.
As far as I have understood it the analog inputs on the 7i84 board by default scale from 0 to 36.3v. By changing the scale to go from 0 to 453.75 the max 8 volts which the servo drive analog output gives is translated to 100. This makes the spindle load bar in Probe Basic go from 0% to 100% as the voltage to the analog input varies from 0 to 8 volts.
I know that it would probably be better to have the spindle load bar in Probe Basic go from 0% to something like 150% or 200% to allow for higher peak loads to be displayed but I put that on the todo list for another day
I've attached my config files for Probe Basic in this post (note that the custom_tool_change.ngc file has to go in the subroutines folder). In this post I'll highlight the areas which were hardest to figure out. Hopefully Google picks them up this post so that other people searching for the same things find this post.
Here is current wiring schematics for reference:
I started with modifying my AXIS configuration using Pncconf. It has been virtually fool proof for generating configuration changes before but the values it generated when selecting a servo spindle in step/dir mode were for some reason not really spot on and it took me a while to figure what was going on as I was getting error about MAXVEL being too high right out of the box.
Currently I'm using the following values in the INI file for the spindle and the encoder:
Code:
[SPINDLE_0]
MAX_VELOCITY = 4500
MAX_REVERSE_VELOCITY = 4500
MAX_ACCELERATION = 15
STEPGEN_MAXVEL = 93.75
STEPGEN_MAXACCEL = 30
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 4500.0
ENCODER_SCALE = -5000
DIRSETUP = 800
DIRHOLD = 800
STEPLEN = 1000
STEPSPACE = 1000
STEP_SCALE = 5000
The new spindle servo has a maximum RPM of 6000 rpm but I've set the limit at 4500 until I have replaced the spindle bearings.
The acceleration values are set very low to ensure a smooth ramp up/down as the servo motor has a lot of torque and makes a very violent starts otherwise.
I carefully matched the polarity for the differential encoder signals from the servo drive to the Mesa 7i96S board but for some reason I still hade to invert the encoder scale otherwise it was reading rotation in the wrong direction. It should also be noted that if you have for example a 1000 pulses per revolution (ppr) quadrature encoder the ENCODER_SCALE value set in the INI file needs to multiplied by four.
The 2kw Delta B3 servo drive for the spindle servo came with a default setting of 2500 ppr setting but I reconfigured it to 1250 ppr instead as 10 000 pulses per revolution felt a bit overkill.
I left the PID settings completely stock but as I'm using a close loop servo I'm not sure that PID should even be enabled as the drive handles that and even triggers a fault if there is too much deviation between the commanded position and the actual position.
When it came to the HAL file I had previously picked up on the fact that the stepgen on the Mesa board used to control the spindle should be enabled by machine-is-on and not spindle-enable as otherwise it would cause very abrupt stops of the spindle when using a servo.
Pncconf correctly generated the following line in my case:
Code:
net machine-is-on => hm2_7i96s.0.stepgen.03.enable
However I was still getting very abrupt spindle stops which I tracked down to the following line in the HAL file:
Code:
# --- SPINDLE-ENABLE ---
net spindle-enable => hm2_7i96s.0.7i84.0.0.output-01
That line controls the enable signal sent to the servo drive, without it the servo drive immediately stops.
I wanted the servo drive to ramp down slowly when stopped and then disable the drive so that I can rotate the spindle by hand when changing tools etc. I the end I solved this by using the great example posted by pippin88 in this thread ( forum.linuxcnc.org/10-advanced-configura...ep-dir-servo-spindle ).
Code:
# --- timedelay before disable spindle output for deceleration ramp --- #
loadrt timedelay names=timedelay.spindle-enable-soft-stop
addf timedelay.spindle-enable-soft-stop servo-thread
setp timedelay.spindle-enable-soft-stop.on-delay 0
setp timedelay.spindle-enable-soft-stop.off-delay 3
net spindle-enable => timedelay.spindle-enable-soft-stop.in
net spindle-enable-soft-stop <= timedelay.spindle-enable-soft-stop.out
net spindle-enable-soft-stop => hm2_7i96s.0.7i84.0.0.output-01
With these values set the spindle enable signal remains active for an additional 3 seconds when the spindle stop signal is given which allows the spindle to ramp down softly according to the values set in the INI file.
When I had the spindle working properly with both ramp up and down I turned my attention to the user interface of Probe Basic.
In order to get the actual spindle RPM from the encoder to work the following line had to be added to the post gui file, in my case the custom.hal.
Code:
#Spindle RPM from encoder
net spindle-vel-fb-rpm => qtpyvcp.spindle-encoder-rpm.in
Getting the spindle load bar to work took only the following 3 lines.
Code:
#Spindle load (torque)
setp hm2_7i96s.0.7i84.0.0.analogin0-scalemax 453.75
net spindle-load <= hm2_7i96s.0.7i84.0.0.analogin0
net spindle-load => qtpyvcp.spindle-load-indicator.in-f
The really magic part in those lines is the scalemax parameter which I would never have guessed existed or figured out how it worked if it wasn't for a few excellent posts from PCW on this forum.
As far as I have understood it the analog inputs on the 7i84 board by default scale from 0 to 36.3v. By changing the scale to go from 0 to 453.75 the max 8 volts which the servo drive analog output gives is translated to 100. This makes the spindle load bar in Probe Basic go from 0% to 100% as the voltage to the analog input varies from 0 to 8 volts.
I know that it would probably be better to have the spindle load bar in Probe Basic go from 0% to something like 150% or 200% to allow for higher peak loads to be displayed but I put that on the todo list for another day
The following user(s) said Thank You: besriworld
Please Log in or Create an account to join the conversation.
2 years 1 month ago #309846
by Unlogic
Feels like I have been working on this thing forever. It felt a bit cumbersome to start tearing stuff apart again however the noise from the straight cut gears in the gearbox combined with low sustainable max spindle RPM really made this is a necessity as making parts with a spindle that only did 1500 rpm was way too slow (anything above 1500 made the gearbox sound like it was going into orbit).
I've looked at several completely new BT40 spindles on AliExpress but the listings often have very little technical information about the spindles and the sellers so far haven't been able to answer many of my questions so for now the spindle that came with the machine will have to do.
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion
Thank you!Good job!
Feels like I have been working on this thing forever. It felt a bit cumbersome to start tearing stuff apart again however the noise from the straight cut gears in the gearbox combined with low sustainable max spindle RPM really made this is a necessity as making parts with a spindle that only did 1500 rpm was way too slow (anything above 1500 made the gearbox sound like it was going into orbit).
I've looked at several completely new BT40 spindles on AliExpress but the listings often have very little technical information about the spindles and the sellers so far haven't been able to answer many of my questions so for now the spindle that came with the machine will have to do.
The following user(s) said Thank You: besriworld
Please Log in or Create an account to join the conversation.
2 years 1 month ago #310278
by Unlogic
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion
In order to test the new spindle motor I decided to mill a new polycarbonate shelf for my parallel blocks.
I milled the polycarbonate at 2500 rpm with very little noise however another issue crept up which I had overlooked, heat!
The old induction motor had a big fan on the back which not only cooled the motor but also indirectly cooled the head of the machine. Without any airflow the new spindle servo got pretty hot after running for an hour straight. The head of the machine was also uncomfortably hot.
In order to be able to finish milling the polycarbonate I ghetto rigged a small USB powered fan on top of the machine which did the trick.
Here is how the polycarbonate shelf came out.
I milled the polycarbonate at 2500 rpm with very little noise however another issue crept up which I had overlooked, heat!
The old induction motor had a big fan on the back which not only cooled the motor but also indirectly cooled the head of the machine. Without any airflow the new spindle servo got pretty hot after running for an hour straight. The head of the machine was also uncomfortably hot.
In order to be able to finish milling the polycarbonate I ghetto rigged a small USB powered fan on top of the machine which did the trick.
Here is how the polycarbonate shelf came out.
The following user(s) said Thank You: pommen
Please Log in or Create an account to join the conversation.
2 years 1 month ago #310279
by Unlogic
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion
In order to tackle the cooling of the servo motor and head of the machine I ordered two 80mm Ncotua branded fans.
I installed the fans in the top cover so they blow across the head of the machine including the toothed belt and then onto the spindle servo motor.
I wired the two 12v fans in series and power them with 24v from one of the outputs of the Mesa 7i84 expansion card in the control cabinet.
In order to have the operation of the fans automatically controlled I added a line of HAL code to my LinuxCNC configuration which slaves them to the spindle-enable signal.
Next up is the replacement of the spindle bearings which have been making bad noises for quite some time...
I installed the fans in the top cover so they blow across the head of the machine including the toothed belt and then onto the spindle servo motor.
I wired the two 12v fans in series and power them with 24v from one of the outputs of the Mesa 7i84 expansion card in the control cabinet.
In order to have the operation of the fans automatically controlled I added a line of HAL code to my LinuxCNC configuration which slaves them to the spindle-enable signal.
Next up is the replacement of the spindle bearings which have been making bad noises for quite some time...
Please Log in or Create an account to join the conversation.
Time to create page: 0.084 seconds