Jump to content


Photo

Hacking the I2C interface of Spektrum DX and AR ?


  • Please log in to reply
355 replies to this topic

#121 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,568 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 12 January 2008 - 02:16 PM

Looks great. Thanks for posting the results.

As was mentioned before, this design should work on any R/C receiver that has typical sequential servo outputs. It can easily be expanded to eight channels by adding one more diode (of course the Rx would need to be eight channels too).

So, it could be used on other R/C systems (not just the DX7), including older PPM Rx's. The nice thing is that you wouldn't have to hack the Rx to tie into its internal circuitry, which saves us from violating the product warranty. :)
- Thomas

#122 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,067 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 13 January 2008 - 12:31 AM

Now I'd need the same for one that has simultaneous outputs.... but unfortunately that's a whole other story :(

#123 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,568 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 13 January 2008 - 11:57 AM

I'd need the same for one that has simultaneous outputs....

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. :)
- Thomas

#124 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 13 January 2008 - 12:06 PM

Would there be a way of creating a lost signal state for this circuit and the AR7000. This is what I am thinking. Since I can set a lost signal throttle position, I set it a value (high or low) with the travel adjusted to its max, then I back the travel adjust down so that I cant get to that extreme with just stick movements. Then we add some cuircetry that is looking for a PWM throttle pulse that is either too long or too short (we pick one). If it finds one then it holds the 221 reset line at GND unitl the next PWM pulse. If the throttle PWM is ok then the 221 reset line is left at +3v (high). That way a lost signal just shuts off the PPM and the MK then immediately knows what happened. For a plane this would be bad but for the MK with some intelligence behind it that’s fine. At a minimum, the FltCtr at the moment will stop all movement and move the throttle to a user selectable setting (hopefully some slow decent point). Future options might activate a “GPS come Home” function on signal loss.

Do you think this would be possible with, for example, one more 221. One of the vibrators triggering with the rising edge of the PWM and set to last to just past a normal max throttle setting. Then a NAND gate (or something) that is trying to make sure that when the 221s output’s a falling edge, that the PWM is also low. (ie if it is high then we are in the lost signal condition). If that occurs then it triggers the second 221 vibrator (with a long pulse) to hold the reset low until the next cycle.

Just thinking out loud here.

Richard

Edited by brashley, 13 January 2008 - 12:34 PM.


#125 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,568 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 13 January 2008 - 12:40 PM

Would there be a way of creating a lost signal state for this circuit and the AR7000? This is what I am thinking. Since I can set a lost signal throttle position, I set it a value (high or low) with the travel adjusted to its max, then I back the travel adjust down so that I cant get to that extreme with just stick movements.

I was also thinking about something like that too, but would go the route of a microcontroller to detect the servo signal. But, if you use precision parts with good long term stability, the '221 IC would work too.
- Thomas

#126 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,067 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 14 January 2008 - 09:01 AM

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, 14 January 2008 - 09:02 AM.


#127 Arthur P.

Arthur P.

    RC-Cam'er

  • Members+
  • PipPip
  • 68 posts

Posted 14 January 2008 - 03:01 PM

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


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., 14 January 2008 - 03:18 PM.


#128 mr_westie

mr_westie

    RC-Cam Visitor

  • Members+
  • Pip
  • 1 posts

Posted 14 January 2008 - 04:21 PM

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....ess#post8801564

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

#129 MorenoEnNYC1

MorenoEnNYC1

    RC-Cam Visitor

  • Members+
  • Pip
  • 10 posts
  • Location:New York | USA

Posted 16 January 2008 - 11:01 AM

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.



#130 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 17 January 2008 - 02:39 PM

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

Richard

Ver2_PCB.JPG

#131 Arthur P.

Arthur P.

    RC-Cam'er

  • Members+
  • PipPip
  • 68 posts

Posted 18 January 2008 - 05:05 AM

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.

#132 MorenoEnNYC1

MorenoEnNYC1

    RC-Cam Visitor

  • Members+
  • Pip
  • 10 posts
  • Location:New York | USA

Posted 18 January 2008 - 06:18 AM

: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

Ver2_PCB.JPG


Edited by MorenoEnNYC1, 18 January 2008 - 06:20 AM.


#133 Arthur P.

Arthur P.

    RC-Cam'er

  • Members+
  • PipPip
  • 68 posts

Posted 19 January 2008 - 01:35 AM

-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., 19 January 2008 - 01:42 AM.


#134 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 19 January 2008 - 06:02 AM

-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, 19 January 2008 - 01:44 PM.


#135 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 19 January 2008 - 08:19 AM

Ver.2 drilled, pre-tined and ready for parts...

Richard
Ver2_PCB_Drilled.JPG

#136 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 19 January 2008 - 10:22 AM

Ver.2 Populated and ready for cabling/testing. (might have to wait till tonight)

Richard
Ver2_PCB_populated_.JPG

#137 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,568 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 19 January 2008 - 10:44 AM

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

#138 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 20 January 2008 - 09:29 AM

Ver.2 Done :D

Top:Ver2_Top_AR7000.JPG Bottom:Ver2_Bottom_AR7000.JPG

#139 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 20 January 2008 - 09:32 AM

And it works.....

Scope Output:Ver2_Output.JPG MK w/ happy green LED:Ver2_w_MK.JPG

#140 brashley

brashley

    RC-Cam'er

  • Members+
  • PipPip
  • 75 posts

Posted 20 January 2008 - 09:34 AM

Buttoned up...

Top:Ver2_Finished__Top.JPG Side:Ver2_Finished_Side.JPG

MkTools:Channels.JPG