openXsensor slimsize GPS Vario for DLG and F5J

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

openXsensor slimsize GPS Vario for DLG and F5J

Post by Carbo » Thu Mar 28, 2019 11:16 am

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.
openXsensor.zip
(339.15 KiB) Downloaded 79 times


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

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Weds » Sat May 25, 2019 5:04 am

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: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Wed May 29, 2019 7:48 am

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: 385
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 » Wed May 29, 2019 8:38 am

Billy60 wrote:
Wed May 29, 2019 7:48 am
Would 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 58 times

Billy60
Posts: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Fri May 31, 2019 6:31 am

Thank you very much.
Have a good day !


Carbo
Posts: 385
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 » Sat Jun 01, 2019 11:37 am

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: 385
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 » 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
(3.76 KiB) Not downloaded yet
openXsensor.zip
(309.31 KiB) Downloaded 83 times

Billy60
Posts: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Mon Jun 03, 2019 2:36 pm

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: 385
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 » Mon Jun 03, 2019 3:22 pm

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: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Mon Jun 03, 2019 4:25 pm

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: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Sun Jun 09, 2019 8:09 am

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: 385
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 » Sun Jun 09, 2019 8:45 am

"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: 29
Joined: Sun May 26, 2019 8:09 am
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Billy60 » Sun Jun 09, 2019 12:54 pm

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: 385
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 » Sun Aug 18, 2019 4:36 pm

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 34 times

Hobby4Life
Posts: 2
Joined: Tue Oct 01, 2019 6:11 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Hobby4Life » Wed Nov 27, 2019 7:22 pm

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?

Carbo
Posts: 385
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 » Wed Nov 27, 2019 9:32 pm

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: 4
Joined: Thu Oct 04, 2018 5:12 pm
Country: -

Re: openXsensor slimsize GPS Vario for DLG and F5J

Post by Astro » Sun Dec 01, 2019 9:45 pm

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: 385
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 » Mon Dec 02, 2019 1:21 pm

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 » Mon Dec 02, 2019 8:26 pm

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: 385
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 » Mon Dec 02, 2019 9:04 pm

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 :)


Post Reply

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