Donnerstag, 19. Mai 2016

Expanding a D4R - II to 8 channels

Today I quickly build myself a small "magic box" that is able to output 8 pwm channels (standard servo signals) from a D4R II FrSky receivers output.

You may ask why to do something like that when there are a lot of cheap 8 channel receivers out there. Well it happened (as always) to me that I run out of receivers while preparing my model airplanes for a larger RC flight event. Unfortunately I thought too late about that this time... The only receiver I had at hand was a broken D4R II and the macgyver inside me decided to try fixing and expanding it.

First things first I started troubleshooting the receiver. I measured a dead short at the voltage input. That clearly indicated a dead LDO (Low-dropout regulator). After checking the output voltage, pinout and footprint at the datasheet, I searched for a matching one in my part stock. Unfortunately I only had one in SOT-223-3 package. So I hacked that one onto the receivers PCB and sure enough, the receiver started working again!

With that done the fun part of hacking took action. Because I had no time to buildup my own hardware, I took an old 2.4Ghz (also broken) receiver apart.


Removed carefully the receiving module.

And reverse engineered the important sections like SPI interface, channel output pins, status leds and serial data lines.

Because the D4R II is able to output ppm signals on channel 1 pin for 8 channels by shorting channel 3&4 pins. I checked the output with my scope and took rough measurements and calculations.

I just had to build a PPM to pwm converter. The Atmega8 on the old receiver is more than capable doing that, so I started writing some software to analyze the PPM signal and split it. You can checkout that messy piece of code here (written in AVR GCC).


It uses the 16bit timer1 to capture the incoming PPM data and split it into data and sync. One of the 8bit timers was then used to output the servo commands. That's it!


Here the final result I came up with. 



Keine Kommentare:

Kommentar veröffentlichen