New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: New beta version of openXsensor (=openXvario)

Post by kalle123 »

Michel, let me ask you.
The SX1276 module in oXs is in listening mode: it sent data only when it receives a request from the "locator receiver"
How is that 'request' triggered? By powering on the 'locator receiver'?

br KH

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

oXs is listening periodically to a signal coming from the "locator receiver".
when it get one signal, it sent a reply (with some data like GPS location and strength of received signal).

It replies only when he get a request.
locator receiver sent a request on regular basis (I would have to ckeck the code to find back the frequency) and wait for a reply from oXS.
Both modules are not sending simultanously. So the same frequence can be used by both (even if it is not required)
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: New beta version of openXsensor (=openXvario)

Post by kalle123 »

Ordered 2 modules and will do some testing. But shipping is from China .....
So I have to wait a bit. ;)

PS. The Configurator also works on Linux mint 19.2 (and this distro ships definitely with python 3.6)
rmd4u
Posts: 16
Joined: Sun Dec 22, 2019 9:14 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by rmd4u »

Hello mstrens,

i have rebuilt the locator. unfortunately i get no display on (OLED 128X64 I2C SSD1306)
My components
2x Ardu 328p 3V3 8Mhz;
2x SX1276/RFM95;
1x GPS
1x OLED 128X64 I2C SSD1306;
and 2x external power supply 3V3, 150mA;
The display was tested by me with another scetchand works.

In "oXs_config_basic.h" #define A_LOCATOR_IS_CONNECTED YES is enabled and the receiver flashed with locator_receiver.

The display was tested by me with another sketch and works.
At the oXs, the NSS(10) and MOSI(11) are permanently 3V3. MISO(12) and SDK(13) are on 0V.
Approximately every 60 seconds I have signals on all pins from 10-13 for a short time. Apparently the oXs is searching here.

On the receiver, there are always signals on all pins, from 10-13, but the display remains dark.

Mstrens writes in the oXs_config_description.h, that the frequency can be set in the oXs_config_advanced.h
or in the locator-receiver sketch. I did not find this option. Now I'm not sure if it's the sketch or one or both of the SX1276/RFM95 modules that prevent me from connecting.
oxs_sensor.png
Locator_Empfaenger_U.png
Locator_Empfaenger.jpg
thanks for reply
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Check the i2c address of the OLED display. For the 128x64 I think you have to modify the library. It has the i2c address set for the 128x32 as default as far as I know

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

rmd4u
Posts: 16
Joined: Sun Dec 22, 2019 9:14 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by rmd4u »

Thanks for the answer,
the I2C address of the OLCD is the same for both versions
#define I2C_ADDRESS 0x3C
That's not the problem.
Here again the pictures
RX Top
RX Top
RX Bottom
RX Bottom
oTx Bottom
oTx Bottom
Robert
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

It seems that I made a mistake in the version I loaded on github.
All the code to handle the display is set as comment.

I will chek and provided a new version on github.
Sory for the mistake. You are probably the first one to try this project.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: RE: Re: New beta version of openXsensor (=openXvario)

Post by jhsa »


rmd4u wrote:Thanks for the answer,
the I2C address of the OLCD is the same for both versions
#define I2C_ADDRESS 0x3C
That's not the problem.
Well I have just finished a project using the 128x32, and when doing my research I have read that for the 128x64 we need to modify the library, and select rhis display.
I assume you are using the adafruit SSD1306 library of course.

I did have a problem with my smaller display that I bought from China. In fact both blue displays had the same problem. They would turn on only the second time I powered the complete board. It turns out they had two of the resistors swapped, and a wrong capacitor value (far.too high) on the reset line. Monday job I guess :)
Repaired them and now they work as they should. ;)

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I hope I found back the correct version of the locator receiver.
I made an update on github.
Please try with this version and let me know if it is correct or not.
rmd4u
Posts: 16
Joined: Sun Dec 22, 2019 9:14 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by rmd4u »

