HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 23, 2012, 12:15 PM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
Alrighty, I finally had a chance to try out the FrSky DIY Vario in an old Tabooish that doesn't fly super well. The vario was tucked inside the nose with a small hole in the hatch to equalize pressures. I'm definitely not used to an uncompensated vario (have plans to make a total energy nozzle and pressure cap fitting), but flying a constant airspeed should hide that. The vario itself worked okay. Not quite ready for prime time. You can hear a little auto-tune style audio that I think is coming from the slow update rate. There is also a weird notch in the sound curve that I'm not entirely sure what the cause is yet. Might be a transmission error? I'm hoping a stronger CRC (vs the lame checksum) will eliminate this possibility. Certainly it is important to port the pressure source more carefully than I have done.

Well here's the in-flight video. I don't have a wonderful video camera and I basically have to walk back over with the speaker to get the audio...
vario 1st real flight in Tabooish (0 min 0 sec)


I'll keep poking at it...

Merry Christmas all!
Dan
danstrider is offline Find More Posts by danstrider
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 23, 2012, 12:27 PM
X-Ikarus
Reflex1's Avatar
United Kingdom, North York
Joined Feb 2003
1,673 Posts
Merry Christmas Dan & all

It does look promising Dan
keep at it, I guess the Vario update rate will be limited by
FrSky's Telemetry update rate ?

Weather still awful in the UK
very little flying here

http://www.bbc.co.uk/news/uk-20829807
Reflex1 is offline Find More Posts by Reflex1
Last edited by Reflex1; Dec 23, 2012 at 12:29 PM. Reason: Link added
Reply With Quote
Old Dec 23, 2012, 12:41 PM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
Quote:
Originally Posted by Reflex1 View Post
I guess the Vario update rate will be limited by
FrSky's Telemetry update rate ?
I think this is the case at the moment (?). FrSky is limited to a 1200bit/sec user transmission rate, which by the raw numbers should be okay for 3bytes@20ms ... 3byte = 24bit, 20ms => 50Hz, 24bit*50Hz = 1200bit/sec. Right now I'm transmitting at 30ms intervals (33Hz), but haven't done the analysis to look at lost packets due to corruption or such. If I can really get full 1200bit/sec rate out of the FrSky system, then it should be no different than Ralph's original software.

Thanks for the encouragement. Once I have some copies of the hardware, some of my local hand launch buddies are good software guys too and I'm hoping one of them picks up the code and adds in some extra features :-)

Dan

Just checked the UK weather link ... uhg. I went through the southern end of hurricane Sandy recently and feel your pain. The weather will get better eventually!
danstrider is offline Find More Posts by danstrider
Reply With Quote
Old Dec 23, 2012, 12:56 PM
X-Ikarus
Reflex1's Avatar
United Kingdom, North York
Joined Feb 2003
1,673 Posts
Dan. I have been using 433Mhz FM Tx and Rx units
with Ralph's software and have noted sometimes a "hiccup" or disruption in the audio

So may be a Flaw in the code rather than a transmission error.
Reflex1 is offline Find More Posts by Reflex1
Reply With Quote
Old Dec 23, 2012, 01:37 PM
Dean
A10FLYR's Avatar
USA, CO, Littleton
Joined Apr 2005
3,864 Posts
Sounds usable to me...Well done.
A10FLYR is online now Find More Posts by A10FLYR
Reply With Quote
Old Dec 30, 2012, 10:13 AM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
I think I found a logic bug in the vario code with respect to the loop timer. These lines don't appear to follow the intention of setting the loop timing to 20ms:
Code:
void loop()
{
  while (millis() < time);        //loop frequency timer
  time += 20;
  Serial.print(millis());
  Serial.print(" time: ");
  Serial.println(time);
}
I added the print statements and get the following results:
Code:
calibration data #1 = 54879
calibration data #2 = 52612
calibration data #3 = 33733
calibration data #4 = 29304
calibration data #5 = 32868
calibration data #6 = 27906
227 time: 20
227 time: 40
241 time: 60
258 time: 80
272 time: 100
286 time: 120
303 time: 140
319 time: 160
333 time: 180
350 time: 200
364 time: 220
380 time: 240
The loop timing isn't held to 20ms. Granted, I removed a lot from loop() that generally was slow enough to be above 20ms anyway, but the beeping part of the sound and indeed the filters would be more consistent with a constant loop timing.

I propose the following:
Code:
void loop()
{
  Serial.println(millis());
  if (millis() > time) { //loop frequency timer
    time = millis() + 20;
    Serial.print("new time: ");
    Serial.print(time);
    Serial.println(" ");
  }
}
The output is:
Code:
calibration data #1 = 54879
calibration data #2 = 52612
calibration data #3 = 33733
calibration data #4 = 29304
calibration data #5 = 32868
calibration data #6 = 27906
227
new time: 247 
235
239
245
new time: 271 
268
new time: 292 
288
new time: 314 
311
new time: 337 
333
337
new time: 364 
360
364
new time: 390 
387
new time: 413 
409
413
new time: 439 
436
new time: 460 
458
As you can see new time updates are always greater than 20ms, which I believe was likely the intention of that loop timer.

I am surprised of the infrequency of back-to-back millis() reports, meaning to me 20ms loop time is too fast for the poor Arduino Pro Mini at 8MHz. Perhaps the Arduino Nano is fast enough at 16MHz for Rolf's original implementation? The serial.print statements do slow things down...

Dan
danstrider is offline Find More Posts by danstrider
Last edited by danstrider; Dec 30, 2012 at 04:34 PM. Reason: misspelled Rolf
Reply With Quote
Old Jan 01, 2013, 12:58 AM
Bone Breaker
Lammergier's Avatar
Dallas , Texas, United States
Joined Oct 2002
825 Posts
will this work

I have a thermal scout. It looks like it will produce a audiable output. Could that be connected to a piezo speaker and use with a 5.8 tx with a build in microphone to hear the tone and transmit it to the rx on the ground and take the audio out to another piezo speaker? Looks like it could be hard wired into the tx too. The TX RX combo is under $100. if it would work it woud be a deal $$
Lammergier is offline Find More Posts by Lammergier
Last edited by Lammergier; Jan 01, 2013 at 01:27 AM.
Reply With Quote
Old Jan 01, 2013, 11:10 AM
CNC Cutter
birdofplay's Avatar
United States, IN, Indianapolis
Joined Dec 2005
8,530 Posts
Wait a minute !

Don't some of the $30-50 Quad copter boards come WITH sensors ON THEM
all wired up to a "healthy" uProc ?
The ones with gyros AND a Baro chip.

Just change the Code out for the Vario function and Bingo
ship that off to an FM tx module and building, wiring, soldering are very minimal.
Plus it's and single production PCB for reliability.

Not trying to rock the boat just thinking of simpler ways to Skin the cat.

Bob
birdofplay is online now Find More Posts by birdofplay
Reply With Quote
Old Jan 07, 2013, 08:50 PM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
I finally had another chance to shoot some audio of the updates I've been making to the vario. This is still the breakout board version, going over the FrSky at a 30ms timing interval. There are two layers of an HD-4 CRC (0x97), so I'm pretty darn sure real data is getting through the transfer process. The weirdness in the sound I'm very much hoping is simply from pressure being scavenged from multiple odd locations rather than a consistent location on the aircraft.

My custom board run should be in this week sometime and they have the sensor isolated so I can add a cover with a pressure port to better sense a clean pressure. I even have a commercial TEK probe from a Skymelody to try on it. With the new board, I'm also planning to log the pressures and vario signal to see if I can isolate what is causing the spurious sounding beeps.

Without further ado, here's a terrible video meant much more for the audio. It was dusk and I was shooting this video with one hand on the video, one hand on the transmitter, and one hand throwing. Listen. Oh and I got bored and did some stalls and botched my catch just to let you hear some more of the range.

Dan

20130107 170652 (1 min 13 sec)
danstrider is offline Find More Posts by danstrider
Reply With Quote
Old Jan 11, 2013, 03:56 AM
Registered User
France, IdF, Villeparisis
Joined Jul 2003
69 Posts
Hi,

I am making exactly the same project ( arduino and MS ) Thanks for the code who help me a lot at startup.

Unfortunaly and due to an error of drotek.fr where I ordered a MS5611 breakout, I received a MS5607 breakout.
Sensitivity is worth and I must to change pressure calculation.

I am not sure that user data ( tonefreq and CRC ) are always coming in a single frsky user data frame; Take a look at this http://www.rcgroups.com/forums/showa...2&d=1354909857, there is an interresting explain of paquet split/reassembly.
This could perhaps be a start to explain the notch sound.

I also saw that millis() return multiple of 1.024ms.

