openXsensor slimsize GPS Vario for DLG and F5J

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

This is my latest oXs GPS Vario setup in arduino pro mini size (35x17x10.5mm).

Material: Arduino pro mini 328 5V 16MHz, GY-63 baro, Beitian BN180 GPS/Glonass/Galileo, resistor 8-10k

- flash oXs sketch, solder SPort connection
01.jpg
- remove reset button, prepare SDA, SCL, GND
02.jpg
- put GPS in place using foam and the correct coloured connector (there are two different), take care to isolate the 8-10k resistor on D6
04.jpg
- connect GPS RX to resistor, do not forget a piece of heatshrink and connect GPS TX to Arduino RX
05.jpg
- prepare and solder powersupply and SDA SCL to GY-63
06.jpg
07.jpg
- time to cleanup and to add some foam between Ardu and GY-63. Also some filter tissue (swiffer) on MS5611 to to ensure air permeability
09.jpg
- low weight and 1s capability - it works down to 3.0V :o supplied over VCC. But do not exceed 5.5V, or use RAW for 5 - 10V power supply.
11.jpg
The sketch is prepared for 5Hz GPS, Vario with adjustable sensitivity over LUA script (but default 50 is OK for most usecases). T1 transmits PWM value generated from SPort LUA script, T2 transmits vario sensitivity. I'm always astonished about the performance, it is imo the best GPS and vario available, again a big "thank you" to mstrens and the other contributors.
Edit: the sketch is in post #4 now.
Last edited by Carbo on Thu Feb 06, 2020 8:05 am, edited 1 time in total.

Weds
Posts: 27
Joined: Mon Jan 02, 2012 4:30 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Weds »

Nice installation... Never thought to remove the reset button, that always gets in the way when trying to put boards on top of one another.
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Good morning Carbo
Would you have the hardware connexion schematics ? I think you use custom input ports (2 instead of 4 ? or am I wrong) so a global mapping would be very useful.
Thanks a lot.
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Billy60 wrote: Wed May 29, 2019 7:48 amWould you have the hardware connexion schematics ?
Sorry, but everythimg is pretty much standard.
GND --> RX GND
RAW --> RX VCC (5-10V)
or VCC --> RX VCC (<5,5V only!)
D4 --> RX SPort

D6 --> 8-10k --> GPS RX
RX --> GPS TX
VCC --> VCC
GND --> GND

A4 (SDA) --> GY63 SDA
A5 (SCL) --> GY63 SCL
VCC --> VCC
GND --> GND

The sketch from post #1 sometimes locked up after several minutes operation. Here is a sketch with debug disabled, which solved the issue. Keep in mind to disconnect GPS, when Arduino is connected to FTDI for flashing.
Attachments
openXsensor.zip
(339.15 KiB) Downloaded 811 times
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Thank you very much.
Have a good day !

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

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

A few days ago mstrens added Galileo and SBAS support to GPS configuration. It seems to be even more precise now. I have tried to walk an "OXS" and a checkbox pattern on a small (4m) street. Downloaded the latest master and pasted the config-files from this thread.
Galileo_FBAS.png
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Here is another sketch with mstrens latest changes (Galileo and SBAS). Vario sensitivity can be increased using oxsppm.lua.

The sketch has also some changes to transmit number of satellites and HDOP (or is it PDOP? I'm not sure.)
#define ACCX_SOURCE TEST_1 // NumSat
#define ACCY_SOURCE TEST_2 // HDOP

I've made some changes to ACCX to get NumSat as integer:
NumSat.png
(3.76 KiB) Not downloaded yet
openXsensor.zip
(309.31 KiB) Downloaded 621 times
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Good afternoon Carb
You are connecting GPS RX pin to D6, What changes are they in the main sketch then ? It should be declared somewhere I suppose
I could not find what had changed in the ino
Thanks
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Hi, D6 is kind of "hardcoded" for us users in oXs_gps.cpp. No need to specify it explicitely. All user configurations can be done in oXs_config_basic.h and oXs_config_advanced.h. Mstrens wrote detailed instructions in oXs_config_description.h

Everything should work out of the box. Place GPS outside with free view to the sky and after a few minutes do a sensor search. oXs waits for a good fix, until sensors are exposed to SPort and can be found with "discover sensors". This approach is different to FrSky GPS, which shows sensors immediately, but with no data. Usually it takes about 1-2 min with recent GPS modules.

If it does not work, which GPS module do you use (link)?

Edit: Forgot to mention, if the configured vario does not work, oXs will not find GPS, because it panics to find the vario on i2c bus. Vario has to work in first place.
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Thanks a lot
I will try it later. I am finishing to assemble it and was waiting for your answer to go along.
I'll keep yu posted.
Thanks for all that support !
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Hi Carbo
Well, little success.
First, lots of trouble to get the USB Serial CH340 board to work on my Mac (10.9), not working and even crashing the Mac !
So I tried to use another one, with a PL1303. Installation was ok.

First remark : on a W7 PC I get compilation errors (division by 0 ) but not on the Mac.
I try to download and I now get a "board not reponding" message.
It doe not come from the sketch.
Which bootloader should I use ?
I use 'Arduino as ISP', is it a wrong one ?
I fear trying them all, would hate to hurt something ...
Thanks for your advise
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

"sketch\oXs_curr.cpp:55:91: warning: division by zero [-Wdiv-by-zero]" is only a warning, you can ignore it (or switch warnings off in Arduino IDE).

Please do not overthink it, there are only 4 steps to do in Arduino IDE: board, processor, port, ---> (click right arrow). You should see "upload completed" in the left bottom corner of the IDE window. Otherwise please post your error messages.

Good luck :)
IDE.png
Billy60
Posts: 44
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 »

Thanks, ok
I think I killed one my prominis, I could upload easily on another.
I will now tranfer the hardware MS baro and GPS boards and see.
Thanks again, keep you posted;
Have a good day
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Here is a version with some changes to work with a nice Android app named "iNav SmartPort telemetry viewer and logger". It shows plane and pilot position and can also transmit actual positions of other planes if selected. T1 triggers armed state and T2 triggers GPSfix and transmits number of sats.
https://github.com/CrazyDude1994/androi ... -telemetry
Besenstiel_iNav_format.zip
(311.98 KiB) Downloaded 396 times
User avatar
Hobby4Life
Posts: 11
Joined: Tue Oct 01, 2019 6:11 pm
Country: -
Contact:

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Hobby4Life »

Carbo wrote: Sun Jun 02, 2019 9:15 am Here is another sketch with mstrens latest changes (Galileo and SBAS). Vario sensitivity can be increased using oxsppm.lua.

The sketch has also some changes to transmit number of satellites and HDOP (or is it PDOP? I'm not sure.)
#define ACCX_SOURCE TEST_1 // NumSat
#define ACCY_SOURCE TEST_2 // HDOP

I've made some changes to ACCX to get NumSat as integer:
NumSat.png

openXsensor.zip
What did you changed to get TEST_1 and TEST_2 getting Satellite status and HDOP?
Gr. Björn
www.hobby4Life.nl
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Here is a summary: https://openrcforums.com/forum/viewtopi ... 22#p146828
But mstrens latest oXs release has the changes by default "add num of sat and hdop as test1/2"
Astro
Posts: 5
Joined: Thu Oct 04, 2018 5:12 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Astro »

I'm following your guide for vario and GPS but it doesn't work fine for me.

All my problems are with GPS.

Vario is working.

When I discover sensors only shows alt and vspd.

I've been waiting with gps sensor outdoors for 10 minutes but It doesn't appear.

I've tested u-blox gps with ucenter and its working fine at 9600 bauds 1Hz.

Im using opentx 3.3.2 in horus x10s with u-blox 7 GPS and FrSky receiver D8.

Can you help me? I'm lost at all.

Thank in advance.
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Everything sounds good. I can think of 2 causes. RX and TX swapped, been there, done that. And a GPS issue (configuration for oXs fails). Beitian GPS work very well, probably it is a good idea to buy a 10$ BN180 or BN220 to crosscheck.
djatila666
Posts: 4
Joined: Mon Feb 25, 2019 10:03 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by djatila666 »

Thank you for your answer,

I've bought a new GPS and waiting for it to arrive.
I've tried to change the speed of my GPS with UCenter and I haven't found a way of getting that to work. It seems to be at 9600 by default and it's impossible to change that apparently.
Although I know 9600 bauds is not optimal for flight, is there any way to change OpenXsensor baud rate to 9600 just to check if everything I did to set it up is done correctly? Otherwise, I'd just wait for my new GPS to arrive.
Thank you again.
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

I'm only the practical man, but as far as I understand the code the GPS is set not only to a faster baudrate, but also the output format is changed from nmea to UBX in oXs_gps.cpp.

Code: Select all

   0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0x96, //        CFG-PRT : Set port to output only UBX (so deactivate NMEA msg) and set baud = 38400.
UART baudrate setup is in openXsensor.ino

Code: Select all

//******************************************* Setup () *******************************************************

void setup(){
// set up the UART speed (38400 if GPS installed else 115200)
#ifdef GPS_INSTALLED
  Serial.begin(38400); // when GPS is used, baudrate is reduced because main loop must have the time to read the received char.
#endif
You can try to change output format to UBX in ucenter and change UART speed to 9600 in openXsensor.ino.
Good luck :)
Astro
Posts: 5
Joined: Thu Oct 04, 2018 5:12 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Astro »

Hi, I bought a BN180.
it works perfect !

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

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Thanks for your feedback! We had just a little issue in our german forum, where the vario was activated in the sketch, but not connected. In this case openXsensor does not find the GPS. If no MS5611 is connected, it must be disabled //#define FIRST_BARO_SENSOR_USE MS5611
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Endorphin »

Nice work, thanks for the thread.
I have some bits in stock might suit. I have a BMP280 and a BP 180. Will one of them suit this circuit?
Also, will an Arduino Nano be ok for this?

If not, I will order some parts that you list.

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

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

Yep. Nano should work and your BMP's also. But as it seems, with less accuracy compared to MS5611. You only have to change MS5611 in this line in oXs_config_basic.h:

Code: Select all

// --------- 4 - Vario settings ---------
// ***** 4.1 - Connecting 1 or 2 barometric sensor(s)  ***** 
#define FIRST_BARO_SENSOR_USE   MS5611       // select between NO_BARO , MS5611, GY86 , BMP085 , BMP180 , GY87,  BMP280  
Some (or all?) BMP sensors are suited for 3.3V power supply only.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Endorphin »

Carbo wrote: Fri Jan 03, 2020 11:40 am Yep. Nano should work and your BMP's also.............................

Some (or all?) BMP sensors are suited for 3.3V power supply only.
That's good Carbo, thanks for the reply. I seem to recall the 3.3 volt limit for the BMP. I will check and make sure I don't over power it.
I will get on with making one soon.

Edit: I just looked at one of my arduino nano boards; they do have a 3.3 volt tab. All good.

Jim.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Endorphin »

What kind of plug does the socket on the Beitian BN180 GPS/Glonass take?
I need to decide to order one at the same time as the sensor, or not.
Is it a special?

Even if it is, can I remove the socket and solder the leads?
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo »

No need to order anything additionally. BN180 comes with 2 readymade cables. For every future flashing you have to unplug the GPS. Thus I would not solder the leads.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Endorphin »

Thanks Carbo!
PeterB
Posts: 27
Joined: Tue Jan 07, 2020 6:40 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by PeterB »

For info. I’ve put together one of these sensors using a 3.3v 8MHz Arduino Mini Pro to avoid the need for any resistor on the BN180 receiver input. I normally run gliders from 4.8v NiMh power rather than 6v or more.
Seems to work ok, although acquiring a GPS fix sometimes takes a while, but this may be normal for the BN180.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Will this work with "D" series receivers?

Post by Endorphin »

Is this unit compatible with "D" series receivers?
Or will it only function via an Sbus system?
I see that Astro asks a similar question below.

Jim.
Astro wrote: Sun Dec 01, 2019 9:45 pm............................
Im using opentx 3.3.2 in horus x10s with u-blox 7 GPS and FrSky receiver D8.

Post Reply

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