Tuesday, December 9, 2014

BeagleBone Encoder Support

Russell Gower has written a HAL driver for the hardware eQEP encoder inputs on the Beaglebone.  This makes it possible to do rigid tapping with an encoder on your spindle, and paves the way for eventually running high-speed servo systems on the 'Bone (which will likely also need support for hardware PWM, since the existing PRU based PWM isn't really fast enough for motor control).

The new code is merged and built, so you should be able to use apt (or your favorite package manager) to update if you've installed Machinekit from packages.  If not, you should consider doing so (instructions), since it makes it much easier to do updates.

2 comments:

  1. Hello Charles !
    Could you briefly explain the PRU based PWM performance problem, and the sort of hardware PWM generator you think about ?

    Briefly, just to orient me...
    Thanks a lot.

    ReplyDelete
  2. The existing PRU based PWM runs at 100 Hz by default. Motor drive PWM is typically at least a few thousand Hz, and generally more like 25-30 KHz and above (to avoid audible noise caused by the switching transients). The PRU could potentially run that fast (especially if one PRU is dedicated to PWM generation), but it's easier just to use the hardware PWM generation already available on the BeagleBone. Details on the hardware PWM can be found in the AM335x Technical Reference Manual from TI.

    ReplyDelete