HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Aug 20, 2012, 04:47 PM
Radio? Screwdriver!
United Kingdom, England, Bristol
Joined Aug 2011
937 Posts
Quote:
Originally Posted by Dirt-Torpedo View Post
Si,

Attached is some evidence for a runt pulse from the VD5M that doesn't show up in wired "pupil mode" PPM transmissions from the A9. The scope was triggering on falling edges, and the closed box with 3V amplitude could only occur with a glitch. It was very intermittent (just like the mSR & phoenix cyclic issue) and only seemed to occur when I was stick banging. Possible logic race on interrupt handling? Perhaps only occurring if RF frames are lost?

The other two attachments show clean frames with 506us pulses from the VD5M and 405us pulses from the A9. It seems like the "calibration mismatch" is likely a result of phoenix measuring servo inputs as the difference between the period and the pulse.

Seems to all make sense to me now.

Cheers.
This is brilliant, thanks for this just what I needed.

Quote:
Originally Posted by Dirt-Torpedo View Post
t was very intermittent (just like the mSR & phoenix cyclic issue) and only seemed to occur when I was stick banging.
What is your EPA set at? Is it set to maximum (i.e. 140%)? I don't suppose if its possible to have a copy of your model memory that you used on it from a HPP-22?

The only reason I ask about the EPA is that on your revision, I put a check in that if received packet had servo pulses out of bounds, it discarded the packet (belt and braces approach). I removed this on later versions, in case Hitec changed the protocol for <9 channel transmitters. Currently the Hitec protocol transmits servo centre for unused channels, however I didn't want it to break if they did decide to change the protocol in that way. Plus for the most part, the CRC check is sufficient.

I checked that the servo limits were as far as my transmitter would send, however it may be the case that your transmitter send's slightly larger value range. Of course this is just a theory as well, and won't be true if you don't have your EPA set high.

Quote:
Originally Posted by Dirt-Torpedo View Post
Possible logic race on interrupt handling?
Shouldn't be, as the Servo interrupt has the highest priority and also has the most code out of all the interrupts. All the main decision making and setting up for the channels are only done when in the blank pulse section. Also it won't change state (Normal/Failsafe/Off positions) unless its in the blank pulse period. This is so the critical servo pulse timing's are not affected.

During the blank period, I take a shadow copy of the current servo positions to prevent them being updated mid-ppm-cycle and messing things up.

The other interrupts are very short (couple lines long) and all just set or clear flags for stuff to be handled in the main loop and clean up any interrupt flags/etc.

Quote:
Originally Posted by Dirt-Torpedo View Post
Perhaps only occurring if RF frames are lost?
I think this could quite possibly be something to do with it. However I can't see quite what would be causing it. Like I said above, the main loop requests a state change, but the servo interrupt only changes when its finished its sequence of pulses.

How often is it glitching? Every couple of minutes or seconds?

The red LED will only be extingushed (or flash if a brief event) when it goes into failsafe mode. It only goes into failsafe mode when it has lost 2 complete channel hop cycles - which is around ~1 second.

Quote:
Originally Posted by Dirt-Torpedo View Post
The other two attachments show clean frames with 506us pulses from the VD5M and 405us pulses from the A9. It seems like the "calibration mismatch" is likely a result of phoenix measuring servo inputs as the difference between the period and the pulse.
Seems entirely plausible that it's working like that. Why they would do it that way I don't quite know. I can only assume that they trigger their timer counter on a level change - rather than on a falling/rising edge. Then if its a valid time period (say >=900uS), then count it as a channel, and then wait for the next channel. If over (say) 4ms, then reset the channel count. Just only a theory, as I don't have Phoenix to test it with.

I can't quite remember how I decided on 500uS (or as near as the 8-bit timer would get me to it) - but I'm pretty sure I decided it on what my Futaba radio was transmitting over its PPM port. I may change it to 460uS to keep it consistent with how the Aurora operates.

Did you have to recentre your centre points when connected through the Spektrum trainer port to fly or was it only on Phoenix?

Thanks for you work on this, hopefully we can get to the bottom of this! The only slight complication I have is that yours is a slightly older revision than the latest - which I had improved and cleaned up some of the way that the PPM is generated. So I have to refer back to my change log and the older revision backup to see what has been changed.

