My goal is to build a DIY servo controller with #BeagleBoneBlack and a DC motor with integrated quadrature encoder. The TI eQEP hardware peripheral integrated into the BeagleBone processor can accurately decode quadrature encoded pulses. I am using the Linux kernel driver from @Nathaniel_Lewis :
I also used this post from BeagleBoard mailing list:
https://groups.google.com/forum/#!msg/beagleboard/0ewLcdUtA_E/sVEoDGkL9FcJ
And this device tree config for eQEP2:
https://17376924468624948387.googlegroups.com/attach/57f40b690c2851b1/LoadeQEP.txt?part=0.1&view=1&vt=ANaJVrGPwHIS2WLiOv6ixKKbzR46eHqySZLgFoyqQ_d_WnwWpd6WHjAYJi1DUftPPemLjzWziNVQ5BXCSQEDe6COpc_1ZPRU5ZAgS0AyU5ycCZ0_vLyWF3g
My changes are in my own repo:
GitHub Gists with notes for this video:
eqep-notes.txt
James Zapico <james.zapico@gmail.com> Unsubscribe
10/14/13
to beagleboard
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.
This file has been truncated. show original
Wondering what the kernel module does? Here is the code extracted from Nathaniel’s kernel patch:
tieqep.c
/*
* TI eQEP driver for AM33xx devices
*
* Copyright (C) 2013 Nathaniel R. Lewis - http://teknoman117.wordpress.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
This file has been truncated. show original
Photos: https://plus.google.com/photos/117542001281850354871/albums/6028753166053143281?banner=pwa
BeagleBone: Using TI eQEP to read quadrature encoder in DC motor - YouTube