Jump to content
Arthur P.

Hacking the I2C interface of Spektrum DX and AR ?

Recommended Posts

Ahh, those Futaba PCM Rx's are little devils when it comes to their paired-up pulse outputs. An FPGA or fast microcontroller solution would take care of it. Sounds like a nice project for someone that has some spare time. :)

Or even worse in that case, all even channels together, then the odd ones together. That's 6 to capture simultaneously :(

FPGA is the way, but still a bit overkill in terms of work...

I've recently come across the Atmel CAP9 that looks like a good approach with both a microcontroller and programmable logic on a single chip. Unfortunately it's no good for hobby projects, as the programmable logic block has to be burned in by the factory at production time :(

The day where they make the same one with RAM or Flash technology for the logic block will be great... the end of microcontrollers that have loads of peripherals you don't need but lack one more input capture module... just fit what you need in the logic block :)

Edited by Kilrah

Share this post


Link to post
Share on other sites
Here is a picture of Version 1 buttoned up and ready to go. I am only going to use this one for testing though.

post-3782-1200167108_thumb.jpg

I-ve been rather busy and not following all threads as closely the last couple of weeks. Great work you guys !!

One thing to add: The channel sequence on the Spektrum systems is NOT fixed. You can move the channels so that they are adjacent. The thought behind this is that for certain 2 servo 2 channel controls you would reduce delay between the movement of the 2 servos. Make sure you do NOT activate this feature or the simple decoder will not work properly. In the DIY section of RC Groups someone has actually decoded the digital signals within the AR7000 and been able to capture those as they are simple digital streams. Using those would avoid this pitfal, but would require a microprocessor based decoder (or reprogramming the Flightcontroler to accept and compare two serial streams and also to do the binding routines).

Edited by Arthur P.

Share this post


Link to post
Share on other sites
Ahh, those Futaba PCM Rx's are little devils when it comes to their paired-up pulse outputs. An FPGA or fast microcontroller solution would take care of it. Sounds like a nice project for someone that has some spare time. :)

2.4ghz radio users rejoice.

Not sure why this was not picked up earlier, maybe I am missing something. :(

http://www.rcgroups.com/forums/showthread....ess#post8801564

I have pm'ed the author to see if he can make a basic PWM to PPM converter.

Share this post


Link to post
Share on other sites

Hi Arthur!

Question: How would one mistakenly activate the feature you describe below?? Would it be something that's activated through the DX7 such as channel mixing?

Selecting 'Acro' as the model type in the DX7 sounds like the safe way to avoid the pitfall below?

One thing to add: The channel sequence on the Spektrum systems is NOT fixed. You can move the channels so that they are adjacent. The thought behind this is that for certain 2 servo 2 channel controls you would reduce delay between the movement of the 2 servos. Make sure you do NOT activate this feature or the simple decoder will not work properly.

Share this post


Link to post
Share on other sites
Hi Arthur!

Question: How would one mistakenly activate the feature you describe below?? Would it be something that's activated through the DX7 such as channel mixing?

Selecting 'Acro' as the model type in the DX7 sounds like the safe way to avoid the pitfall below?

You would activate it my mixing two channels for e.g. flaperon control. That could move the two channels next to each other.

Share this post


Link to post
Share on other sites

:D:D 1 of those are miiiine! :D:D I really didn't think it would be THAT tiny..looks great! awesome job! Wow it's Christmas in January! Can't wait

I finished etching my Ver.2 boards. Now I just have to drill, hook up the feed-throughs and populate.

Richard

post-3782-1200609525_thumb.jpg

Edited by MorenoEnNYC1

Share this post


Link to post
Share on other sites

-AT-Brashley, Just had another look at your PCBs. Any chance of you etching and selling me a couple (4-6) of those PCBs ? And any test-results of actually flying with this design?

Regarding hooking it up to the Rx, I used single strands only connecting to the Rx signal pins, instead of the full three pin connectors. I-ve been thinking about epoxying the row to a thin strip of plywood to create a single long PWM connector which would ensure a fixed (correct) sequence with the 7th channel connector on the right pin. Might not save a lot of weight but does reduce the bulk of wires between Rx and converter, and may reduce the risk of the connector coming loose during operations.

Edited by Arthur P.

Share this post


Link to post
Share on other sites

-AT-Arthur P.: I could probably make some more PCBs if you like. I got all the parts from Mouser and could probably create a bill of material that someone could just order up to make one.

I have not tried it on a flying MK yet because my MK is not finished but I have had it hooked up the FltCtr for many hours at a time (w/ scope) and had/seen no problems. The real test though is to make sure there is no noise or other issues in an operational MK that would create problems (which I doubt would be a problem any more than what exists with the AR7000 by itself). AJ (MorenoEnNYC1) will probably be the first to fly with it, I am making one for him and his MK is already flying.

Cabling: yes, the way I did it on my first one was very bulky. As a mater of fact, once I was done and not very happy with the results, I went back and looked at your pictures very closely and noticed that you used single connectors. I ordered some singles and will be making the new ones that way. I am leaving the channel 7 one as a std servo 3 wire connector so that it can carry the power and GND and also be easy to ID. The rest of the channel order does not realy matter.

Richard

Edited by brashley

Share this post


Link to post
Share on other sites

The board looks great.

I-ve been thinking about epoxying the row to a thin strip of plywood to create a single long PWM connector which would ensure a fixed (correct) sequence with the 7th channel connector on the right pin.

On a PCB layout I started working on, I used a Digikey #S4342 7-pos single row female header. Common ground and power would come from the MK host. This method seems like a low cost way to keep things neat and orderly.

Share this post


Link to post
Share on other sites

We have lift off! The first successful 2.4GHz MikroKopter flight (I think it’s the 1st) Special thanks to Richard ‘Brashley’ Mr RC-Cam and Arthur P!

1st flight was F L A W L E S S I’m very excited! I’ll have to get use to using my DX7 again. I drained 2 ½ packs with no glitches or issues…more flying tomorrow. A HUGE thanks for the hard work you all put into this! Absolutely no problems to report. I've tested the 'issue' of lost TX signal and the MK's inability to recognize it when using the converter...it really isn't an issue because once the signal is lost the AR7000 shuts throttle input. You also have the option to set it to a lost signal throttle position which allows the MK a slow descent :D

Edited by MorenoEnNYC1

Share this post


Link to post
Share on other sites

That is good to hear. Did Brashley send one of his to you or did you make one on your own using the latest schematics?

Regarding the failsafe issue, I'll try to work on that. No doubt it would be useful to have the MK detect lost DX7 signals. But as you say, it is not necessary; But if it ain't broke, make it better. :)

Share this post


Link to post
Share on other sites

Hi Mr RC-Cam,

Yes, Brashley sent me a unit, all buttoned up and ready to go. Thanks again for jumping in and assisting...truly amazing!

"But if it ain't broke, make it better" I like that :D:D I probably would feel better if the MK detected a lost signal which would make this solution 100%

Thanks again!

AJ

That is good to hear. Did Brashley send one of his to you or did you make one on your own using the latest schematics?

Regarding the failsafe issue, I'll try to work on that. No doubt it would be useful to have the MK detect lost DX7 signals. But as you say, it is not necessary; But if it ain't broke, make it better. :)

