Rotary encoder in CNC servo boucles

30 views
Skip to first unread message

pasce...@gmail.com

unread,
Feb 22, 2020, 2:54:37 PM2/22/20
to BeagleBoard
Hello.
I've a CNC project with the Beaglebone Black. Is It possible to put 4 rotary encoder without a lost of performance of the servo boucles (servo cycle of 1ms)?
I saw some libraries but there are limitations and a way is to acces GPIO in mode 7 and use internal timers.
So my question is if the CPU timers are accessible throught a kernel module, and how many, from the 8 timers present on the processor, are usable?

I've planed to use the machinekit but, if i've good understand, it's only possible to work with 2 encoders on the BeagleBone Black.
Fun is in the horizon, write a nex cnc software :-)


TJF

unread,
Feb 23, 2020, 1:42:05 PM2/23/20
to BeagleBoard
The AM335x CPU has three PWM subsystems, each one containing an eQEP module. So three rotary encoders are supported by the hardware (speed and direction/position @ 100 MHz counters).

In order to measure speed only (no direction/speed) you can use the eCAP modules in two of that subsystems (the third one isn't wired to any header pin). Or you can use one of the four TIMER subsystems (24 MHz counters).

If you need a fourth direction/position sensor, there's a PRU firmeware in the BBBlue package.

pasce...@gmail.com

unread,
Mar 7, 2020, 7:55:52 AM3/7/20
to BeagleBoard
Thank you for the answer.
I finaly decided to make a custom hardware with a STM32 to match the accurity that i want, the speed factor isn't important an it simplify the global design.
A nice 6 layers PCB tha fit in the HMI case of the machine.

MFCnc-CPU429.jpg


If you're interested, I've hosted the project to Grabcad.


Thank you and best reguards.

F.Declercq
Reply all
Reply to author
Forward
0 new messages