Introduction to the openx vario/altimeter

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

Thanks neilrogers for testing your boards.
I'm using XP pro.
It's posable the sparkfun FTDI board is in trouble or I've still got a wiring issue?
I'm still confused about the config as far as selecting a programmer board. What's being told to me is once the FTDI driver is loaded I don't select a programmer, just a port and the Arduino 328 board. Then to I just tell Arduino to upload and not use a programmer?
Knowing the exact steps would help a lot.
I also will reload the Arduino pgm and it would help to have a link to the one that's working for you as well as the FTDI driver you used so I can replicate tryout setup.

I did rewire to have TXD go to RXD and RXD to go to TXD as suggested my Mike.
I'm teaching RC flying this morning but I'll focus on all this this afternoon and maybe try the USBasp or UNO programmer setup that's been suggested. I have too many puzzle pieces and only one FTDI board.
Any chance you've found a schematic for the deer robot board?
Thanks for your help.

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introduction to the openx vario/altimeter

Post by MikeB »

Have you got a terminal program you can run?
If so, to test the FTDI board, loop its TXD to RXD, run the terminal program connecting to the required COM port, then what you type should echo on the display.

I've got Arduino 1.0.5 installed.
Under file|preferences you could tick
"Enable verbose output during upload" to get more info.
When I just tried to upload without the COM port plugged in to the computer, it failed, but popped up a dialog box saying COM port not found.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Introduction to the openx vario/altimeter

Post by ReSt »

Sometimes, when it fails to upload, I have to replug my USB cable at the PC.
After that it normally works again.

Reinhard
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Introduction to the openx vario/altimeter

Post by Carbo »

I have two of the "Deek Robot" boards running openxvario.

As Mike wote, i would test the FTDI, using Hyperterminal, which comes with XP (Accessories, Communication). Important to set the Flow Comtrol in Hyperterminal to OFF, to do the test with the loop.

In my working setup i have the following connections:

FTDI - Arduino

DTR-DTR
RXD-TXD
TXD-RXD
5V-VCC
CTS-GND
GND-GND

Bernd
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

I just checking in after a good morning of teaching RC flying. It was really good because it was the first time I used my Taranis as the master to a DX6i as the trainer. I never used this mode until today on my Taranis.
We all got some training today.
So now I'm ready to revisit the Arduino project.
So I already swapped the RXD and TXD I had wrong but now I see CTS is going to ground. Mine is floating right now so I'll try that next.
I'll also try hyperterm to verify my FTDI board is ok. I'm sure it's my lack of experience that the issue here. Probably no surprise so I'll own up to it.
Ok, off to the "lab"

User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

ReSt wrote:Sometimes, when it fails to upload, I have to replug my USB cable at the PC.
After that it normally works again.

Reinhard
I'll try that also.
Thanks
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

Still trying.
I tried hyperterm and after grounding CTS I got kheyboard echo on the FTDI board ok.
I checked my wiring and it's like the one Carbo posted.
Attached are the pictures of my board selection and upload choice. The dot is the board selection.
ImageUploadedByTapatalk1383355673.157792.jpg
ImageUploadedByTapatalk1383355705.354664.jpg
My FTDI shows up as com 13.
I get a sync error still as posted before.
I tried a new Arduino board with the same results.
I'm NOT using the programmer upload option and haven't selected a programmer choice. It was said earlier that this is for loading a boot loader. I'm assuming I have one because of the other posts using this board ok.
I will ohm out each connection from the FTDI to the Arduino IC pins as another option but I've done that before.
So my mistakes to date are not having CTS grounded, RXD and TXD not bring flipped.
I do have 5 v from the FTDI going into he Arduino clone and z solid red led and flashing slowly green led.
I'm sure learning a lot of what not to do.
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

I think it just worked? I pushed the arduino board reset button after disconnecting and reconnecting the usb cable and no error this time.
How can I confirm it loaded using the arduino pgm?This stuff is magic!
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

