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
Replies
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
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.