Decoding a PWM signal from a rc car receiver

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

Decoding a PWM signal from a rc car receiver

Postby kahlenberg » Sun May 29, 2016 2:02 am

Hello,
I want to decode a PWM signal with PIC16F877A. As you can see in the attached picture, there is a noise in front of the signal. I want to ignore them, I think those 3 jumps after noise are start of the signal, because they are same in every condition (I tested). After start condition there are 17 pulses. I want to measure the on-time and off-time of every pulses. How can I do that?
Can I make it with Capture module? And how?


Image


One question regarding capture mode:
Does the TIMER1 start immidiately after initializing? Or it waits until a falling edge comes to RC2/CCP1 input and then starts.

By the way: This signal is comming from a 27 MHz receiver in a RC-car.
Thanks.
kahlenberg
 
Posts: 2
Joined: Sun May 29, 2016 1:51 am
PIC experience: Experienced Hobbyist

Re: Decoding a PWM signal from a rc car receiver

Postby Joseph Watson » Sun May 29, 2016 6:18 am

You might want to check out the operation of encoder/decoder chip sets similat to PT2262 and PT2272. If it looks like your transmitter's signal resembles what a PT2262 sends, you might find that understanding what a PT2272 does might help you design your software. I cannot be sure that is what you have there but these things are quite common and their pulse patterns look similar to yours.
NCR once refused to hire me because I was too short. I'm still waiting on my growth spurt.
User avatar
Joseph Watson
 
Posts: 49
Joined: Sat May 31, 2014 8:06 pm
Location: Ohio, USA
PIC experience: Experienced Hobbyist

Re: Decoding a PWM signal from a rc car receiver

Postby kahlenberg » Sun May 29, 2016 12:55 pm

Thanks for answer,
I looked at datasheets of PT2272 and 2262, it seems that they are working with digital data rather than PWM signals. So, they are not compatible with my transmitter and receiver.
kahlenberg
 
Posts: 2
Joined: Sun May 29, 2016 1:51 am
PIC experience: Experienced Hobbyist

Re: Decoding a PWM signal from a rc car receiver

Postby Joseph Watson » Sun May 29, 2016 7:50 pm

I gather, then, that as you move the steering control slowly through its range, you see one of the pulses in that pulse train that you are displaying on the scope slowly get wider and narrower to indicate the degree of activation of the control? If that is the case, I am curious as to the number of channels of proportional control that are coded into that pulse train?
NCR once refused to hire me because I was too short. I'm still waiting on my growth spurt.
User avatar
Joseph Watson
 
Posts: 49
Joined: Sat May 31, 2014 8:06 pm
Location: Ohio, USA
PIC experience: Experienced Hobbyist


Return to 16-Bit Core

Who is online

Users browsing this forum: No registered users and 13 guests

cron