...
The driven gears in the final mechanism were fixed to the ends of driveshafts mounted in bearing blocks for freedom of movement. The driveshafts were 8mm diameter wooden dowels, found in TIW, which fit snugly into the sealed ball bearings. Two motors, a 12v DC motor geared to run at a nominal speed of 100 RPM and a NEMA 17 stepper motor, were used to drive the mechanism. The 12v DC motor was used to drive the linkage, and it was connected to the driveshaft through two more laser-cut gears. During testing, a DC lab bench power supply was used to run the DC motor at a reduced speed and voltage, so the pen would be able to write smoothly. (I considered using a motor driver and PWM to drive this motor, but since I was already using a motor driver and Arduino to drive the stepper, it seemed unnecessarily complicated.) Both motors were mounted in laser-cut acrylic brackets, which in turn were mounted onto a second 1ft x 1ft sheet of acrylic at the bottom of the mechanism using more wooden dowels. All the fixed connections throughout the mechanism were made using M3 bolts and nuts, since they were readily available at TIW. Non-driven gears were mounted the same way. (I later found that since the nuts were not fixed to the ends of the bolts, they sometimes loosened themselves and fell out while the mechanism was running. A more permanent solution would have been to loctite Loctite the nuts to the ends of the bolts, or to use another type of shaft entirely, but I felt that the ease of disassembly was more of a benefit than a drawback during the construction of the mechanism.) Where possible, holes were drilled slightly smaller than the outer diameter of the bolts, so that they could be threaded directly into the acrylic/wood.
...