Hi,
I am trying to set up an ArduPilot Mega 1.4 for a friend. Never had one before.
Hardware installation went OK. ArduCopter V2.2b2 flashed w Mission Planner. Checked out the git repository, and flashed the ardupilot-mega/Tools/ArduPPM/Binaries/ArduPPM_v0.987_Arducopter-APMv1.x.hex to the 328p with an ISP.
When connecting a standard N*PWM receiver, I get the bar graphs to move OK with the sticks in Configuration->Setup in the Mission Planner. Now I want to connect a PPM "sum signal out" receiver instead. I put a jumper between Ch2 and Ch3, send the PPM to Ch1, the blue LED flashes long-short-short when the transmitter is on, but the bar graphs won't move!
Looking at the signal on Pin14 of the 328, it looks pretty much the same with the PWM and with the PPM receiver (which is a FrSky TFR4). Frame time is about 24 ms, the low periods between pulses are 0.5 ms and the space between frames is high.
Is there a way I can find out what is required from the PPM signal before it will work? And what is that PPM vs. MUX thing? I see 2 encoded outputs from the 328, not just 1 as I would expect.
An attempt with a Futaba R6107SP receiver also failed.
Kind regards
Soren
Tags: PPM

You should have a PPM signal similar to this but with 8 channels.
I
I tested that with a Jeti receiver and it was working flawlessly.
Try to set your receiver output to 8 channels mode, and check if the output is clean with a scope. Some receivers can have a very dirty PPM sum output. This is the case on some FM receivers.
Mux is only for planes manual control, it is trigged by channel 8. It is a bypass to effectively send Ch1 - 4 directly to the Ch 1 - 4 APM output.
On wich Mega 328 pins do you see 2 PPM output ? This seems strange. The code is only duplicating Ch1 input and send it to main AVR ppm input through a single line.
Permalink Reply by Søren Kuula on January 19, 2012 at 5:21am Hi,
Well I got it to work now, with the FrSky TFR4 receiver. My obervations were:
- It just HAS to be 8 channel. 7 channel will not do, even if I don't care about the 8th channel. The bar graphs in Mission Planner won't move with the same receiver in 7 channel mode. (7 channel or multi mode are a Futaba speciality. Have to use a Multi capable receiver, and set up the transmitter to use Multi as well).
- The working signal had HIGH variable periods in the PPM signal and also a HIGH space in between the frames. In Olivier's image in this thread, the "Received PPM Frame" signal is the inverse. So with a receiver that outputs LO variable pulses and LO frame gaps, I guess one has to invert the signal.
- Also when looking at ATMega328p Pin 14 with a standard PWM receiver attached via a million of wires, it was HIGH, HIGH.
What is the design rationale behind using a PPM signal internally between two ATMegas? I would have thought of SPI or something else first.
Would there be anything wrong about hacking at the code for the main CPU to make it 7ch tolerant? Alternatively, have the 328p add a dummy 8th channel to the signal? And maybe even have an option to invert the signal for those receivers that have LO, LO output, such as my Futaba R6107SP ?
Kind regards
Soren
Permalink Reply by Andrew Radford on February 16, 2012 at 11:45pm Just had the same issue with my Hitec Electron 6. The signal is the inverse to what you see in the graph, so it doesn't work.
I think the signal really is passed through to the APM though, so the fix would have to be done in there.
Permalink Reply by Andrew Radford on February 26, 2012 at 3:20pm After hacking the PPM code and inverting the signal from the 328 to the Atmega, it still does not work. The highs & lows etc are the same as when the 328 is emitting failsafe PPM. I can only assume that the Atmega is picky about timing or something like that.
Permalink Reply by Søren Kuula on February 26, 2012 at 3:33pm Hi,
I think that I concluded that the signal has to be the inverse of the image above. And it has to be 8 channel.
Try make a scope image of your signal, and I will compare it to that of my working receiver. I assume here that the ATMEGA328 firmware is original (not hacked at) and is "PPM capable", and that a jumper is set between inputs 2 and 3 and that the receiver signal is one PPM signal.
Regards
Soren

Permalink Reply by Andrew Radford on February 27, 2012 at 12:18am Actually the firmware was hacked - to do PPM pass through only, and to invert the PPM signal to agree with what the ATMEGA expects. The channel count is also the same.
I'd have to get my analyser out to compare the signal from the receiver and from the 328 when in failsafe in order to see what is happening. However as it goes, I don't think a solution to this can appear anywhere but on the ATMega, NOT the 328. For that reason, I have taken this no further.
FYI - I'm using a Futaba 7CAP so would have thought my PPM signal would have common timings etc.

If you want to adapt ppm decoding to your receiver, you'll have to do that in the main APM code.
The PPM encoder does nothing when it is in ppm passthrough mode, except generating a failsafe ppm signal if the input PPM signal is missing.
The input signal in this mode is simply sent to the main AVR ppm input pin without modifications.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.74 members
685 members
133 members
51 members
314 members
© 2013 Created by Chris Anderson.
Powered by
