Monthly Archives: January 2014

Past Project: DIY CNC Mill – Pictures

TitleCNC

I would say that this was probably my very first project in the field of robotics. When I was finishing up my last year of high school – maybe 2007? – somewhere online I discovered a world of DIY CNC machines; I had to make one myself. This is a little blast from the past since just today I rediscovered the following pictures. This was such a fun project and I learned a lot from it. Sadly after I finished it, it didn’t get much use. I had power supply and table alignment issues, and a lack of funding to fix it. The best part of this project is the inspiration it gave to my friend, John Grimsmo. After seeing it, this got him into CNC machines and he is now running a successful business using them – http://www.grimsmoknives.com/
Hit more to see more pictures of my first hacked together CNC machine.

Continue reading →

Building the Frame and Mechanical Design

The mechanical side of the machine was where most of my learning happened. Since I had almost no budget as a high school student, I built the frame out of whatever I could find or afford: MDF sheets, some scrap aluminum, and threaded rod from the hardware store. Nothing was machined professionally. Every hole was drilled by hand, and every joint was squared up with a carpenter's square and a lot of patience. Looking back, it is surprising the thing moved in a straight line at all.

For linear motion I used a simple combination of smooth rods and bushings on each axis, with threaded rod acting as the lead screw. This is a very common approach in hobbyist builds, because it is cheap and easy to source. The downside is backlash. Plain nuts on threaded rod have noticeable play, so the cuts were never as precise as I wanted. I learned the hard way that a design is only as accurate as its loosest component.

Alignment of the table was the biggest headache. If the gantry was even slightly out of parallel with the bed, the cutting depth would vary across the work area. I tried shimming and re-leveling several times, but the MDF base flexed with humidity and never stayed true for long. That experience taught me to appreciate why real machines use rigid, stress-relieved materials.

Electronics, Stepper Motors and Control Software

The electronics were the part that really pulled me toward robotics. The machine was driven by stepper motors, which turn in precise, repeatable increments and so make open-loop positioning possible without any feedback sensors. I paired them with hobbyist stepper driver boards, which took step and direction signals from the computer's parallel port. In those years, that was the standard way to talk to a homemade CNC.

On the software side, I used a PC-based controller program that read G-code and converted it into pulses on the parallel port. G-code is a surprisingly simple language: commands such as G01 for a straight cut and G00 for a rapid move, followed by coordinates. Watching a text file turn into physical motion for the first time was one of the most exciting moments of the whole project.

  • Stepper motors for each of the three axes
  • Driver boards translating step and direction signals into motor current
  • A computer running G-code interpreting software
  • A separate power supply for the motors and logic

Power Supply Problems and Lessons Learned

The power supply issues I mentioned were a real limiting factor. Stepper motors draw significant current, especially when holding position or moving quickly, and my supply was underrated for the job. Under load the voltage would sag, causing the motors to lose steps. Lost steps are especially nasty because the machine has no way to know it happened, so the error silently accumulates and ruins the part.

Electrical noise was another problem. Long unshielded wires running next to motor cables introduced interference into the control signals, which sometimes produced random jitter or missed commands. Today I would use shielded cable, proper grounding, and a well-sized regulated supply from the start. At the time, I simply did not know these things mattered, and discovering them through failure was a valuable, if frustrating, education.

Fixing everything would have required money I did not have, so the machine eventually ended up sitting idle. Even so, I never considered the project a failure. Every problem it exposed became knowledge I carried into later builds.

Legacy and What I Would Do Differently

If I were to build this machine again today, I would change a great deal. I would use a rigid frame of aluminum extrusion or steel, ball screws or at least anti-backlash nuts, and a modern microcontroller-based controller instead of a parallel port, which has largely vanished from computers. I would also plan the power system first rather than last, and budget for proper limit switches and an emergency stop.

Still, the value of this project was never in the finished machine. It showed me that with enough curiosity and stubbornness, a teenager with scrap materials could build a tool that moves under computer control. That realization shaped my path into robotics, and seeing it inspire my friend John to start working with CNC machines made the effort feel even more worthwhile. Sometimes the best result of a project is the spark it passes on to someone else.

PIDDYBOT – A Self Balancing Teaching Tool.

Title

After I built the tiny balancing robot using an IR sensor for stabilization, there was a comment on the youtube video about how it would be a good thing for kids to build and learn about PID controls. I thought that was a great idea, the only problem was that that tiny robot was the simplest of balancing robots. It was just an on off switch for telling the motor which way to move. There was no actual PID implementation in that system. So that got me thinking about how it would have been really cool if in one of my classes where I was learning about control theory I had a robot that actually let you see the changes in a PID system in real time. I decided to take it upon myself to create such a robot.

Continue reading →