FranksTXein (OpenTX + OpenLRSng + Telemetry)

My quest for a cheap, small, and powerful RC radio.
FranksTXein (OpenTX + OpenLRSng + Telemetry)

FranksTXein

alt text

I currently live in Finland, but eventually I'll have to go back to Brazil, and It's not fun to leave stuff behind. With this in mind I began researching what equipment to buy for RC so didn't stay grounded for the one year I have to stay here.

The options weren't very good, the cheapest radios on hobbyking are big, heavy (extra shipping) and very low on features.

Then I found the Turnigy 5x, which, being cheap, small and lightweigth, looked like a good option, but it still lacked features. After some more research I found this project:

5xOwn [der-frickler.net]

and It was perfect, the size on Turnigy 5x with the features of er9x!

So I bought all the components, and waited.

At first I wanted to use the same module and rx from 5x, but as [der-Frickler] discovered, that board uses spi to communicate with the module, and as I wanted future compatibility with other modules, I decided to not even try to understand the spi protocol, instead I choose to build my own Openlrsng Tx and Rx (detailed further down the post).

Hardware:

Components:

The required components are:

Circuit:

The circuit Is pretty simple, just take the 5x circuits out (and maybe leave the wire on switches and potentiometers) and connect everything following the 9x schematic here, with a few details worth noting:

Telemetry:

If you plan to use any kind of telemetry, leave pins PE0 and PE1 (tx/rx) free, as this switches are maped to another port the free the usart port.

Oled connection:

The oled, as it uses a different protocol, should have the following connections:

(Also, do not panic if you see SCK and SDL as pins, I received one with pins named like this, and it used SPI, but with i2c names)

| Oled ------------- Atmega128 |

MOSI/SDA/SID ===> PC5

CLK/SCL/SCLK ===> PC4

DC/RS ==========> PC3

CS/SS/ST ========> PC1

RESET/RES/RST ==> PC2

Atmega128 board:

My board, despite the crystal and jumpers, arrived with the fuses set so it would use the internal oscilator at 16Mhz, So it's necessary to add a 16Mhz crystal on the extra slot(or replace the existing one), set the jumper correctly, and change the fuses so it runs properly at 16Mhz with the external crystal.

I dont remember the exact configuration of the fuses, but they can be read with avrdude:

avrdude -c usbasp -p m128 -U lfuse:r:low_fuse_val.hex:h -U hfuse:r:high_fuse_val.hex:h

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9702 (probably m128)
avrdude: reading lfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "low_fuse_val.hex"
avrdude: reading hfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "high_fuse_val.hex"

avrdude: safemode: Fuses OK (E:FF, H:99, L:EF)

avrdude done.  Thank you.

The board is also sligthly too big, so you might have to cut the borders, like [der-Frickler], or cut the borders poorly and leave it inclined in there.

Regulator:

I choose to use a readily available 7805 regulator, it means I need around 7V of input voltage on worst case, you can choose a buck/boost converter, as well, and run for example on a 1s pack.

Software:

er9x:

The first option, as the code was ready to run, was the er9x software, which run perfectly!

openTX

As I wanted to see telemetry data on the screen, er9x started to look not so good, while it supports frsky telemetry, and the display options are ok, it lacks when compared to openTX. OpenTx, however, had no support to the SSD1306 oled display, so I had to port it myself.

I ported it to the latest master branch of the repository. The source can be found here and an ready hex( for atmega128 with frsky telemetry) here:

OpenLRSng

As I couldn't use the 5x stock module, I nedded something else. My choice was a pair of diy openlrsng tx/rx.

The instructions came from this thread at rcgroups.

Components:

These were the required components for the circuit:

Circuit:

Slightly modified from felipealex@rcgroups

TX: alt text

RX: alt text

Software Setup:

The software is standard openlrs, first, get the configurator extension for chrome, then, with the configurator open(or not), connect the 3.3v ftdi to the TX, the configurator should detect a new com port, and show on the top left.

But before using it, you need to go to the firmware flasher, and flash the tx with (any of them) "board 5" selected. after this, connect the RX, and flash the rx firmware, also for the board 5.

Now reconnect the tx, and click connect, you should see something like this:

(Note that the Frky telemetry option is selected, so it communicates with the opentx software) alt text

Then, click on "RX Module", and turn on your RX module. You should see this:

(note that I'm using PORT 6 as a analog input for remote battery voltage, to do this you just need a proper voltage divider)

alt text

Telemetry

In order to get telemetry working properly, it's necessary to:

  • have OpenTx Installed ( Frsky telemetry version).
  • have te proper connections between openlrs and openTx, noting that the voltages are different, so a direct connection is a no-no. My connection used a 10k resistor between atmega128 Tx and pro mini Rx, and a 2k resistor on the other line(not necessary, just in case something went wrong).
  • Telemetry setup on openlrsng configurator.
  • (optional) a pin set as analog on openlrsng configurator, connected to the battery using a voltage resistor that limits the pin voltage to a maxium of 3,3V with battery fully charged.

    Setup:

    If you fulfil all the requirements above, rssi should already be showing after pressing [long down] on OpenTx. Now, in order to get the voltage display, you must go to the telemetry page of the current model [a few right clicks] and change the analog calibration until the reading matches your battery voltage.

I set up my first telemetry screen to show both voltages, both rssis, and a timer, this is the end result(potato phone picture):

alt text

Extra

In order to see if it was behaving normally, I used a Rtl-sdr dongle to see the frequeny spectrum(notice the frequency hopping in action):