Share this post


Link to post
Share on other sites

AJ was the test pilot :D (He is a brave soul). My original plan was to finish up my MK first but AJ was very eager to get his MK flying again so I just went ahead and made two of them. Looks like it works great :):):) … The lost signal thing does still make me nervous though. I cant say thank you enough for all your help RC-Cam..... (it actually was fun)

Richard

Edited by brashley

Share this post


Link to post
Share on other sites

I believe the normal FC setup is to go to slow descent with neutral roll, tilt and yaw on loss of signal. I.e. the FC software has a failsafe build in. If you have GPS integrated, you might be able to go one step further and program in a return to origin (hoping that there are no high trees or buildings in between ;=)) but I-m not sure how far that development is.

I wonder whether you couldn't simply modify one or two lines of source code in the FC programming. You need it to identify either no signal (current program) or a particular preset of controls which should not normally occur during flight after motor on. If you then set up the Spektrum failsafe to that combination of presets, the FC software should correctly identify it as the receivers signal that it is no longer receiving a signal. Probably only requires one line of code to be added or changed as an or statement to the current failsafe trigger, and one line to identify recovery from signal loss.

Hi Mr RC-Cam,

Yes, Brashley sent me a unit, all buttoned up and ready to go. Thanks again for jumping in and assisting...truly amazing!

