For those interested, and electrical engineer solved the problem. The issue was noise in the A/B channels from the encoder. This was causing extra pulses to be registered.
On Tuesday, June 20, 2017 at 9:40:59 AM UTC-7, Kevin B wrote: > > Hi all. > > I am working on a project using the BBB PRU and eQEP module. At given > positions I am using a pulse to trigger the shutter on a camera that is > pointed at the motor that is driving the encoder. For testing purposes I am > attempting to get a pulse on every rotation so I can easily compare the > image from one rotation to the next to confirm that I am properly trigging > every rotation. ‘ > > This is my first time using the BBB, and it has been quite the learning > experience. I have been using the AM335x technical reference manual > <http://www.ti.com/lit/ds/symlink/am3358.pdf> (starts on page 1650) as a > guide for doing this. > > > > The problem: > > Using an oscilloscope with the green probe attached to position compare > sync output index pin (P8_31) and the red probe attached to the index input > from the encoder on each rotation of the motor I am seeing the time between > the pulses varying (see attached image Problem.gif, a picture is worth a > thousand words). It is important to note that the system technically works, > however because the difference in timing I am unable to capture the images > that I need. The goal is to be able to consistently get the expected image. > > > > Things I have tried: > > Switching the sync output pulse between the strobe and index pins. No > change in behavior. > > Adjusting the value put into the position-compare register. I tried both > 4,001 and 3,999. In each case I still see variance between the > position-compare sync output and the index pulse. > > Hooking the camera shutter up directly to the index pulse from the encoder > and the resulting images show little to no change from one rotation to the > next. The camera itself is hooked to a PC that is receiving the image. This > confirms that my method for capturing images seems adequate. > > > > Questions: > > I am working on the assumption that the position-compare register on the > eQEP module, when set to 4k for my encoder, should exactly match the index > pulse coming from the encoder. Is this assumption correct? > > Are there any additional debugging steps I could take to determine why > this is happening? > > > > Technical details: > > Linux beaglebone 3.8.13-bone84 #1 SMP Sun Feb 12 02:54:13 UTC 2017 armv7l > GNU/Linux > > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5aa5583f-d1d4-4dd3-a972-4d8881bf3c1d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
