Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a RC Switch to Inav
#1
Hello,

I am near completion of a quad and want to do the following:

1. Add an RC switch to allow for remote powering of my camera gimbal
2. Wire it into an open UART

I am using:

Latest Inav
Matek F722-Px
This switch: https://www.amazon.com/gp/product/B07FJZ...UTF8&psc=1

Frysky XSR receiver
Seperate BEC to provide clean power to the gimbal from the Vbatt. 

On my resources, Pinio1 and 2 are defined and I will be damned if I can find a map showing where to access these pins.  I have UART1 and 3 unused and was goign to remap the pins to to one of these and then learned this was not an option for Inav.

I have both Servos in use for the Roll and Yaw of my Gimbal.

Is this switching doable?  Do I need to rethink this?  Is there a magic bullet I can do to make this happen.  I am sure that this is a Newb problem, but I have searched the internet for a solution and have come up blank.

Any help is really appreciated.

Thanks in advance.
Reply
Login to remove this ad | Register Here
#2
On the Matek F722 PX, pinio 1 is used to turn on or off power to the VSW pad which is intended to power a camera.
pinio 2 selects between cameras. You can't use either of these to turn your switch on or off - the switch expects a PWM signal.

The way you would get the swtich to work is to:
  • assign one of your transmitter switches to a spare channel
  • set up a servo channel in iNav on an unused motor output
  • connect your RC switch to the motor output you have assigned
  • follow the mixer documentation (https://github.com/iNavFlight/inav/blob/...s/Mixer.md)
    to assign a raw RC channel to the servo
That will then let you activate or deactivate your switch via a switch on your radio.
Reply
#3
Unseen!! Thank you. I will try this out tonight and post an update! I knew there was an answer in the extra motor outputs but could not put it together in my head.

Thanks you thank you.
[-] The following 1 user Likes tedman111's post:
  • unseen
Reply
#4
(15-Sep-2020, 02:40 PM)tedman111 Wrote: Unseen!!  Thank you.  I will try this out tonight and post an update!  I knew there was an answer in the extra motor outputs but could not put it together in my head.

Thanks you thank you.

No problem! Let us know how you get on.
Reply
#5
So, in reviewing the github, since I have (4) unused Motor outputs, I could add an additional (4) outputs if I wanted to. This is in addition to 9 and 10 which are already set up as servos.

Correct?
Reply
#6
(15-Sep-2020, 02:53 PM)tedman111 Wrote: So, in reviewing the github, since I have (4) unused Motor outputs, I could add an additional (4) outputs if I wanted to.  This is in addition to 9 and 10 which are already set up as servos.

Correct?

That sounds right. 10 motor outputs, six used so far and the four free ones can be used to drive servos or whatever else wants a standard PWM channel as a control signal.
If you've bound your XSR in 16 channel mode, you also have plenty of radio channels to assign as well.
Reply
#7
So, I added the servo, but I do not believe it is set to Motor 5. How to I get this servo to read on the pin for motor 5? In searching, it looks like I need to do a custom firmware?

Or is there a way to redefine the motor pads to servo pads. When i look at resources, all motor pads are defined motors 1-5. I cannot see the servos defined, well, I don't know what I am looking for either.

Sorry for the silly questions. Hope to be around long enough to help out one day.
Reply
#8
Hmmm...

Looks like iNav is missing some flexibility in assigning servo outputs. I'm afraid this is out of my depth. Maybe you could raise an issue on iNav's issue tracker and see if anyone knows how to configure iNav to support your switch.
Reply
#9
Have done this. I will update for the group.

Thank you for all your help!
[-] The following 1 user Likes tedman111's post:
  • unseen
Reply
#10
Here is what I changed:

From:

DEF_TIM(TIM2, CH3, PB10, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S7 UP1-7 D(1, 1, 3)
DEF_TIM(TIM2, CH4, PB11, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S8 UP1-7 D(1, 6, 3)
to:

DEF_TIM(TIM2, CH3, PB10, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7 UP1-7 D(1, 1, 3)
DEF_TIM(TIM2, CH4, PB11, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 1), // S8 UP1-7 D(1, 6, 3)
Testing it out tonight. Thoughts?

Can someone tell me what the 0, 0) denotes a the end of each definition? S8 is the only one that has 0, 1 and I am questioning if it needs to be different.
Reply
#11
It worked!! I have 4 servos in my quad!! Setting up Ubunto/Linux was tricky, virtual box and all. Then, the Git for iNav is 2.6.0 and the configurator that is out is 2.5.0, so that was another trick, getting the archived master files.

All in all, I think i can tweak inav to make minor adjustments when needed.

And that is cool.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Can you have 6 position switch default at one position? changitamir 0 89 30-May-2024, 11:17 PM
Last Post: changitamir
  INAV Sensors Barometer GiantsFan5 1 220 02-May-2024, 05:46 PM
Last Post: PeladoMat
  INAV Angle mode problems RConcienne 1 233 18-Apr-2024, 04:17 PM
Last Post: segler999
  Boxer SA Switch will NOT Arm my Quads soky157 35 1,377 01-Mar-2024, 12:29 PM
Last Post: SnowLeopardFPV
Exclamation iNav Install I Question.... Coleon 15 565 23-Feb-2024, 07:31 AM
Last Post: fpvapnea


Login to remove this ad | Register Here