eQep -quadrature encoder controller - anybody using it?

Hi all,

Since I want to use Beaglebone black in order to perform e motor position controller I need to use an Encoder.
I’m struggling with the eQep configuration.

Searching other posts I found this:

https://groups.google.com/forum/#!searchin/beagleboard/encoder/beagleboard/mE_ha4zOApM/VewMCyQx37kJ

In which Teknoman117 released his own version of a kernel module driver.

I compiled it, and it seems to work except that the posiotion sysfs entry is always 0.

Has anybody ever used it?
Or Has anybaody used the eQep?

I’m using a 3.8.13bone28 kernel with xenomai extensions…

I came across that post and Teknoman’s library a few weeks ago. I have been able to compile it and get the eQEP to work on 3.8.13-bone28 Ubuntu 12.04 (shortly before I carelessly shorted my BBB). Yes, the position sysfs entry does change when I use it. The only problems I noticed were you have to make sure you’re hooked up to the correct pins, and the pullup/pulldown settings don’t seem to do anything in eQEP mode.

Hi James,

After a lot of other tests I’m quite sure the pins are hooked correct, really the eQep reads something, the only thing is tath it is continually underflow/Overflow…

I’m experimentig varying the QEPCTL settings but without luck (until now).

Giuseppe

The stuff crammed into this little SoC never ceases to amaze. It would be
nice to get this added into the mainline kernel.

David

Giuseppe,

I cheated a little in my setup. Instead of hooking up an encoder, I’ve only hooked up two SPDT buttons I took from the inside of a ball mouse to ground and 3.3V and pressed the buttons to generate gray code.

I set mine up again to see if I could spot anything and came across a little problem. Check your pinmux settings after loading the dtbo. When I loaded the eqep2 dtbo provided by Teknoman117, the pinmux didn’t change. I’ve attached the output from my successful session where I load my custom eqep2 dtbo on P8’s 11 & 12. You might need to recompile the dtbo’s.

James

LoadeQEP.txt (3.32 KB)

Hi all,

just to let you know,

It turned out to be an electrical issue with the resistor used, the voltage level were good but maybe the current was too low.

Now it works!

Thank you very much!

Giuseppe