davx wrote:Ok,
Below, the connection diagram:
FTDI Basic | Arduino
DTR ---------- DTR
TXO ---------- RXD
RXI ---------- TXD
5V ---------- VCC
CTS ---------- GND (pull low)
GND ---------- GND

Then you select the good board in the Arduino IDE : Tools/Boards/Arduino ProMini and you choose the COM port corresponding to your FTDI.
That's all !!

Good luck ;)
Thanks for the wiring. I didn't carry the CTS wire through to the Arduino board where it would have connected to ground. I've done that now and I believe not being grounded the CTS holds off the data now that I've read up on it.
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

I ran out of time tonight to check that the vario is actually working now but I'm sure it will so I'm still reading up on it.
What about additional add on features info?

Question about pin 3 out on the Arduino?
The notation mentions additional filtering needed. Has this been documented?
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

Yet another post from me!
It seems to be working most of the time now? Sometimes the green led blinks in repetition and no data out? A reset or power cycles doesn't seem to help. Then it starts working and the green led changes its blink rate as I raise and lower the board. I see the data on my scope as well then. I can't seem to find a connection error but I will go over the boards with my mag scope looking for IC pin soldering trouble?
I wired up the pin for the ppm control and if I disconnect it the green led really blinks and no data.
This is all fact finding right now and I have another set of parts to do another build after I learn on this one.
My soldering is good and the wiring I did is clean!

A few more questions.
I seem to only get get ALT in meters. I have my Taranis set to imperial. When I use another D receiver with the Frsky precision vario I do get feet. Do I need to change the code to reflect feet somehow as I see meters referenced in the printout I did?

In reading the wiki on the vario it has a link to how to setup opentx to use it. It shows a screen with the Frsky hub option. I can't find that screen. The vario is working pretty much but I do have Frsky hubs. Have the hubs been eliminated from opentx or am I just missing the screen showing it?

So many questions I know but I'll probably be the tech local helper in my clubs as more buy or get delivery of a Taranis and ask me these questions.
I'm hoping a few technical types will find me or me them if I get lucky.
davx
Posts: 210
Joined: Sun Sep 15, 2013 7:01 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by davx »

ShowMaster wrote:
davx wrote:Ok,
Below, the connection diagram:
...
Thanks for the wiring. I didn't carry the CTS wire through to the Arduino board where it would have connected to ground. I've done that now and I believe not being grounded the CTS holds off the data now that I've read up on it.
Glad to have helped :)

Unfortunately, I can't do anything for your other problems...

Tchao
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Introduction to the openx vario/altimeter

Post by ReSt »

ShowMaster wrote:
Question about pin 3 out on the Arduino?
The notation mentions additional filtering needed. Has this been documented?
If you downloaded the full svn data then you will have a directory of 'AVR OpenX-Vario Docs'

There is an 'AnalogClimbRate.txt' file and in the subfolder 'images' a lot of pictures that will explain most of it.

Pin3 is only required as an analog output for analog climb rate, if you do not have an rs232 connection.

Reinhard
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Introduction to the openx vario/altimeter

Post by ShowMaster »

Update. I got sidetracked but to date I flashed the file and do get a report from the vario. The Arduino seems to work every time it turns on but I don't always get a alt update, just zero. If I cycle RX power it seems to all start working. My scope shows random data on the Arduino out when it's not working.
I'll come back to it ASAP and have a second setup I can try to maybe narrow it down. Of course all my parts are from the same orders.
At least I've had success with my wiring and programming so that's behind me the next time.
terrag42
Posts: 1
Joined: Sat Nov 09, 2013 5:03 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by terrag42 »

Thanks ShowMaster. I was having the same sync error, but had all the wiring correct. I got the deek_robot board to program by pressing the reset button when it had finished compiling and it was in the middle of its three attempts to sync. This was also accomplished by plugging in the deek_robot board to the FTDI programmer while it was sending the sync attempts.
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Introduction to the openx vario/altimeter

