Welcome! Log In Create A New Profile

Advanced

Anyone here using the BeagleBone (Black) to control their 3D printer?

Posted by marcosscriven 
Anyone here using the BeagleBone (Black) to control their 3D printer?
August 07, 2013 08:55AM
I have a Mendel90 which came in a kit with the Melzi board (Marlin firmware), which works great (in terms of quality of print etc)

There's two things that bug me though:

1) The slowness of uploading to the SD card (which I always do as printing directly from a computer, be it a laptop or a Raspberry Pi, always has the risk of interruptions)
2) Monitoring the printer remotely (again, can cause print issues)

I've read recently about the BeagleBone Black (or BBB ), which only costs £30 or $45. The really cool thing about it is within its ARM processor it has two 200MHz microcontrollers (which they call PRUs) on the same chip. They can communicate via the same memory as the main ARM core, but operate independently - allowing you to run Linux, whilst handing off stepper instructions to a separate real-time MCU (thus not having issue with interrupts). It's therefore a bit like having a Melzi + Raspberry Pi, but with a much faster MCU, and much faster communication between the two.

There's a guy who's created something called a Replicape ('capes' are add-on boards, in a similar way to Arduino shields), but his BOM is $90 (chiefly down to the connectors and stepper drivers, the latter of which seem to be 3x the cost of the ones on the Melzi).

I'd really like to make a such a cape as cheaply as possible, but using the same components as on the Melzi (minus the Atmega, SD card reader+buffer, FTDI). That got me wondering about making in a more generic way - such that you could either plug it into a beagle bone, or into an Atmega-based board?

What would also be cool about this setup is that save for the stepper control (which has to be in ARM assembly, but relatively short), all the rest can be written in a dynamic language like Python.

Just wondering if anyone's actually done any of this? I contacted the Replicape guy, but not heard back.

Edited 1 time(s). Last edit at 08/07/2013 08:57AM by marcosscriven.
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
August 07, 2013 01:28PM
The PRU's I think are meant to be flexible communication chips.

Instead of installing a chip for every communication protocol,

RS232, Ethernet, USB, I2C, CAN, Firewire, etc, etc, etc.

They put in these programmable chips, which you can basically program to act like a controller for any communication protocol.

Stepper drivers aren't communicated with via a protocol. It's just 3-boolean signals, Enable/Step/Direction.

So these PRU's aren't going to help in that aspect. You won't be able to just hand off the stepper instructions.
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
August 07, 2013 02:07PM
It's most definitely possible to control a stepper driver with the PRUs. Take a look here:

https://bitbucket.org/intelligentagent/replicape/src/2143a25b0537e6959e674441add9ee7866278049/firmware/firmware_00A3.p?at=master

In just the same way as the AVR MCUs can output step/direction to GPIOs, so too can the PRUs.

EDIT: Just found another BeagleBone project that does this: https://github.com/modmaker/BeBoPr/wiki/Hard-real-time-stepping

EDIT2: Another link explaing the Replicape approach http://hipstercircuits.com/pypruss-a-simple-pru-python-binding-for-beaglebone/

Edited 2 time(s). Last edit at 08/07/2013 03:51PM by marcosscriven.
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
August 07, 2013 03:48PM
The BeagleBone looks like a really interesting platform for 3d printing, and the PRUSS are very neat units. Basically like an embedded RISC CPU, and you get two. Possibly a better way to do it than hacking kernel drivers, the only downside is they are specific to the TI SOC.

I have a BeagleBone Black, haven't had time to play with it yet. I guess the problem is that the software will need writing from scratch, perhaps that is a good thing. I had thought of adapting RAMPS shield for BBB, but with Replicape being available soon there may not be much point.

The BBB may not be a cheap solution, but with all that power available it should make a good high-end system.
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
August 07, 2013 05:47PM
bobc Wrote:
-------------------------------------------------------
I had thought of adapting
> RAMPS shield for BBB, but with Replicape being
> available soon there may not be much point.

From what I gather, the Replicape will be at least twice the cost of RAMPS, so actually adapting the latter may be a good idea. The BBB works on 3.3v levels though, and as far as I know the Arduino shields run on 5v levels, so not sure if it would be quite as straightforward as a simple bridge.
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
October 16, 2013 03:26PM
I am running my Delta printer on Beaglebone Black with LinuxCNC for the software.. The PRU's are used to drive the steppers at 2.5 times the speed the best Arduino based RAMPs solution does now and using LinuxCNC on a desktop monitor frees up my laptop as well.. Very nice solution and very fast. The best part is LCNC is customizable and you can write your own interfaces and GUI's using Python or C++..

Charles Steinkuehler developed the PRU code and he has it posted on his blog at http://bb-lcnc.blogspot.com/p/machinekit_16.html
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
November 12, 2013 08:10AM
Not long ago got my BBB and I'm currently getting my copy of Gen7 electronics working, I'm planning on cutting my own cape for BBB based on Gen7 and see if I can drive Gen7 with I2C, if I can, then the next step is using pronterface for the print drive on BBB - simples
Re: Anyone here using the BeagleBone (Black) to control their 3D printer?
July 15, 2014 10:46PM
Quote
BobLWeiss
I am running my Delta printer on Beaglebone Black with LinuxCNC for the software.. The PRU's are used to drive the steppers at 2.5 times the speed the best Arduino based RAMPs solution does now and using LinuxCNC on a desktop monitor frees up my laptop as well.. Very nice solution and very fast. The best part is LCNC is customizable and you can write your own interfaces and GUI's using Python or C++..

Charles Steinkuehler developed the PRU code and he has it posted on his blog at http://bb-lcnc.blogspot.com/p/machinekit_16.html

How do you got the CRAMPS? It seems that you can't buy one right now
Sorry, only registered users may post in this forum.

Click here to login