Sunday, January 6, 2013

Feed Speed

I've implemented feed speed. In machining, "speed" usually refers to the rotation speed (RPM) of the spindle/cutter. Feed rate refers to the speed that the cutter moves through the material - the speed of the table. Here, I'll just use speed for the latter.

Up until now my gcode interpreter has simply been building a 3D path and ignoring the speed information in the file. I've been "babysitting" the program runs, moving the speed override ("throttle control") as I need to. I've added support for the speed information in the gcode.

For the acceleration development I've been rendering little boxes around each location point and coloring it according to the speed through the point. I thought it would be cool to change the color of the line as the speed changes. I thought such a thing would be pretty challenging and I'd give it a try later on. Using the point-coloring method or printing speed values to the console isn't very readable. I came up with a clever idea for coloring the line and it turned out to be pretty easy. Here's a shot:


I created a list of colors like the ones used on weather maps to indicate storm intensity. The vertical traversals in white in the center look a little funny because the up speed is different than the down speed and the colors kind of jump back and forth as the scene is rotated. Having the color blending in the lines really helped develop the support for speed changes.

I've calculated the maximum feed rate of my mill to be 18.75 IPS (inches per minute). Obviously since this is the first time I've had IPS support, I've never considered the speed in any sort of objective way. I just run the mill and position the throttle "by feel". So now I need to calibrate my brain and learn what speeds work for what materials and processes. I don't think there will be too many values I'll actually use. I'll probably use something like 1, 5, and 10 for nearly everything (and 18.75 for rapids, of course).


Tuesday, January 1, 2013

First Real Project

My friend Bob is a rock star. Well, he's the bass player in a band, I don't know if that counts. Anyway, the band is called Phoenix Rising and Bob did the logo design. Probably more than a year ago he did a graphic design job for me and I suggested I could make a key chain for him with the band's logo on it. So right on schedule, I finally got it done. It's not really a key chain, though, it's 3/16" thick aluminum and over 2" x 3". I decided to call it a "plaque" and put a couple holes for screw mounting to a guitar case or something.

It's a simple design, an etching with a profile cut out. I really didn't have a suitable bit to do the etching with. I bought a Dremel engraving kit with a mix of grinding and engraving bits in it. I assumed the bits all had a 1/8" shank as most do. I've got a 1/8" collet just for Dremel bits. Unfortunately the engraving bits were 3/32" shanks. So I went ahead and used my drill chuck to hold the bits. This is considered bad form, drill chucks aren't designed to take side loads, but the engraving was only 0.015" deep and went slow. I'm not terribly happy with the cuts, but after breaking a small bit doing PCB milling a year ago, I was reluctant to invest in another high-quality engraving bit without being sure what I wanted.

I did a couple of tests in a vinyl sheet material. I mounted the stock over a sacrificial plexiglass piece and held it with the same hold-down clamps I use for my vise. I ran the engraving program and everything went fine.


Then I switched to the 1/4" collet and mounted a 1/8" bit to cut the profile. I immediately realized my first error when I brought the head down. With the stock mounted so close to the surface of the table, the head with the short 1/8" end mill won't come down far enough to cut through the stock. So ends practice run number one.

One of the greatest challenges with this mill is the work envelope. You've got to plan ahead to make sure the bit can get every where it needs to go without running into the limits of the machine. I took some measurements and figured I needed to raise the work surface 1/2". I even took off the lower Z-axis limit switch to get a little more room. Fortunately, I had in the works a large tooling plate I mentioned in my last post. I didn't have any holes in it, so I had to take a quick detour from this project.

I mounted the tooling plate, and found the center rear edge. I then made a number of holes on a 1/2" grid clustering them on either side of center figuring I didn't need too many holes in the middle. Anything small enough to fit in the space in the middle likely could go in the vise just fine. Tapping lots of holes is tiring. I lost focus at one point of the drilling phase. My wife called me while I was in the middle of transiting the spindle from the left to the right side. I took the call and when I finished I assumed the head was at the target location and proceeded to drill the hole. Then I looked at the DRO and realized I was a little more than 1/4" short of the target. I made another hole to pair up with it, so now I've got 2 holes that are off the 1/2" grid, but they're actually in a pretty useful spot for holding the vice.


After completing the drilling and taping of the tooling plate, I mounted the sacrificial piece and another vinyl practice piece. I ran the engraving job again, then did the first roughing pass of the profile with the 1/8" bit. I've been using Cam Bam to generate the gcode. It supports "tabs" to hold the inner material in place while the profile is cut. The size of the tabs I chose turned out to be too small. I switched to the final finishing pass with a 1/16" bit and the tabs broke free. So I doubled the size of the tabs. A valuable practice run...

The blank stock mounted:



Engraving:



Profile cut:



You can see the tabs in the above picture. I had to grind them off and clean up, of course. This was a bit of a drag. The final milling pass was pretty clean so to have to grind and sand was a bummer. If I had to do it again I'd drill the holes first and screw the stock down. This would leave the complete perimeter free so the tabs wouldn't be needed. That's OK, I got a feel for the tabs and I know what the correct size is and what I'm up against for future jobs that don't have any interior holes for securing.