Post by ShowMaster »

terrag42 wrote:Thanks ShowMaster. I was having the same sync error, but had all the wiring correct. I got the deek_robot board to program by pressing the reset button when it had finished compiling and it was in the middle of its three attempts to sync. This was also accomplished by plugging in the deek_robot board to the FTDI programmer while it was sending the sync attempts.
Pretty much my attempts before success.
If I knew what I did correctly I'd do it again the same way? In stead I'll try it all and hopefully get lucky,
As long as it programs we're winners.
hexfet
Posts: 14
Joined: Mon Oct 14, 2013 1:58 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by hexfet »

jhsa wrote:Does that board have pads to solder a ISP Programmer? It looks like it :)
Yes it does. The silkscreen has MOSI and Vcc swapped. If you put the header on top it matches the 6-pin USBasp adaptor. It's a tight fit with the reset switch though. I stuck a header in there without soldering just long enough to program the bootloader.

Thanks to this thread I was able to get my deek_robot boards going. The bootloader wasn't the issue. I started the day with TXD and RXD correct, swapped them mistakenly, then spent the rest of the day convinced something else was the problem. I do have to push the reset each time before uploading, but the timing doesn't seem to matter much. Is that normal for Arduino, or is the DTR reset not working? This is my first time using Arduino. Edit: playing with it some more after powering off and on. The DTR reset seems to be working fine. Clicking upload is all that's required. gremlins...

I'm using an old laptop with Ubuntu and a real serial port. Made a cable using the Maxim MAX3222 5-volt rs-232 chip. Free samples on their website...

Thanks again for the info.
AlanGP
Posts: 27
Joined: Sun Feb 19, 2012 6:51 pm
Country: -
Location: Paderborn, Germany

Re: Introduction to the openx vario/altimeter

Post by AlanGP »

ShowMaster wrote:Well I'm almost ready to power and program mine. I messed up and bought the deek robot Arduino mini pro so the pinouts are a little different and I think the boards miss labeled RXD or 0 ? instead RXI. I bought the sparkfun FTDI programmer and it's pinouts don't match the deek robot board either. A lot of head scratching and googling has got me going I hope. At Least I bought the suggested vaio module!
Here's a pix of my deek robot Arduino board pinout. A4 and A5 are in a different location for starters and no RXI label, it's RXD but goes to the correct IC pin.
ImageUploadedByTapatalk1383167436.203167.jpg
Hi,

I am using the same Deek robot boards on an OpenLRSng TX project. Mine all came without the Arduino boot loader but so far I have them working - they appear largely pin compatible with the classic Pro Mini - with the obvious exception of the double top row. Has anyone worked out what the pins are - the silk screen on all of mine is badly smeared and I can't read them.

Grateful for any help.

AlanGP
Last edited by AlanGP on Mon Nov 18, 2013 9:25 pm, edited 2 times in total.
Anything can be made to fly - wings are just an option
AlanGP
Posts: 27
Joined: Sun Feb 19, 2012 6:51 pm
Country: -
Location: Paderborn, Germany

Re: Introduction to the openx vario/altimeter

Post by AlanGP »

I got some of the detail from ShowMaster's picture but not all. Doesn't look like an ISP programmer port - shame.

Detail for re-flashing the Pro Mini boot loader is: http://arduino.cc/en/Hacking/MiniBootloader
Anything can be made to fly - wings are just an option
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introduction to the openx vario/altimeter

Post by MikeB »

General question, probably for Rainer.
The PPM input signal goes to IO2. Is there a specific reason for this pin to be used?
With the changes I've just done to support the SPort interface, I have timer 1 running freely. It would therefore be possible to use the input capture of timer 1 to obtain very accurate pulse measurement.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Introduction to the openx vario/altimeter