"But if it ain't broke, make it better" I like that :D:D I probably would feel better if the MK detected a lost signal which would make this solution 100%

Thanks again!

AJ

Share this post


Link to post
Share on other sites
If you then set up the Spektrum failsafe to that combination of presets

That's the problem, the spektrum allows setting a failsafe only on the throttle channel.

Share this post


Link to post
Share on other sites
That's the problem, the spektrum allows setting a failsafe only on the throttle channel.

From the Spektrum DX7 manual: Note: Fail-safe positions are stored via the stick and switch positions on the transmitter during

binding.

According to this it stores all stick and switch positions, but most people leave the roll, nick, and yaw positions neutral so it would seem only the throttle is stored.

Share this post


Link to post
Share on other sites
From the Spektrum DX7 manual: Note: Fail-safe positions are stored via the stick and switch positions on the transmitter during

binding.

According to this it stores all stick and switch positions, but most people leave the roll, nick, and yaw positions neutral so it would seem only the throttle is stored.

That's not how mine works. Unless they've changed something recently (which would be nice), all the Spektrum receivers except the 9 channel one only have throttle fail safe and all other channels hold their last position. The do go to the "bound" positions when you first power it up, but if you lose a signal they hold their last position.

Share this post


Link to post
Share on other sites
That's not how mine works. Unless they've changed something recently (which would be nice), all the Spektrum receivers except the 9 channel one only have throttle fail safe and all other channels hold their last position. The do go to the "bound" positions when you first power it up, but if you lose a signal they hold their last position.

You're right. Reread the section. The Spektrum manual is far from clear on a number of things. The use two terms: "smartsafe" and "failsafe" and if I understand the text correctly now the "smartsafe" refers to the startup "stick position" programmed, while failsafe indeed retains last control surface positions and the failsafe throttle setting. I'd hardly dare call this "smart"-safe.

Share this post


Link to post
Share on other sites
We have lift off! The first successful 2.4GHz MikroKopter flight (I think it’s the 1st) Special thanks to Richard ‘Brashley’ Mr RC-Cam and Arthur P!

1st flight was F L A W L E S S I’m very excited! I’ll have to get use to using my DX7 again. I drained 2 ½ packs with no glitches or issues…more flying tomorrow. A HUGE thanks for the hard work you all put into this! Absolutely no problems to report. I've tested the 'issue' of lost TX signal and the MK's inability to recognize it when using the converter...it really isn't an issue because once the signal is lost the AR7000 shuts throttle input. You also have the option to set it to a lost signal throttle position which allows the MK a slow descent :D

Sorry to disapoint you :-)

i was flying my MK with Spekrtum DX-7 on the MK Meeting at Germany/Cologne in October 07.

As Receiver i where using the WL1000 FS One Wireless Sim Interface ( http://www.spektrumrc.com/Products/Default...?ProdID=SPM1800 )

This receiver outputs a real PPM Signal, but is only useable for short range flying without modifying the receiver antena section.

At the moment i use a own receiver (ppm output) made of a Microcontroller where up to 3 Spectrum receiver Boards can be hooked up http://www.spektrumrc.com/Products/Default...?ProdID=SPM9545

At the moment i'am implementing the AR9000 protocol to get support for the higher channel counts when using suitable RF Modules (http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPMMSJR9)

When this is finished it will be a drop in replacement firmware for the AR7000 receiver.

best regards,

Walter

Edited by LabMaster

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...