Wednesday 30 May 2007

Underpowered

I have done quite a bit of milling with my Minicraft drill attached to HydraRaptor. I always considered it a bit underpowered for the job but it mills plastic and copper clad board reasonably well. Recently I started using it for drilling plastic. The first thing I drilled was 6mm Perspex. I programmed a pecking action to avoid the drill clogging as Perspex tends to melt when it is drilled at high speed. Again this worked reasonably well. The next thing I tried was drilling 25mm metal loaded resin. No matter how slowly I went I could not stop the drill from stalling once it got to a certain depth.

I decided the only way to solve the problem was to monitor the drill speed, detect when it was about to stall and automatically back off until it speeded up again. To this end I started investigating ways to monitor the speed. Off the top of my head I came up with four alternatives :-

  1. Monitor the current, because it increases as the speed reduces.
  2. Turn it off occasionally and monitor the generated voltage.
  3. Measure the frequency of the commutation noise.
  4. Put a black spot on the chuck and use a reflective opto detector to count shaft revolutions.
I attached the drill to a 12V switch mode PSU in order to take some voltage and current measurements and look at the current waveform on a scope. To my surprise the drill went much faster on the 12V PSU. The PSU that came with it is labelled 11.5V 400ma 4.6W but when loaded by the drill it was only giving about 8V. Then I looked at the drill and saw it was labelled 12V 40W. A bit of a mismatch! When driven from 12V it takes about one amp with no load. No wonder it was stalling so easily. It also explained why when it does stall it does not seem to care. Most drills start smoking pretty quickly if you stall them.

So it looks like the drill is ten times more powerful than I thought. The only problem is that it could do with some speed control as it goes a bit fast for plastic when running from 12V.

So now my next task is to tame it with PWM and monitor the speed somehow. I also want to control the vacuum cleaner with software as I am too lazy to switch it on and off.

Saturday 26 May 2007

Tooled up

I wired up and tested the tool height sensor that I made last week and it worked fine. It gave consistent and repeatable results. Rather than use an OR gate I just connected two of the pins to two inputs of my micro and did the OR in software. I configured the micro to have internal pull downs and I connected the third pin of the sensor to 3.3V via a current limiting resistor. This configuration allows for the tool to be connected to ground, in which case either the tool touching the disk or any of the three contacts being broken will take at least one of the inputs low.

The software just plunges the tool into the sensor at full speed. As soon as one of the inputs goes low it backs up 1 mm and then descends slowly until it breaks the connection again.

There was only one small problem ... I made it for the wrong corner of my XY table! Having it on the right meant that the vacuum pipe had to clear it so could not be as close to the workpiece as it could otherwise be. No problem, I just got HydraRaptor to make another base for the left hand corner. I designed the part in Visio and then manually made a Python script to mill it. At some point I need to find a free CAD / CAM program for things like this.

Here is the drawing :-



This is what the script looks like :-
from Hydra import *
from Arc import *
from Tool import *
from Line import *

hydra = Hydra("10.0.0.42")
top = 6.1
base = -0.3
hydra.work_origin = (-50,0)
hydra.work_height = top
hydra.measure_tool(end_mill)
hydra.tool = end_mill

tr = end_mill.radius

# recess
hydra.drill((0,0), 18.0, top, 5.6)
hydra.drill((0,0), 15.0, top, 5.6)

# spring well
hydra.drill((0,0), 10.0, top, 3.0)
hydra.drill((0,0), 2 * tr, top, 3.0)
hydra.drill((0,0), 7.0, 3.0, 1.0)
hydra.drill((0,0), 2 * tr, 3.0, 1.0)

# screw hole
hydra.drill((13.5,19), 5.0, top, base)

# outline
outline = [Line(-10,32.5), Arc(-9,32.5,-9,33.5,-1), Line(26,33.5), Arc(26,32.5,27,32.5,-1),
Line(27,-9), Arc(26,-9,26,-10,-1), Line(0,-10), Arc(0,0,-10,0,-1)]

hydra.mill(outline, top , base)

del hydra
And here it is installed :-



You can see that I used JB Weld to glue the pins in. I did that to stop them moving when I soldered the wires on, as Perspex melts very easily.

Below is a video of the new base being made. You can see the right handed version of the tool sensor being used at the beginning. I upped the feed rate to 15mm per second with no problems. Even so it took more that 15 minutes to make the piece so I have speeded up the video by a factor of two.



Obviously it is important to switch the spindle motor off when measuring the tool! At the moment I am doing this manually. I forgot once but I got away with it because it measures so quickly. The next job is to put the motor under software control.

Sunday 20 May 2007

Let there be light

Taking close up video footage requires quite a lot of light because the maximum exposure is limited by the frame rate and zooming in wastes a lot of the light hitting the lens. I have previously been using a random collection of incandescent spot lights totalling about 200w. These gave an overly warm white balance with my camera, a Fuji Finepix 900, plus they tended to get in the way and gave off a lot of heat. I decided to try LED lighting as that seems to be the future. I suspended twelve 1W white LEDs over the top of the machine on a sheet of aluminium laminate plus another six on a strip of copper PCB laminate under the box that supports the Z-axis.



The LEDs were wired in groups of six in series and connected to the 24V supply with a small series resistor. I adjusted these to get about 300ma. A constant current source would have been better but I didn't have any suitable medium power transistors to hand and the supply is well regulated.

Here is what they look like in the machine viewed from below, they are not visible with the normal camera angle from above.



They seem to be bright enough for shooting video and they are only using 18W, 10 times less than my spot lights. If you compare my second video with the first you can see the difference although I didn't have the bottom six installed at that point.