After milling, I painted the face gloss black, let it cure and sanded it with a random orbital sander. This left the black only in the engraving path. I took a shot at polishing the aluminum with my Dremel. I bought some polishing compound and hit the sides and the back. I figured the back isn't going to be seen so it would be good practice. It's not perfect, but it shows promise. Polished aluminum looks really nice.

Bare aluminum in the hands can feel a little dirty, so I sprayed on a clear coat enamel. And here is the final piece:






Wednesday, December 26, 2012

Way and Screw Cover

I visited a friend of my father over Thanksgiving break. He has a rather extensive machine shop in his basement. This guy is good. He builds his own telescopes. So what, right? You went to a meeting of the local astronomy club and some guy had a plywood stand with a cardboard Sonotube and some optics, and bam! he's built his own telescope, right? You could do that.

No. This was different. This guy grinds his own optics. I didn't see any mirrors he made but I wouldn't be surprised if he could do that, too.

Anyway, he squared up a large piece of stock of mine to be made into a tooling plate. I'll get to that in another post. He also gave me some vinyl from a shower pan liner or something. He suggested I use it to make way and screw covers. The Y-axis is pretty exposed on the Sherline so I thought I'd give it a try.

The front side of the machine is easy. It's "open ended" so easy enough to add mounting material to hold the cover. Here's a shot of the front piece I made:


I used this huge piece of Corian solid-surface counter top for the material. It's plastic. It's machines pretty nicely although it gets a little stinky if it heats up too much. It doesn't look very good, however. It's kind of poor simulation of granite or something. So I just painted it with a flat black and buffed it a bit. It fits right in with the anodized black aluminum of the machine. Ok, the piece I made has the 3 screws on top. Of course I used my hot glue gun to mount it. 



Here's the first of three attempts to design a mount for the rear. The challenge with the rear is that anything attached to the rear reduces the range of motion. Above I added the mounting pieces outside the rear column. Theoretically the cover would fold up on itself once and compress against the column costing only 80 mils of Y-travel. I attached the vinyl sheet so it folded up against the table. This resulted in the vinyl arching down against the screw. As the table moved to the rear, the downward bow became strong enough to stall the stepper motor.

Here's the third attempt:


The second attempt had no support in the middle and the vinyl dipped down creating a path for swarf right down to the screw/way. The third design is just one piece with a thin bridge to provide support. So I'm losing about 1/4" of travel at the rear.

Here it is with both covers in place:


And an engraving operation with the covers doing their job:


