Nema 17 is used to Build a free-standing, autonomous robot capable of creating an accurate plot from a set of Cartesian coordinates.
Pen plotters work by precisely moving either the plotting head or the plot medium or both. The size of plot that can be created is limited to the platen size of the printer. This project mounts the print head on an autonomous robot capable of precise movements in two orthogonal directs: x and y. Because it is freestanding, plots can be drawn directly onto floors, sidewalks, and other smooth concrete surfaces. The basic design can be scaled up for a machine capable of plotting on roads, runways, etc.
Finding a pre-made, small, rugged, adaptable chassis for the project proved difficult. Selection was further complicated because the print head needed to be centrally positioned and be able to access the print surface, The VEX Robotics 15×16 Chassis Kit (Small) was usable but not perfect (Figure 1). The primary problem with this chassis is that the spacing of mounting and connecting holes are based on Imperial units and many of the connected components use metric spacing. Mount holes had to be drilled or extended, weakening the chassis. The best but expensive solution was to have a custom chassis fabricated.







Figure 1. Plotting robot built on the small chassis kit from Vex Robotics to which Mecanum wheels are mounted to roll in parallel but the roller axes are perpendicular to the two adjacent wheels.
Omni versus Mecanum Wheels
There are two different types of wheels used for moving vehicles in two orthogonal direction: omni wheels (Figure 2) which can roll in one direction and be pushed on their rollers in the orthogonal direction (available from RobotShop), and mecanum wheels (Figure 3) that, when mounted in sets of four, can be powered to roll in one direction and, when the front and back wheels are rotated in opposite, directions, will move in the orthogonal direction (also available from RobotShop).





Figure 2. Omni wheels rotate in one direction and the rollers move in the orthogonal direction.






Figure 3. Mecanum wheels rotate in one direction but when mounted in pairs and rotated in opposite directions, moves the wheels in the orthogonal direction

To enable movement in two orthogonal directions, omni wheels may be mounted in two sets perpendicular to each other to roll in orthogonal directions (Figure 4). When using mecanum wheels, all four wheels roll in the same direction but the roller direction is perpendicular to the direction of the rollers across and in line with it. To move obliquely, the robot moves a minute distance in the x and then in the y directions (Figure 1). Nema 17 is uniquely able to make the precise, minute movements necessary. Many of the STEPPERONLINE nema 17motors have ¼” D-shafts ideally suited for the attachment of either wheel type using hubs with 8mm diameter mounting holes (Figure 5). Mounting brackets available from STEPPERONLINE are ideal for mounting the stepper motors because the motors are held precisely and tightly and the mounts are very strong and inflexible.






Figure 4. Omni wheels are mounted in two sets to roll in two orthogonal directions.







Figure 5. These hubs, available from RobotShop, can be attached to either omni or mecanum wheels and mounted on the ¼” D-shaft of stepper motors.

Microprocessor control
A variety of microprocessors can be used to move the wheels. Both Arduinos and Raspberry Pis have been used successfully. Although the wheels can be turned simultaneously using parallel processing or multiple microprocessors, it was easier to move each wheel successively a minute amount. Because space on the robot was limited, it was not practical to use the digital stepper drivers available from STEPPERONLINE . Drivers based on the L298 H-bridge driver were tried initially (Figure 6). Because these can only drive whole and half steps, stepper motors with a 0.9° step size were used to achieve the resolution necessary. Because of its limitation to half steps and because all wheels must be moved as close to simultaneously as possible and the L298 is relatively slow, faster and more sophisticated drivers from Allegro MicroSystems and Texas Instruments (TI) were tested. The TI DRV8825 was found to work best (Figure 7). The DRV8825 on a board from Pololu was mounted so that the step size the step size could be changed by the microprocessor.







Figure 6. L298 H bridge




Figure 7. The TI DRV8825 is fast, provides a up to a 1/32 step size, can easily handle currents up to 1 amp and above






Figure 8. To keep the weight over the wheels roughly equal, the robot is powered by two lead-acid batteries wired in parallel.

Yaw correction
The system worked well but, with larger plots, the robot rotated about its vertical axis (aka yawed) about its vertical axis. A Bosche BNO055 absolute gyroscope was used to measure and correct for this rotation. Because the BNO055 requires clock stretching and the Broadcom BCM2836 microprocessor used in the Raspberry Pi has problems handling this, the BNO055 was run by Arduino Nano which was read via serial by the Raspberry Pi over the USB connection (Figure 9).




Figure 9. Rotation of the robot about its vertical axis was measured by a Bosche BNO055 absolute gyroscope run by an Arduino Nano connected to a Raspberry Pi.

Initially, to reduce weight, a NiMH battery was used for power. This arrangement worked but not well. A design using 12V lead-acid storage batteries was used instead. Because the battery is quite heavy, to keep the weight over each wheel roughly equal, two batteries were used wired in parallel. Because the robot weighed in excess of 53 Newtons, nema 17 geared steppers motors from STEPPERONLINE were used.