Cheers,
Si.
SimonChambers is offline Find More Posts by SimonChambers
RCG Plus Member
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 20, 2012, 06:54 PM
...just an earth bound misfit
Dirt-Torpedo's Avatar
Joined Mar 2010
654 Posts
Quote:
Originally Posted by SimonChambers View Post
This is brilliant, thanks for this just what I needed.
Stop, you're making me blush.

Quote:
What is your EPA set at? Is it set to maximum (i.e. 140%)? I don't suppose if its possible to have a copy of your model memory that you used on it from a HPP-22?
You should find my current version of that model memory attached. I can't quite recall why but my EPAs on THRO are +/-103% and PITC is at +/-102%. GYRO EPA is +/-126%, per FinlessBob's Helifreak videos, just to make gyro gains match with JR/Spek standards. Everything else is +/-100%.

Quote:
The only reason I ask about the EPA is that on your revision, I put a check in that if received packet had servo pulses out of bounds, it discarded the packet (belt and braces approach). I removed this on later versions, in case Hitec changed the protocol for <9 channel transmitters.
Ok.

Quote:
Currently the Hitec protocol transmits servo centre for unused channels, however I didn't want it to break if they did decide to change the protocol in that way. Plus for the most part, the CRC check is sufficient.
CRC on what?

Quote:
:
The other interrupts are very short (couple lines long) and all just set or clear flags for stuff to be handled in the main loop and clean up any interrupt flags/etc.
I wish I had done a little more testing to measure the runt pulse but my bench time was limited today. It may well be just a couple of instructions long. I loved the ATmega108 back in the day but have "fond memories" of being forced to embed code into the interrupt vector table to mitigate stack handling latency induced by the IAR C compiler.

Quote:
I think this could quite possibly be something to do with it. However I can't see quite what would be causing it. Like I said above, the main loop requests a state change, but the servo interrupt only changes when its finished its sequence of pulses.
Quote:
How often is it glitching? Every couple of minutes or seconds?
It doesn't seem to be deterministic. I can get a couple of minutes trouble free but then might get a few glitches in short succession.

Quote:
The red LED will only be extingushed (or flash if a brief event) when it goes into failsafe mode. It only goes into failsafe mode when it has lost 2 complete channel hop cycles - which is around ~1 second.
The flashes I'm seeing on the red LED are brief and it doesn't seem like I've had any latency when I see it happens.

Quote:
Seems entirely plausible that it's working like that. Why they would do it that way I don't quite know. I can only assume that they trigger their timer counter on a level change - rather than on a falling/rising edge. Then if its a valid time period (say >=900uS), then count it as a channel, and then wait for the next channel. If over (say) 4ms, then reset the channel count. Just only a theory, as I don't have Phoenix to test it with.

I can't quite remember how I decided on 500uS (or as near as the 8-bit timer would get me to it) - but I'm pretty sure I decided it on what my Futaba radio was transmitting over its PPM port. I may change it to 460uS to keep it consistent with how the Aurora operates.
No issue here now that the behaviour is understood; I simply can't tolerate mysteries.

Quote:
Did you have to recentre your centre points when connected through the Spektrum trainer port to fly or was it only on Phoenix?
No trim required but the mSR is inherently self-stablizing with its 45 degree flybar design. I found that I needed a lot of back elevator to get airborne with the A9 but it self-stabilizes once off the ground, and fore/aft cyclic response was decidedly biased to aft.

Quote:
Thanks for you work on this, hopefully we can get to the bottom of this!
It was fun, no thanks necessary, and the least I could do. I'm impressed by your skillz and tenacity, and quite confident you will squash this glitch dead!

Quote:
The only slight complication I have is that yours is a slightly older revision than the latest - which I had improved and cleaned up some of the way that the PPM is generated. So I have to refer back to my change log and the older revision backup to see what has been changed.
What would I need to burn a new hexfile? I have a USBasp incoming from HK for use with the KK2.0 multi-rotor controller board that I just ordered, for a DJI 450 I just ordered, to use with the VD5M. If you want to execute an NDA that's fine by me.

ps: I really prefer the orthogonal instruction sets of the VAX/MOTO/AVR processors over the goofy in the 8051.
Dirt-Torpedo is online now Find More Posts by Dirt-Torpedo
Last edited by Dirt-Torpedo; Aug 20, 2012 at 07:03 PM.
Reply With Quote
Old Aug 20, 2012, 07:17 PM
Radio? Screwdriver!
United Kingdom, England, Bristol
Joined Aug 2011
937 Posts
Only a brief reply as its 1:10am here and I should be asleep!

Quote:
Originally Posted by Dirt-Torpedo View Post
You should find my current version of that model memory attached.
I can't see it? Not sure if RCG attachments has eaten it up.

Quote:
Originally Posted by Dirt-Torpedo View Post
CRC on what?
The transmitting CC2500 adds a CRC byte for the receiving end to validate that the packet is valid. Very remote possibility that it could have a corrupt packet but a valid CRC - hence the extra check. However I decided the extra check was more risky than the very remote chance of a corrupt packet with a valid CRC.

Quote:
Originally Posted by Dirt-Torpedo View Post
I wish I had done a little more testing to measure the runt pulse but my bench time was limited today. It may well be just a couple of instructions long. I loved the ATmega108 back in the day but have "fond memories" of being forced to embed code into the interrupt vector table to mitigate stack handling latency induced by the IAR C compiler.
I don't think the compiler I'm using (IAR too incidentally) has too much latency handling interrupts. Well I hope not, not least how much it cost! I'll have to double check. IIRC (I'd have to double check, as its late/early) the 8051 core is running at 26MHz, so should have plenty of horse power available.

Quote:
Originally Posted by Dirt-Torpedo View Post
It doesn't seem to be deterministic. I can get a couple of minutes trouble free but then might get a few glitches in short succession.
Always the worse type of glitch to debug!

Quote:
Originally Posted by Dirt-Torpedo View Post
No trim required but the mSR is inherently self-stablizing with its 45 degree flybar design. I found that I needed a lot of back elevator to get airborne with the A9 but it self-stabilizes once off the ground, and fore/aft cyclic response was decidedly biased to aft.
Does sound like that the Spektrum transmitter could be processing it in a similar fashion. I wonder if Andy Kunz knows/allowed to say?

Quote:
Originally Posted by Dirt-Torpedo View Post
It was fun, no thanks necessary, and the least I could do. I'm impressed by your skillz and tenacity, and quite confident you will squash this glitch dead!
Your making me blush now!

Quote:
Originally Posted by Dirt-Torpedo View Post
What would I need to burn a new hexfile? I have a USBasp incoming from HK for use with the KK2.0 multi-rotor controller board that I just ordered, for a DJI 450 I just ordered, to use with the VD5M. If you want to execute an NDA that's fine by me.
CC Debugger - $49. Not cheap, cheap, but not ridiculously expensive. I made up a program header with some 2mm header pins jammed into the included 1.27mm header, then the other side of the IDC cable I made an adapter that connected into a 2.54mm header - which then connects into the 2.54mm IDC header. Works surprisingly well and is robust for what was a rigged program lead originally.

Quote:
Originally Posted by Dirt-Torpedo View Post
ps: I really prefer the orthogonal instruction sets of the VAX/MOTO/AVR processors over the goofy in the 8051.
I would have much preferred if TI used MSP430 core instead of the ancient 8051. I believe its a legacy of TI's acquisition of ChipCon. However even their new devices such as the 2540/2541 Bluetooth Low Energy chips still use the 8051. A 8051 that is supposed to be used in low energy products....

Cheers,
Si.
SimonChambers is offline Find More Posts by SimonChambers
RCG Plus Member
Reply With Quote
Old Aug 20, 2012, 07:18 PM
Radio? Screwdriver!
United Kingdom, England, Bristol
Joined Aug 2011
937 Posts
Quote:
Originally Posted by SimonChambers View Post
I can't see it? Not sure if RCG attachments has eaten it up.
I see it now, RCG must had a funny moment or something.
SimonChambers is offline Find More Posts by SimonChambers
RCG Plus Member
Reply With Quote
Old Aug 24, 2012, 11:24 PM
I can crash anything
United States, TX, Fort Worth
Joined May 2012
143 Posts
Simon,
Just got my package (yes the US post office is slow - 5 days from the UK and 10 in the US )
Man these are small
Took me an hour and a half to get every thing repinned but once I did it works great...in the shop at least
Since its midnight I will have to wait unil tommorrow to give it a try. Well that's if the rain stops. I just hope to get sone flights on it before TS Issac gets here (S Flodida).
Thanks and keep up the great work.

