3 ms·
I actually had no idea that the Beaglebone had these guys hiding onboard. A nice alternative to something like a RasPi with an Arduino hat or a USB-connected Ar
by amorphic 10y ago
I actually had no idea that the Beaglebone had these guys hiding onboard. A nice alternative to something like a RasPi with an Arduino hat or a USB-connected Arduino.
This is great for projects where you control the whole stack and don't plan to support anything else. I guess the only downside to going down this path is that you're locking in the Beaglebone Black as your sole hardware platform and losing some modularity.
For example it would be great to control a 3D printer by running something like OpenGB (http://opengb.readthedocs.io/ http://opengb.readthedocs.io/) on the main CPU and something like Marlin (https://github.com/MarlinFirmware https://github.com/MarlinFirmware) on a PRU. But that would require a Beaglebone-centric approach which wouldn't work on other hardware combinations.
That's just an observation though - I'm really impressed that the PRUs are there!
- cnvogel 10y agoSo, structure your project that you can either use the internal PRU or an external motor controller… I don't see the big problem. I'd say that most embedded related projects will have to deal with newer revisions of their hardware, maybe because an older part is no longer available or because people came up with more intelligent or less buggy circuits over time. So that's already a few (prob. very minor) variations you'll have to support. And besides very trivial projects, you should always try to have at least one "dummy" implementation of everything, to facilitate automated testing of your code. So, in your case, yout 3D printer controller could support the internal PRU of the Sitara, an external servo controller, or some dummy library that just logs positions to a file, for testing.
- amorphic 10y agoOn reflection - you're absolutely right. In fact this is exactly the way OpenGB is designed! OpenGB uses an abstract base class (called IPrinter) to describe a printer interface. At the moment there exists a Marlin implementation and a Dummy implementation (as you describe) of IPrinter. Other comments mention BeagleG and MachineKit. It should be pretty trivial to add IPrinter implementations of both of these. Thanks for the inspiration! :)
- eeZi 10y agohttp://www.machinekit.io/ http://www.machinekit.io/ MachineKit is using the PRUs with LinuxCNC already and you can control 3D printers with it!
- amorphic 10y agoI'm reading the MachineKit docs and I kindof get how it works. From the gcode docs (http://www.machinekit.io/docs/fdm/fdm-gcode/ http://www.machinekit.io/docs/fdm/fdm-gcode/) it seems like it should be reasonably simple to add support for it to OpenGB. Have raised an issue for this: https://github.com/re-3D/opengb/issues/18 https://github.com/re-3D/opengb/issues/18
- squeed 10y agoA friend of mine made a G-code interpreter for the Beaglebone. It opens up a circular buffer and passes commands to a small program running on the PRU: https://github.com/hzeller/beagleg https://github.com/hzeller/beagleg
- amorphic 10y agoThat's awesome! Sounds like with the PID/PWM loops in the works he's well on his way to a working 3D printer solution! I've added an enhancement issue to OpenGB for adding BeagleG support: https://github.com/re-3D/opengb/issues/17 https://github.com/re-3D/opengb/issues/17