Fixing the IrangeX IRX-IR8M

More
07 Oct 2020 09:45 #76856 by metalstrolch
Fixing the IrangeX IRX-IR8M was created by metalstrolch
By surprise i got the owner of a IrangeX IRX-IR8M, and I wanted to drive WFLY receivers with it.
Unfortunately WFLY receivers weren't supproted by the Deviation version in it. So I started to update Deviation.
While there are nightlys built for ir8m, none of them seems to currently work. There is another thread about this, but I start my own as I started to fix it.


What I did so far:

- I Identified the commit that broke A7105 module detection (and maybe others). The problems seem to be caused by pinmux, so I don't 100% understand why the revert of that change fixes it.
- I reverted the speedup of the SPI channel. Seems the ir8m hardware layout cannot cope with the higher frequency properly.

Current state:

- Deviation (HEAD) is running on the IR8M again, and at least WFLY and DSM protocols are working. BUT: Signal range is really limited due to PE1 PE2 signals being not driven.

Analysing the limited range:
- The ir8m features virtually the same 4in1 board than the universal module to be installed in other TX. On the web (actually a banggod store...), I found a pinout description telling one needs to drive two pins (PE1 and PE2) in order to multiplex the antenna to one of the four tx chips on the 4in1.
- Measuring it, it seems the current Deviation for ir8m doesn't drive them as they stay all low regardless the protocol choosen.
- Forcing the pins to proper level by soldering resistors to 3.3 Volts pin actually selects the proper antenna and gives full range.
- Unfortunately I cannot measure out any MCU pins those PE1 and PE2 are connected to. So maybe the IR8m is even really broken in hardware.

My Questions:
- Does one know the source code location in Deviation that should usually drive such pins? I know PE1 and PE2 must be present on other models as well.
- Does one have access to schematics of the IR8m?

P.S. I'll post my changes in source code soon.

Please Log in or Create an account to join the conversation.

More
07 Oct 2020 14:06 #76861 by metalstrolch
Replied by metalstrolch on topic Fixing the IrangeX IRX-IR8M
As proposed: Here is the code I'm working on: github.com/metalstrolch/deviation/tree/ir8m-missing-A7105-fix

Please Log in or Create an account to join the conversation.

More
07 Oct 2020 14:45 - 07 Oct 2020 15:16 #76862 by vlad_vy
Replied by vlad_vy on topic Fixing the IrangeX IRX-IR8M
Probably it can use HAS_4IN1_FLASH feature for switching PE1 and PE2, but some different way. At least IRX-IR8M doesn't work without HAS_4IN1_FLASH feature enabled.

HAS_4IN1_FLASH feature is for victzh's 4in1 adapter with 4MB flash along with the 4in1 board installed. I don't know how it work.

www.deviationtx.com/forum/7-development/...ion?start=1380#68361
Last edit: 07 Oct 2020 15:16 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
08 Oct 2020 09:27 - 08 Oct 2020 09:36 #76864 by metalstrolch
Replied by metalstrolch on topic Fixing the IrangeX IRX-IR8M
It's getting more and more mysterious. I wonder if the IRX-IR8M EVER worked correctly. Even with it's stock firmware. Unfortunately I don't have that.

The IR8M is basically using a common RF_4IN1_V1.0 module which can be found on the "4 in 1" modules like the IRX4Plus.
The pinout of that platine is given in this forum several times: There www.deviationtx.com/forum/3-feedback-que...rf24l01-module#76833 for example.
By using a multimeter (sorry I don't have more fancy tools...) I found out that all lines not being ground, 3.3v or the antenna being connected to the STM32 next to it. All but the PE1 and PE2 lines.

Now I learned from other posts, for example this one www.deviationtx.com/forum/6-general-disc...tion?start=760#76038 that usually some external logic chip is wired between the STM32 and the RF_4IN1 PE1/2 signals to drive them based on chip select lines.

There the real funny things starts: It seems PE1 and PE2 pins are not connected at all on the ir8m. There seems to be no logic driving them and they are not connected to the STM32 alloing that to drive them.
So If I haven't overseen something (remeber: only basic tools and no schematics) the IRX-IR8M could never have worked properly for anything than A7105 based protocols. As this seems to be the default if nothing is connected (PE1 and PE2 low).

Speaking software. the IR8M works with HAS_4IN1_FLASH, as it clearly behaves like one just put a "IRX4 Plus" to the STM32 as one would with the ready made one from banggood. But here, there seems to be no logic driving the antenna select. Deviation NEVER does this, as there seems no TX using the RF_4IN1_V1.0 without helper circuits like the mentioned logic.
Looking at the github.com/pascallanger/DIY-Multiprotocol-TX-Module project, one easily finds the code for driving PE1 and PE2.

So what to do:
- Give up... No.
- Solder two Switches to PE1 and PE2 allowing to manually switch antenna. Low end solution which would even work. But... No
- Find out what the logic does and install it. Maybe, but requires: Parts and soldering skills.
- Connect PE1 and PE2 to free gpio's of the STM32 and drive them like the DIY Multiprotocol firmware does. I think that's the way to go as this only requires some wires and soldering skill. Looks as if free GPIOs is no issue.

Which brings me back to the question: Where in Deviation software structure would be the best place to put the code driving the PE1 and PE2 GPIO's. And how to #ifdef that to not break the other radios.
Last edit: 08 Oct 2020 09:36 by metalstrolch.

Please Log in or Create an account to join the conversation.

More
08 Oct 2020 12:41 #76866 by vlad_vy
Replied by vlad_vy on topic Fixing the IrangeX IRX-IR8M
I think where is some mysterious chip on the back side of the mainboard that connected to PE1 and PE2. Both PE1 and PE2 pads soldered to mainboard, but pad 13 not (not used in IRX-IR8M, but used in T8SG).

Please Log in or Create an account to join the conversation.

More
25 Oct 2020 21:01 #76934 by metalstrolch
Replied by metalstrolch on topic Fixing the IrangeX IRX-IR8M
Took me a while, but antenna switching can be done.

First of all it requires good soldering iron, thin wire and a calm hand to do so. It's difficult but doable to directly solder to the STM32's pins.
I use PB3 for PE1 pin, and PA8 for PE2 pin, because they seem to be free, and are not next to each other for easier soldering.
The result may look like this:


See the code at github.com/metalstrolch/deviation/tree/ir8m-missing-A7105-fix

Fixed IRX-IR8M gives TX range for WFLY and DSM2 receivers (don't have others currently) 200Meters or more.

Problem left: Deviation sometimes seems to disturb SPI communication. At least I noticed servos at WFLY receiver sometimes to stutter. This is gone after restarting the TX.
This behaviour is independent from the antenna fix, as it happened before as well.
Attachments:

Please Log in or Create an account to join the conversation.

More
25 Oct 2020 21:08 #76935 by metalstrolch
Replied by metalstrolch on topic Fixing the IrangeX IRX-IR8M
For the curious being too lazy to compile themselves...

File Attachment:

File Name: deviation-...8c63.zip
File Size:1,810 KB


The build will run on stock hardware (no missing modules!), but requires fix above to make the antenna selection work.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum