Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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. • Posts: 2,286 Threads: 38 Likes Received: 1,527 in 995 posts Likes Given: 1,881 Joined: Apr 2016 Reputation: 72 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. • Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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. Posts: 2,286 Threads: 38 Likes Received: 1,527 in 995 posts Likes Given: 1,881 Joined: Apr 2016 Reputation: 72 (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. • Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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? • Posts: 2,286 Threads: 38 Likes Received: 1,527 in 995 posts Likes Given: 1,881 Joined: Apr 2016 Reputation: 72 (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. • Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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. • Posts: 2,286 Threads: 38 Likes Received: 1,527 in 995 posts Likes Given: 1,881 Joined: Apr 2016 Reputation: 72 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. • Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 Have done this. I will update for the group. Thank you for all your help! Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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. • Posts: 15 Threads: 6 Likes Received: 7 in 6 posts Likes Given: 0 Joined: Sep 2020 Reputation: 0 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. • |