I decided to upgrade WordPress so I could display videos. So here is a video of one of the doors for the Miniature Elevators in action. This was a quick video I did for my sister. I need to do a better one, but I figured this would do as a test.
Month: March 2019
Updating a DRO
As mentioned in a previous post, Holes, my Sherline mill has a digital readout (DRO). Unlike typical DROs which use magnetic or optical sensors, the Sherline works by keeping track of the position of the lead-screws using quadrature detectors mounted in the hand-wheels. While this is not as accurate as real positions sensors, the lead-screws are precise enough that it is generally more than good enough. The readout for the DRO was designed years ago and uses a 2×16 character display which is quite small. The same unit is still being sold today and is quite expensive for what it is.
I decided I wanted an easier to see display and after looking around for something suitable found Nextion displays. These are small graphical LCD displays with an attached microprocessor, touch screen and PC software that allows a GUI to be relatively easily designed and loaded into the Nextion. The Nextion uses a UART interface, so it is easy to run with another micro-controller. Interestingly, I was able to buy a 2.8 inch Nextion for less than I could find a raw 2.8 inch graphical LCD.
It was quite simple to use the Nextion PC software to produce a GUI for my DRO. The result can be seen in the photo below, which shows the Nextion in a 3D printed case next to the original Sherline readout. Since the Nextion includes a touch-screen, no buttons will be required.
You can also see at the top of the photo, the Cypress PSoC4 prototyping kit I’m using to develop the DRO firmware. PSoC stands for programmable system on a chip, and the PSoCs are quite amazing devices containing some combination of programmable analog circuitry, various function blocks and effectively a CPLD along with an ARM Cortex CPU. While all of this is not required for this project (the Sherline DRO uses an 80C51 compatible micro) and in the past I might well have done this with a Microchip PIC, the PSoCs have some advantages over typical micro-controllers. One is, the CPLD can be used to synthesize a quadrature decoder, so this operation can be done in hardware rather than software. I plan on using a PSoC5 for the actual display since it has enough CPLD cells to synthesize the required 3 quadrature decoders also has a lot program and data memory. This allows it to easily accommodate FreeRTOS, the use of which I find can considerably simplify program design.
If you were going to mass produce this DRO, the PSoC would be overkill as you can certainly do it using a much cheaper micro-controller. However, for quantity one, the processor cost is not significant. Indeed, the PSoC5 I will use is the KitProg part of the PS0C5 prototyping board and so is effectively free. The PSoC5 prototyping kit contains 2 PS0C5s, one is the prototyping PSoC, the other is used to program the first and is called KitProg. KitProg can be broken off the main board and then reprogrammed to do what you want, albeit with a limited number of pins brought out. I have several KitProgs from the Miniature elevators project available. Even if you need to buy a PSoC5 prototyping kit, at $15 it is hardly expensive (the Nextion was $20) and is insignificant next to the nearly $300 cost of the Sherline electronics.
At this point, I have the quadrature decoders displaying on the Nextion and am working on code to handle input from the touch screen. I also have a custom circuit board in the works to mount the RJ9 connectors used to connect the quadrature encoders to the electronics. The circuit board should be done next week. The custom board was $15 for three, so in the end the DRO will probably cost less than $50 and be considerably nicer than the $300 Sherline.
The CNC Mill
Several years ago I purchased a Little Machine Shop HiTorque Mini Mill, a ball screw kit, steppers and controller, in short, all the stuff need to assemble a CNC milling machine. However, I never got it to the point of actually machining anything until recently. There are several reasons for that. One is that it took some time to figure out the kinks and get issues with the control software resolved. The other is that when I needed to mill something, it was easier just to do it by hand on my Sherline mini mill than do it with CNC. Also, I hadn’t found a CAM processor.
For those unfamiliar with CNC there are several stages to doing it. First, you design the part with a Computer Aided Design (CAD) program. Then the CAD design is processed with a Computer Aided Manufacturing program (CAM) that turns the design into instructions that tell the Computer Numerically Controlled (CNC) machine how to make the part. You can in principle program the machine in a language called G-code directly, but this tends to be error prone and works mostly for simpler parts. After looking at and trying various CAM programs, I finally discovered that Autodesk Fusion 360, which is a cloud based CAD program, also includes a CAM processor. Best of all, it is free for individuals and small companies to use.
While Fusion is in some ways easier to use than TurboCAD, which I have used for years, I found aspects of it frustrating, in part because it is so different from TurboCAD. So I imported my design into Fusion and then used the CAM processor to generate the G-code to run the machine. After a trial run cutting air, I was able to successfully drill 8 holes in my carriage plate with the CNC mill. I wanted to put a video of this here, but I discovered the free edition of WordPress doesn’t allow this. So until I decide I like this blog thing enough to pay for WordPress all you get is a picture of the CNC mill.
Holes
The carriage plates for the elevator doors (Miniature Elevators) are aluminum flat bar with a bunch of holes in them, eight in fact. The two pairs of these which mount the ball bearings must be precisely located, since there is almost no adjustment. It turns out there is some adjustment because the bearings have 3-mm IDs and are mounted with M3 screws, which are just slightly smaller in diameter than 3-mm. Because there are so many of these plates, 18 in fact, it is useful if all the holes are precisely located so everything just goes together and fits. One of the best ways to do this is to drill the holes on a mill. I have a Sherline miniature mill with digital readout (DRO) on which I made the first few plates, but is surprising how easy it is to screw up a hole location even with the DRO. But I was pleasantly surprised when I made the first plates, that the bearing holes were in the correct location, even though I’d located them based on measuring the v-groove bearing since I did not have manufacturer’s dimensions of the v-groove.
However, it became apparent, based on the screw up rate and the large number of these plates that needed to be made that now would be good time to finally commission the CNC mill I’d put together some time ago, but not actually used yet.
Miniature elevators
From time to time, I work with my sister, Pat Keck (http://patkeck.com) on animating one of her sculptures. The current project is a Ghost Elevator, which actually contains three approximately 1/10 scale three floor elevators. This means there are 9 miniature sliding elevator doors and a lot of small fussy parts. My sister came up with a door mechanism based on that used in the real deal. Fundamentally it was fine, but she used little hand made Delrin wheels for the door slides riding on brass bar, which proved not to reliably glide and also contained an awful lot of fussy assembly. So I redesigned the glides to use miniature v-groove ball bearings riding on ground drill rod. Since there is very limited space to make things fit, I measured my sister’s door mechanism and put the whole thing into a CAD program (I use TurboCAD). This allowed me to try various options without having to build things. The CAD rendering of the door assembly is below.
More on this to come.
The Journey Begins
Thanks for joining me.
Having become disturbed by the near daily revelations of issues with Facebook, I closed my Facebook account. Mostly I don’t miss it, but it was nice to use it to show off some of the projects I work on. So I figured I’d give a blog a try. We’ll see how it goes.