Pulse Measurments with Capture Module

Hi,

I would like to capture R/C receiver pulses with the USBizi timer3 capture module for maximum accuracy.
On the Domino board An0 is muxed with CAP3.0 so I may use this pin.
I have some questions regarding this…

Can I use Timer 3 for this purpose using the register class API or is timer 3 used for another purpose by the kernel?

Since the Interrupt class does not support capture interrupts how do you think is the best way to synchronize reads from the capture registers?

Thanks,
S.B.D

Chris has already done this on his RWAR project. He also has the source code available for download. R/C system use a relatively low speed signal so nothing real fancy is needed to decode them. Using an interrupt pin will work just fine.

Yep, there is a PPM decoder in this driver package: http://files.chrisseto.com/c5V

Jeff & Chris thanks!

I will look at Chris’s code to do the R/C task.
My main concern was jitter since the .net is not real time, so handing the job over to hardware seemed the right choice.
Returning to my original question, will I be able to use the Capture module in the future if a short pulse width needs to be captured? Is this even possible?

S.B.D

You have to use the Register class to access the underlying HW. When using an interrupt pin remember that each interrupt generated is time stamped so you have an accurate way of determining the pulse width.

In my experience, the PPM driver is pretty stable. It’s measuring stuff between 1 and 2ms. IF you need to go lower, you might want to use something else.

Hi Chris,

I will use your driver to sample the PPM signal and adjust a PWM output accordingly with the
servo driver. I will check for noticeable servo jitter using analog and digital servos.

Will let you know the results as soon as I find the time to wire this in the coming week.
I will also have a go at trying to bring up the capture HW (taking into account that Timer3 isn’t used…)

S.B.D

That is exactly what I used the PPM driver for, and I didn’t have any issues. That was controlling an RC car at around 25MPH.