As others have done before me, I decided to test the Cartesian system by turning it into an over engineered pen plotter. I used the refill out of a Fisher Space Pen which apparently "is the most advanced writing instrument in the world". If so, when controlled to a precision of 6 μm, it must make HydraRaptor the most advanced writing machine in the world! I can't think what I would use it for apart from forging signatures.
I suspended the pen from the z-axis on a random bit of aluminium using a lump of PolyMorph. This made a perfect mount because I pushed the pen through while it was still molten. There was no play, but if the z-axis were to overshoot, it would just pop the pen out rather than ram it into the table.
I ran a simple program which went from the origin to one edge, around three sides and back to the origin again. It then repeated this, stepping in by 0.2 mm each time. I soon realised the line width was bigger than 0.2mm so I stopped it and ran it again with a step size of 0.4 mm. This left a gap between the lines and produced the pattern below.
Here is the top left corner magnified.
You can see the corners are pretty good considering the table was travelling about 4 cm per second with no acceleration, deceleration or pause as it turned. At this resolution the graininess of the paper is the most significant distortion.
The paper was stuck to the metal top of the XY table with masking tape. I set the height of the pen by stepping it down until it just started to leave a mark on the paper and then one step more. The paper was about 0.1 mm thick so that meant the pen was pressed about half way into it. As you can see from the first picture the pen never left the paper so the table must be pretty flat and its movement true. Here is the machine in action :-
The results look promising, time to have a go at milling next.
Monday, 9 April 2007
Sunday, 8 April 2007
Know your limits
The XY table boasts Hall effect limit switches with a repeatability of ±2.5 μm so I should have no problem getting a repeatable homing position to the nearest 6 μm step. They do however have quite a lot of hysteresis and activate some distance from the actual physical end stop. In my first cut of the code the homing routine steps quickly until it sees the negative limit and then steps slowly forward until it sees the limit go away. It sets the position at this point and then ignores the limit from then on so it can achieve the full range of travel. I am not sure whether both positive and negative edges of the limit signal have the same accuracy. I will get more idea when I write the shaft encoder software. These have an index pulse so, no matter how inaccurate the limit switch is, I will be able to get an absolute fix on the position to within one shaft encoder step, which is the same as one stepper microstep.
I haven't used the positive limits yet and I can't think of a reason for needing them except for possibly an automated self-test. I will use the shaft encoders to check that the table is where I think it should be and halt if I find a significant discrepancy. That would indicate a firmware bug, tool crash or hardware failure.
The z-axis did not come with limit switches so I had to improvise. I wanted repeatability to within one half step, i.e. 50 μm. The software knows what the shaft position modulo 8 is because it knows the phase pattern applied to the motor. That means it only needs a limit switch with repeatability better than 0.4 mm. I decided to try a micro switch to see if I could find one good enough. As you can see I have managed to amass quite an extensive collection!
I picked one of the small ones on the bottom right and it seems to do the trick. Again it has significant hysteresis as one would expect. My homing routine steps upwards at speed until it activates the switch and then steps down slowly until the switch opens again. At this point I AND the motor position with 7.
Once the homing was sorted out I was ready to test the accuracy.
I haven't used the positive limits yet and I can't think of a reason for needing them except for possibly an automated self-test. I will use the shaft encoders to check that the table is where I think it should be and halt if I find a significant discrepancy. That would indicate a firmware bug, tool crash or hardware failure.
The z-axis did not come with limit switches so I had to improvise. I wanted repeatability to within one half step, i.e. 50 μm. The software knows what the shaft position modulo 8 is because it knows the phase pattern applied to the motor. That means it only needs a limit switch with repeatability better than 0.4 mm. I decided to try a micro switch to see if I could find one good enough. As you can see I have managed to amass quite an extensive collection!
I picked one of the small ones on the bottom right and it seems to do the trick. Again it has significant hysteresis as one would expect. My homing routine steps upwards at speed until it activates the switch and then steps down slowly until the switch opens again. At this point I AND the motor position with 7.
Once the homing was sorted out I was ready to test the accuracy.
Saturday, 7 April 2007
... like a bride's nightie!
The z-axis was advertised as accepting a NEMA23 dimension motor without any adapter flanges. The motors that I have are more than 10 years old and I don't have any data on them so I don't know if they are true NEMA23 or not but they weren't quite compatible in two ways. The shaft exits from the wrong end and the holes are tapped M4 but the holes in the frame are also tapped M4 and blind. I resolved this by mounting it upside down on some aluminium pillars that were nearly the right length. I had to turn them down in the lathe, drill them and tap them to insert M4 bolts with the heads cut off. The result was very solid because the pillars exactly fit the semi-cylindrical recesses of the motor.
I used a flexible coupler, shown above, to join the motor shaft to the drive screw. This allows for slight misalignment. A cheap alternative can be made from plastic or rubber tubing and pipe clips but I had a couple in my junk collection so I used one. This may have been a mistake because the z-axis is very noisy when it is running. This is made worse by the fact that it is mounted on an MDF box structure which resonates. A softer coupling may help here. Another idea I had was to fill the box with something to dampen the sound, fine sand perhaps, I am open to suggestions.
BTW, if anybody is interested, there were more of these axes available here when I last looked.
The z-axis only needs to move relatively slowly so I used a simple unipolar drive circuit based on a ULN2803 octal darlington driver chip. I paired up the channels to get enough current because with only 3.3V inputs they are derated somewhat. The 2803 has internal clamping diodes to protect it from the back e.m.f. generated when a winding is turned off. Rather than tie these to a zener off the positive rail, like the RepRap version does, I clamped the outputs to ground with some external diodes. This makes use of the fact that each centre-tapped winding behaves like an auto transformer, so if you stop one end going below zero you stop the other end going above twice the supply rail, in my case 48V. This technique has the advantage of returning the energy in the coil to the supply rail, rather than dissipating it in the zener. It has the slight disadvantage that if you disconnect the motor while the power is on you risk damaging the driver. I used fast recovery rectifiers salvaged from the same broken PC power supply I mentioned before. These will perform better than ordinary rectifiers if I do any high frequency PWM for micro stepping.
The motor got quite hot when it has been on a while, leveling off at about 60°C. It is, after all, dissipating about 19W. While I didn't think this was a big problem I decided to stick a spare CPU heatsink and fan on the top. I ran this from 5V rather than 12V to keep the noise down. It reduces the temperature to about 40°C. With a constant voltage drive, keeping the temperature down stops the torque falling off due to increased winding resistance.
The next step is to write some code and test the axes.
I used a flexible coupler, shown above, to join the motor shaft to the drive screw. This allows for slight misalignment. A cheap alternative can be made from plastic or rubber tubing and pipe clips but I had a couple in my junk collection so I used one. This may have been a mistake because the z-axis is very noisy when it is running. This is made worse by the fact that it is mounted on an MDF box structure which resonates. A softer coupling may help here. Another idea I had was to fill the box with something to dampen the sound, fine sand perhaps, I am open to suggestions.
BTW, if anybody is interested, there were more of these axes available here when I last looked.
The z-axis only needs to move relatively slowly so I used a simple unipolar drive circuit based on a ULN2803 octal darlington driver chip. I paired up the channels to get enough current because with only 3.3V inputs they are derated somewhat. The 2803 has internal clamping diodes to protect it from the back e.m.f. generated when a winding is turned off. Rather than tie these to a zener off the positive rail, like the RepRap version does, I clamped the outputs to ground with some external diodes. This makes use of the fact that each centre-tapped winding behaves like an auto transformer, so if you stop one end going below zero you stop the other end going above twice the supply rail, in my case 48V. This technique has the advantage of returning the energy in the coil to the supply rail, rather than dissipating it in the zener. It has the slight disadvantage that if you disconnect the motor while the power is on you risk damaging the driver. I used fast recovery rectifiers salvaged from the same broken PC power supply I mentioned before. These will perform better than ordinary rectifiers if I do any high frequency PWM for micro stepping.
The motor got quite hot when it has been on a while, leveling off at about 60°C. It is, after all, dissipating about 19W. While I didn't think this was a big problem I decided to stick a spare CPU heatsink and fan on the top. I ran this from 5V rather than 12V to keep the noise down. It reduces the temperature to about 40°C. With a constant voltage drive, keeping the temperature down stops the torque falling off due to increased winding resistance.
The next step is to write some code and test the axes.
Subscribe to:
Posts (Atom)