Is there a way to get Smart Audio?

I have been looking back through older posts concerning Smart Audio functionality - or the lack of. I am wondering if anything as changed?

I have been using Ardupilot for a few years now, mainly copter. I am in the process of building my first proper plane, and i really want to stick with Ardupilot. But i really want to be able to have at least a very basic control over my vtx, really all i am interested in is switching the power levels. I really am not bothered about having the osd function, just being able to switch between 2 or 3 power levels via a switch on my Taranis would be more than enough. Does anyone know if this can be done? My vtx is tucked away in a bay on the underside of a wing, so not easy to get at to quickly change it manually before take off.

Any suggestions on how and if this could be achieved would be gratefully received. Thanks.

It would be possible to write a onboard lua script for this on master, lua access to serial ports has not made it to stable yet.

If I wanted to run a Lua script from the Simulator in Mission Planner, what directory would I place it in?

Nevermind, I found it I think. I created a scripts folder and put the sample script in it and no more ā€œno lua scrips to runā€ errors so itā€™s probably working.

1 Like

Thank you both. I have never used Lua scripts before, to be honest i would not have a clue how to compile one, or what it would need to include. I will do a bit of googling to learn about them and how to write and use them. And hopefully i will find some info on what needs to go into one for Smart Audio.
If i can get that far i will come back and ask for help on how i can use it with Ardupilot and Mission Planner. I am guessing i would have to use the command line interface?, that is something else i have not delved into before.

But thank you again for your replies, at least i have a direction to look to now. :slight_smile:

This is the scripting read-me

There are several examples

The only limitation is you need a board with greater the 1MB of flash, this rules out some of the ā€˜betaflightā€™ boards

Yes. Matek F765-Wing is one of the few. Or the only oneā€¦

Thanks again for the replies. I have a feeling that itā€™s going to be over my head, i am not very good at that type of thing. Also, for the time being i will be using an Omnibus F4 SD f/c, which i believe is only 1mb of flash memory. But i would be open to changing the f/c to some kind of pixhawk if the script option was a bit easier to understand.

I can only hope that Smart Audio support will one day make it into a master or beta build. Being able to switch vtx power levels remotely really is a great idea, especially if fiddling around with some things once the craft is powered on, with your vtx getting hotter by the second.

If anyone has got any other ideas on a way of simply switching the power level i would love to hear it. Thanks!

I think i may have found a way around my problem. I had a spare F4 nano v6 f/c that was looking for a use. I have connected it to the SBUS line coming from my receiver to my main flight controller. I have Arduplane on the main f/c, and have betaflight on the nano f/c. So far the two of them seem to be quite happy together - would i be correct in thinking SBUS is only a one way link between rx and f/c? If so it is my hope that they will not interfere with each other. Which, so far in testing this appears to be the case - i have both Betaflight and Mission Planner connected to the flight controllers, and i have duplicate control over both of them at the same time.

My crazy idea is to run my video feed through a cheap video switcher - i have had no issues with the hobbyking one in the past, then i can connect my smart audio cable to the betaflight controller. Then when i want to make a change to the vtx power settings i can flick a switch to change over to the video feed from the Betaflight controller. I could also stop and start recording on my Runcam hybrid from the Betaflight f/c.

I am going to carry on testing. I will not implement it on the final build yet, this is my first plane, and my first time with Arduplane, all my previous experience with ardupilot was with hexacopters and quads. So i want to get used to flying a plane, and i want to get used to the various flight modes, because obviously if i am going to be using the sticks to enter the Smart Audio menu i donā€™t want the plane freaking out whilst i am doing that. In fact i might see if i can map a couple of switches on my Taranis to take me into the Smart-Audio menu.

The Nano and the video switcher together only weigh about 13g, so i am not bothered about the extra weight. A mad idea i know, but like i said, i am at a loss when it comes to things like Lua scripts and how to use them, so i will try this roundabout route!

1 Like

I have simplified my idea, i think i can now do all that i need without the use of a video switcher. Thanks to a video posted by Painless360 i have learnt that if i put iNav onto my second f/c i can simply set a spare 3 position switch to change my vtx power levels. Still via smart audio, but doing away with the need of having to do via the osd menu.

So, once it is all together i will be able to stop and start recording on my Runcam Hybrid, plus change power levels of my vtx. All done separately from the main f/c that is running Ardupilot. I have spent a lot of time on the bench running both the iNav f/c and the Ardupilot f/c together from the same RX (R9 Slim). I have not been able to create any kind of conflict between the f/cā€™s even though they share the same Sbus line. So hopefully all will be well. All i need now is some decent weather to go out and get some flying in!

@Steve.B did you ever get this working? Would like to also control my VTX power and was curious if your method was working.

@thecrumb,
Hi Jim, yes, i got it all set up and it works flawlessly. I am using a cheap second flight controller to switch recording on/off on my Runcam Hybrid, and to switch between 3 different power levels on my vtx via smart audio.

I am running iNav on the second flight controller, the f/c is just a Omnibus F4 Nano V6, but i would imagine any iNav suitable f/c with a smart audio input will work. I am simply splitting the sbus signal from my rx so that it goes to both my main flight controller, and the secondary f/c. Sbus being a one way signal means that both f/cā€™s are happy together on the same rx - they donā€™t know each other is there.

I followed the advice on one of Painless360ā€™s videoā€™s to set up my iNav f/c so that it let me switch my vtx power levels. I must give him a big shout out because i would never have worked it out for myself! It was a little bit more involved than say just setting the f/c up to operate your Runcam. Here is the video - hope it helps, some very good info. And if you wanted to go one step further and have iNav automatically switch vtx power levels, dependent on how far away your craft is from you, he shows how to do that in a following video. That is not something i have tried yet, i am more than happy just using a 3 position switch to do the job.

https://www.youtube.com/watch?v=mTPy5-xOaMk&list=PLBXc6VGDqqp2Z6XzmJIqT8zOgCsVOi8hl&index=10&t=0s

The only other thing i did was add a 3 way camera switcher to my onboard set up, that way i can switch to the iNav f/cā€™s osd if i need to - to be honest the only thing i set up on that osd was the vtx power setting level, just so that i could confirm it had switched when i commanded it. It always works, so i donā€™t use the switcher at all now, the vtx power levels switch every time.

But without the added camera switcher it is very simple to do - just one small extra f/c that weighs next to nothing, just run your vtx smart audio cable to it, along with your Runcam control tx/rx wires.

If i can be of further help, let me know, will do my best.

Good luck.

Steve.

1 Like

Just another follow up on this - been tinkering around with Crossfire on both my small Betaflight quads and recently stuck one on my 450 Arducopter

Using Micro TX and a Crossfire Nano - I can now do Smart Audio via lua scripts on my radio

For Nano
1 - smart audio
2 - ch2
3 - Mavlink RX
4 - Mavlink TX

Set ā€œRC over mavlinkā€ to ON

Now I can go into Crossfire lua script on my Taranis and there is a VTX section where I can set ch, band and vtx power :slight_smile:

Need to dig into Lua scripting as ideally Iā€™d like to be able to flip a switch and go from low to high power without having to go into the menu each flight. But this does work.

What VTX are you using, probably Unify? There seem to be some problems with 3rd party, non-TBS VTXs when controlling SA directly from a Crossfire receiver.

Apart from that, I was only able to get it to work with CRSF. When using Mavlink at a serial port with option 23 (RCin), half of the telemetry sensors were missing. Using CRSF, theyā€™re all there. :wink:

Iā€™m using a RDQ MachII VTX. So you are using a Unify and it works via CRSF?

No, it works via SA. I read somewhere about VTX control via CRSF also being possible but that wouldā€™ve made things even more complicated, as I know nothing about how that works.

Iā€™m trying to use a Rush Tank Ultimate Plus but apparently the SA implementation is not bug-free - it offers some strange values to be set. So now Iā€™m considering switching to a VTX with rock solid SA.

The CRSF vs. Mavlink part was totally unrelated to the VTX part. Itā€™s just something else I spent many hours on figuring out a few days ago. :wink:

tell me when will the script work on the stable version? for example 405?

using smart audio from an eachine vtx to a Matek f405 wing, i can change power levels the only issue i am facing is the VTX settings for band and channel keep changing, i choose Raceband channel 7 but it changes it to F 8 instead which are both 5880 frequency, so when i change power levels in the goggle osd it shows correct mW value but the wrong band and channel (wrong because i chose a different band and channel, only common thing between f8 and R7 is the frequency value matches 5880)
is this a bug or is it something wrong in settings, 2nd question is in MP max vtx power can be set to 1000 value, so what should be the value for a vtx like AKK 3000mW ?