Remotly controlling your vario sensitivity

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Remotly controlling your vario sensitivity

Post by rainer »

EDIT: i replaced the remote control implementation against the one described in this post:
viewtopic.php?f=86&t=2854#p40641

the old text is here for reference only:
ABBC3_SPOILER_SHOW
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Remotly controlling your vario sensitivity

Post by Rob Thomson »

I quite like the idea of this.

Will be good got fine tuning to suit the model.

Rob

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

i will add one more configuration option to enable/disable the automatic adjustment to the channel range.
I had to add this automatic adjustment to be able to "learn" the min and max value of an already configured channel.
Internally the input will be mapped to values between 1 and 1000.
If you double use your e.g. rudder channel, and that one has min max values of -70..110, the auto learning wil make sure that -70 maps to 1 and 110 will map to 1000. This is nice for reusing a achannel, but forces you to once move the stick the full way from left to right before using it to set values form 1 to 1000.
If you are using a dedicated channel, this would mean that you cannot configure mixers with predefined values that always end up in the same sensitivity.
So with the new option you can choose if you want to use fixed values for min / max or if you want to auto-learn the channel range by once moving the stick the full way.

I guess we need a good manual writer in the future ;)
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

rainer wrote:SNIP...
I am currently thinking about a way to double use a channel. this would enable you to use a channel to configure the sensitivity, then disconnect the ppm signal and we would store the last value into the internal eeprom. this way it would be possible to change the sensitivity on the field, without permanently assigning a channel for the vario.
maybe if we add a posibility to disconnect the ppm signal via a mini plug... i´ll think of a way, but i guess it should be possible.

If the PPM plug is disconnected part way through a PPM pulse the stored value will be something random. How about using a jumper between two pins to signal the code when to store the ppm value? Check for the jumper at the end of each PPM measurement. As long as the jumper is present the PPM value controls the gain. Removing the jumper signals the code to save the current value and then use it while ignoring the PPM input.


I haven't received my parts yet but I assume the push button on the pro board is only for reset? It would be nice if we could have used that. The delivery from China is agonizing. For comparison I ordered some Xbee and some openlog modules from Sparkfun (in US) on Monday and I see they are on the local fedex truck for delivery this morning (wed) That's an international shipment also. Mind you, I am still bleeding from the shipping charge....
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: openXvario development

Post by Rob Thomson »

What you want is a ppm pass through connector. And a button that reads the current setting and stores it to epprom.

Make sense?

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

We can do the button on the custom board but for now with the proto boards I think a jumper is the simplest solution. What's a pass through connector?
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: openXvario development

Post by Rob Thomson »

Well..

If you connected the vario to the rudder channel on the rx, them the rudder to a separate connector on the board... Essentially you could pass the rudder pom through the vario board to drive the rudder. Pressing the button would store the offset for vario sensitivity based on the current rudder position.

That way you can achieve a sensitivity mix without using up a channel on the rx.
Make sense?

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXvario development

Post by rainer »

Actually i´ve got it running allready here. if i disconnect the ppm connector i do get values which are outside of the range that i get when it is connected. if i connect it to ground, i get a stable 0. so we could do a 2pin female connector. one side to GND, the other one to the ppm signal on the receiver ( which might be allready used by another function like rudder or aileron). If we want to use the PPOM Signal to change the sensitivity, we connect the arduino pin it to the ppm signal. if we want to store the value to the eeprom we disconnect it from PPM and connect it to GND.

@rob: passthrough is not required, a normal Y connector wil do the job
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXvario development

Post by jhsa »

but we can't do that in flight, right? specially if we use the ailerons ;) or am I missing something as always? :D

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXvario development

Post by Flaps 30 »

I suspect that I will stick with altering the sketch file manually to find the sweet spot, if it isn't there already along with alterations that can be done on Open9x
Rob Thomson wrote:Essentially you could pass the rudder pom through the vario board to drive the rudder.
And that is just a small step away from getting something like the rudder waggle as per the WS vario for those who haven't got telemetry. Next step would be an audio output to feed into an onboard 433Mhz FM transmitter.
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXvario development

