RC Radios, Transmitters, Receivers, Servos, gyros Discussion all about rc radios, transmitters, receivers, servos, etc.

Convert PPM to PWM

Reply

Old 01-31-2005, 05:36 PM
  #1  
Dj Vinz
Junior Member
Thread Starter
 
Join Date: Sep 2004
Location: Tongeren, BELGIUM
Posts: 4
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default Convert PPM to PWM

Hi there!

I am making my end of year school project,
with 2 friends, and we have to read PPM signal from a gyro or receiver,
into our digital microcontroller (µC) (a PIC16F873 @ 4 mhz)

I have some PWM input in my µC,
but no PPM input, i tried to read it via analog digital conversion,

but all i get is 0 or 255,
wich is normal, since PPM consists of a little peak, every time a PWM signal would stop.
They both start at the beginning of your period in a predefined frequency.

.freq: |_________|_________|_________|_________|

PWM: |¯¯¯¯|____|¯¯|______|¯¯¯¯¯|___|¯¯¯¯ ¯|____|

.PPM: _____|_______|____________|________|_____

What i need to know, is, how i could easily convert the PPM signal to a PWM signal,
and maybe backwards.

Anyone has some experience?

Thanks!
Dj Vinz is offline  
Reply With Quote
Old 02-01-2005, 11:03 AM
  #2  
laryboy
My Feedback: (2)
 
Join Date: Jul 2003
Location: wilmington, MA
Posts: 825
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

a simple chip called a j-k flip flop should do the trick. the freq input goes to the j input and the ppm goes to the k input. since these flops trigger on negative edges signal inversion is necessay. probably many other ideas will be posted. i hope i am not dating myself wit j-k flip flops
laryboy is offline  
Reply With Quote
Old 02-01-2005, 11:08 AM
  #3  
Dj Vinz
Junior Member
Thread Starter
 
Join Date: Sep 2004
Location: Tongeren, BELGIUM
Posts: 4
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

Thanks!!
I really can't find ANY information anywhere...
Even my teachers at school have no idea!

I'm allready very happy with your reply,
and hope other people have idea's too!

Thanks!
Dj Vinz is offline  
Reply With Quote
Old 02-01-2005, 11:34 AM
  #4  
laryboy
My Feedback: (2)
 
Join Date: Jul 2003
Location: wilmington, MA
Posts: 825
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

the key is to notice that the pwm signal goes positive at each freq tic mark and negative at each ppm tic mark
laryboy is offline  
Reply With Quote
Old 02-01-2005, 11:44 AM
  #5  
Dj Vinz
Junior Member
Thread Starter
 
Join Date: Sep 2004
Location: Tongeren, BELGIUM
Posts: 4
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

Yes, indeed.

I really understand the difference and the relation between the two signal modulations,
but i didn't knew how i could easily convert / demodulate the signal.

I found some great site explaining the two types of signal modulations,
but nothing about conversion
http://www.tpub.com/content/neets/14.../14184_135.htm
Dj Vinz is offline  
Reply With Quote
Old 02-06-2005, 03:35 PM
  #6  
Dj Vinz
Junior Member
Thread Starter
 
Join Date: Sep 2004
Location: Tongeren, BELGIUM
Posts: 4
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

mm less reply than i thought...
* up...
Dj Vinz is offline  
Reply With Quote
Old 02-06-2005, 04:20 PM
  #7  
mr.rc-cam
Senior Member
 
mr.rc-cam's Avatar
 
Join Date: Jun 2002
Location: West Coast, CA
Posts: 536
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default RE: Convert PPM to PWM

Examples of PIC routines for servos is found here: http://www.piclist.com/techref/microchip/servos.htm

Decoding the full R/C PPM frame is MUCH more complex. You must determine the start of the frame (look for the frame reset), then start measuring the width of each channel as it is serially presented. The channels are separated by sync's, which must be detected by your software. Each frame is separated by a reset pulse.

Your code must do everything. You can use simple polling techniques or take advantage of the interrupt features that are available on some PICs. This sort of project is not well suited for an entry level PIC programmer.
mr.rc-cam is offline  
Reply With Quote
Old 05-24-2016, 02:12 AM
  #8  
Gayu
Junior Member
 
Join Date: May 2016
Posts: 1
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default

PPM to PWM conversion can be made using a Bistable Multivibrator
Gayu is offline  
Reply With Quote

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Thread Tools
Search this Thread

Contact Us Archive Advertising Cookie Policy Privacy Statement Terms of Service