Monday, December 25, 2023

Roland PNC-3000 tabletop mill

Roland PNC-3000 tabletop mill

I got my hands on a Roland PNC-3000 already more than a year ago. I found it on Markplaats a Dutch plaza for 2nd hand stuff. It was a proper barn find as I picked it up at a farm and it litterally came out of a barn where it probably resided for years, clearly not months. The paint was flakey, the guide rails rusty and there was dirt and spiderwebs all over it.

Still I was intrigued enough to buy it, as it came with 2 additional spindles, original documentation, a handfull of spare parts. Machines like this from that era, although outdate in electronics are in general built to last, with quality, precision components. The original price back then was around 25.000 US dollars.

The spec

Although marketed as a tabletop device the machine is still a good 35 kilos and built up from rigid components. It comes with dual 35 mm round guides for the Z axis, supporting the spindle motor. For the X and Y axis dual 20 mm round linear guides. The ballscrews are NSK types 1404 (that proved to be very hard to find as a replacement.) All in all mechanically well spec-ed.  

The plan

I already did some research before buying the mill and I knew that the electronics and drivers that come from the late 80s eighties/begin nineties could be troublesome and to use the drivers from another era would limit the capabilitites of the hardware. So the hardware would stay and most of the electronics would go. Depending on how complex the modification would be it would be nice to reuse the display, as it gives constant feedback on the curent XYZ positions.

So, this is what I had in mind:
- Try to fire up the machine without any modification to see if there would be any movement in manual control.
- Strip the machine, 
- Remove all rust and oxidation 
- put a coat of primer over the base and the covers 
- replace parts that were beyond repair
- Remove the controller board (that also includes the stepper drivers)
- Put in new stepper drivers
- Use a commodity micro controller, like an Arduino Uno with GRBL as control software
- Optionally replace the spindle motor and motor controller
- Put everything back together

The execution

Testing the machine

After a quick inspection under the hood to see if there was no visible signs of trouble in the electronics I plugged the machine in and switched it on. IT did smell a bit funny after a few minutes as if it was overheated but after some fiddling I got the X and Y axis to move and even though the guide rails where completely without lubricats and on top of that slightly rusty the movement was not yerkey. The Z axis however only moved a few centimeters and did want to go down, helped by gravity and a heavy spindle motor, but stuttered and by occasion wanted to go up a few milimeters. After a more thorough inspection I notices that there where some ball on top of the ballscrew nut instead of in it. The detailed report you can find in the Z axis story. The problem seemed to be both mechanical and electrical. Probably one half of the driver had burned out as the the Z axis had so much trouble moving that it would result in overcurrent.

Besides the few mechanical issues there was not much wrong with the electronics. Not much, but few things seemed to out of place. The Y axis display seemed to loose track of the position once in a while, the rotary encoders of the controller unit are probably corroded and work half of the time. The spindle however did turn on and the speed was controllable with the potentio meter near the power inlet. So not a bad score. The verdict, lets continue fixing this piece of japanese craftmanship

Disassembly

Removing all the covers was a breeze, it became clear that the machine had been partly disassembled before. Most of the crosshead screws where heavily abused wth a screwdriver that obviously did not fit properly, so when reassembling I need to find myself some nice M3 and M4 screws that do this machine justice.

The controller and driver electronics can be removed from the back of the machine, just clipping some tieraps and removing some cable mounts, most of the cabling terminated with molex KK 254 connectors, so it separates easily. Whith the spindle and motor removed and the electronics out of the way the thing that is disassembled is the Z axis. Also to allow further inspection of the ballscrew that was missing a few (or many) balls.

Next up was the removal of the X/Y table, this is done by removing the round guiderails from the base and the table. The steel rods are secured with imbus screws at one end and the fit is H7 precision milled holes. Under normal conditions the rod would just slide out as it is not press fit, but after years of moisture and temperature changes the aluminum body and the steel rods cold welded together. It took a few hours and some custom tooling to remove the rods from the base and the table. It also was clear the the X and Y axis guide rails did not have a layer of fly rust but had some serious, dents and scratches. While trying to sandpaper them into a smooth and even surface again I realized that this would be come a nightmare and that whatever precision the machine once had would go out the door.

