Thinking Inside the Box
After a good 10 hours of knocking around and around a yard of double-sided tape, I finally have everything inside the enclosure!
The good news is that everything fits. Other than that it’s kind of a mess, which is probably to be expected from Serial #000001. The jog wheel was pulled off the shaft of a stepper, so it’s not as big or pretty as I’d want. The keypad works, but the cutout is major-league ugly, and the overlay doesn’t fit it well. And the labels don’t align as well with the buttons beneath as they should. Mounting the LCD was also a PITA as it required making a mount to fit the studs inside the enclosure. And, just when I thought I had everything ready, I realized the USB socket needs to have clearance milled out of both the top and bottom halves of the enclosure.
Nonetheless, I’m feeling pretty happy about seeing it all inside the enclosure for the first time. I had an epiphany and realized that the outlines for the cutouts for the keypad and LCD unit could be marked by printing outlines on sticker paper and sticking them right on the top of the case. All you’d have to do is clamp the case down and mill right through.
I also have an idea for improving the feel of the keypad. Tomorrow I’m going to hit the hardware store to see if I can get some 3/16″ weather stripping. The tops of the buttons are 0.167″ above the PCB, so if the weather stripping is 0.1875″ of foam, that might strike a good balance of firmness and give. I’ll keep my fingers crossed because if that doesn’t work, I’m probably going to have to go back to the drawing board. My goal has been to make this something that’s relatively easy for someone to assemble. Right now, I’m starting to push those limits a bit.
I’ve also started to go back and nibble more on the software. When I swapped in the new 128PPR encoder, I noticed a problem. Basically, if you gave the wheel a really good spin, it caused the Arduino to become unstable, and the only way to get it working properly was to reset it. The old, 32PPR encoder didn’t seem to cause this problem, but it may also have been that with detents, it simply couldn’t be spun as fast without really trying. More testing will be necessary. This is why the encoder is connected via a header, not soldered on!
In the meantime, I did some tweaking to the data input-handling routine in the Arduino, and the result is some improvement in the stability of it. Basically, I added some exception-handling code that tries to recover if the serial communications get out of whack. So far, it’s not preventing errors completely, but interestingly, if you spin the encoder and the display locks up, if you wait a second and just jiggle the wheel a little, it will “wake back up,” for lack of a better term. This makes me hopeful that there’s a specific condition or bug down there causing this that I can handle and make this really solid. As it is now, I think it’s quite usable, but it’s a long way from industrial quality. Though, it’s also a long way from industrial price….
I’m coming around to thinking that the 3-axis DRO page might only make sense when running in manual mode. Instead, I think I’m going to have a Program Run mode page that displays the FRO and SRO percentages, the spindle speed, and the velocity. That will be more useful, and, in practice, likely a lot less data coming down, which might make lockups even less likely.