Monday, December 05, 2016

Barndoor Tracking Mount Part 3

So I had to back up on something I posted last time. I showed the stepper motor with an 8mm screw and two intervening shaft couplers. Well, after ruminating on it a bit I realized that the shaft coupler that was flexible would not work with my design. I needed one that was ridged, otherwise too much play would be added into the system and accuracy would suffer. I knew that the motor shaft is 1/4 inch and the lead screw is 8mm so I looked for a coupler that would match those sizes and, surprise, there is such a thing. $6 later I have one. So now I was ready to start building the mount. The two “doors” are 3/4 inch oak and there are three hinged areas that hold the two doors together and also allow the motor and lead screw nut to stay aligned as the door is opened and closed. I showed a picture of this design in the last post so I took to building. The RV resort where we live in the winter has a nice woodworking shop so I had everything I needed.

I started cutting and shaping and, with a couple of restarts due to misplaced components and the purchase of another piece of wood to make the hinges, I was able in a few days to have put together the mount. Here are some pictures of the components and the final assembly.

Motor and mounting block Fixed leg bottom view
Moving leg top view Motor with screw and blocks
Hinged door Assembly bottom view
Assembly top view Assembly end view

Next came a test of this set up. I created a program for the Arduino to move the door in one degree increments from the closed position to the maximum open position. I immediately found a problem. Measurements showed it to be opening too far, about 1.3 degrees per increment. I did some modeling of my code in an Excel spreadsheet and it looked good. After some more testing I finally discovered that the lead screw, which I could have sworn was a three-start thread, was actually a four-start thread. This meant that instead of moving 6mm per revolution, it was really moving 8mm per revolution. This made a big difference and I was able to just change a variable in the program to correct it.

I forgot to mention that a crucial part of getting the door to open correctly was making accurate measurements of the finished device. I need to know the exact dimensions from the main door hinge center to the motor block hinge and the lead screw nut hinge. I also need to know the distance from the lead screw hinge center to the center of the screw and the same from the motor hinge to the center of the motor shaft. With all of those dimensions I can there create a formula that gives me the angle between the two door halves and can compute how far the lead screw nut has to be pushed out to open that angle by a specific amount. The same formula then can be used to determine the rate at which to step the motor to get the door to match the sidereal angle of the earth.

Now, examine this diagram:

triangle

If the vertex of a-b is the main door hinge, the vertex of a-c is the lead screw nut hinge, and the vertex of b-c is the hinge of the motor block, then the angle C is defined by the formula:

formula

So “a” and “b” are measured constants and “c” is variable as the lead screw moves. However, the screw does not pass thru these points so there is another formula to find “c” for different steps on the lead screw. The geometry of the lead screw with respect to “c” is described in the following diagram and formula:

diagram2

formula2

The lead screw nut (“n”) leg and the motor base (“m”) leg are always at right angles to the lead screw (“L”). Note: this is the reason the flexible motor shaft coupler was not appropriate. So the Pythagorean Theorem is used to determine the length of “c” depending on the position of the nut on the lead screw. By combining these two formulas the angle “C” can be determined for any particular step of the motor and can be matched then to the sidereal angle of the earth starting at the home or closed position of the door.

Next, I have to attach a switch to mark the home position and program the tracking algorithm for the Arduino. More on that in the next installment.

No comments: