My favorites | Sign in
Project Home Wiki Issues Source
Search
for
FrskyInterfacing  
Fr-Sky Interfacing
Updated Apr 16, 2012 by gru...@gmail.com

Fr-Sky Interfacing

Gruvin (more or less) followed the original TH/ER9X 'JETI' wiring instructions to get RS-232 (TTL level) TX and RX signal for my Fr-Sky two-way transmitter module. Those instructions can be found here.

Below, you'll find similar and extra detail of exactly how I hooked up my Fr-Sky unit.

Accessing TXD and RXD on the ATmega

The ATmega RXD and TXD special-purpose pins are used for simple switch inputs in the factory '9X -- namely, Throttle-Cut and Aileron-D/R, respectively.

To free these pins up for use with serial data, we need to move those two switches elsewhere. The two pins chosen for their new home were pins 41 and 42, or PC6 and PC7 respectively.

The modification requires the use of really fine wire. I used 0.2mm, enamelled copper wire. You can also use fine, insulated wire, salvaged from the newer (yet now old) high-density computer IDE cables. Each of these wires is a single-core, PVC insulated wire. You most definitely do not want to try and use any kind of multi-strand wire -- no matter how fine it it is.

IMPORTANT: The main reason to use really fine wire may not be what you think. It is certainly possible (though more difficult) to use heavier, stronger wire. But doing so will increase the risk of accidentally damaging the delicate ATmega chip's pins. (Think of it as using a wrecking bar to pick your teeth -- or something like that! :P) In practice, the slightest accidental tug by 'big fat, shaky, human hands on a big fat wire', can quite literally rip an ATmega pin right of the chip. Trust me -- use really fine wire!

Re-wiring Procedure

Referring to the image below ...

  • Remove the two left-hand-most resistors as indicated in yellow
  • Hot glue a couple of 220ohm resistors (1/8th or 1/4watt are OK) to a nearby, clearish area of the PCB
  • Solder your 'super fine' wires to pins 41 and 42 of the ATmega and connect to the top end of the resistors as shown. Use alcohol if required -- to steady your hands! (Just joking -- but if it works for you -- go right ahead. :p)
HINT: Pre-solder the wire end and the ATmega pins. Use a solder sucker or de-soldering wick to clear away excess solder from the two pins and to remove any solder bridge. Then lay the first wire end over the pin and apply the soldering iron directly down on top of it for half a second, then directly straight up -- then let go the wire. Give the wire a gentle tug in the direction directly away from the chip (in line with the pin).If it holds -- you're done. Don't futz with it. If you're right handed, solder the left hand wire first, so the the soldering iron does not lay over the first wire when trying to solder the second.
  • Solder wires from the bottom ends of the hot-glued resistors to the little vias (holes) near where the two removed resistors were, as shown in the image.

NOTE: It pays to use small dabs of hot-glue near the ATmega pins and in a couple of places along the wires to hold them in place. The last thing you want is for something to get hooked under them and rip them off, possibly damaging the ATmega pins in the process!

The Interface

Fr-Sky, in their wisdom, decided to use RS-232 voltage levels for their interface, rather than provide a more modern 5V TTL-to-serial USB interface. We tried to talk them out of it, but they stuck to their guns. Oh well.

What this means is that you need to invert and voltage-shift the signals to and from the Fr-Sky transmitter module, so they can play happily with the 5 Volt ATmega chip. There are specialised 5V TTL to RS-232 chips to do this, "properly". But we show here is a simple and in fact advantageous, discrete transistor method.

Advantageous? Well yes, actually. The method shown below allows the transmitter module to still operate -- for both hosts simultaneously -- when connected to an external serial interface, say on a computer -- while not having to disconnect the internal wiring to the '9X. With the values shown, most computers will take precedence over the internal 9X ATmega micro in terms of sending (transmitting) data to the Fr-Sky module. More useful even, is that you don't have to disconnect the telemetry interface for re-Flashing. Clever huh! (In truth, this was a lucky fluke! :P)
That said, be careful not to have your Fr-Sky two-way receiver switched on during re-flashing, as the stream of data will collide with the ISP programming signals and could mess up your ATmega chip.

Here is the discrete transistor circuit ...



NOTE An earlier version of the above circuit had the collector and emitter of Q3 reversed. The circuit as shown here now is correct. (This circuit is clipped from the full schematic of the gruvin9x custom controller board.)

Any general purpose NPN and PNP transistors should work for the components marked Q2 and Q3, respectively. The BC847/857 devices are in fact SMD surface mount versions, as used in the new PCB design we're working on.

For the prototype, Gruvin actually used a dremel too to carve up the mostly unused, legacy PCB mounted inside the '9X rear casing to build the above circuit 'dead bug' style. (A photo is not presently available.)

ADDENDUM: A future version of this circuit (v4.2) uses 5.1K-Ohm resistors in place of all the 10K and a 1K across Q3's E/C leads to improve the 'squareness' of the TX signal for use with DSM2 modules at 125,000bps. This change is in no way required for 9600 Baud Fr-Sky operation however.

Ground Loops (WARNING)

Gruvin found that the Fr-Sky module refused to operate correctly if a ground (GND) wire was connected between the Fr-Sky module's rear RX/TX/GND pins and the level-shifting circuit above. The problem was probably RF energy pick-up through the ground-loop created by having two ground wires -- one where the module plugs into the 9X and the other from the serial data port. Solution: simply do not connect the ground wire as shown as pin-1 on the connector-K2 in the circuit above. Others have since said that they had no such problem. YMMV

ER9X Compatible

In case you're wondering, this wiring modification is 100% compatible with the JETI and Fr-Sky telemetry extensions in the ER9X firmware, too.

Comment by yoy...@gmail.com, Aug 20, 2011

"The modification requires the use of FINE wire. I used 0.2mm enabled copper wire."

I suspect you mean 'enamelled' copper wire?

Comment by project member gru...@gmail.com, Oct 11, 2011

I did indeed. Thanks :D

Comment by rct...@gmail.com, Nov 4, 2011

do i have to do this mod to flash my th9s with er9x if i have a frsky diy module connected? many thanks RCT

Comment by andy.del...@gmail.com, Feb 7, 2012

Have you guys seen the new FrSky display module for telemetry data. I was thinking of using this with out modding my controller to much more.

Andy

Comment by BogdanD...@gmail.com, May 17, 2012

Hi Nice work few question. Why Q2 and Q3 instead of Q1 and Q2? Who is K1 and K2 switch on image above dont show who is who. Thanks B

Comment by katawen...@gmail.com, Yesterday (23 hours ago)

Hi, great great job! can you please tell me if this one will work? http://www.suntekstore.com/goods.php?id=14002601

Cheers, Henry


Sign in to add a comment
Powered by Google Project Hosting