Post by rainer »

jhsa wrote:but we can't do that in flight, right? specially if we use the ailerons ;) or am I missing something as always? :D

João
:D no you're right. We can't dual use a channel and adjust it in flight.
BUT: you can use the same channel as the rudder or aileron to adjust it on the ground, than disconnect the ppm signal from the openXvario to the receiver and the value get stored to the eeprom. This way you do not need a seperate channel. and as the oXv automatically adjusts itself to the limits of the rudder/aileron channel, you can use that channel on the ground without reprogramming anything on the TX.

Of course if you have a dedicated channel you can adjust it in flight.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

Yeah I think I'm missing something too. If the PPM signal is controlling a servo and the openxvario is reading the ppm at the same time it doesn't make sense to me. What I envisioned was using a channel like a pot to explore gain settings while flying. I could live without rudder for example on a glider with ailerons while this tuning was going on but I would map that rx channel to a pot on the 9x so that it stays put at the value I set it until I can land and remove the jumper or push the button whatever. Then I would reconnect my rudder servo, map it back to the left stick and be done. In a different airplane I might want to readjust the vario setting but once set I'd leave it alone. In that sense the Y harness or pass through jack is not really something I need. I'm not sure what you guys are picturing but maybe it is something better. Please let me know.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

rainer wrote:BUT: you can use the same channel as the rudder or aileron to adjust it on the ground, than disconnect the ppm signal from the openXvario to the receiver and the value get stored to the eeprom. This way you do not need a seperate channel. and as the oXv automatically adjusts itself to the limits of the rudder/aileron channel, you can use that channel on the ground without reprogramming anything on the TX.

Of course if you have a dedicated channel you can adjust it in flight.

We posted almost simultaneously. OK I get it. Then you can leave the ppm channel connected to the oXv 'thru' connector all the time. If one of the arduino pins is raised high then you are setting gain and when grounded the value is stored and ppm is ignored? You can't explore in flight but you can set at the flying site on successive trials.
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXvario development

Post by rainer »

edit: yes you got it... but here it is again anyway: ;-)
OK, let me try to explain.

Option 1:
You use a dedicated servo channel assigned to a pot on your TX and can control it anytime. done. perfect it works fine.

Option 2:
you only have a 4 channel receiver... no free channel... you will not be able to adjust the sensitivity in flight.
BUT: after landing... on the ground.. without reprogramming or switching models, you want to be able without reprogramming the arduino to change the sensitivity.
To achieve this:

- use a Y cable to connect the vario to the same port as the rudder servo.
- cut the PPM signal line between the vario and the receiver.
- on the receiver side, you place a 1 pin female header in some shrink tube.
- on the vario side you solder a 1 pin male header.

you can now connect / disconnect the PPM line.

if you connect the ppm line, the vario will detect that there is a signal and use it. As we do not now which limits the rudder servo is using, the vario will automatically adapt to the channels limit if you move your rudder stick once to min and max.
Now you can move the rudder stick and can read the sensitivity value on the display in the DIST field ( 1..1000) you move the stick to whichever value you want the sensitivity to be in your next flight and then disconnect the small ppm plug again. The vario will detect this store the current value for the sensitivity to the eeprom and signal this it via a flash sequence of the LED and by sending 9999, the sensitivity value and again 9999 to the dist field.
from now on if you do not connect the ppm line, the value from the eeprom will be used.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: openXvario development

Post by Rob Thomson »

Makes little difference.

If you want to control it from a pot and use an independent rx channel, that would be fine.

But... If you did not have enough spare rx slots, then a pass through mode or similar is useful.

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