Perfect, now the locator works :-)
Thanks mstrens
fixless_locator_tx.png
TX.jpg
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

Please note that I did not make many tests with this feature.
If you find some bug or if you want some improvements, let me know.

Currently you can't change the frequency in the config but you can do it in the file (oXs_)lora.cpp
Here
#define TX_FRF_MSB 0xC0 // F / 32E6 * 256 * 256 * 8
#define TX_FRF_MID 0x00
#define TX_FRF_LSB 0x00

#define RX_FRF_MSB 0xC0
#define RX_FRF_MID 0x00
#define RX_FRF_LSB 0x00

The frequency is defined on 3 bytes. Uou can see the datasheet of the module for more info.
It is evident that the sender frequency on one device must be equal to the receiver frequency on the other device.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

What library did you use for the display?

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

The library files are copied into the sketch. So no need to upload the library.
You can see the library in the code (see "#include" instruction)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Ok, thanks.. Merry Xmas all... :)

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
midelic
Posts: 128
Joined: Mon Dec 23, 2013 9:57 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by midelic »

Hi ,
I tried the compile the new oxs code with config file generated by the new configurator, and I get an error.

**********************************************************************
openXsensor:92: error: #error When AN_ADS1115_IS_CONNECTED is set on YES, ADS_MEASURE (in oXs_config_advanced.h) must be uncommented and contains 4 values

#error When AN_ADS1115_IS_CONNECTED is set on YES, ADS_MEASURE (in oXs_config_advanced.h) must be uncommented and contains 4 values

^

openXsensor:98: error: #error When ARDUINO_MEASURES_A_CURRENT is set on YES, PIN_CURRENTSENSOR must be uncommented and must specify the analog pin that is connected to the current sensor

#error When ARDUINO_MEASURES_A_CURRENT is set on YES, PIN_CURRENTSENSOR must be uncommented and must specify the analog pin that is connected to the current sensor

^
****************************
My config basic
has
#define ARDUINO_MEASURES_A_CURRENT NO
#define AN_ADS1115_IS_CONNECTED NO


I did not selected any current sensor or ADS1115 in configurator.
so should not be an issue
I think there is bug in lines 91 and 97 on openXsensor.ino
#if defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES) && (!defined(ADS_MEASURE))
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES) && (!defined(PIN_CURRENTSENSOR))

which shows that are defined to trigger the error,though i did not selected them in configurator.
rdeanchurch
Posts: 750
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: New beta version of openXsensor (=openXvario)

Post by rdeanchurch »

Can you please post the URL to github for OpenXsensor.

TIA

(Maybe put it in post 1 so it would be easy to find for new folks.)
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1
User avatar
midelic
Posts: 128
Joined: Mon Dec 23, 2013 9:57 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by midelic »

rdeanchurch
Posts: 750
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: New beta version of openXsensor (=openXvario)

Post by rdeanchurch »

Thank you very much
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: New beta version of openXsensor (=openXvario)

Post by Carbo »

midelic wrote: Sat Jan 04, 2020 1:56 am Hi ,
I tried the compile the new oxs code with config file generated by the new configurator, and I get an error.
Hi,
this is a question for mstrens - it seems he is making holidays ;)

When I edit the config files manually, there is no error with the actual master. Probably a configurator issue. Can you publish your config files, to see the configurator output?
User avatar
midelic
Posts: 128
Joined: Mon Dec 23, 2013 9:57 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by midelic »

Yes the configurator output files should not define something that is not selected.
that is one problem.

But I think
those 2 lines are confusing
#if defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES)
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES)

In config basic
you have
****************************************************
#define ARDUINO_MEASURES_A_CURRENT NO // select between YES , NO

// ***** 6.6 - Ads1115 parameters ***** see oXs_config_advanced.h for additional parameters when AN_ADS1115_IS_CONNECTED is YES
#define AN_ADS1115_IS_CONNECTED NO // select between YES , NO
****************************************************
so you have to define them anyway.

