Saturday, 14 April 2007

Stacking up

You may notice my blog entries slow down a bit as I have now finished catching up so it has become real time. Hopefully I should get less complaints about mixing tenses in a paragraph!

I have made a clamping system to fasten PCB material to my XY table. The test using masking tape worked surprisingly well but I need to be able to turn the board over whilst maintaining alignment for double sided PCBs.



The bottom layer you can see in the picture is a plastic tray to catch the dust from milling. It is the bottom half of a Ferrero Roche chocolate box. They make great boxes but unfortunately my wife does not rate the chocolates much.

The next layer is a sacrificial piece of laminate flooring to support the PCB and prevent breakout when it is being drilled. It seems a shame to cut it up and use it this way but at £6 per square meter this piece only cost £0.17 and I can use both sides at least once.

The blue sheet is single sided PCB material. I will use the machine to route a square aperture in the middle of this at the limits of the XY table's travel. The PCB being made will rest against one corner of the aperture to locate it. Being double sided it will stand proud by 0.3mm due to the extra layer of copper.

The top layer is a 3 mm aluminium and plastic laminate that I will use to clamp the board down on two edges. I will use the machine to route a slightly smaller aperture in it than the layer below so that it overlaps slightly. The other two edges of the board will be held down with masking tape.

The whole lot is clamped by four 2 BA nuts on threaded rods that fit holes in the XY table. My XY table is imperial and the rest of the machine metric!

I am currently working on the firmware. I have replaced the test code I cobbled together just to try things out with an interrupt driven 3D Bresenham line drawing routine. Although I probably will never need to step Z at the same time as X and Y it was easier to code the general case. It makes some interesting sounds when in runs because the motors play a three note chord depending on the gradient of the line.

The code is written in C in an object oriented style even though C is not an OO langauge. I always tend to code like that and have done so since before I knew what OO was. The three axes are represented by structs that store the position, etc, along with function pointers for stepping and reading limits which is axis dependent. That way I can reuse the same Bresenham and homing code for all three axis.
typedef struct axis {
sword pos; // Current position
sword min; // Limits
sword max;
sword steps; // Number of steps to do this line
sword dir; // Direction of each step +/-1
sword acc; // Brezenham accumulator
void (*set_dir)(bool); // Virtual function to set direction output (X,Y only)
void (*start_step)(void); // Leading edge of step pulse
void (*end_step)(void); // Trailing edge of step pulse
bool (*mlimit)(void); // Read the negative limit
} axis_ty;
The next task is to link HydraRaptor to my PC using Ethernet. The demo box comes with a free TCP/IP stack but it is not very efficiently written so I will replace it with my own minimalist version. I will just implement ARP, IP, UDP and ICMP ping. I have done this before so it should not take me too long.

Wednesday, 11 April 2007

The powers that be

When trying to make parts of my machine stiffer I got to wondering about the relationship between a material's thickness and its resistance to bending. It is obviously not a linear relationship because as a sheet gets thicker not only is there more material to resist bending, but the outer layers have more leverage than the inner, so it must be at least a square law. I tried googling this for some time but failed to find a formula. I did find a comment on CNCzone by somebody that thought he recollected it being a fourth power law. I can believe this because we recently had two versions of a metal box made at work, one in 0.5 mm steel and the other 0.8 mm. While the thin one was quite flimsy the 60% thicker one was very solid. Any mechanical engineers out there?

I came across another fourth power law recently on the website of the company that made my XY table. If you have a servo system moving something from A to B as fast as it can go, then going twice as fast requires 16 times the power. Some video lectures, and a lot of other useful info about servo systems, are here www.neat.com/products/corner/default.asp.

The highest power law I have ever come across is that incandescent bulb lifetime is inversely proportional to the 12th power of voltage, see www.allegromicro.com/en/Products/Design/an/an295012.pdf. Can anybody beat that?

Tuesday, 10 April 2007

Trouble at' mill

Having established that the axes were all working well I decided to do some tests to check the feasibility of milling PCBs. I originally planned to use a Dremel but its shape looked difficult to mount. I saw a cheap alternative that was cylindrical so I decided to give it a try.