With the ballscrews, motors, coupling etc removed it it was posible to clean and inspect the different components. As the ballscrews where mostly covered in dried out grease they had not suffered the same fate as the guide rails. So these could luckily be reused. This grade of ballscrew would set you back a couple of hundreds when replacing them with the same quality. Alternatively a cheap 1204 ballscrew could be used, possibly sacrificing some precision.

The only parts that were not removed fromt he machine were the 35 mm guides of the Z axis, these were so stuck, are not really in the way of any refurbishing and alse had very limited rust so did not have to be replaced.

Cleaning and fixing  

Now with an explosion of parts it was time to start cleaning everything up. 

The base

I removed the paint and scrubbed the bare metal with a wire brush until the white coat of oxidation was completely removed from the aluminium base. With a knife I peeled the flakes of paint from the machine until it got really hard to remove (meaning it was still in tact). After cleaning the base up the work of applying car filler, to get rid of the ugly dents that were created where the paint was removed. Now the process of sanding, filling, sanding, filling, applying primer as a base coat started.

The covers

The metal covers were even worst. I started with the wire brush, then tried a motorized wirebrush on my hand drill and finally ended up using an angle grinder with a laminar buff to remove enough material to get rid of allt he rust. Here also car filler saved the day. Dus to my impatience I did not get it perfect but the improvement was major nevertheless. The covers I was able to clean and spraypaint in one go. Having everything in a single color again made a huge improvement already and helped with morale.

The spindle support

After putting some cloth in the 35 mm bush bearings to make sure that no grit or dirt could end up in the linear baring I completely scrubbed the casted unibody. After completing that and cleaning it up with some spiritus it looked nice. It does not have a coat of paint but given that it was not in a realy bad shape, my assumption is that it will last my lifetime without any further hassle.

The spindles

I have to make a distinction here between the spindle motor and the removable spindles that are mountend in the unibody frame. These spindles have a collet that I think is unique to this machine, the tighning nut and the collet are one and the same thing. It works but there are better alternatives in this day and age. There are 2 spindles with a collet mount and there is one spinle with a drill head/chuck. These machine were often used to drill holes in PCB's so that makes sense, at least to me.

Cleaning the spindles

While turning the spindles by hand they all sound slightly different. Mostly because there is a different amount of grease in the bearings I suppose. Other posibility could be that there is a different amount of play in the spindles. The bearings are at oposite side and are angle bearings so play can be removed by tightening the nut that holds everything together. I decided to take on of them apart to see what it looks like on the inside and apply some grease when reassembling. In the end the plan changed to creating a ER11 finish on the spindle and replace the current collet system all together for one of them.Worst case scenario, if this plan fails I have a backup unit. When the time comes for this side project I will record my findings in a separate blog.

Using thinner I removed the old grease from the bearings, the are semi closed so using a compressor with a piece of cloth around the bearing saves you the embarresment of having grease spread evenly all over your face. I don't know yet if I want to replace the bearings. Given other wear and tear (the Z axis) I have the feeling that this little machine has seen a lot of use, and ocasional abuse. For now they seem to work, just not that silent

The spindle motor

Yikes, there is a lot to say about this motor, for one it uses carbon brushes, the color of the motor is the ugliest shade of grey they could find and the thing is noisy as hell. No wonder I considered replacing it ... but with what. 

Currently the motor controller is in working order. The motor fits snuggly in the Z chassis and delivers a decent amount of power given its size. Replacing it would also mean replacing the motor controller, which in turn would make the tacho/rotary encoder on the pully of the spindle useless without conjuring up a electrical circuit or modifications to the software to actualy have a feedback loop.

The remaining electronics

