Monday, July 20, 2020

Comet C/2020 Astrophotography

Last weekend I went out to take some photos of the comet C/2020 F3 NEOWISE, which is has been passing by for the last several days and will still be in sight for a few more days. I wasn't able to go too far to get to a dark place so the light pollution was pretty bad. Not the most detail in the photos but some stacking and light pollution gradient removal worked pretty well.

I haven't done astrophotography for awhile so I was a little rusty, but still got some nice shots:

135mm, f/5.6, 2 seconds, 80 lights stacked in DSS, gradient removed in PS.

50mm, f/1.8, ISO 800, 4 seconds, 55 lights stacked in DSS, gradient removed in PS.
Panorama.



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.