"programming" the prototype
Now that the prototype shows signs of coming to life, it is time to consider how to animate it. The axles are rotated and lifted from the "21st century" section on the bottom that is filled with stepper motors controlled with a PJRC "Teensy 3.5" microcomputer. Here are comments from the source file of a motion script interpreter I have written for it:
The following axles are implemented in this first prototype:
C carry sectors for adding 1
F the anticipating carriage digit wheels
FC the connector pinion for above to FP
FP the fixed long pinions
FPC the connector pinion for above to either A1 or A2
MP the movable long pinions
MPC the connector pinion for above to either A1 or A2
A1 the upper number in the digit wheel stack
A2 the lower number in the digit wheel stack
The axles can be connected thusly:
C -- F -- FC -- FP == FPC -- \
|| -- A1/A2
MP == MPC -- /
Double lines represent axles that are always connected, but the FP==MP connection can optionally be from MP to the FP in the cage above, i.e. a shift. Connecting both FPC and MPC to the same Ax creates a jam. There are also motors that control locks for F, A1, and A2, and that position the fingers in F and A1/A2.
primitive movement commands
rot <axlename> <signed degrees> // rotate a shaft the specified degrees; positive is clockwise
lift <axlename> <signed mils> // lift (positive) or lower a shaft the specified thousandths of an inch
functional movement commands
{lock | unlock} {F | A1 | A2} // control digit wheel locks
mesh FC // create the F==FP link
mesh {FPC | MPC} {A1 | A2} // create the link from FP or MP to A1 or A2
unmesh {FC | FPC | MPC} // break the link
finger {F | A1 | A2} // make the giving-off finger engage with the named digit wheel
nofinger {F | A} // make the giving-off finger disengaged
index {F | A1 | A2} // initialize the finger rotational position and zero the digit wheels
giveoff {F | A} // rotate the digit wheel finger down one digit
setcarry {0 | 9 | reset} // carry chain positioning
carry {up | down | add | sub} // lift the carry warning levers or rotate the carry sectors
keepers {up | down | // lift or rotate the carry sector keepers
none | top | both}
multi-step movement commands
run <script> // do a predefined cycle of operations
step <script> // same, but wait for input between steps
"finger A1; mesh FC; mesh MPC A1; keepers none; unlock F; unlock A1",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"giveoff A",
"nofinger A; unmesh FC; unmesh MPC; carry up; keepers up; lock F; lock A1",
"giveoff A; keepers both",
"carry down; unlock F",
"carry add",
"setcarry reset; keepers top; lock F",
"setcarry 9; keepers down",
NULL } }
This program seems to be working fine. But then software is a whole lot easier than getting complicated mechanical mechanisms to work!
Comments
Post a Comment