Post by jhsa »

As far as I remember all pins can/could be defined in the config.h..

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
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introduction to the openx vario/altimeter

Post by MikeB »

I did have the PPM pulse measurement NOT included. Having just added it in, I seem to have a MUCH slower response to height changes. Is this due to the fact that the PPM input is changing the filter, or is it caused by the PPM reading code blocking reading of the sensors (or both)?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introduction to the openx vario/altimeter

Post by MikeB »

I've got a change to the way the PPM input pulse is measured. This only works currently with the change I have made to the serial port as it relies on timer 1 free running at full speed.

Basically, the pin used for PPM input is also the INT0 pin, so we can get an interrupt when it changes. In the interrupt, I just read the timer1 count for each of the edges, then find the difference to get the pulse width.

This is much better than using the Arduino pulse measurement as that waits for the pulse to occur, or 20mS, during which time nothing else happens.

Here is the patch file for the changes I've already done, with this change added as well.
oxspatch2.patch
(26.02 KiB) Downloaded 306 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: Introduction to the openx vario/altimeter

Post by bob195558 »

:D
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Introduction to the openx vario/altimeter

Post by Carbo »

Hi Mike,

i get an error patching the openxsensor files (win XP). Any hints for that?

patching file oxs_out_frsky.cpp
missing header for unified diff at line 168 of patch
can't find file to patch at input line 168
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|===============================================================================
=========== Send Frame 1B via serial
| void OXS_OUT_FRSKY::SendFrame1B(){
--------------------------

Bernd
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introduction to the openx vario/altimeter

Post by MikeB »

I'm using svn diff to get the file, it doesn't seem to have a -p or -strip option (at least not the version I have!). It is quite an old version, I may need to update it.
The problem may be to do with the line of ============= in the source file as the diff file has a similar line above each different file to patch.
perhaps just change the line:
//============================================================================================================== Send Frame 1B via serial
to:
// Send Frame 1B via serial
in both the source file and the diff file and see if that works.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
NeilRogers
Posts: 87
Joined: Sat Jun 22, 2013 2:12 pm
Country: United Kingdom
Location: Wiltshire

Re: Introduction to the openx vario/altimeter

Post by NeilRogers »

Thanks Mike,

I've integrated the patch2 and I'm getting a continuous flow of Vspd & Alt, hopefully test live tomorrow weather permitting.

Cheers neil
ironstone
Posts: 4
Joined: Mon Apr 02, 2012 10:50 pm
Country: -

Re: Introduction to the openx vario/altimeter

Post by ironstone »

can i substitute the 328 pro mini with a Leonardo Pro Micro ATmega32U4 ? someone knows ?
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Introduction to the openx vario/altimeter

Post by kaos »

Well, I have put off this project TOO LONG. expecially after the er9x/ersky9x started to support it.
I got the pro mini, FTID in hand. I only need to get a sensor board.
The cheapest GY63 board I found: http://www.aliexpress.com/item/Free-Shi ... 20056.html

But I am also looking at this: http://www.ebay.com/itm/310625639429?ss ... 1438.l2649
I know this project is limited to vario, but the price is only 6.00 different. So I have two questions here:
1. Can I just use the ebay 10DOF board and just use the SDA, SCL, 5V, GND to make the openXvario and ignore the other two sensor with the exiting code in wiki for now, and later if there are more coded added for the other two sensor would be easy to 'upgrade'?

If this is OK, I might as well get the 10DOF board and just use the vario for now.

2. or there are already open source projects already done to get all 3 sensors data for Frysky Rx?
mpjf01
Posts: 367
Joined: Thu Jul 26, 2012 3:07 am
Country: -
Location: Adelaide, Australia

Re: Introduction to the openx vario/altimeter

Post by mpjf01 »

I have been using this GY63 sensor, works fine

http://www.ebay.com.au/itm/350699129242 ... 1439.l2649

Post Reply

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