rainer wrote:Actually i´ve got it running allready here. if i disconnect the ppm connector i do get values which are outside of the range that i get when it is connected. if i connect it to ground, i get a stable 0. so we could do a 2pin female connector. one side to GND, the other one to the ppm signal on the receiver ( which might be allready used by another function like rudder or aileron). If we want to use the PPOM Signal to change the sensitivity, we connect the arduino pin it to the ppm signal. if we want to store the value to the eeprom we disconnect it from PPM and connect it to GND.
Rainer I'm not sure if you got the point I was trying to make. Suppose our ppm signal ranges between 1msec and 2msec and 1msec=Kalman R(100) and 2ms=kalman R(500). Suppose you are in the gain setting loop and now you want to disconnect the ppm signal. You will be unplugging it some time within the Rx PPM frame. Now suppose you are trying to set R=500 so PPM=2ms and you are unlucky and happen to unplug the ppm plug just 1.5msec after the rudder pulse became active in the PPM frame. Now oXv would have measured that as a 1.5msec pulse and stored that value instead of your 2msec value. You need an independent signal to store for the arduino.
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXvario development

Post by rainer »

RightRudder wrote:
rainer wrote:Actually i´ve got it running allready here. if i disconnect the ppm connector i do get values which are outside of the range that i get when it is connected. if i connect it to ground, i get a stable 0. so we could do a 2pin female connector. one side to GND, the other one to the ppm signal on the receiver ( which might be allready used by another function like rudder or aileron). If we want to use the PPOM Signal to change the sensitivity, we connect the arduino pin it to the ppm signal. if we want to store the value to the eeprom we disconnect it from PPM and connect it to GND.
Rainer I'm not sure if you got the point I was trying to make. Suppose our ppm signal ranges between 1msec and 2msec and 1msec=Kalman R(100) and 2ms=kalman R(500). Suppose you are in the gain setting loop and now you want to disconnect the ppm signal. You will be unplugging it some time within the Rx PPM frame. Now suppose you are trying to set R=500 so PPM=2ms and you are unlucky and happen to unplug the ppm plug just 1.5msec after the rudder pulse became active in the PPM frame. Now oXv would have measured that as a 1.5msec pulse and stored that value instead of your 2msec value. You need an independent signal to store for the arduino.
Yes i understood that.
It seems to be working anyway. I am reading the ppm signal. if it is a value in the "valid range" i set it to kalman_r. if i receive an invalid value, i debounce by waiting 50ms and check if there is still no valid signal. if that is the case, i store the last valid kamlan_r vlaue to the eeprom.

i tested that yesterday evening like 50 times and it worked each time.

i get a numeric value for the ppm pulse in the range of 981 to 2000. the invalid values are outside this frame. I will check if enabling the internal pullups of the arduino help in creating a better defined signal tonight. but at least for my tests so far it seems to work just fine.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: openXvario development

Post by RightRudder »

rainer wrote:i tested that yesterday evening like 50 times and it worked each time.
You should definitely stay away from the casino! :lol: If the PPM frame is 20ms you have between 1 in 10 to 1 in 20 chance of hitting the jackpot unless I'm missing something.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: Remotly controlling your vario sensitivity

Post by RightRudder »

Just thought of a software solution for this rare problem without needing an arduino pin. Save two values (a 2 element FIFO). when the PPM is no longer detected save the value from the previous frame instead of the last frame.
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

that's a good idea. i can add in the fifo for added security.

how about another idea:
On Startup: if the read PPM Value is in a predefined range (e.g. ruder stick at the far left position) we can use the first <n> seconds after powering up the arduino to reprogramm the sensitivity. at the end of this time we start a blink signal to inform the pilot that the time is about to end and then we use that value without processing the ppm signal any more.
so:
power on your plane, wth the rudder stick to the far left.
now we are in programming mode if a PPM Signal is present.
move the stick to min/max for the arduino to learn the range.
than move the stick to the desired position ( you can read the value in the DIST Field)
than you hold i at that position.when the led starts to indicate the end of the programming phase. and you are done.
This way we would completly save the unpluggin of any cables.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: Remotly controlling your vario sensitivity

Post by RightRudder »

Works well for the rudder example because of the springs in the tx. The only problem I see is if I do have it on a dedicated channel like a pot and if I power up with un-intenionally my pot is at min value, while I'm distracted by something else my oXv is going to happily reprogram itself to minimum gain without my knowing anything about it!