If your taking request / wishes for future development, I would like a 5 or 6 channel mini RX that takes standard servo plugs...you know just asking cause the worst you can say is no...hehehe.
Thanks again
Rescuejim is offline Find More Posts by Rescuejim
Reply With Quote
Old Sep 14, 2012, 10:51 AM
I can crash anything
United States, TX, Fort Worth
Joined May 2012
143 Posts
Simon,
Any chance you will be doing another run on transmitters?
Jimmy
Make that receivers...not sure what I was thinking there
Rescuejim is offline Find More Posts by Rescuejim
Reply With Quote
Old Sep 14, 2012, 05:20 PM
Registered User
USA, CA, Pismo Beach
Joined Oct 2007
1,331 Posts
+1 on more RX's. If there are any in the queue, please add me to the list.

Thanks
Richard
Greywing is offline Find More Posts by Greywing
Reply With Quote
Old Sep 15, 2012, 04:22 PM
Registered User
BelgiŽ, Vlaams Gewest, Brugge
Joined Sep 2011
322 Posts
You can count me in too Si!

Cheers

Steve
stevo0476 is online now Find More Posts by stevo0476
Reply With Quote
Old Sep 16, 2012, 11:52 AM
Addicted to lift
eosglider's Avatar
United States, FL, Miami
Joined Jul 2010
491 Posts
Si,
How confident would you be to place one of these in a DLG?
eosglider is offline Find More Posts by eosglider
Reply With Quote
Old Sep 16, 2012, 12:30 PM
Stop scaring my donkey!
JohnathanSwift's Avatar
Greenland
Joined Mar 2012
7,179 Posts
Being an old pig, I bought 4 from Si while available.

My eyesight is getting bad and I can't solder up the leads as I once could, so, if anybody is game, I have only 1 I'll sell (I'm using one, have plans for one, and the other will be a reserve).

I'm old and slow, so take that into account.
JohnathanSwift is offline Find More Posts by JohnathanSwift
Reply With Quote
Old Sep 16, 2012, 01:12 PM
Registered User
USA, CA, Pismo Beach
Joined Oct 2007
1,331 Posts
I'll take that. Sending PM
Greywing is offline Find More Posts by Greywing
Reply With Quote
Old Sep 16, 2012, 05:43 PM
Stop scaring my donkey!
JohnathanSwift's Avatar
Greenland
Joined Mar 2012
7,179 Posts
Well, I have not gotten your pm....
JohnathanSwift is offline Find More Posts by JohnathanSwift
Reply With Quote
Old Sep 16, 2012, 07:17 PM
Registered User
USA, CA, Pismo Beach
Joined Oct 2007
1,331 Posts
Resent.
Greywing is offline Find More Posts by Greywing
Reply With Quote
Old Sep 16, 2012, 09:10 PM
Stop scaring my donkey!
JohnathanSwift's Avatar
Greenland
Joined Mar 2012
7,179 Posts
I got it, and here is what I propose: I'll send the details by pm, if you agree, but I'd like for you to send a small, padded envelope, self-addressed, with stamps, for first class or whatever you want, using a weight of no more than 2 ounces.

I'll wait until it arrives, the ask for paypal payment and drop it in the mail, if you agree.

It's a good thing both of us are old and slow!
JohnathanSwift is offline Find More Posts by JohnathanSwift
Reply With Quote
Old Sep 17, 2012, 12:50 AM
Registered User
Romania, Dolj, Craiova
Joined Sep 2007
14,225 Posts
Available at HK now.
renatoa is offline Find More Posts by renatoa
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question Hitec 2.4GHz compatible receivers G_Wright Radios 1 May 09, 2011 06:02 PM
Sold OrangeRX Orange RX Spektrum 2.4GHz DSM2/X compatible receiver lrplin Aircraft - General - Radio Equipment (FS/W) 2 Apr 18, 2011 12:07 PM
Discussion OrangeRx Futaba FASST Compatible 8Ch 2.4Ghz Receiver WSWitby Electric Plane Talk 2 Apr 05, 2011 07:30 AM
Sold OrangeRX Orange RX Spektrum 2.4GHz DSM2/X compatible receiver lrplin Aircraft - General - Radio Equipment (FS/W) 5 Mar 30, 2011 05:35 PM
Sold OrangeRX Orange RX Spektrum 2.4GHz DSM2/X compatible receiver lrplin Aircraft - General - Radio Equipment (FS/W) 0 Mar 28, 2011 03:38 PM