Week 10: Machine Building

This week

Tripod Descent.

<video src="../../machines/img/DeltaHopper.mp4" autoplay=true loop=true></video>

Acknowledgements for this week

Special thanks to gavindar and aathalye for helping keep EDS open late Tuesday evening! Completion of this machine would have been impossible without their generosity of spirit and time.

Assignment: make and automate a machine

This week’s project was an all-section project – we were tasked, as a section, to produce a CNC machine of some form. We split up into subteams based on our relative expertise and interest; I was tasked with leading the software team.

Hardware: TinyG

As one of the simplifications for this week we were given a Synthetos TinyG CNC controller to run our machine. This XMEGA-based board includes 4 stepper drivers and a Gcode interpreter, allowing control of up to 4 independent axes. Configuration allows the stepper motors to be interpreted as either linear axes or rotary axes, permitting decently complex machines to be operated.

A software plan

Our section decided to attempt a delta positioner. Background reading revealed that no one has really done delta positioner kinematics with any of the TinyG tools. Luckily, we can push Gcode directly to the TinyG and direct it to move in rail space, and it will do so smoothly and linearly.

The crazy software plan I came up with was this:

  • Take in a toolpath expressed as SVG.
  • Extract toolpath points from the SVG and translate them from world space (mm) to rail space (mm) in tiny increments.
  • Convert the rail-space toolpath points to Gcode and push them to the TinyG for execution.

Executing on the software plan

I took on the task of pushing Gcode to the TinyG board and wrote a software module to do this.

One of the important features of TinyG is its ability to buffer up to 32 GCode lines at once, and interpolate cleanly between lines. For this to be healthy we need to keep the buffer decently full without dropping commands. To do this, our code subscribes to queue updates in an event loop and pushes GCode lines as long as the queue reports having room for them.

In the meantime, maxallen worked on the SVG-to-toolpath conversion, and agarwalv worked on the conversion of world-space points to rail-space points. This was all successfully integrated early Tuesday evening.

Testing the software plan

We tested the completed software capability with bare stepper motors and it appeared to work relatively well. Unfortunately, we were never able to test on the full-size machine, as during testing using direct serial control we determined that the drive pinion on one of the carriages was slipping with respect to the stepper motor shaft, rendering it effectively inoperable.

Miscellaneous things I did

Software wasn’t the only thing I did on this machine; I also did some incidental tasks during the final assembly on Tuesday, including:

  • Smoothed out machining residue from carriage components using a utility knife.
  • Produced optical alignment marks for stepper mounting plate.
  • Soldered wire extensions to stepper motor cables.

I only wish the final outcome were better.