Peg@se
pegase is offline Find More Posts by pegase
Last edited by pegase; Jan 11, 2013 at 02:02 PM.
Reply With Quote
Old Jan 11, 2013, 07:36 PM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
Quote:
Originally Posted by pegase View Post
I am not sure that user data ( tonefreq and CRC ) are always coming in a single frsky user data frame; Take a look at this http://www.rcgroups.com/forums/showa...2&d=1354909857, there is an interresting explain of paquet split/reassembly.
This could perhaps be a start to explain the notch sound.

I also saw that millis() return multiple of 1.024ms.

Peg@se
That's a great reference for using FrSky, and helps show some of the limitations too. I'm especially interested in the 36ms frame timing; I have not tried longer than 30ms, but might do so to see if throughput is actually improved. I'm not sure that helps explain the glitches though. I throw out packets with the incorrect size or ones that fail my CRC. But the vario's three filtering stages should remove pressure reading glitches, so that really leaves the RF transmission suspect. Open to suggestions.

To be on topic enough to stay in this thread, Rolf just used a separate audio transmitter module and that certainly would remove FrSky from being an issue.

BirdOfPlay, I think what you're suggesting would work and let you/others concentrate on software rather than hardware. The main gotcha is to ensure the pressure sensor is sensitive enough for very small motions. The MS5611 seems to work well. Other threads have looked at other sensors with varied success. Also, using a totally off-the-shelf sensor board might defeat the whole DIY Electronics thing. And a general purpose board wouldn't be as small as a custom one, if that matters to you.

Circling back to my implementation, custom boards based heavily on the Arduino Pro Mini are in, but I have spent almost a week failing to burn the Arduino bootloader onto the ATmega328 (first mistake: Pro Mini uses ATmega328p). No more flights until the bootloader works. ACK.

Dan
danstrider is offline Find More Posts by danstrider
Reply With Quote
Old Jan 12, 2013, 04:56 AM
Registered User
France, IdF, Villeparisis
Joined Jul 2003
69 Posts
where these boards come from ?

I can't recognize telemetry Frsky receiver.

Peg@se
pegase is offline Find More Posts by pegase
Last edited by pegase; Jan 12, 2013 at 05:05 AM.
Reply With Quote
Old Jan 12, 2013, 07:09 AM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
Quote:
Originally Posted by pegase View Post
where these boards come from ?

I can't recognize telemetry Frsky receiver.

Peg@se
A friend helped me with the layout and a board house did the manufacturing. I populated the boards.

That is the FrSky D8R with the right angle telemetry headers removed.

Dan
danstrider is offline Find More Posts by danstrider
Reply With Quote
Old Jan 12, 2013, 07:56 AM
Registered User
Canada, ON, Merrickville-Wolford
Joined Jun 2012
835 Posts
Quote:
Originally Posted by danstrider View Post
A friend helped me with the layout and a board house did the manufacturing. I populated the boards.

That is the FrSky D8R with the right angle telemetry headers removed.

Dan
Cool! Is the pressure sensor on your board too then? I was wondering who you had make them for you too.

thanks,
Andrew
Banjo5 is offline Find More Posts by Banjo5
Reply With Quote
Old Jan 12, 2013, 08:03 AM
Who needs a pilot??
danstrider's Avatar
Alexandria, VA
Joined Jul 2002
1,161 Posts
Quote:
Originally Posted by Banjo5 View Post
Cool! Is the pressure sensor on your board too then? I was wondering who you had make them for you too.

thanks,
Andrew
What you see is the whole kit & kaboodle. The pressure sensor is between the two header rows. Haven't gotten that working yet either because of the stupid bootloader issue.

Another pic attached. Zoom in closely and you can see the MS5611-01BA03 (metal can version) hiding between the header rows.

We used Advanced Circuits for the PCB manufacturing, out of convenience and familiarity. There are a multitude of other board fab options though. Pick your favorite flavor.

Dan
danstrider is offline Find More Posts by danstrider
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Arduino based IR tag module for combat sh4nce Electric Combat 36 Aug 19, 2014 03:21 AM
Mini-HowTo DIY arduino twin video receiver diversity controller. Updates allways in post #1 Richard_s FPV Equipment 144 Jul 13, 2014 11:27 AM
New Product DIY OpenPilot based FlightControl (F4) lilvinz Multirotor Electronics 267 Feb 16, 2014 03:43 AM
Idea DIY Video Diversity with Arduino - Please Review! MayMayDay FPV Talk 2 Sep 23, 2012 12:36 PM
Help! Engineering student and first arduino based build? cad2blender UAV - Unmanned Aerial Vehicles 3 May 17, 2012 07:59 AM