PPM with CC3D
« on: October 06, 2016, 07:46:58 pm »
Hi,

I am using Arduino to send PPM of 4 channels to CC3D. I already got it working with PWM using 4 wires. It's really easy: I just need to send a pulse with the width that I want inside a periof of 20ms. It's fine and works great.

But when I use PPM I know I am gonna multiplex it, put the 4 channels inside the 20ms. Ok, I can easily do that with Arduino. But my question is this: if I have 4 channels and I want to fit those 4 channels inside 20ms, I know each channel will have to "last" 5ms and inside this 5ms I will have to send my actual data.

Ok, but how will CC3D know that every 5ms I will be sending data? I cant fine any specification of how long each channel can consume of the total pulse (20ms). I only need 2ms in each channel cause that is the largest value I will have, so can I make every channel consume only 2ms? How will FC know that? It must have a specification of this that I cant find so far.

Brian

  • *
  • 119
Re: PPM with CC3D
« Reply #1 on: October 06, 2016, 08:40:00 pm »
You need to send a full 8 channels, not just 4.  There is a 4+ ms start pulse, followed by the channel pulses, which are 2ms each.

This page describes it pretty well: http://www.fpv-hero.de/RC-Sender_2_en.html

Re: PPM with CC3D
« Reply #2 on: October 06, 2016, 10:28:29 pm »
@Brian thanks man, the link you pointed is great however it does not say the "starndard" or what works with CC3D. In the beginning it says you should use 8 channels (ok, 8 channels will be below 20ms) however reading it further the guys says the duration can be up to 22.4 but I am sure CC3D will not allow both cause it could not recognize if the user is using the 20ms pulse or 22.4 ms pulse. I would like really to find the documentation about the PPM that CC3D uses, do I really need the 4ms to syncronize it? With arduino I already used multiplexed and I didnt need the 4ms to syncronize it. Even if I have to use 4ms, maybe CC3D will use a different value.

Do you have any idea where can I get reliable information sepcifically to CC3D?

Brian

  • *
  • 119
Re: PPM with CC3D
« Reply #3 on: October 07, 2016, 06:07:18 pm »
Actually, it does look like it will work with just 4 channels:

https://github.com/librepilot/LibrePilot/blob/next/flight/pios/stm32f10x/pios_ppm.c

Trying to use PPM
« Reply #4 on: October 11, 2016, 07:21:09 pm »
Hi,

I am using CC3D with LIbrepilot and I am generating the input signal of the receiver of the CC3D with arduino. I am currently using channels 1-4 and generating the pulses in these channels with PWM. Now I heard of PPM and that I only need to use 1 channel to send data.

Ok, in the docs of librepilot it says: "The PPM stream should be sent to the first input through the white wire connected to CC ReceiverPort wire/pin 3"

Pin 3? Is it the channels 3? Or is it the signal pin of the channel one?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PPM with CC3D
« Reply #5 on: October 11, 2016, 07:30:54 pm »
Post moved to similar theme started a few days ago

Look here how to wire PPM input. Best option is PPM on pin8 / input6 for Oneshot feature.
https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Hardware+Configuration#CCHardwareConfiguration-ReceiverPort

FlexiPort can be used for PPM also.
https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Hardware+Configuration#CCHardwareConfiguration-MainPortandFlexiPortserialcablepinout

Re: PPM with CC3D
« Reply #6 on: October 12, 2016, 07:41:25 pm »
It's really freaking hard to generate the PPM. I spent the last days making everyting possible but CC3D never recognizes my PPM.

I really cant believe it's so hard to find the PPM model that CC3D uses. How long should be the first sync pulse? Should it be high or low? After that, how long can each channel consume of the total pulse?

I even tried some german pages to find the correct structure of PPM but it's unbeliveable impossible. Some people provided me some pattern which CC3D didnt recognized, other people provided me other pattern very different but it does not work too. So where is the documentation of the protocol in which PPM is sent?

I really appreciate any help. I also would like to know, if you can help me, in LIBRE PILOT when I select PPM in the INPUT tab, I select PPM to throttle, pitch, roll and yaw and I select "channel 1" in all of those throttle, pitch, roll and yaw. Should I just change this in LIBREPILOT in order to it start recognizing PPM?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PPM with CC3D
« Reply #7 on: October 12, 2016, 08:08:35 pm »
The PPM model used with the CC3D is pretty standard i think, it works with all know receivers with PPM output.
Every stick have his own channel inpout.




Brian

  • *
  • 119
Re: PPM with CC3D
« Reply #8 on: October 12, 2016, 09:11:21 pm »
You really need some sort of logic analyzer to look at the signals.  If we could see the signals, we could probably tell you what's wrong.

I have this one, which is pretty cheap, and works very well for relatively low bandwidth signals: http://dangerousprototypes.com/blog/open-logic-sniffer/

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PPM with CC3D
« Reply #9 on: October 12, 2016, 11:25:14 pm »
I found your post in Arduino forum: http://forum.arduino.cc/index.php?topic=428945.0

Tested the code you posted and works fine




Re: PPM with CC3D
« Reply #10 on: October 13, 2016, 03:43:04 am »
@f5soh man, I am so glad you are here to help me! I checked the print of your LIBREPILOT and mine was configured different! In this weeked I will test your setup and check if it works. It's gonna save me!! I spent so much time into this and I almost gave up, you gave me the last breath I needed. I will come back here to tell you if it worked!

Re: PPM with CC3D
« Reply #11 on: October 13, 2016, 03:48:35 am »
@f5soh could you please answer me this: I was using pin 3 of CC3D to connect to my arduino and could never make it work. I see you used the FLEXIPORT. Unfortunatelly I cant use FLEXIPORT, could you please check that code in PIN 3 of your CC3D?

Brian

  • *
  • 119
Re: PPM with CC3D
« Reply #12 on: October 13, 2016, 04:21:12 am »
Can you show a picture of your hardware configuration tab?  The configuration options for the receiver port are shown here:

https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Hardware+Configuration

Re: PPM with CC3D
« Reply #13 on: October 13, 2016, 04:42:51 pm »
Hi Brian, this is my screenshot :)

I tried right now and couldnt make it work on pin 3 of the receiver. Unfortunatelly I cant use flexiport, could anyone else confirm if can send PPM to pin 3 using arduino?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: PPM with CC3D
« Reply #14 on: October 13, 2016, 04:59:50 pm »
Your receiver port is set to PWM...
Look at link posted above and learn what it means, there is also some connection diagrams.
Whatever the input you use, if configured right the PPM works.

In hardware tab:
PPM-NoOneShot : PPM input, pin3.
PPM_pin8. PPM-OneShot compatible.

The config you set should match the pin you use.