A few components remain relevant, the transformer has powered this machine in the past and it would surely be able to do so in the future, right? The motor driver PCB features a solid state relay that is used to chop the sine wave and regulate the RPM of the motor. When the motor is not replaced al can remain the same and the orginal wiring can be used. The display that is mounted to the front of the Z axis unibody, showing the cartesion coordinates of the three axis in 0.01 mm increments. If this display can be reused that would be awesome as it would mean that the physical appearance remains unaltered. More on this later. The last piece of electronics that I would like to salvage is the controller. The base has a magnetic sheet glued to the front and the manual control box just stick to this with a large metal bottom plate. Once attached it looks like part of the machine.

Autobots transform

I would personally not use a block style transformer in the current day and age, but a torodial transformer when building a machine like this. This transformer however fits the housing, it already fused and the secondary windings give voltages that are matched for the used stepper motors. 

When measuring the actual voltages I did not end up with the expected values but slightly higher which would bring the voltage for the stepper motors close to the maximum allowed value. After looking at the diagrams again I found out that the transformer can be wired for 110, 220 and 240 volt and this one was wired for a primary voltage of 220 volt, in line with the net supply of the Netherlands in the 1980s. Gradually the net voltage has been increased in roughly a decade of time. Checking an outlet gives me a 235 volt reading. A quick rewire brought the output voltage back on spec. Nice if some things are so easy to solve. Wat remains for now is to create a small voltage regulator for 12 volt output to make it possible to power some of the electronics. As a workarond I've added a switching powersupply for this for now.

The motor driver

Nice to have all this stuff in place. A small, white, 4 pin molex connection is used to control the motor. While testing it scared the shit out of me as I was making a connection on the female molex connector, providing the 12 volt powe to drive the circuit. Then making a connection to the motor on pin. Stupid that when you connect something to let a motor spin that I still was caught by surprise that the the thing started spinning, at full RPM as there was no feedback from the tacho yet. What is tricky is that the encoder (tacho) is connected to the display (VF signal) to show the actual RPM as a bar on the display, a control voltage signal is then connected to the motor driver. I'm not sure yet if the machine in its orriginal state controlled the RPM or if this was always done with the potentiometer on the motor controller PCB. 

The display

There is a lot of things that can be said about the display, it is actually a smart module as the actual pulse counters are part of this assy. Also the RPM to bargraph conversion is done here. The feedrate that is at the lower right hand side of the display is controlled from the original control board. What I like about this is that during normal operation it shows the feedrate setpoint, when an error occurred the LEDs are used to give a status indication what is wrong. Nice dual function. For now GRBL does not make it easy to do anything with the feedrate, maybe I need to switch to GRBL HAL in the future as this has a plugin architecture that allows you to extend the functionality. Don't know how yet but it looks promising.

Following the schematics I found out what pins are used to drive the display from the motherboard. A 15 pin connector holds the step and direction for each axis. The display is literally counting the pulses that are sent to each stepper motor driver. When hooking up the display with a breadboard as a proxy to an Arduino (Mega in this case) I got the Z and the X axis to work relative quickly. The Y axis however failed to stick to the promis of the diagram. OK, deduction mode on! With a 1k resistor in series I probed all the different pins and I could not get the Y axis to respond to amanually induced step signal. As I was about to give up and put the display back on my desk the Y axis came to life without any input. To cut a long story short. Through the year of use, the 24 wire cable moved up and down with the Z axis. The cable was mounted to the metal backplate and the plasitic clamp was a pinch/hinge point with a relatively sharp bend in the cable. I tried to solve the problem with three wires that were not connected, but I ended up discovering that more than one wire was actually broken. I ordered a new cable, molex pins and I'm still trying to find the correct crimp equipment to properly fix this. Until then I will have to solder 21 wires onto the existing connectors using a short piece of the original wire to connect it. Not pretty, but workable, nothing that a piece of braid and a crimpsleeve can not hide from sight :)

The 7 segment display units have a decimal point, this is however not used. It would make it a lot easier for quick readout if the display would show 100.00 instead of 10000 for 100 mm. There are some jumpers on the display board so maybe this is 

