/* */

Sunday, December 29, 2013

Updated MachineKit Image Available

A new MachineKit image is now available.  While there are no dramatic changes with this release, pretty much everything got updated.  There’s a new kernel (-bone33), the latest Debian (7.3), and continued updates to LinuxCNC.  One somewhat major change is switching from the xdm display manager to lightdm, which plays nice with consolekit so the shutdown/reboot buttons work, user-mode USB mounting works, etc.

There’s no dramatic reason to update if your current system is working well.  This is primarily a baseline build I wanted to make available before I head off and start seriously working with the joints-axis code on the BeagleBone for controlling the non-Cartesian 3D printers I’m building (a Mini-KosselPro mashup, and Nicholas Stewart’s Wally and GUS Simpson).

Monday, December 2, 2013

New BeagleBone Cape Available

Alex Joni has finished up his bbb_parport cape and has them available for sale!

This cape provides support for up to 6 axis, and has an optional ADC for analog inputs.  There is a DB25 connector that should allow direct connection of an existing LPT based CNC machine to a BeagleBone.  If you’re more interested in cutting metal than printing with plastic, this is the cape for you!

Great work, Alex!

Tuesday, November 5, 2013

BeBoPr-Bridge Purchase Page

To make it even easier to purchase a BeBoPr-Bridge board set, I have added a purchase page complete with nifty PayPal “add-to-cart” buttons.

I have stock levels linked to the buttons, so if PayPal lets you send me money, I have the PCBs and connectors in-hand and ready to ship to you (saving weeks vs. ordering direct from OSH Park).

I also have another BeBoPr and BeagleBone Black coming, so I’ll be putting together my second Bridge board set soon and I promise this time I’ll take lots of pictures and put up some assembly instructions.  When I built the first Bridge board I didn’t realize I would eventually be selling them!  🙂

Monday, October 21, 2013

Configuring Multiple Home Switches on LCNC

Back in July, I showed how to configure a home switch with a BeBoPr board.  That blog post is a bit out of date now, as Charles has integrated many of the needed changes (including additions to the device tree config and setup.sh) into the main MachineKit branch.  Nice!

Still, you need to modify the default configuration a bit, and that post only showed how to set up a single axis.  This post will show how to configure multiple home switches in a few ways:

  • Axis-at-a-time: press the home key for each axis.  Common on machine tools; homing each axis separately avoids crashing a milling head into a vise or workpiece.
  • Sequential: each axis moves until it presses a home switch, in turn.  Common with 3D printers; the Z axis is typically homed last, so that the hotend doesn't scratch up the print surface.
  • Combined: all axes moves simultaneously, until each one hits the switch. Necessary with delta robot 3D printers, where moving just one axis might smash the head into one of the tower.  
You can follow the full explanation, or just skip to the bottom section and pull in the config changes for combined homing.

Saturday, October 19, 2013

Hung Task Bug in Xenomai Kernel

Thanks to Ralf Roesch, some glitches I had been writing off to bad SD cards have been shown to be a significant bug in the Xenomai patched kernel for the BeagleBone.  The symptom is the kernel hangs and prints a message similar to the following:

[26160.894920] INFO: task mmcqd/0:74 blocked for more than 60 seconds.
[26160.901577] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[26160.909811] mmcqd/0         D c0699e08     0    74      2 0x00000000
[26160.916607] [] (__schedule+0x5b8/0x774) from [] (schedule_timeout+0x1c/0x21c)
[26160.925943] [] (schedule_timeout+0x1c/0x21c) from [] (wait_for_common+0x130/0x170)
[26160.935718] [] (wait_for_common+0x130/0x170) from [] (mmc_wait_for_req_done+0x1c/0x74)
[26160.945851] [] (mmc_wait_for_req_done+0x1c/0x74) from [] (mmc_start_req+0x50/0x158)
[26160.955712] [] (mmc_start_req+0x50/0x158) from [] (mmc_blk_issue_rw_rq+0xa4/0x348)
[26160.965485] [] (mmc_blk_issue_rw_rq+0xa4/0x348) from [] (mmc_blk_issue_rq+0x3fc/0x450)
[26160.975624] [] (mmc_blk_issue_rq+0x3fc/0x450) from [] (mmc_queue_thread+0xa0/0x104)
[26160.985481] [] (mmc_queue_thread+0xa0/0x104) from [] (kthread+0xa0/0xb0)
[26160.994345] [] (kthread+0xa0/0xb0) from [] (ret_from_fork+0x18/0x38)
[26161.002875] Kernel panic - not syncing: hung_task: blocked tasks
[26161.009184] [] (unwind_backtrace+0x0/0xe0) from [] (panic+0x84/0x1e0)
[26161.017756] [] (panic+0x84/0x1e0) from [] (watchdog+0x1d4/0x234)
[26161.025866] [] (watchdog+0x1d4/0x234) from [] (kthread+0xa0/0xb0)
[26161.034065] [] (kthread+0xa0/0xb0) from [] (ret_from_fork+0x18/0x38)
[26161.042529] drm_kms_helper: panic occurred, switching back to text console

To ‘tickle’ this bug, all you have to do is boot, get to a console prompt, and run:

grep TestConfig /usr -r

There’s a thread over on the Xenomai list about this issue, and it looks like it’s a problem with the interrupt code for the am335x MMC or DMA driver (the MMC code makes heavy use of DMA).  I’m not sure how long it will take to track down this bug, or if I’ll be able to recruit any help from TI or elsewhere.

NOTE:  You can still use LinuxCNC on the BeagleBone, as this issue doesn’t really show up that often (I’ve done overnight prints and had systems run fine for a couple weeks straight), but it is definitely something that needs to get fixed.

UPDATE: I initially figured this was probably an issue with the TI code for the AM335x mmc controller, but it looks like it could possibly be an actual kernel bug based on the following very similar issue:
UPDATE 2013.10.29: Thanks to tireless efforts by Ralf Roesch, it looks like this is probably fixed.  Ralf identified a 3.12 kernel commit 7472bab236bdee1173412585591329e718f4d324 that seems to resolve this issue for both xenomai patched and ‘plain’ kernels.  I am still testing, but everything looks good so far.  I have checked in updates to my linux-dev project and expect to make new MachineKit images with updated kernels soon.

Sunday, October 13, 2013

BeagleBoard 3D Printer and CNC Capes

The BeagleBone is rapidly becoming a key player in the CNC and (I hope) 3D Printing space.  Don’t believe me?  Just check out the list of 3D, CNC, and motion control capes I threw together.  It turned out to be a *LOT* longer than expected!  Even better, most of these will work out-of-the-box with my existing MachineKit version of LinuxCNC.  Support for the Replicape will need some programming (it requires working I2C and SPI for proper operation, not just twiddling I/O pins), which will probably happen as soon as I can either buy a board or someone sends me one (hint-hint).


If I missed anything, you notice any goofs, or if you have more details on any of the boards (including YouTube “Action Videos” or similar!) please let me know.

Thursday, October 10, 2013

Bridge Boards Arrive!

Look what came in the mail:



After a long wait (which was sort of the point of ordering boards to have available for sale in the first place), 4-and-10 BeBoPr Bridge board sets finally arrived in the mail!

For those of you who have sent me money, I will be mailing your boards out tomorrow (Friday, Oct. 11).  If you are interested in purchasing a set, let me know.  Prices are in my previous post, and are quite reasonable (you actually save both money and time!).

Now buy some from me so I don’t regret deciding to sell them at cost!  🙂