(Yes, that's a drill chuck. Yes, I know I'm not supposed to use it for milling, but I bought a Dremel engraving kit assuming the shanks were all 1/8". Turned out half of them are 3/32" and I don't have a collet that size. This is a pretty light engraving cut so it should be OK.)

Sunday, December 2, 2012

USB Port Installed

I think it's fair to say this project is done. The system is fully operational. I made 3 parts to secure the USB port. Here's a screenshot of the CAD design for the part that holds the end of the board where the USB cable plugs in. I forgot to take a picture of it.



The fit of the USB board is real nice. I had to file the cabinet opening a bit, then I tapped the part in and it's quite snug. Then I made 2 parts to secure the board in the inside:


I just used some scrap material for this. The plexiglas machines quite nicely I think.

I did the CAD design above in ViaCAD. I'm running the trial copy of the 2D/3D version. I'm quite impressed by the product. It's quite advanced, as far as I know. I was pretty happy with QCad and ViaCAD blows it away. It's also very reasonably priced at $100. I got it 20% off.

I generated the tool path with HeeksCAD. My impression of HeeksCAD seems to degrade the more I work with it. I had high hopes initially. Same goes for PyCAM. PyCAM was supposed to release a significant version a year ago. I find the current release pretty unworkable since I'm not needing full 3D paths and PyCAM's pocketing is very basic.

There are some CAM libraries written in C/C++ but I can't figure out how to leverage them in my project. I wrote a basic pocketing routine a year or so ago using the Java Topology Suite. It looks like I'm going to have to pick that up again and see about reading in a DXF file to generate profile, engraving, and pocketing paths.

Saturday, November 17, 2012

Chip guard

I stated previously the next step was to make some sort of mounting block for the USB port. I was doing some test work on some plaster/glue material and I discovered pretty quickly how dirty my controls would get. I figured I would make a chip guard eventually but after some debris got caught in a couple of buttons in the ON position I changed my priorities.

I got a piece of plexiglas cut to size at the local hardware store. I cut a slot in the center to accomodate the Y stepper and made some aluminum brackets. The mounting blocks are affixed to the counter top with screws and the brackets slide in a channel.


Machining is a practice where a high degree of accuracy is the goal and fairly easy to achieve with a decent mill. Working on larger projects, wood working, house building and so on isn't so accurate. Here, the countertop edges are not square with the surface and I didn't check it. With a good eye you can see the block, bracket and glass are not in line. I had to do a little rework to open the channel to allow it to move easily.

Here's a longer view. The glass is pretty clean.


I cut a slot in the front panel for the USB port. I made a template from scrap plexiglas and clamped it behind the surface you see here and used a 1/2" trim bit in my router. It was a bit tricky since the depth of cut was less than 1/2" and the material was 3/4" thick. It took several passes at multiple depths.


I produced a profiling GCode file in HeeksCAD for the "plug" to go in this hole. I had to implement arcs in my host program. I'm pretty happy with it. Here's a preview:


It's got a nice "roll on/off" in the lower left. I also put a "tag" in for fun that's in the lower center. I don't need it for this piece, I just wanted to see how it worked.

I've got a couple of decent geometry libraries available. For the arc implementation I needed to calculate the angle between three points. One available routine worked well for 3 out of 4 quadrants. Consider a point at 12 o'clock, the center of the clock another point and a third point at 3 o'clock. That's a 90 degree angle. If you are going clockwise, but a 270 degree angle the other way. The routine I tried seemed to recognize the orientation and produce 90 or 270 depending on the order of the points but it failed in one quadrant.

So I had to use a routine that always produces the smaller angle, in this case 90. I needed a way to determine if I needed to subtract the angle from 360 to get the oriented angle.

I got crafty and pulled this off by making a line segment from the first point to the third point. I found the midpoint and made another line segment from there to the center. The line segment objects I created have a method to compare itself to another line segment and determine if the other line is to the left or the right. If to one side I take the angle given, if to the other side I subtract the angle from 360.


Sunday, October 7, 2012

Recoded host

I haven't made anything yet. That's a bit of a bummer. I decided to re-write the host software in Scala. I wanted to learn the language and there's no better way than to dive in to a real project. Pecking away at examples in a book doesn't lead to strong retention of concepts. I'm a veteran Java coder but I have a feeling Scala will take over soon.

The Java host program was a bit messy. A lot of it was experimental. I had to find out real quick like if I could do a number of things I hadn't done before because I knew I was going to be writing a lot of the code. I want to drive the system from a Mac and there just isn't enough related software for it.

So the Scala rework gave me an opportunity to clean up a lot of it. It's much better organized with a number of interdependencies removed. I also wrote a new "procedure" for facing a block of material. Here's a screen shot of a "box-in face" tool path:


Next up will be procedures to edge the material, also part of "squaring up" the stock. Then a procedure to cut a channel which might also be called a groove, except that it's wide. I also need drilling procedures. I think I'll throw in a rounded-corner procedure for fun. That will give me all I need for the parts I need to mount the USB connector.

Wednesday, July 18, 2012

It's Done!

Ok, the title of this post needs qualification. This project will never be done. There will always be room for improvement and of course there's plenty to do on the software, but the hardware looks done. From a distance.


If you look carefully, you can see the USB board sticking out at the lower left of the countertop. I didn't  design in any way to mount it. On purpose. I need the mill working in order to machine an appropriate mount. It's easiest to drill a big hole in the face of the top drawer face so I figure I'll make something out of plastic that secures the board within a round plug of some kind. Then I'll have a nice USB port right on the front panel. Nice.

Here are some more pics of the assembly process.



Here's a ghetto-style box for the spindle speed controller. The SC is in the upper right. That's duct work left over from remodeling with, appropriately enough, duct tape holding it together. I'm hiding the whole thing inside the cabinet, so I don't care much how it looks. The metal box is grounded and intended to capture noise from the SC.




The wiring took me a long time to finish. Most of the wires connecting to the microcontroller weren't long enough, at least not for comfort. I think I planned for a cabinet of 24" in width, then I got the 30" countertop and didn't increase the wire lengths accordingly. I can't even remember if I made the wires before or after I got the countertop.

In an early test of the wiring hookups I had a little problem. I have a button input for the thermal switch. One thing I did well in my design of the microcontroller breakout board was to pull out all the pins. I allowed for the extra pins to be easily wired as output with spots for resistors. I did not provide for input by making connections for resistors to pull to ground. So I contrived a 3-pin connector for the thermal cutoff switch that has a 10K Ohm resistor "inline". Here's a picture with the heat shrink tubing pulled back.


After connecting it together, I powered things up. Wiggling the connector resulted in the green LED of the Sanguino going out. I didn't know what that meant, but the microcontroller wouldn't work when the light was out, so it certainly wasn't good. I stepped back and scratched my head to think a bit when I noticed a smell. Not a good sign so I powered down quickly. I started manipulating various wires and I brushed my finger across the 5V regulator package and burned my finger!

The regulator on the Sanguino is not supposed to get hot, the overall draw is quite low. This had to mean I had a short. I removed the thermal shutoff input and the buzzer output and powered up. The system worked fine. So I tore apart the thermal shutoff input and discovered what you see above. Manipulating the connector resulted in the two leads of the resistor coming together and shorting power to ground. Not good. I spent quite a bit of time reworking this connector. It was painful.

Anyway, it's all good now. Fully operational. I've started moving things into the drawers. The paint is going to be a pain. It chips very easily and the color is too light, it will get dirty fast.

Time to clean up my shop, something I've refused to do for about 20 months until this was done.