Stepper motor drivers.

The stepper motors are high quality Vexta steppers, originally these steppers were used in half mode, with seperate coils per phase. In my experience these also work well more modern stepper drivers. To avoid assuming that this would work a test setup was made with a driver actually moving all the individual parts of the machine and running some tests. What works well is using a tool like universal gcode sender to run an actual millng cycle without material in the machine or the spindle on. I ran 10 test cycles of 10 minutes virtually milling a design I once made. After that I checked the going to a know position with a measurement clock set up. This is to check if any steps were missed during the cycle. While that does not give a definitive answer (an equal amount of steps could be missed in both directions) it is a good start.

The new electronics

Overview

To keep things easy for myself I wanted to use some components that I already had and know. I have experience with GRBL, although outdate it is still new and relevant when compared to the age of the maching. GRBL runs just fine on a Arduino Uno, the one that I still had from trying to jailbreak my Apple TV 3 (and failed.) would do just fine. Initially I wanted to use separate drivers but the space in the Roland milling machine is confined/constrained. I had a board lying around that I did not dare use because of all the crazy bad reviews it got on the angry interwebs, maybe time to give it another go. Not unimportant is the software that needs to be used like Arduino studio and Universal GCode Sender. I'm not endorsing anything, I'm just pointing out what I'm using.

The stepper motor controller

As a stepper driver controller I used something that I once had bought and used in several test setups.  The board I'm talking about has 4 stepper motor drivers on a single PCB and a delta 25 printer connection to provide the steps and direction, with the users of Mach 3 in mind, using a paralel port on a PC. The board however has a very bad reputation of being unreliable, lots of stepper noise and even claims of spontanious blowups within the voltage specification. So I stay way below the maximum of 36 volts that the board should be able to handle, I run the motors at 25% current, and do not use microstepping. With what I tested, in a 100 minute run the board seems to stand its ground. If it would fail misserably it should take no more than a day to replace with 3 separate drivers. The fourth stepper driver (for a rotary A axis is currently not connected) due the use of an Arduino Uno with a limited capacity and pinout, software for the uno not being available for 4 axis.   

If you are thinking; "why no microstepping". This has to do with the display. The original configuration used the Vexta stepper's 400 steps per revolution to divide every millimeter of the ballscrew (4 mm per revolution) into 100 steps per mm. This makes it easy to create a direct relation between the steps and the lineair movement. The display counts these steps and comes to a 1/100th of mm precision on the display by just counting the steps. By using microstepping the amount of steps go up without the displacement changing, resulting in the display being incorrect. 

Not too bad, I often like to do some mechanical trickery to end up with integer values instead of floating point values.

The micro controller (and electronics)

I first thought there was nothing that I would be able to say about the arduino micro controller, besides that it survived some serious stupidity so far.

To be able to get everything neatly tied up in the original enclosure of the milling machine I thought it made sense wire everything on an experimentation PCD that piggybacks on the Arduino. I found out that not knowing how to use a design program for circuits boards can make your life misserable

I first created the layout of the solder islands in an overview drawing. I wanted to put a 26 pin boxed header on the print to use a flatcable with a delta 25 connector going to the stepper controller. Since the driver board is restricted to what data terminals there are within the parallel port the layout for these pins is predetermined. On the connector the driver enable, step and direction pulses are present for the 3 (some 4) axis, 3 limit switches are handled here and a switch for the emergency stop. This emergency stop is also present on the display (effectively the only control in the form of a button) 

This is a table of the different pins on the delta 25 and a drawing of the physical layout. I always seem to forget what pin 1 is on a connector.

So the step and direction pulses for the display also need to go somewhere. I added the 15 pin molex connector tot he drawing and labeled the pins where appropriate. Last but not least I marked the pins on the arduino where, with the standard layout of GRBL, the input and output signals should be. 

Now the great puzzle begins, I decided to use the soldering islands as vias. Al the tracks run horizontally on the bottom side and vertially on the top side (isolated wires). After a few hours of connecting the dots I had a design that in my opinion had the shortes path from point to point and required the least amount of soldering work. After switching the tip of my soldering iron the process of wiring everything sped up. Even after quadruple checking the soldering there were several things wrong. Most of them in the design phase. Luckily the strategy of shortest paths and horzintal and vertical distribution made the fixes relatively easy.

In its current state both the stepper driver board and the display are doing what I tell them to do.

The software

When I ran a test with the milling machine connected I had to figure out if I could get the homing cycle to work. 

Some theory

Homing in the CNC world means, First retract Z to make way for X/Y moves. The z axis moves all the way back to a limit switch. When the switch triggers the machine immediately stops, it then reverse the motion for a few milimeters and then appoaches the limit switch at a much lower speed to alow the switch to more accurately trigger (also reducing the timing component). When Z is homed, The X and Y axis both move at the same time in the direction of teh limit switch that is set up for homing. The same procedure as with the Z axis takes place. When all the axis are homed, the software has a 0,0,0 reference where to start from.

Cartesian mindfuck

I also have a portal mill, this mill has a stationary bed and the milling spindle is attached to the gantry and  moves over the bed. So sending the mill in a positive position for X or Y moves the mill in the positive direction, away from me and to the right.

The Roland PNC-3000 has different approach, the mill is stationary and only moves up and down in the X/Y plane and the table moves under the mill. While testing (without the home switches) I used UGS (Universal Gcode sender) to move in a positive direction, so X+ moved the table to the right. Y+ moved the table upwards. 

Only when trying to get the limit switches working I realized that the table moved in the oposite direction. If the tool needs to move to the right in respect to the object that is processed the table is moving to the left. same applies to the other axis in this plane.

So where can these direction be changed? 

  • Flipping 2 wires of the coil of the stepper motor makes it move in the oposite direction.
  • The direction can also be changed by inverted the direction signal from the arduino to the stepper motor. 
  • The homing direction can also be changed. 

What can't be changed though is what the display uses as a positive or negative movement.

For me it seem logical that the part is placed as it is designed and that the path that is calculated is visible as such. UGS has a visualizer and I'm sure that you can rotate the axis in UGS for the visualizer but for me.

Positive move means the tool moves to the right or the top of the object. I will have to see how all this wil work out. 

Doing your home work (aka getting homing to work)

So when a homing command is given first the Z axis and then the X/Y axis are homed. So the table needs to move into the direction of the limit switch.

The limit switches are at the top and the left hand side. 

To check the configuration of GRBL you can type $$ in the console window of UGS (or any other terminal application)

This dumps

$0 = 10    (Step pulse time, microseconds)
$1 = 25    (Step idle delay, milliseconds)
$2 = 0    (Step pulse invert, mask)
$3 = 0    (Step direction invert, mask)
$4 = 1    (Invert step enable pin, boolean)
$5 = 0    (Invert limit pins, boolean)
$6 = 0    (Invert probe pin, boolean)
$10 = 1    (Status report options, mask)
$11 = 0.010    (Junction deviation, millimeters)
$12 = 0.002    (Arc tolerance, millimeters)
$13 = 0    (Report in inches, boolean)
$20 = 0    (Soft limits enable, boolean)
$21 = 0    (Hard limits enable, boolean)
$22 = 0    (Homing cycle enable, boolean)
$23 = 0    (Homing direction invert, mask)
$24 = 25.000    (Homing locate feed rate, mm/min)
$25 = 500.000    (Homing search seek rate, mm/min)
$26 = 250    (Homing switch debounce delay, milliseconds)
$27 = 1.000    (Homing switch pull-off distance, millimeters)
$30 = 1000    (Maximum spindle speed, RPM)
$31 = 0    (Minimum spindle speed, RPM)
$32 = 0    (Laser-mode enable, boolean)
$100 = 200.000    (X-axis travel resolution, step/mm)
$101 = 200.000    (Y-axis travel resolution, step/mm)
$102 = 200.000    (Z-axis travel resolution, step/mm)
$110 = 600.000    (X-axis maximum rate, mm/min)
$111 = 600.000    (Y-axis maximum rate, mm/min)
$112 = 500.000    (Z-axis maximum rate, mm/min)
$120 = 50.000    (X-axis acceleration, mm/sec^2)
$121 = 10.000    (Y-axis acceleration, mm/sec^2)
$122 = 10.000    (Z-axis acceleration, mm/sec^2)
$130 = 200.000    (X-axis maximum travel, millimeters)
$131 = 200.000    (Y-axis maximum travel, millimeters)
$132 = 200.000    (Z-axis maximum travel, millimeters)
ok 

