Showing posts with label CNC. Show all posts
Showing posts with label CNC. Show all posts

Monday, July 20, 2020

CNC Lithophanes

I tested out making some lithophanes on the CNC about a month ago; only got around to posting this now since I wanted to do some more iteration on my first tests but never really got around to it.

I just had some scrap 1/4" HDPE squares lying around from awhile back that looked suitable for making the lithophanes out of. The source photo was converted to black and white and the toolpath was generated with a trial of MeshCAM. White was mapped to a depth of 0.22 inches and black was mapped to 0.

First roughing was done with a 1/8" square endmill (feedrate of ~50 IPM, sped up in LinuxCNC so I don't know the exact speed; depth of cut of 0.05 in?, don't remember exactly; stepover probably 90% of tool diameter) and the finishing pass was done with a 1/8" ball end mill (don't remember the feedrate/stepover on this one). I felt the level of detail wasn't enough so I bought a 1/16" ball endmill for my next one.

After roughing.

There seems to be some sort of bug with the white region at the top of the photo where the material wasn't removed at all.

After finish pass.

Not bad except for the sky.

For my second attempt, I clipped the white levels to just under pure white which seems to have fixed the problem with the top of the photo from before:

Some strange discontinuities.

For this one, I had to stop after the roughing operation since my Y axis lost steps somewhere in the middle so I never got to use the 1/16" ball end mill.

HDPE isn't ideal since it leaves behind many little strings after cutting which means the picture isn't very clean. I looked online and saw that many others cut out their lithophanes from Corian, which I may want to try next. Another issue is that cutting a lithophane out takes a long time and has many small movements, which makes the stepper motors very hot.

Sunday, May 24, 2020

CNC: Replacement Parts and Aluminum

Over the last week I made a few parts on my CNC, one of which was made out of aluminum. The first part was a replacement part for a VR headset a friend gave to me. I accidentally broke one of the 3D printed adjustment racks and had to make a new one.

I made it out of HDPE, which is just wonderful to machine, due to its flexibility. I surfaced the material to thickness and cut out most of the profile with a 1/8" endmill. I used a cheap 1/16" endmill to get between the rack teeth:

Surfaced and most of the internal surfaces cut out.
Completely cut out.

Replacement on the left.
The next part I made was out of aluminum. This was a bearing block designed to replace the original wooden ones I made not too long ago. I didn't use any oil/coolant and it went fairly smoothly. Next time I probably would get rid of the lead in and lead out on the 2D contours and just use ramps. The plunge between each depth didn't sound great.

I used a 2 flute, 1/4" endmill for the whole process:
Sharp.

Cut out.
Reasonable surface finish.
 After cutting, the part was square as far as I could tell and had reasonable dimensional accuracy. The CAD model was 2.953" by 4.035", and part came out to be 2.960" by 4.034".
Square.
The hole cut out for the bearing was supposed to be 1.126" in diameter, but when I measured it it ranged from about 1.123 to 1.125. Had I taken a finishing pass I probably could have gotten closer and the bearing would have fit in. I had to sand the inside of the cutout with a Dremel to be able to get the bearing to fit.
Installed.

Sunday, May 17, 2020

Bench Power Supply

Yesterday I put together a simple wood box for a DIY bench-top power supply. I had the electronics for awhile now (I forgot when I bought them, but it was probably around a year ago) but just never put them all together. I bought a used 24V, 13A power supply and a DPS5005 front panel/regulator.

I put together a quick CAD model of the box using slot construction and 1/8" wood:

The back part would be on the ground so the front is tilted up.

However, I realized after making this model I probably didn't have enough 1/8" plywood to make all the faces. I redid the design to have panels slot into thicker material and came up with this:
3/4" wood for everything but the front and back panels.
I flattened everything out and just ran contour toolpaths on everything. I had to break up the parts into separate programs because I wanted to use the edges of wood scraps where there was only enough room for some of the parts.



It took awhile to cut everything because I had to change stock between nearly every part. After cutting it all out I screwed the box together:

Front panel cut out.
Bottom plywood is a little scuffed.
Back panel.

I didn't realize how thick the banana plugs I ordered were (I was always imagining the ones on  commercial power supplies like Keysight bench PSUs), and the little cutouts around each pair of plugs are a little small.

I have small DC-DC boost converter on the way to boost the 24V to 48V since the DPS5005 can take in up to 50V. The left most output is the output from the DPS, and middle is 24V out, and the right will be 48V out (it might actually never be useful and it could just be another 24V out).

Also: a fun picture of some more endmills I bought a few weeks ago (I just had to buy some more real brand name 1/8" endmills after seeing how good actually sharp cutters are). I have yet to try the single flute cutters on acrylic but the two flutes ones cut the wood in this project perfectly.

Sharp.

Monday, May 11, 2020

DIY Numpad: Video and Gesture Sensing

I made an overview video of my numpad last week to summarize its features and build process:


Originally, I didn't intend to make such a complete video, but I had some time to burn and eventually got to this. Along the way, I learned to use the animation tools in Fusion 360 (which is a little clunky), made some cases out of oak wood I bought awhile back, and remembered how much time it takes to make and edit a good video.

Here are some photos from the oak wood CNC process:

Completed case top side.

Didn't set home correctly and crashed the collet.
Top cover cut out without any issues.

Since I had issues with alignment for double sided machining last time, I tested out a different way of doing the bottom side this time. I used a single pin set relatively deep into the wasteboard to align a hole and just ran the pocketing operation for the screw head on each hole on the back one at a time. It does require me to move the part manually for each hole but it turned out alright. The major downside is that since the whole part is already separated from the rest of the material, and the pockets are so close to the edge of the part, in wood some of the side walls break.

I coated the wood in some polyurethane after cutting.

Fun combinations of acrylic and wood case parts:


If you saw the video, you would have noticed that I didn't get the gesture detection working (only had the other features like brightness and proximity detection working). Pretty much the day after I made the video I decided to finally sit down and get to the bottom of why it worked outside on the breadboard with an Arduino and not in my numpad.

I suspected that the sensor was being partially obstructed by the adjacent keys. Testing on the breadboard and moving some obstacles closer and closer to the side of the sensor until swipes stopped working showed that the sensor in the keyboard was most likely being blocked. For one of the keyboards I desoldered the sensor and moved it up with a socket.

The next issue was definitely in the code. A quick glance at it showed the problem: I wasn't giving the I2C read from the sensor for the gesture enough time. I set the timeout to one millisecond, which is enough for all the other operations. Just the gesture data can get relatively long and the standard speed of 400kHz isn't fast enough to get all the data out in 1 ms. I raised this up to 5 ms and got different behavior from my keyboard now.

The next issue was even dumber; I just didn't realize that the specific read function used by the gesture part (used nowhere else) needed to return the number of bytes successfully read, not just true/false for success. After correcting this, we have a working sensor:


The issue with the sensor causing lockout is something I'll fix another time, or at the very least create some sample layout firmware that has gesture and typing modes. You could make some pretty funny controls with this sensor (e.g. a jank theremin, volume control, scrolling, etc.).

I've worked on this for quite awhile now, and it is fairly complete. I want to cycle back to some other projects that have just been sitting on the side before coming back to this and making the rest of the numpads. The parts taking up space on in my workspace are starting to feel slightly annoying and whole place need a good clean up anyways.

(Update) Some more photos I didn't upload before:










Thursday, April 16, 2020

DIY Numpad: Squareness

Over the last week I've done some more work, cutting out the USB slot, making a new case, and figuring out how to get better alignment. For the USB slot, I turned the case on it's side, zeroed in on the top left corner of face, and ran a simple pocketing operating to make the hole:
I clamped the case between a piece of MDF I screwed into the CNC table and a free piece of MDF.

Some shifting.
One clamp wasn't enough to hold it in place, and for the next case I used two clamps.

I began making another case, this time with another set of mirrored alignment holes. I also leveled out the waste board with a simple facing operation.
Added another hole at the top.
5x5 pocket cut out for the stock to be flat.
I ran the backside operation, which went smoothly. After I flipped over the part, I could still only get the holes on one side to line up with pins; the far side holes didn't line up perfectly. Now I realized what the problem was: my CNC's X and Y axes weren't perpendicular! I never realized this earlier because I never tested the squareness of my parts, and a double sided milling operation would effectively double the skew error. This also explains why the wood top case I made before doesn't line up well either since it was machined top side down (the error in screw hole position is effectively doubled by trying to mate a piece machined right side up and a piece top side down).

After some fiddling with the 8020 extrusions and the only square I had around, I think I have the axes dialed in fairly well. I just bought a machinist's square and you can clearly see the error in the last case:
Gap.
I lined up the holes I already made from the backside the best I could (effectively getting all the pins in with force so there would be a little error in all the hole positions, but no single hole far off like with the previous case) and continued on with the front side operations just to see how the case would turn out:
Actually not that bad.
Case in the light.
Surface finish questionable.
Better, but probably need to slow down.

Things lined up fairly well, I just couldn't use all the screw holes immediately because the aluminum plate was also made with the axis error. The next day I made the top part of the case:


Left: success; right: failed
Surface finish.
After heating, there is some optical aberration.
Same aberration.

The first one was scuffed because I didn't mount the middle piece down well, so the finishing pass knocked the floating piece from the middle contour, and the edge of the stock wasn't held down so when it was on the last pass, the thin edge vibrated and cause some terrible gouging. I fixed this on the second time around.

I tried heating the screw inserts, but it creates a visible defect in the clear acrylic. I just superglued in the rest of the inserts. for the next top case I make, I need to make the insert holes deeper since the screws hit the end before tightening the top to the bottom of the case.

Putting it together though:

Clear is the way to go.
The numpad looks far nicer that I expected. Things don't line up perfectly yet since the bottom holes were still made before the alignment, but after I make the changes to the insert holes and re-mill everything, the next case should go together perfectly.

I tried making another wood version of the top section of the case, but the crack in the wood caused some problems:
A crack in the left side caused the wood to become free to flap up and forced me to stop the program. I'll try again another time.

Friday, April 10, 2020

DIY Numpad: Machining Madness

I've spent the last week testing out different things to see how I could improve my ability to machine acrylic. Since I didn't want to have to buy new lead screws (which would mean spending more money and waiting for them to ship), I first tried to fix the ends of my lead screws. To prevent a screw from whipping, it needs to stay under some critical speed that is a function of it's length and the boundary conditions of the ends of the screw.

My screws are rather poorly installed, with only one end being fixed to the stepper motor and some part of the middle inside the anti-backlash nut. The other end was not fixed at all and there were no bearings to take the axial load from cutting. This was never a big issue before since I never ran my machine faster than 48 IPM during cutting. But now since I wanted to push 70-80 inches per minute without things resonating and stalling, I would have to fix this.

For the y-axis lead screw, the longest one in my CNC, I designed a few bearing blocks that could attach to the 8020 running under it. I started off with one to fix the far end of the screw in a simply supported way. This didn't really do much, and the axial load was still all taken by the motor.

Before adding more bearings and designing a system to tension the leadscrew, I tried adding some lubricant to the the lead screw and nut to reduce the sliding friction of the plastic on the metal. I read some posts online recommending adding just a little is actually very important to proper operation (which makes sense since the screw should have minimal friction with the nut, like with ball screws). I put a few drops of some generic anti-seize/rust-removing lubricant and the difference was like night and day. The x-axis no longer made any resonating noise at all when running over 80 IPM and y-axis ran much smoother too. (also the little rust that built up on the screw in some places was cleaned off by the lube and the nut running over it.

Next, I designed another bearing block to go on the motor side, so that I could tension the screw and take off the axial load from the motor.
I cut this out with my new end mills I bought a week earlier. I realized I lacked 1/4" endmills and bought two 1/4", 3 flute carbide end mills for general work, a 1/4" 2 flute carbide end mill for aluminum, and a 1/8" 2 flute carbide end mill. These were my first "real" end mills, in that they weren't from generic cheap 10 packs; I got them from drillman1 on eBay, with the two flute ones being Kyocera branded.
1/4" 3 flute carbide endmill
Cut from MDF.
The cutting went smoothly and I installed the block the next day:
On the other side, there is a bearing and a nut tightened to pull on the screw, and on this side the motor coupler acts as the nut and is pressing against the bearing. I only had normal bearings, not axial bearings or thrust bearings, so the coupler rubbing against the bearing was not ideal. However, this wasn't a big issue.

I tested this out for a bit, but still get resonance. During a test cut at 80 IPM, the y-axis lost some steps during some high-speed changes in direction.

Test pockets.
I was testing different feeds and speeds to see how I could get the best finish in acrylic. I realized that using conventional cutting for 2D contours left a much better finish on the walls:
Inside wall is rough while outside is smooth in a climb cut.
I tried two end mills: the single flutes I got a while back, and the two flutes I got last year for cutting aluminum. Both were cheap 10 packs so I could afford to test with them. Everyone says to use o-flute or single flute cutters to be able to run at the relatively high RPMs of a router (~10K RPM lower limit for me) and low feed rates of hobby machines. I was having serious trouble with chip evacuation and kept getting melting with my single flute. A little bit of plastic would get stuck in the flute and just ruin things. This is why I tried the 2 flute and higher RPMs; the two flute had a low helix angle and worked pretty well for getting chips out of the pocket and cavities.

Yesterday, after doing all that plastic testing the day before, I decided to do some practice for cutting out the acrylic cases for my numpad. Using the same 1/4" 3 flute end mill from earlier, I ran an adaptive tool path for roughing the pocket: 0.15" stepdown, 0.06" optimal load, 72 IPM. I tested this in some extra 1/2" thick acrylic I got when the seller accidentally sent 4"x4" squares instead of 5"x5".
Adaptive roughing.
Plastic chips!
It went really well, except for the lost steps in the middle of the program. I had to bump up the spindle speed to around 18K RPM to get the cut to sound good. I was afraid of heat generation from the higher surface speed, but it wasn't a problem at all. I had real chips (tons of them)! I kept a constant blast of air on the cut, but it wasn't really necessary; the chips pretty much ejected themselves out with no problem.

To try to further combat the lost steps without making another bearing block, I moved the motor side bearing block to the other side:
At the expense of table travel (I wasn't planning on making anything that big in the near future), this created a fixed end condition that made the screw whip much less. I just realized I should swap around the orientation of the bearing blocks to put the section in between in tension, but this worked really well. I still should put a bearing block on the motor side, but that can wait for now.

Today, I got around to really testing out making a numpad case in the 5"x5" stock. With all the fixes and things I learned for cutting the acrylic, I felt confident I could make this work.

This needed to be a two-sided setup since I needed to cut out the holes for the screw heads on the back side, then cut out the pocket, lip, and perimeter on the front side.

Back side.
Front side.
I aligned the two sides by drilling out the screw holes deeper than the bottom and using pins to align after flipping. I could only align the two holes along the bottom right faces since those were the only ones symmetric around my flip axis.
Screw heads opened up and holes drilled.
After flipping and cutting the pocket (1/4" for roughing, and 1/8" for getting the corners and finishing the walls):
The edge of the floor has a lip since I forgot to
re-zero the z-axis after swapping 1/8" cutters.




When doing the finishing with the 1/8" end mill, I started with the single flute cutter I had, but it created a really poor surface finish and the cutting wasn't consistent (edge didn't perfectly line up in some places. Swapping over to my new 1/8" end mill and running the program again gave a much cleaner result.

After these steps I realized there some sort of alignment issue but I couldn't really tell what exactly was wrong. I tried to test fit a plate and PCB into the pocket, but the corner holes didn't exactly line up. I just continued on since this was just a test.

Still using the new end mill, the lip for the plate and the edge cut went perfectly. Despite going only at 48 IPM and running at around 12K RPM, I had no issues with melting through the whole depth of the cut. I'm pretty much never going to go back to my old end mills; these may be more expensive but you get what you pay for: the quality and sharpness of the new 1/4" and 1/8" far exceeds the generics from China.

When the lip was being cut, I realized what the issue was. The two pins I used for aligning the bottom edge weren't enough to keep the stock perfectly aligned. The bottom was well-aligned, but the top could still skew a little. This caused the holes on the far side to not line up:
Right side holes are mis-aligned.
Case backside with the PCB inside.
However, everything else fit perfectly. I can still use this case to test cutting out the top side USB hole. (I plan on aligning the case vertically but still need to figure out how to set up my work piece origin in a reliable way.) Next time, I just need to add another alignment hole to drill out on the other side. The frosted finish of the outside is really nice and has just the right amount of diffusion.