Close
0%
0%

FrSky SmartPort Inverter

A compact hardware solution for interfacing the FrSky SmartPort to a F4 (or possibly other) flight controller.

Similar projects worth following
The FrSky SmartPort interface must be "uninverted" to work properly with the F4 flight controller. If your soldering skills are top notch there is a simple method to connect SmartPort to the Ominibus F4 V2 Pro FC, but the DYS F4 Pro doesn't seem to be able to use soft serial. This tiny PCB offers a way to get SmartPort telemetry working using a normal UART and no special soldering is required.

Some Background First:

I am building a new quadcopter and a couple of new fixed wing models that use the F4 flight controller and iNAV software. I use the FrSky Taranis XD9+ transmitter and have purchased a few XSR-E receivers (or XSR-M, the FrSky equivalent) to use on the new builds. The XSR-E offers full range diversity, implements both SBUS and CPPM, and transmits telemetry back to the Taranis using the SmartPort protocol developed by FrSky. The Taranis has the capability to display the telemetry values and also give audible and verbal alerts and warnings depending upon the values of the telemetered parameters (usually RSSI and battery voltage). This is very handy for line of sight (LOS) flying since I don't have to look down at the display while flying.

I am equipping the fixed wing aircraft with an Omnibus F4 V2 Pro flight controller board, and will add GPS capability. This will consume all of the available hardware ports on the flight controller:

UART1 -- SBUS from the XSR-E

UART3 -- GPS magnetometer, using I2C protocol

UART6 -- GPS

The Omnibus F4 offers a SoftSerial port under software control that can be used for SmartPort telemetry. In order to use the soft serial port you must connect the SmartPort signal from the receiver to the CH5 pin in the figure below, and then connect a 1kΩ resistor between the CH5 and CH6 pins. It requires a fine tip on your soldering iron, steady hands and keen eyesight.

You can find the documentation for this here, but all you need is this:

I followed this procedure and got it working on the Omnibus F4 V2 Pro board. 

Implementing telemetry with a DYS F4 Pro Flight Controller:

I'm using the DYS F4 flight controller on my new quadcopter. This quad is really space limited (and I fell for the supposed magic provided by an all-in-one(AIO) 4X 30A ESC(Electronic Speed Controller)). The DYS F4 doesn't appear to have a soft serial connection -- at least I can't find one. But I still want telemetry if I decide to fly LOS so I must make my own SmartPort interface for the DYS F4.

I found a simple circuit from this website, but did not like the idea of sky-wiring 5 components or the size of the solution. So I decided to just convert the circuit to surface mount components and make it as small as possible. Here's the circuit (claimed to work by said website) that I implemented in Diptrace:

I then created a PCB...

And had it fabricated by OSH Park:

I assembled the components to the PCB. There are 2 components on the back side to save space. 

SmartPortInverterSOT23-6.zip

A ZIP file for a version of the PCB using the DMN601DMK, which contains two MOSFETs in a single SOT23-6. This PCB has been checked for design rule violations and schematic connectivity -- it is free of errors. It has also been successfully uploaded to OSH Park. But it has not been fabricated. This PCB isa 2 layer board of0.33 x 0.33 inches (8.4 x 8.4mm) 3 boards will cost $0.50

Zip Archive - 4.86 kB - 07/30/2018 at 13:21

Download

SmartPortInverter1s.zip

A ZIP file for a single sided version of the PCB. This PCB has been checked for design rule violations and schematic connectivity -- it is free of errors. It has also been successfully uploaded to OSH Park. But it has not been fabricated. This PCB isa 2 layer board of 0.37 x 0.38 inches (9.4 x 9.7mm) 3 boards will cost $0.70

Zip Archive - 5.51 kB - 07/30/2018 at 13:13

Download

SmartPortInverter.zip

This is the ZIP file that I uploaded to OSH Part to fabricate the PCB. This is such a small PCB -- it only cost $0.50 to build 3 prototypes with free shipping!!!

Zip Archive - 5.70 kB - 10/31/2017 at 21:51

Download

  • Adding Smartport Telemetry to the Diatone Mamba Mini

    Bud Bennett02/17/2019 at 05:46 0 comments

    I recently obtained an Armattan Gecko 4 inch quad frame. I wanted to build it with an AUW less than 250g, which is a challenge. I decided to use a Diatone Mamba mini stack to keep both cost and weight down. The rest of the build is Brother Hobby Avenger 1507/2800kV motors, A FrSky XSR-E receiver, a Caddx freestyle camera, and an AKK FX3 VTX.  With a Tattu 4S 650mAh LiPo the AUW is just under 250g, but I'll probably fly it with a 4S 850mAh LiPo.

    The Mamba mini is an F4 FC equipped with only 3 UARTs. I wanted to use SBUS for the receiver, smart audio for control of the VTX, and Smartport for the telemetry back to the Taranis transmitter. The Mamba only has an inverter on UART1 to service SBUS. I tried to get Smartport working on TX1 and TX6 with soft serial, but it doesn't appear to be implemented on the Mamba. The only option was to use the Smartport inverter -- I set it up on UART6, using VDD = 5V with no issues.

    The telemetry settings:

    tlm_inverted = OFF
    set tlm_halfduplex = OFF

    There is still a need for this inverter when using some F4 flight controllers like the Mamba. I have not yet migrated to F7 flight controllers -- they are a lot more money and the F4 FCs still work pretty well.

  • PCB Variations

    Bud Bennett07/30/2018 at 14:10 0 comments

    I got a suggestion for two variations of the SmartPort Inverter -- one with all the components on a single side of the PCB (for easier soldering), and another single-sided variation that uses the DMN601DMK part, which includes both MOSFETs in a single SOT23-6 package. I spent some time on each of these designs with varying results.

    Two-sided to Single-sided Conversion:

    There is no way to prove that any particular layout is the absolute smallest possible (IMHO). I spent as much time as I was willing to create the single sided PCB below.

    The components could probably be packed a bit tighter, but it might make soldering more difficult. As it is, the PCB is quite a bit larger than my original 2-sided PCB at 0.37 x 0.38 inches (9.4 x 9.7mm) -- 3 boards will cost $0.70. If you wish to make this board be aware that I have not made one myself, but it is checked for design rule errors and connectivity. One benefit to a single sided PCB is that the pad labels are placed on the back side, which makes it easier to connect the wiring harness.

    Another version for the DMN601DMK:

    The DMN601DMK is a part that includes 2 MOSFETs in a single SOT26 (SOT23-6) package (There are other dual MOSFET parts that might be suitable as well). The thought (not mine TBH) was to make a single sided PCB as small as the double sided PCB. I had two objections to this approach: multiple components in a single package are sometimes more difficult to hook up efficiently and may not lead to the smallest layout area, and there is a possibility that the package could be rotated 180° when soldered. Both of these concerns were unfounded. 

    The package and schematic for the DMN601DMK is shown below. Note that the package can be rotated in either direction while maintaining the same connectivity. The pins are not even numbered in the data sheet. I did, however, have to create a new component in order to use this device in the schematic and layout. You can get this part from Arrow.com or Digikey in small quantities. (Note: The SOT363 is NOT the same package as the SOT23-6. The SOT363 is a 6-pin SC70 package with a pin pitch of only 0.65 mm vs. 0.95mm for the SOT23-6. It would be very difficult to hand solder the SOT363, but possible to hand solder the SOT23-6.)

    Here's my final attempt at the PCB:

    The back side is nicely labeled:

    The PCB area is 0.33 x 0.33 inches (8.4 x 8.4mm), which is only slightly larger in one dimension than my original double sided PCB. 3 boards from OSH Park will cost $0.50 -- same as the double sided PCB.

    I uploaded the gerber files to this  project's "Files" area if you want to make PCBs for yourself. Disclaimer: The design rules and connectivity  are without errors, but I have not fabricated these boards. Caveat Emptor.

  • Accommodating VDD = 3.3V

    Bud Bennett07/23/2018 at 00:50 5 comments

    I had a problem with an Chinese clone of an Omnibus F4 Pro Corner flight controller. I connected the smart port inverter to VDD=5V and found that the gyro noise was so high that I had to set moron_threshold = 0 to get the quad to arm. Any value larger that zero for moron_threshold would not allow the quad to arm consistently. It was not obvious what the problem was until I cut the smart port inverter out of the system and the gyro noise disappeared. Q.E.D. 

    I was suspicious, however, and measured the voltage on the the UART6 TX/RX pins at 3.3V, even though the inverter was connected to 5V. I decided to reconfigure the smart port inverter to operated at VDD=3.3V. The solution was to replace the 2N7002 MOSFET with a MOSFET having a lower threshold voltage that allowed operation at 3.3V. I did not trust the 2N7002 to switch properly when using a 3.3V supply because it  has a large specified maximum threshold voltage of 3V, which is pretty close to VDD.

    I decided to substitute a 2SK3018 MOSFET for the 2N7002. The 2SK3018 has a max VTH of 1.5V, which is better suited to the lower VDD value. Unfortunately, the 2SK3018 is an obsolete part, but still available from eBay sources. Alternatively, the DMN65D8L MOSFET has a threshold between 1.2V and 2.0V and is probably still active. There are probably other MOSFETs that will work at the lower VDD if the max. threshold is below 2.0V

    I changed the VDD supply for the smartport inverter to 3.3V by configuring the Corner flight controller to provide 3.3V on the 3V/5V pin via the jumper adjacent to the j2 pads:

    After I made the changes to VDD the telemetry worked again and the gyro noise disappeared, so now moron_threshold = 32, the default value, and the quad arms without any issues. 

    Conclusion:

    I suggest that going forward that  a lower threshold MOSFET like the 2SK3018  should be substituted for the 2N7002. This should allow operation at VDD=3.3V and VDD=5V. Be careful to match the VDD of the smart port inverter to the VDD used by the UART that it is connected to.

  • Success!

    Bud Bennett10/31/2017 at 21:37 0 comments

    The inverter circuit appears to work as advertised. I was able to get the correct telemetry displayed on my Taranis transmitter. Here's the procedure:

    I hooked up the inverter board to +5V, GND, TX3 and RX3 on the DYS F4 flight controller board. I also connected the inverter input to the smart port lead on the XSR-E receiver (the thin blue line). Here's the inverter next to the receiver.

    I then hot-glued the inverter to the flight controller board to reduce stress on the wiring. I attached the receiver with double-sided sticky foam tape. Both items are pretty small compared to the flight controller. Here's a side view of the stack:

    This quad uses a Transtek Frog Lite frame so there is very little room within the housing. Fortunately, everything fits fine. Here's a top view of the entire quad in a mock-up state (I'm waiting for some 20AWG silicone wire so I can hook up the ESC to the motors.) There's not much room.

    The next step was to configure the telemetry properly in the iNav configurator. I assigned the smart port telemetry to UART3. It took me a while to realize that I had to "set smart port_uart_unidir = ON" in the command line interface. After that, the Taranis was able to get the telemetry from the quad:

    And I set up the sensor display temporarily:

    At this point I'm pretty much done with this project. Things are working and I don't expect any problems with the smart port inverter going forward.

View all 4 project logs

Enjoy this project?

Share

Discussions

Ivan Trail wrote 12/13/2020 at 18:00 point

I just ordered enough stuff to make 10, but ordered 60 boards. If I can't screw up 10 of them, I will have enough with the remaining 50 boards to keep myself in inverters for the rest of my life, and probably my friends too.

Thanks for this project!

  Are you sure? yes | no

Bud Bennett wrote 12/18/2020 at 05:23 point

You are welcome.

  Are you sure? yes | no

ninja-zx11 wrote 08/29/2018 at 01:16 point

Thanks bud for creating single sided pcb using dual package mosfet.

  Are you sure? yes | no

Bud Bennett wrote 09/03/2018 at 04:19 point

You're welcome. Just be aware that the dual MOSFET is a SOT26 (or SOT23-6), not a SC70 or SOT363, which has a smaller pad pitch. I also did an even smaller layout with the SC70, but you have to be a stellar hand solderer or have a hot-air station or IR reflow setup to be successful with the smaller pad pitch.

  Are you sure? yes | no

ninja-zx11 wrote 07/21/2018 at 23:46 point

This is the parts list i used from arrow.com which is offering free shipping at the moment.

1)RK73H1JTTD4702F   -----47kohm

2)2N7002AQ-7        --------diode

3)ERJ-PB3B4701V     -------4.7kohm

  Are you sure? yes | no

Bud Bennett wrote 07/23/2018 at 01:28 point

Free shipping is pretty nice. I suggest that the DMN65D8LFB-7 be used instead of the 207002 if you need operation at VDD=3.3V. See my recent Log posting.

Edit: The 2N7002AQ-7 will also work just fine — it has a Vth range of 1.2V-2.0V. The older 2N7002 has higher threshold voltages.

  Are you sure? yes | no

Jose Makalolot wrote 08/04/2018 at 13:00 point

@ninja-zx11  you are also using this? We were just talking about this in gihub. So, is this the one that you replaced 4.7k>300 and 47k>4.7k on the tx side? That means R2 and R3 on this board, right?

  Are you sure? yes | no

ninja-zx11 wrote 08/04/2018 at 16:42 point

That's right.

  Are you sure? yes | no

Bud Bennett wrote 07/20/2018 at 00:03 point

I had a problem using this circuit with a clone of the Omnibus F4 Pro Corner flight controller that I got from Banggood. I used a 5V supply for the inverter, but I think that the UART was operating on 3.3V. It caused problems with electrical noise in the gyro output. I eventually cut out the inverter and reverted to using just the OSD for feedback on battery voltage, etc. The gyro noise went away when I removed the inverter. A better approach may have been to lower the VDD supply to 3.3V, but I don't think that the 2N7002 will work well with the lower supply voltage -- they have a max threshold specification of 3V. You could substitute a 2SK3018 as a drop-in replacement for the 2N7002 -- it has a much lower threshold and I think the circuit would perform well with either 3.3V or 5V for VDD.

  Are you sure? yes | no

ninja-zx11 wrote 07/18/2018 at 18:01 point

Just in case someone need to know the size of the resistor, 0603 package size fits on this board.

  Are you sure? yes | no

Bud Bennett wrote 07/19/2018 at 23:51 point

Yes...0603 is the correct package type for the resistors. See comment below for more info on package types.

  Are you sure? yes | no

zector555 wrote 07/18/2018 at 03:36 point

Would this do two way communication for the new frsky fport?  Would you sell a few to someone who doesn't have the hands or equipment to solder that size?

  Are you sure? yes | no

Bud Bennett wrote 07/19/2018 at 23:44 point

Sorry, I don't really know anything about FrSky's F.port. I would not expect this to work for that protocol.

  Are you sure? yes | no

ninja-zx11 wrote 07/21/2018 at 23:42 point

Yes i can confirm that it works on Fport.I tested it on spracingF4evo board on UART4 running Inav firmware.Got receiver data and telemetry using a single wire(just using one UART for Rx and Telemetry).I had to set 

set smartport_uart_unidir = ON

set telemetry_inverted = ON

  Are you sure? yes | no

ninja-zx11 wrote 06/27/2018 at 19:40 point

Hi, First of all i am really grateful to you for sharing this project!!

Could you please provide the part no.s of the components because i don't have enough experience with the sizes and packages of  the components.Thanks.

  Are you sure? yes | no

Bud Bennett wrote 07/19/2018 at 23:49 point

M1 & M2 are 2N7002 MOSFET transistors in a SOT23-3 package

R1-R3 are 0603 surface mount resistors.

I apologize for not providing a Bill of Materials file, but there is not much to this circuit.  In any case, you need to know what the package types are.

  Are you sure? yes | no

ninja-zx11 wrote 07/21/2018 at 23:49 point

No worries Bud.Thanks for your files.It works good on Sport and Fport on F4 boards.

  Are you sure? yes | no

Claudio Alberto Ortega wrote 06/09/2018 at 00:31 point

Thank you Bud,

  Are you sure? yes | no

Claudio Alberto Ortega wrote 06/05/2018 at 18:17 point

Hey Bud, 

This is so great. Thank you so much for sharing. Two questions: 

(1) do you allow the readers to use your files to make the PCB. 

If so it might be good to clarify that. 

(2) How was your experience with DipTrace?

Claudio Ortega

  Are you sure? yes | no

Bud Bennett wrote 06/08/2018 at 23:54 point

I don't make any claim to the files. It is open hardware, as far as I'm concerned. Use it as you wish. 

As to Diptrace...I find it perfectly acceptable. I've tried others, but they don't provide a familiar experience (I'm an old EE with certain expectations regarding design tools -- Cadence, Mentor Graphics. etc.) I would pay money (within reason) for what I get from Diptrace.  So far, the complexity of my projects is below the requirement to buy a license from Diptrace.  But I think I would pay for what I'm getting if I exceeding the "hobby" license. Enough said.

Bud.

  Are you sure? yes | no

Jose Makalolot wrote 03/02/2018 at 20:22 point

I just joined hackaday to say thank you and sorry.

Sorry because I used the files you have to print with OSHPark without your permission.

Thank you because I can now use my XSR-M/E on my Omnibus F4 Pro FCs without messing up with the small softserial pads.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates