First pulse in PPM stream truncated

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

First pulse in PPM stream truncated

Post by sgofferj » Thu Aug 08, 2013 11:21 pm

Hi,

I had a few problems with OpenLRSNG which were solved with 3.1 now. However, one more problem persisted:
While all other channels have good values from 985 - 2020, channel 1 shows 937 - 1963.
My config was 12CH PPM, negative polarity. When I changed to positive polarity, the problem vanished. Another user on RCG has scoped the PPM signal and found that the first pulse in negative polarity mode is truncated to 230µs while it should be 300µs. He scoped also a Taranis and that outputs a correct stream.

--Stefan


Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: First pulse in PPM stream truncated

Post by Romolo » Fri Aug 09, 2013 8:28 am

wait how long is the pulse train ? 12ch=32.5ms as minimum

sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: First pulse in PPM stream truncated

Post by sgofferj » Fri Aug 09, 2013 11:22 am

I don't follow - where is the connection?
It looks like OpenTX has a bug which causes the first pulse to be too short when negative polarity output is selected.

User avatar
MikeB
9x Developer
Posts: 16586
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: First pulse in PPM stream truncated

Post by MikeB » Fri Aug 09, 2013 11:53 am

If the frame length is not long enough (and the default 22.5mS isn't long enough for 12 channels) then the first pulse could be being affected by the last pulse in the PPM stream. 12 channels at 2 mS each (no extended limits) need 24mS, then you need (I recommend) 4.5 mS for the sync pulse, so a minimum of 28.5mS for the frame time.

Do you measure a short first puls with less than 12 channels?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: First pulse in PPM stream truncated

Post by sgofferj » Fri Aug 09, 2013 12:03 pm

Ah! I didn't measure it - unfortunately I don't have a scope.
With 8ch, I didn't have those problems. The model was set to 12ch, 30.5ms, 300µ, -. With identical settings but positive polarity, the problem does not occur.

Edit: 30.5ms is what comes automatically in OpenTX when you choose 12ch.


User avatar
DTFUHF
Posts: 5
Joined: Thu Aug 08, 2013 11:44 pm
Country: -

Re: First pulse in PPM stream truncated

Post by DTFUHF » Fri Aug 09, 2013 2:26 pm

here's some tests with these settings:
8ch, 22.5ms, 300u all channels high, 1st pulse: 260uS
8ch, 22.5ms, 300u all channels low, 1st pulse: 260uS
8ch, 23.0ms, 300u all channels high, 1st pulse: 260uS
8ch, 23.0ms, 300u all channels low, 1st pulse: 260uS
8ch, 22.5ms, 200u all channels high, 1st pulse: 160uS
8ch, 22.5ms, 400u all channels high, 1st pulse: 360uS

sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: First pulse in PPM stream truncated

Post by sgofferj » Fri Aug 09, 2013 3:14 pm

So the first pulse is always 40µs short in negative polarity?

User avatar
DTFUHF
Posts: 5
Joined: Thu Aug 08, 2013 11:44 pm
Country: -

Re: First pulse in PPM stream truncated

Post by DTFUHF » Fri Aug 09, 2013 3:15 pm

Both polarities, and i've seen it truncated by as much as 70uS

User avatar
DTFUHF
Posts: 5
Joined: Thu Aug 08, 2013 11:44 pm
Country: -

Re: First pulse in PPM stream truncated

Post by DTFUHF » Sat Aug 10, 2013 4:01 pm

I have a theory about where this error is coming from: in ISR(TIMER1_COMPA_vect), setupPulses() is called before the bitbang (output change) takes place. I noticed that with 8ch PPM, the 1st pulse is truncated to 267uS, and with 16ch PPM is truncated to 230uS. I think setupPulses is taking too long and affecting the length of the 1st pulse. Also note that er9x does not have this problem, and setupPulses() takes place after the output is changed.

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: First pulse in PPM stream truncated

Post by kha » Sat Aug 10, 2013 5:11 pm

There is a comment
/ / Must do this before toggle PORTB to keep timing accurate
In the code.... I wonder what's the logic on that

User avatar
DTFUHF
Posts: 5
Joined: Thu Aug 08, 2013 11:44 pm
Country: -

Re: First pulse in PPM stream truncated

Post by DTFUHF » Sat Aug 10, 2013 5:23 pm

kha compiled openTx with setupPulses() moved to after the bitbang and the 1st pulse is now accurate, so I am confident that this is the problem.

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: First pulse in PPM stream truncated

Post by kha » Sat Aug 10, 2013 6:18 pm

This reverts the behaviour to match er9x and fixes the pulse truncation.

http://kari.hautio.net/1stpulse.patch

User avatar
jhsa
Posts: 18980
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: First pulse in PPM stream truncated

Post by jhsa » Sun Aug 11, 2013 3:00 am

Maybe you should post that on the google code project page.. I'ts more likely the devs will look there more than here..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: First pulse in PPM stream truncated

Post by kha » Sun Aug 11, 2013 4:46 am

jhsa wrote:Maybe you should post that on the google code project page.. I'ts more likely the devs will look there more than here..
Ah forgot that it has a nice issue tracker.

http://code.google.com/p/opentx/issues/detail?id=100

iggyz
Posts: 3
Joined: Thu May 23, 2013 7:09 am
Country: -

Re: First pulse in PPM stream truncated

Post by iggyz » Thu Sep 05, 2013 9:39 am

http://openrcforums.com/forum/viewtopic.php?f=45&t=3492

PPM signal - first PPM delay is shorter than others.

Postby iggyz » Thu May 23, 2013 9:23 am
Hello.
I measured PPM signal on stock 2281 OpenTX firmware.
First "stop information - PPM delay" following "start information" in every PPM frame is shorter than others "PPM delays" between channel pulses.

PPM delay is settable in Menu 2/9 from 100us to 800us, default is 300us.

When PPM delay is se to 300us, first PPM delay in every frame is only cca 244us. (100 vs 47, 150 vs 97, 200 vs 148, 250 vs 197, 300 vs 244, 350 vs 296, 400 vs 346, 800 vs 748)

User avatar
Kilrah
Posts: 10240
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Incorrect first PPM pulse, 9X PPM output

Post by Kilrah » Thu Sep 05, 2013 11:01 am

Was fixed in r2746.

windcatcher
Posts: 11
Joined: Sat Jan 05, 2013 10:43 am
Country: -

Re: First pulse in PPM stream truncated

Post by windcatcher » Sun Mar 30, 2014 8:32 pm

Is it possible that this problem has returned??

I am using opentx r2940 and have problems with channel 1 using external PPM OrangeTX JR module.
Channel 1 is always way out of sync and acting weird. I have tried changing frame settings with no luck.

By the way. What is the best frame settings for OrangeTX on Taranis? Is default settings ok or maybe there are other better "spektrum like" frame settings?
Id like to make it work with ZYX-S using OrangeRX satellite but one of the channels is always out of sync.

User avatar
Kilrah
Posts: 10240
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: First pulse in PPM stream truncated

Post by Kilrah » Mon Mar 31, 2014 3:06 pm

Defaults are fine, and there have been no other reports of such an issue.
When did you get your Orange module, and did you buy it directly from HK (not second hand)? The first batch of that module had a defect that caused something like that.

Daedalus66
Posts: 1834
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: First pulse in PPM stream truncated

Post by Daedalus66 » Mon Mar 31, 2014 4:28 pm

The problem with the first batch was specifically on channel 2. It was a firmware issue and can be fixed. I don't think that's it. But there are similarities.

It looks to me as though the module in this case might be faulty. They generally work very well, but a few faulty examples have been reported.

windcatcher
Posts: 11
Joined: Sat Jan 05, 2013 10:43 am
Country: -

Re: First pulse in PPM stream truncated

Post by windcatcher » Thu Apr 03, 2014 7:44 pm

I have bought my module directly from HK some time ago. It is working quite ok with 6 channel orange receiver but I can not get it to work with orange satellite and tarot zyx-s FBL unit.
1 channel is always out of sync when using PPM signal and ZYX-S monitor.

I heard about the problem with orange module and also read somewhere that orange firmware upgrade would fix it. I have bought orange upgrade dongle from HK recently and done the update.
There is no difference in module behaviour.

1. Do you think that my module is broken? Even after the update?
2. What is the best PPM setting to use with this OrangeTX module and get best spektrum compatibility?
3. Is there anyone here using OrangeTX module with OrangeRX satellite and ZYX-S?

User avatar
Kilrah
Posts: 10240
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: First pulse in PPM stream truncated

Post by Kilrah » Thu Apr 03, 2014 7:56 pm

If the module works fne with a receiver the problem is either with the satellite or the ZYX, or the combination of both.

windcatcher
Posts: 11
Joined: Sat Jan 05, 2013 10:43 am
Country: -

Re: First pulse in PPM stream truncated

Post by windcatcher » Thu Apr 03, 2014 8:13 pm

Could be the problem with ZYX-S. There are people successfully using ZYX-S with orange satellite and a spektrum DX7, DX8 or DX6 radio.
I dont have a spektrum radio and would like to find out how to make my taranis with orangetx similar to spektrum signal.
I have no problem with binding the module with satellite and using 6 channels but at least one of them or sometimes 2 channels are out of sync or overlapping.

It looks to me like something is slightly wrong with PPM signal. Could you advice best PPM settings to use?

User avatar
Kilrah
Posts: 10240
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: First pulse in PPM stream truncated

Post by Kilrah » Thu Apr 03, 2014 8:46 pm

The defaults should work perfectly fine. There are many users who use the orange module and we never had any issue report about such a problem. I have one myself, and it works just as well with any possible valid PPM settings (I spent a lot of time testing and abusing it with my BNF models and a couple of receivers when I received my V2 module, as I was one of those who had the first buggy one and received a free replacement). While it works I still don't trust it on anything other than those BNFs where I don't have choice.

Remember both the module and satellite are "compatibles", and there could always be something the Chinese got wrong somewhere and which fails in particular combniations.

windcatcher
Posts: 11
Joined: Sat Jan 05, 2013 10:43 am
Country: -

Re: First pulse in PPM stream truncated

Post by windcatcher » Thu Apr 03, 2014 8:53 pm

Thanks for you help. I will contact HK and maybe try to get a replacement. Im not sure if its V1 or V2 but LED light has stopped working after few weeks....

Daedalus66
Posts: 1834
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

First pulse in PPM stream truncated

Post by Daedalus66 » Fri Apr 04, 2014 1:17 am

The default settings have worked fine for me with two different Orange modules (one of the from the faulty first batch with firmware upgraded). The only situation that requires different settings is for the old Spektrum DM9, which requires positive polarity to work and 400us for proper centering.


Post Reply

Return to “openTx”