Playing with the Beaglebone Black am335x PRU to generate stepper pulses.

Playing with the Beaglebone Black am335x PRU to generate stepper pulses.
Originally this was a little New Years’ Eve project to learn how to utilize the PRU. It looked promising, so I added a G-Code interpreter :slight_smile:

The host CPU just pushes parameters via a ring-buffer to the PRU, the PRU reads these and creates full motion profiles (acceleration - travel - deceleration) autonomously.

BeagleG can easily reach 1Mhz step frequency (this is more a theoretical limit - real-world steppers won’t go that fast). And right now 8 motors can be operated in a controlled move. These number of axis should be useful for some robotics experiments.

The host CPU is pretty much bored. The advantage of BeagleG is, that the Beaglebone can host nice frontend software for the 3D printer (e.g. @OctoPrint ) without the trouble of too slow serial connections (often a pain-point). And of course cost saving because there is no additional micro-controller board needed for the low-level G-Code to stepper operation. And less things that can fail. It implements a network interface, so allows for interactive sessions via telnet without the need for a terminal emulation.

This is not complete software yet, but getting close. There are some small things to do to make it fully capable to operate a 3D printer (acceleration planning and a PID controller and PWM to control heaters). Also, I am looking forward connecting this to my Fireball V90 CNC machine.

As stepper drivers, I just use a regular RAMPS board, see this test-setup:
https://plus.google.com/u/0/+HennerZeller/posts/HyDMSHRBBDH

Code: http://github.com/hzeller/beagleg
http://www.youtube.com/attribution_link?a=lG_ogJAfrI0&u=/watch?v%3DhIEY9077D64%26feature%3Dshare

@Josef_Prusa

That was kind of insane :wink: