openXsensor slimsize GPS Vario for DLG and F5J
Moderator: rainer
openXsensor slimsize GPS Vario for DLG and F5J
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 - remove reset button, prepare SDA, SCL, GND - 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 - connect GPS RX to resistor, do not forget a piece of heatshrink and connect GPS TX to Arduino RX - prepare and solder powersupply and SDA SCL to GY-63 - 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 - low weight and 1s capability - it works down to 3.0V supplied over VCC. But do not exceed 5.5V, or use RAW for 5 - 10V power supply. 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.
Material: Arduino pro mini 328 5V 16MHz, GY-63 baro, Beitian BN180 GPS/Glonass/Galileo, resistor 8-10k
- flash oXs sketch, solder SPort connection - remove reset button, prepare SDA, SCL, GND - 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 - connect GPS RX to resistor, do not forget a piece of heatshrink and connect GPS TX to Arduino RX - prepare and solder powersupply and SDA SCL to GY-63 - 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 - low weight and 1s capability - it works down to 3.0V supplied over VCC. But do not exceed 5.5V, or use RAW for 5 - 10V power supply. 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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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 825 times
Re: openXsensor slimsize GPS Vario for DLG and F5J
Thank you very much.
Have a good day !
Have a good day !
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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:
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:
Re: openXsensor slimsize GPS Vario for DLG and F5J
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
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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 !
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 !
Re: openXsensor slimsize GPS Vario for DLG and F5J
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
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
"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
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
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
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
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
https://github.com/CrazyDude1994/androi ... -telemetry
- Hobby4Life
- Posts: 11
- Joined: Tue Oct 01, 2019 6:11 pm
- Country: -
- Contact:
Re: openXsensor slimsize GPS Vario for DLG and F5J
What did you changed to get TEST_1 and TEST_2 getting Satellite status and HDOP?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
Gr. Björn
www.hobby4Life.nl
www.hobby4Life.nl
Re: openXsensor slimsize GPS Vario for DLG and F5J
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"
But mstrens latest oXs release has the changes by default "add num of sat and hdop as test1/2"
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
-
- Posts: 4
- Joined: Mon Feb 25, 2019 10:03 pm
- Country: -
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
UART baudrate setup is in openXsensor.ino
You can try to change output format to UBX in ucenter and change UART speed to 9600 in openXsensor.ino.
Good luck
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.
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
Good luck
Re: openXsensor slimsize GPS Vario for DLG and F5J
Hi, I bought a BN180.
it works perfect !
Thanks
it works perfect !
Thanks
Re: openXsensor slimsize GPS Vario for DLG and F5J
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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:
Some (or all?) BMP sensors are suited for 3.3V power supply only.
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
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
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?
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?
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
Re: openXsensor slimsize GPS Vario for DLG and F5J
Thanks Carbo!
Re: openXsensor slimsize GPS Vario for DLG and F5J
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.
Seems to work ok, although acquiring a GPS fix sometimes takes a while, but this may be normal for the BN180.