Thursday, February 20, 2014

Linear Delta Printing with LinuxCNC

Reviewing my posts, it looks like I somehow missed sharing Brandon Heller's incredibly awesome video of his Kossel linear-delta printing parts for a GUS Simpson (a grounded delta).  I printed up a few sets of the GUS Parts on my MendelMax and will vouch for how hard they are to print.  I've gotten my Kossel based printer to move via LinuxCNC, but it's no where near as far along as Branon's.  Great work!

Friday, February 14, 2014

The King Is Dead

Long Live the King!

...which is a round-about way of saying this blog has a new address!

http://blog.machinekit.io/


When linking to anything on this blog, please use the new blog.machinekit.io domain.  Of course any URLs you have stashed in bookmarks or web pages will still work thanks to the wonders of modern networking.  :-)

Over the next several weeks, look for more additions to the machinekit.io network family, including a main website and some more technical posts on how the new architecture differs from the existing LinuxCNC, what bits-and-pieces are available, and how to build useful machines that work in hard real-time without spending man-years writing code.

Lots more details coming soon, as well as lots of handy usable software.  I'll be releasing a major update to the PRU code which will support encoders (for full servo systems w/o an FPGA) and a consistent pin numbering system you won't have to be a programmer to understand.

What is MachineKit, I thought it was a BeagleBone uSD image?!?


What is MachineKit?  I like to think of it as a "Robot Army Construction Set", but something like "controlling movable things" is probably better.  Give us a bit to work up a good slogan...we're all engineering types here and marketing taglines are hard.  :-)

But yes, the work I've done to get LinuxCNC running on the BeagleBone does have a downloadable image named MachineKit.  However there is more to MachineKit than just an SD card image.  MachineKit is Michael Haberler's vision for LinuxCNC being worked on by a small (but very talented and busy) group of folks.  The idea is to take the "guts" of LinuxCNC back to it's modular roots and into the future by providing an assortment of pre-built, ready-to-use drivers, routines, and interfaces for machine control.  Think something sort-of like Lab View, but with hard-real time performance and the ability to (safely) control anything from room-sized CNC machines to desktop 3D printers to self-balancing robots and autonomous quad-copter drones (hmm...did I mention Robot Army Construction Set?).

Background and dry technical overview to help you sleep tonight


One of the first major features of the new MachineKit code was porting LinuxCNC to run on a variety of real-time kernels.  LinuxCNC used to support several real-time options but recently had degenerated to only working with RTAI.  With the introduction of several new RTOS options (including Xenomai and RT_PREEMPT), it became possible to run LinuxCNC on the BeagleBone.

Other enhancements being worked on include a completely new messaging scheme to communicate between various components of the LinuxCNC/MachineKit world.  This not only simplifies several existing use cases, but opens up many new exciting possibilities.  Real-time and user-interface components will be able to be distributed across multiple platforms (ie: different physical CPUs connected via networking, shared memory, or some other means).  The simple version of this is running the user interface on something like a tablet or desktop PC, while a BeagleBone or other embedded processor runs the real-time code.  But even more is possible.  The new scheme has been designed to allow multiple CPUs to participate in real-time operations, so you could potentially run floating-point real-time motion path generation on the ARM of the BeagleBone, use the PRUs as "first-class HAL citizens" (rather than the pseudo-hardware interface they are currently), and even something like an AVR or ARM CortexM to off-load various other bits of HAL code.

The vision of MachineKit is to return LinuxCNC to it's modular roots (you can theoretically swap out the motion planner, gcode processor, and other core parts of LinuxCNC, not that anyone does these days...it's code left over from the old times) and be able to more easily mix-and-match different pieces, potentially even having more than one component that performs the same or similar function.  As a simple example, perhaps you have a linear delta 3D printer (Rostock or mini-Kossel).  Usually, you want the motion controlled by the gcode processor for printing a part.  But sometimes you may want a complex program directly communicating with the motion planner to do things like non-trivial homing and auto-calibration (auto-probe a bunch of points on the bed and do a bit of linear algebra magic to determine the real physical characteristics of your machine, like arm length and tower offset, rather than trying to measure everything to sub-millimeter accuracy).  MachineKit intends to make this (and much more) not only possible, but easy to implement.

Monday, February 10, 2014

CRAMPS Board


I have finished the design for the first version of the CRAMPS 3D print controller board for the BeagleBone. This "new" design is a rework of the RAMPS-FD board for the Arduino Due, which in turn is a rework of the RAMPS board for the Arduino Mega (isn't open-source great!). The PCB files are queued at OSH Park meaning I will hopefully have boards around the end of February.

Features & Details:
  • 12-24V operation
  • 6 Pololu drivers
  • 15A driver for heated bed, with dedicated power
  • 3 high-current drivers for extruder heaters
  • 2 medium-current drivers for fans/lights, always 12V
  • 4 Thermistor inputs
  • 6 Limit switches (5V tolerant)
  • 4 Servo outputs
  • SPI and I2C expansion headers (5V tolerant)
  • Flexible power options for the BeagleBone (use 'Bone 5V jack, 5V screw terminals, or add a regulator to generate 5V from 12-24V system power)
  • Hardware ESTOP chain
  • Stack-through design allows for expansion
If you like living on the edge I've shared the board at OSH Park so you can order your own. Design files are on github, and I've started a thread on the RepRap forums if you have any questions.

Currently the BOM pretty much doesn't exist, and please don't judge me by the lack of assembly drawings in the PCB files.  KiCAD apparently doesn't have assembly layers or allow creating arbitrary mechanical layers so I can't make assembly drawings the way I'm used to for the last 15 years.  I'll get it all sorted out, and add a full BOM once I've sourced and ordered all the bits and pieces needed to build the board.

Saturday, February 1, 2014

New -bone39 Kernel Available

I've been building a lot of kernels lately, testing various options recommended by the Xenomai folks to improve latency.  Nothing has been a "magic silver bullet", but the overall combination of options has dramatically reduced typical latency, even though worst-case values haven't dropped much.

Also, some folks testing with recent kernels noticed the CPU wasn't running at full speed.  I have re-enabled the frequency scaling support in the kernel (the Xenomai folks recommend disabling this), which has restored the expected 1 GHz operation.  Tests so far show no impact on latency figures, since the CPU frequency isn't actually changing (only the performance scheduler is compiled into the kernel, which keeps the CPU running at the highest possible speed and doesn't try to throttle the CPU to save power).  AFAIK, the latency hit is from the CPU shutting down while the PLLs relock to a new frequency, so if the CPU never changes it's operating frequency there shouldn't be any issues.

You can download the new kernels here.  If you try it out, please let me know how it works for you.  I'll probably try to make new images with just the kernel update soon, but I'm in the middle of a bunch of other coding and updates, so pester me if you really want a new image and it hasn't shown up on the MachineKit page.

In other news, work is in progress to develop interfaces geared towards the BeagleBone (lower resolution screens with less 3D intensive "eye candy"), I've started work on the CRAMPS 3D Printer interface board, and I hope to have encoder support (both hardware and PRU software based) working  soon.  Rigid tapping could be coming soon to a 'Bone near you!  :-)

I am making good progress on the CRAMPS and encoder tasks.  If you would like to assist with interface design for the 'Bone, please post on the LinuxCNC developer list.  I don't do well designing GUI interfaces, and am looking for as much help as I can get to provide usable and attractive interfaces for the BeagleBone, for both CNC machining and for 3D printing.  Thanks!