And my in flight adjustment option is gone!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

no, in flight would be a seperate option...
you could choose when flashing the vario which way you want it to behave.
use a dedicated channel for the sensitivity=> then no reprogramming/eeprom storaged would be required at all.
-or-
a way like the one described in my last post.
It shouldn´t be a problem to decide which way you want it to act:
-you have a spare channel that you want to use option 1
-no free channel : option 2
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

OK, i think i´ll give this idea a try.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

done, tested, works. and i like it.

I implemented the new programming mode. This is how it works.

====== Starting the programming mode ======
1. Turn on Receiver and open your telemetry data screen
You should enable the following additional fields on it:
==> T1 (will be used for the countdown timer)
==> T2 RPM (will be used to display the sensitivity value)
==> DIST (will be used to indicate the start/end of programming mode)

2. Turn on your power for your plane
The openXvario should be connected to the same port as the rudder servo.

3. Enter Programming mode
Move the rudder stick to the left in the next 5 seconds after power on.
==> the oXv will detect this and blink the led on the arduino in this pattern:

1sec ON, 3 Flashes 100ms, 1sec ON

4. In the Programming mode:
Now for the next 30 seconds (configurable) the oXv will be in programming mode.
==> The remaining time in programming mode will be displayed as a countdown on your open9X in the T1 field.
==> The T1 Field will now display the current Sensitivity setting.

Move the rudder stick once the full way from left to right. the oXv will learn the range by this.
Now change the sensitivity by moving the rudder stick to the desired position.

5. End of Programming mode
As soon as the countdown in the T1 field reaches 0 the new senitivity will be written to the eeprom the end of the programming mode will be signalled via another flash sequence of the LED and by sending 9999, the sensitivity value and again 9999 to the dist field.

The T1 and Dist field now display whichever fields you configured for them. enjoy flying.

if you want to reenter programming mode turn off/on the power or press reset followed by moving the rudder stick to the left

Done.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: Remotly controlling your vario sensitivity

Post by RightRudder »

Awesome. Thanks again Rainer. And now....we wait.
SupraGo
Posts: 33
Joined: Tue Dec 27, 2011 9:09 pm
Country: -
Location: Alberta, Calgary

Re: Remotly controlling your vario sensitivity

Post by SupraGo »

Just finished building my OpenXvario. And it works :). I would like to use a dedicated channel, linked to a pot to control the sensitivity. Got that setup and with a servo connected to the channel, it moves with the pot. I would like to see the sensitivity on screen. What field do I use for display? I have looked through the documentation and the fields to use when using the rudder as a sensitivity control are written up, but can't find when using a dedicated channel.
Bill
SupraGo
Posts: 33
Joined: Tue Dec 27, 2011 9:09 pm
Country: -
Location: Alberta, Calgary

Re: Remotly controlling your vario sensitivity

Post by SupraGo »

Found it. It's a configurable setting in the sketch, by default set to "T2", and it works.
Now if someone can point me to how to get the sound going, I'll be a really happy camper.
Bill
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Remotly controlling your vario sensitivity

Post by Flaps 30 »

You need to set up the vario in Opentx.. Details here ---> https://code.google.com/p/openxvario/wi ... gsInOpen9x
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Remotly controlling your vario sensitivity

Post by Rob Thomson »

I personally found little use in remotely setting the vario.

Maximum sensitivity all the way!

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Remotly controlling your vario sensitivity

Post by rainer »

But till you found that setting of yours it was sure a helpfull feature ;-) and that setting "maximum sensitivity" is good for you, but i bet others are getting nervous already if there is just on false indication. ;-)
i like settings around 200... with limits in the positive like 0.1 and 3 m/s. I tried to use limits starting at 0.0, but that creates some strange beeps (a bit like morse code) in the air (maybe a bug in the audio tone generation?)
I started to remove the tone for negative vertical speeds as well lately. at least when i'm out on the field.
For development i always use -3,-.1,+.1,3
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”