variometer implemented - test away

Post Reply
User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

variometer implemented - test away

Post by Hamburger »

with r1275 I submitted a first implementation of a variometer (audio feedback on copter rising/falling and speed). In the glider world this is a well known device to aid in following thermals; with copters it should help in obeserving altitude or maintaining altitude without explicit alt.hold.

The audio output gets modulated depending on direction (up or down) and speed. With higher speed, the silent spacing between signals gets shorter and the tone duration gets higher.

It requires a working baro. Output is done over serial (wireless via BT or xbee etc.) to a vt100 terminal program available for most smartphones/handhelds, computers etc.(I use an old palm treo for testing). For the experimental souls, Sebbi was kind enough to modify a terminal program specifically for android to produce two different tones; the variometer does work with the single tones from regular vt100 terminal program.

Current impelementation utilizes two methods to detect rising/falling speed. Method 1 relies on short term variation of the 'vario' variable while method 2 does a long term delta of altitude. Either one of the two or both metods can be activated.

Requirements:
- working baro
- vt100 terminal program with audio output for BELL (0x07) command (available for most devices like smartphones/handhelds, computers)
- working wireless connection between copter and device

Configure:
- activate in config.h with VARIOMETER set to one or two methods
- select one or two tones output (depending on your vt100 program
- optionally limit detection to either rising or falling movement
- enable LCD_vt100
- if you have not done yet, install vt100 terminal program on your ground device (link to the enhanced vt100 terminal program for android: http://code.google.com/p/multiwii/sourc ... 274&r=1274)

Usage:
- assign activation of variometer to an aux switch via GUI or LCD config menu as usual,
- fly and test.
- give feedback

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: variometer implemented - test away

Post by copterrichie »

I need to invest some time at getting this vt100 terminal working. It should work very well over WiFi. Thanks.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: variometer implemented - test away

Post by Hamburger »

how do you force the serial data stream over wifi? Typical wifi devices have an ip implementation as low level layer.
Do you want to utilize a secondary mcu feeding the serial data into its locally running web server, accessible via wifi, then have your smartphone browse the flying server?

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: variometer implemented - test away

Post by copterrichie »

Hamburger wrote:how do you force the serial data stream over wifi? Typical wifi devices have an ip implementation as low level layer.
Do you want to utilize a secondary mcu feeding the serial data into its locally running web server, accessible via wifi, then have your smartphone browse the flying server?


Well, I have a serial-to-Wifi converter and on the PC, I would use serial-to-TCP. I have not done any of this yet but back in the days of BBS'ing, we used to do this type of connection all the time. Recall PC Anywhere? :D

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: variometer implemented - test away

Post by dr.tom »

could MWC code output sound via FPV gear?
if it can generate PWM, maybe it could generate simple acoustic output?

something like this?
http://www.dronesvision.com/lastonedown ... pv-flying/

If it is possible somehow, I would like to test it in my FPV plane,
put mwc board (crius aio) and connect some output pin from it to audio-in on fpv-tx,

even if it can't output sound directly,
I could connect a pilot lamp (buzzer) to some pin,
so it would beep faster if plane is lifting... or silent when plane is loosing alt.
my fpv mic would pick it up and transfer it to ground station...
http://youtu.be/zbk3ipTgMqo?hd=1&t=1m48s

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: variometer implemented - test away

Post by copterrichie »

I would assume replacing the speaker with a connection to the audio-in on the transmitter is possible.

http://www.arduino.cc/en/Tutorial/Tone

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: variometer implemented - test away

Post by dr.tom »

there is an variometer based on arduino and MS5611 baro,
by kapteinkuk,
but outputing on 433MHz and captured with handheld radio unit...
it seems like it could be modified to drive buzzer onboard (or sound feed ) for FPV usage...

http://www.rcgroups.com/forums/showthread.php?t=1749208

User avatar
KasparsL
Posts: 75
Joined: Wed May 16, 2012 3:31 pm

Re: variometer implemented - test away

Post by KasparsL »

I am looking forward to see this audio feedback for accending - descending implemented in MultiWiiConf !

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: variometer implemented - test away

Post by Hamburger »

dr.tom wrote:could MWC code output sound via FPV gear?
if it can generate PWM, maybe it could generate simple acoustic output?

something like this?
http://www.dronesvision.com/lastonedown ... pv-flying/

If it is possible somehow, I would like to test it in my FPV plane,
put mwc board (crius aio) and connect some output pin from it to audio-in on fpv-tx,

even if it can't output sound directly,
I could connect a pilot lamp (buzzer) to some pin,
so it would beep faster if plane is lifting... or silent when plane is loosing alt.
my fpv mic would pick it up and transfer it to ground station...
http://youtu.be/zbk3ipTgMqo?hd=1&t=1m48s

sorry, currently the output is limited to using the sound capabilities of a vt100 terminal program running on a smartphone, tablet, computer or some such. Sebbi provided a special version of android terminal program which will even give two different tones, so it is possible to distinguish rising and falling.
Other output could be coded - provided you have a free output still on your arduino board? Also should be possible to hook variometer output to the alarms implementation, then you have choice of buzzer output (piezo buzzer or LED driver) and pilotlamp automagically. This might be the best way to allow for various output channels?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: variometer implemented - test away

Post by Hamburger »

KasparsL wrote:I am looking forward to see this audio feedback for accending - descending implemented in MultiWiiConf !

you are running the MultiWiiConf via wireless at the field? So you have a capable computer with you always?
I do not engage much in MultiWiiConf coding these days - I am not a real programmer and I find it difficult to work with java. So someone else would have to do it. For the time being you may use a vt100 terminal program on that computer and get the variometer's audio output that way.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: variometer implemented - test away

Post by crashlander »

@Hamburger: are you using same data for your Vario implementation that can be read using MSP with MSP_ALTITUDE?
How often do you pool that data and what kind of additional "cooking" you do with it?
I'm asking since in my version of MSP TX I'm pooling that data over serial aprox. every second and results are not so good.

Regards Andrej

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: variometer implemented - test away

Post by Hamburger »

Andrej,
(had to look at code anyway to answer your questions, so I copied some fragments from there)

yes, I use the vario and BaroAlt variables; both should be available via MSP, I think.
I do evaluation every 5th cycle (~2ms - 5ms) -> (~10ms - 25ms) but !!!
* choice of two methods (enable either one or both)
* method 1 : each call: use short term movement from baro ( bigger code size) <--- uses vario
* method 2 : every 400th call: use long term observation of altitude from baro (smaller code size) <--- uses baroalt

method 1 uses vario directly to compute possible sound,
method 2 does a delta to last time's (400 calls away <=> 2000 cycles) BaroAlt value and computes possible sound based on that delta.

No filtering /averaging.
Yes, it all depends on quality of data in vario and BaroAlt. Yes, it has room for improvement

I use method 2 mostly for now (because not enough memory space for both).

User avatar
KasparsL
Posts: 75
Joined: Wed May 16, 2012 3:31 pm

Re: variometer implemented - test away

Post by KasparsL »

Hamburger wrote:
KasparsL wrote:I am looking forward to see this audio feedback for accending - descending implemented in MultiWiiConf !

you are running the MultiWiiConf via wireless at the field? So you have a capable computer with you always?
I do not engage much in MultiWiiConf coding these days - I am not a real programmer and I find it difficult to work with java. So someone else would have to do it. For the time being you may use a vt100 terminal program on that computer and get the variometer's audio output that way.

Yes I have APC220 link working with MultiWiiConf and MultiWii WinGui.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: variometer implemented - test away

Post by Hamburger »

+ audio output sanitized,
+ activation via aux switch handling fixed
in svn repo r1290

Post Reply