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: