Page 17 of 18

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Nov 04, 2019 9:25 am
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

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Nov 04, 2019 10:04 am
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)

Re: New beta version of openXsensor (=openXvario)

Posted: Wed Nov 06, 2019 10:30 am
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)

Re: New beta version of openXsensor (=openXvario)

Posted: Sun Dec 22, 2019 10:03 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sun Dec 22, 2019 10:42 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 8:18 am
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
Locator_Empfaenger.jpg
RX Top
Locator_Empfaenger_U.png
RX Bottom
oxs_sensor.png
oTx Bottom
Robert

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 8:45 am
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.

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

Posted: Mon Dec 23, 2019 11:31 am
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



Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 2:04 pm
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 3:37 pm
by rmd4u
Perfect, now the locator works :-)
Thanks mstrens
fixless_locator_tx.png
TX.jpg

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 4:16 pm
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 4:37 pm
by jhsa
What library did you use for the display?

João

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 5:06 pm
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)

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Dec 23, 2019 7:12 pm
by jhsa
Ok, thanks.. Merry Xmas all... :)

João

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 1:56 am
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 2:19 am
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.)

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 2:26 am
by midelic

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 3:01 am
by rdeanchurch
Thank you very much

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 11:21 am
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?

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 11:51 am
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 12:50 pm
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 4:41 pm
by midelic
Yes if you manually modify the config files it compiles ok.
The auto-generated config files from configuration are causing problem

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 04, 2020 5:05 pm
by mstrens
Thanks for the feedback.
When I have time, I will fix the bug in the generator.

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Jan 18, 2020 11:22 am
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Tue Mar 24, 2020 12:13 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sat May 02, 2020 1:51 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sat May 02, 2020 11:02 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sat May 02, 2020 11:17 pm
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sun May 03, 2020 12:01 am
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sun May 03, 2020 7:16 am
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.