I made some mounts out of MDF and these were bolted onto a 2 mm aluminium plate which had some folds in it for strengthening. I could not find a source of countersunk bolts long enough to go through the top mount. Instead I used some shorter ones and made captive nuts out of PolyMorph. I did this by first drilling clearance holes from the back of the mount to a depth just longer than the bolts. I then drilled 5 mm holes through the thickness of the MDF to meet them. I filled these with molten PolyMorph. When it had set I drilled it for tapping but I found I could just screw the bolts in and they cut their own thread. This technique seems to make a successful fastener system.



I asked a friend who works for a company that owns a professional PCB mill what they place under the PCB while it is being drilled. He was kind enough to send me a sample. It is 2 mm hardboard laminated with a thin layer of hard, melamine like, substance on each side. I have not found a source for this yet but my wife, ever keen to see "junk" turned into something useful, suggested I used some laminate flooring offcuts we have in the garage. I will give this a try, but for my initial test I used the hardboard sample. I just taped it to the top of my XY table with masking tape and taped a piece of PCB material on top. The arrangement is shown below :-



And here is a magnified view of the results :-



The diagonal on the far left is where I broke a drill due to a typo in the code: step_x instead of step_z. The drill made a valiant attempt at being a milling bit before it snapped. Not a good start, this could get expensive!

The holes on the left are 1 mm on a 50 thou grid. So far I have tried to keep all the units in this blog metric but PCB measurements are traditionally done in 1000 ths of an inch because most component leads are on a 0.1" grid. Again this was a bug but it turned out to be a good test to show drill run out. The gaps between the holes should be 0.27 mm or about 10 thou.

The holes in the middle are on a 0.1" grid which was my original intention. The holes don't actually go all the way through due to end play in the drill.

The bottom slot on the right was done with the conical tool shown in the picture below :-



This has quite a fine tip but an abrasive surface rather than cutting flutes. I estimate the channel is about 20 thou but the edges are a bit ragged, particularly the top edge. The tool rotation was clockwise and the travel left to right. This means the bottom edge was climb or down milled and the top edge conventional or up milled. Climb milling is recommended for a better finish so I need to organise my tool paths to go clockwise around the outside of tracks.

The three tracks were produced with a rose burr tool like the one on the far right but smaller. The remains of it are shown in the middle. I snapped it after the test with another accident. This tool created a smoother cut. Again, the bottom edge is cleaner. The bottom track is about 20 thou, the middle one 10 thou and the top one 15 thou. The gap between tracks is about 30 thou.

My target for through hole PCBs is 10 thou tracks and 15 thou gaps. This allows one to get a track between two 60 thou pads 0.1" apart, i.e. between the legs of a chip.

Things I learned from this experiment :-

  • Not surprisingly, the cheap (£20) drill was not up to the job. It has about 1 mm end play and noticeable lateral play. It is also very noisy when mounted on the machine. I have ordered a 30000 RPM 600W laminate trimmer for £26.49. Again, I will not know the quality of the bearings until it arrives, could be another mistake.



    If that does not work I might try a Dremel or perhaps one of these :-



    This is an 800W router spindle motor for about £80.

    There is a good article on how to make your own PCB router spindle here but I think my lathe is too small.


  • The 2mm aluminium plate is not stiff enough, I got a 6mm slab from eBay to replace it.


  • The milling bit, before I broke it, was too big. I got an eight piece "carbide circuit board maker" kit from Drill Bit City for $23. They were very helpful and efficient. Again the good stuff is on the wrong side of the pond so the shipping was another $12.



    They also sell carbide end mills down to 5 thou. These are quite pricey and delicate but I might try some when the software is stable. I will need smaller clearances for fine pitch surface mount.

  • I need dust extraction and it needs to be a fairly strong suction to lift the copper chips. I can buy a 1300W vacuum cleaner from ASDA for about £17.

Despite the deficiencies noted above I think the test was reasonably successful. In fact the current set up could probably produce a working PCB. I will get the software written and debugged before I fit the new parts. A 600W router could do a lot of damage! It would bring a whole new meaning to the phrase "software crash".