If I comment those lines manually the arduino is passing over that error.
Attachments
oXs_config_basic.h
(642 Bytes) Downloaded 305 times
oXs_config_advanced.h
(891 Bytes) Downloaded 291 times
myconfig_diyoxs.ini
my configurator config file
(2.76 KiB) Downloaded 300 times
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: New beta version of openXsensor (=openXvario)

Post by Carbo »

midelic wrote: Sat Jan 04, 2020 11:51 am But I think
those 2 lines are confusing
Every line of the code confuses me, sorry (but not because of the code ;)). I've attached manually edited config files. Reference voltage changed to 3300mV and the second baro sensor in oXs_config_advanced deactivated (only, because it is very unusual to have a second one). It compiles fine, but I have no clue, why the autogenerated files do not compile - this is a question for mstrens.
Attachments
oXs_config.zip
(8.05 KiB) Downloaded 290 times
Last edited by Carbo on Sat Jan 04, 2020 4:52 pm, edited 1 time in total.
User avatar
midelic
Posts: 128
Joined: Mon Dec 23, 2013 9:57 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by midelic »

Yes if you manually modify the config files it compiles ok.
The auto-generated config files from configuration are causing problem
Last edited by midelic on Sat Jan 04, 2020 8:01 pm, edited 1 time in total.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

Thanks for the feedback.
When I have time, I will fix the bug in the generator.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I just put on github a new version of openXsensor.
This version is supposed to accept the files generated by the configurator program.

I still noticed that the VOLTAGE_REFERENCE value in the file was in Volt with a decimal (3.3). it must be in mVolt and not in Volt (so e.g. 3300 and not 3.3). I did not checked if the wrong value was generated by the configurator or not.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

I have firmware available for FrSky D8 receivers that allows them to operate in D16 mode. This includes supporting SPort telemetry using the serial port on the D8 receiver, with the Tx and Rx signals combined using either a diode or a transistor on the Tx line.
However, the positive going voltage in this mode is only about 2.7V, which is not enough for a M328 running from 5V. FrSky sensors work OK as they have a transistor on the input that only needs around 1V positive voltage.
The M328 has an analog comparator that should be able to detect a positive voltage of 1.1V (bandgap). So do we think we could change the SPort pin to PD7 (AIN1) and use the analog comparator interrupt and state for the SPort input signal?

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: New beta version of openXsensor (=openXvario)

Post by MikeB »

I have the changes tested to use PD7 as the SPort signal, using the analog comparator as the input detector. What is the best/easiest way to get these added?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: New beta version of openXsensor (=openXvario)

Post by jtaylor »

I hope this will be an option with default to old pin so as to not break compatibility with all the existing sensors and all the old drawings and information. I would hate to have to rewire a sensor just to make a program change (or try to remember to change my config file).

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

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Absolutely, the existing code has the option of IO2 or IO4 in the config file, this change just allows IO7 as well. If IO7 is selected, then the analog comparator is automatically used.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: New beta version of openXsensor (=openXvario)

Post by jtaylor »

Sounds good Mike. I'm still running a Taranis so haven't tried your receiver code yet but probably will if I upgrade to a Access transmitter. I'm using some of your other code though so thank you for all you do for the community.

Jim
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

MikeB wrote: Sat May 02, 2020 1:51 pm I have the changes tested to use PD7 as the SPort signal, using the analog comparator as the input detector. What is the best/easiest way to get these added?

Mike
Mike, I presume this change is mainly (only) in oXs_out_frsky.cpp.

You can send me the file(s) that you modified and I will integrate them in my version that I will put on Github afterwards.

I have just a version prepared in order to support a new type of airspeed sensor. So I have to merge the 2 set of changes.

You can put the files here or provide me a link to the files.

Thanks in advance.

Post Reply

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