The settings that are relevant for homing are

$3 = 0    (Step direction invert, mask)

This is a value where 3 bits can be set to indicate if X, Y, and or Z motors go clockwise or counter clockwise.
x-dir has a value of 1 -> bit 001
y-dir has a value of 2 -> bit 010
z-dir has a value of 4 -> bit 100
To indicate for example that X and Z need to be reversed set the values 

1 + 4 = 5 -> bit 001 + 100 = 101
The controller will use this value to reverse the behavior for the corresponding stepper motors
The maximum value is 7, with 8 possible permutations.

$23 = 0    (Homing direction invert, mask)
This is also a mask as explained in for parameter $3 and indicates the direction the axis will move. if the table moves in the wrong direction, first make sure that the direction is correct when manually positioning. After this, if any of the axis move in the oposite direction of the limit/homing switch the mask can adjusted accordingly.

$24 = 25.000    (Homing locate feed rate, mm/min)
This is the speed at which the acurate positioning takes place. At first the machine performs a fast move in the direction of the limit switch. This saves time when homing but the switch is pressed very quickly resulting in a less acurate result. The speed for the fast move can be set in parameter $25. The speed as set in this example makes the machine move very slowly towards the switch giving a more repeatable result. Repeatability is important because after homing it is the intention that a job can be resumed after the machine has lost his knowledge of the absolute positioning. For example after failure or a power cycle. It is always good validate if the positioning is acurate and I do not recommend restartign a job based on homing alone, it has saved me several times though (during 3d printing, not milling)

Seek rate

$25 = 500.000    (Homing search seek rate, mm/min)

This is the setting of the velocity for fast moves. Please take into account that a machine can not stop immediately. The mass of the machine will make rapid deceleration impossible. When the machine reaches the limit switch it needs to stop immediately. Setting a value that is too high might damage your machine as it cant stop in time and crashes into your limit switch or mechanical hard stop. Start with a lower value first and if visually validate the speed. The seek rate is expected to be higher than the locate rate.

Debounce delay 

$26 = 250    (Homing switch debounce delay, milliseconds)

When the metal contact of a switch moves it is a spring action. As a result, when making contact, the metal part bounces a few times, giving not one but multiple short pulses before the contact is fully made. This behavior is noticable when the contact is normally open and closes (making contact to indicate the switch is triggered). When a switch is normally closed, it is opened when the switch is triggered. Normally closed is preferred as it would also trigger a machine stop if for some reason there is something wrong with the cabling. The debounce time suppresses the repetive triggers of bouncing. 

Switch pull-off distance

$27 = 1.000    (Homing switch pull-off distance, millimeters)

The pull-off distance is the amount of mm that the cariage of the axis is pulled back after the switch was triggered. It should be enough to break the contact of the switch. A switch has a hysteresis, the point of making contact and the point of breaking contact are a little bit apart. This is by design to make sure that a switch that is just triggered wouldn't keep triggering due to mechanical vibration. after moving 1 mm as in the example setting the machine is at 0 (origin) 


No comments:

Post a Comment

It is not good because it is old, it is old because it is good

In the category: Borrowed wisdom is better than no wisdom at all. The title is a quote I have seen somewhere in a machinist forum. I can...