Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
I have been trying to get OP-Config working with an Arduino Mega standard board (well I say standard it’s an “Elegoo” model rather than Arduino) and it fails to read the radio when trying to use I-bus.

I’m using a FlySky i6s with a FS-A8S as per the recommendations on the wiki.  I have the output mode set to PPM and Ibus for serial.  I connect the ibus cable to pin 15 as per the guide for Arduino but op-config fails to find the radio.

If I connect the ppm cable to pin 3 it finds it ok and can read the data ok.  Ppm of course only gets the 8 channels and I was hoping to use ibus to make use of the extra couple of switches.

Before I go trying to diagnose if pin 15 is even getting a signal or if the receiver/transmitter are even talking ibus is there anything I am missing or any known issues/workarounds?

Pretty sure the code on the TCB project is set to subs initially by default and the tries ppm and ibus.  Not sure which it tries next but it either isn’t getting ibus or not seeing it on pin 15.   

Might have to go and put some diagnostics in the radio class to see if it’s even trying or if the receiver is duff.

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: OP-Config not finding I-Bus radio with an FS-A8S and Arduino Mega
« Reply #1 on: January 09, 2024, 03:46:00 PM »
Hi Chris, no, I don't think there's anything you've missed. You have interpreted the schematic correctly as far as what pins go to what. The good news is that if PPM is working that tells us at least that the TCB code is functioning and that your receiver is not completely a duff either.

The FS-A8S was my favorite receiver of the FlySky ecosystem, so I know it can work with the TCB. But it could be that they have updated the firmware on the transmitter with extra settings that I don't know about or remember. If (in the transmitter) you set Serial to iBus that should work, but I don't know, maybe you need to re-bind after a change, or maybe for some odd reason it wants the other setting to be PWM. I'm just making random guesses, I really don't remember what the transmitter settings were.

As for the TCB, yes, it starts off looking for sBus, then iBus, then PPM, but if it fails all three then it starts over again and repeats them all in a loop over and over, so if the iBus signal is there, it will pick it up eventually.

I'm willing to bet the answer will end up being something simple.

You could certainly put some diagnostic statements in the TCB code, maybe something that would be even easier and quicker is to download the IBusBM library. It includes a sample sketch called Ibus_singlemonitor that you can load on to your Mega, connect your receiver as described in the notes at the top of the sketch, and it should spit out the channel values on the Serial Monitor. There is some stuff in there about sensors which you won't need. Anyway at the least it would serve as a sanity check.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
Re: OP-Config not finding I-Bus radio with an FS-A8S and Arduino Mega
« Reply #2 on: January 09, 2024, 05:06:47 PM »
Excellent thanks Luke.

I tried a few permutations of settings but still not detecting the I-bus.  Will have a go with that sketch and check if the receiver is outputting anything.

I even hooked up a few LEDs to check the outputs when activating switches and things.  A little confused that the MG LED doesn’t have a pin on Arduino but I assume that is just a PIN number allocation in the code and I should be able to tweak that.  I guess the Arduino pin layout is the way it is because you designed the pins were they were convenient on the chip when mounted directly but they are relocated to different places on an ardunio board?

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
Re: OP-Config not finding I-Bus radio with an FS-A8S and Arduino Mega
« Reply #3 on: January 09, 2024, 05:20:43 PM »
Found the section in opsettings.h for tcb diy to switch the pins to 20/21 for MG and Airsoft so will have a play with that too.

 :)

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
Re: OP-Config not finding I-Bus radio with an FS-A8S and Arduino Mega
« Reply #4 on: January 10, 2024, 02:13:34 AM »
Good morning all,

Luke was absolutely correct (as usual  ;)), it did turn out to be something simple.   Using the ibus2pwm example program from the IBusBM library I tried to see if the serial port was seeing anything at all from the receiver and it wasn't.

Tried a few other things and nothing.   Did some more googling (and I had already done quite a bit before but not found this) and discovered a comment on this forum (https://www.rcgroups.com/forums/showthread.php?2792377-FS-A8S-help) complaining that to switch the FS-A8S receiver from the default ibus to sbus you had to press and hold the bind button for 2 seconds and it wouldn't remember it (rendering sbus a bit useless).

This is in addition to setting the output mode on the transmitter (which was already ibus).

In my initial attempts to get things working I had tried a couple of times to rebind the receiver without any obvious success but it looks like in attempting to do that while the receiver had power (which isn't the process for binding anyway) I must have switched it to sbus output and it looks like they fixed it's ability to remember the setting.  With the transmitter set to ibus and not having the required reversing circuitry needed for sbus connections nothing was getting through.

Pressing and holding the bind button for 2 seconds (while powered and bound to the transmitter) it suddenly started spouting serial data out!   Woohoo!  I now have 10 channels in Op-Config to play with.

The receiver came with the transmitter and the manual for the transmitter doesn't contain any information about the receiver at all so knowing you have to actually do something on the receiver to switch between the modes is voodoo at best.  ;D

Sorted...   8)

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: OP-Config not finding I-Bus radio with an FS-A8S and Arduino Mega
« Reply #5 on: January 15, 2024, 11:06:46 AM »
Hi Chris, sorry for the slow reply!

A little confused that the MG LED doesn’t have a pin on Arduino but I assume that is just a PIN number allocation in the code and I should be able to tweak that.  I guess the Arduino pin layout is the way it is because you designed the pins were they were convenient on the chip when mounted directly but they are relocated to different places on an ardunio board?
You figured it out, but for anyone else curious, yes, there are a few pins on the ATmega2560 which are not used by the Arduino project, but they are still there and on the TCB board I chose to use some of them. For those using a stock Arduino Mega board, those pins will have to be changed, but this can be done as Chris says by uncomenting the "#define TCB_DIY" line in the Settings.h file, or what is even easier, just flash the "TCB - DIY Version" firmware to your Mega from OP Config where all this is already taken care of.


Pressing and holding the bind button for 2 seconds (while powered and bound to the transmitter) it suddenly started spouting serial data out!   Woohoo!  I now have 10 channels in Op-Config to play with.
Thanks for reporting back! The documentation with these Chinese companies is never great. I've added a link to your post in the Wiki under the Receiver Selection Guide for anyone else who might encounter the same confusion, so thanks again for resolving that and helping out future users!
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

 

bomber-explosion