New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Following some testing with João, I've been led to this define:
#define MSEC_PER_BYTE 4
in oxs_out_frsky.cpp.

Using this value is very close to the limit that a perfect RF link can handle. If any telemetry frames over the RF link need to be retransmitted, then using this data rate from the OXS can easily cause an overrun at the receiver input, resulting in corrupted data.

I would suggest never going below a value of 6, to allow for this.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

MikeB wrote:Following some testing with João, I've been led to this define:
#define MSEC_PER_BYTE 4
in oxs_out_frsky.cpp.

Using this value is very close to the limit that a perfect RF link can handle. If any telemetry frames over the RF link need to be retransmitted, then using this data rate from the OXS can easily cause an overrun at the receiver input, resulting in corrupted data.

I would suggest never going below a value of 6, to allow for this.

Mike.
Thanks Mike.
I added this parameter because someone was asking for a higher data rate and so I reduced the value from 7 to 4.
It seemed that it worked but perhaps only when there was a good rf link.
In next version, I will put the value again on 6.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Where is openXsensor on Github these days?
I've found one that is 7 months since a last commit. Is it that is the latest release and the beta code is just on this thread?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

The latest "official" version is V7 and is in the branch master on github (7 months old).
I have on my pc a beta version 8. It support Jeti telemetry protocol, extra ADC (ADS1115) for better accuracy.
I did not tests 100% of extra ADC and I would have to add the possibility to send new ADC data in more fields and protocols.
If you want it, I can put it here or create a new branch on github
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 »

Maybe a branch called "Next"'' ?? You would probably have more people testing..
And if something happens to your PC you wouldn't lose your work :) ;)

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
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Thanks, I just needed to check the master branch was the latest I needed.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
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 »

Been working on this :) Nothing professional of course and it is quite big I think. But I can't make it smaller as I will try to etch the PCBs myself and will have to solder wires in the vias to join tracks on both sides of the board, therefore I couldn't place any via under the chip or under the MS5611.
A0, A1, A2 and A3 have the pads to solder the voltage divider's resistors. So, I can read 4 cells. I don't think the voltage reading is accurate beyond 3 or 4 cells anyway. All the pins are made available, and Pin 8 will also be used to program the oXs. I have one working this way already, and it works.. Anyway, just thought I'd share this..
If required, will share the eagle files after I built one..

João
Attachments
PCB_Test.png
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
cdauv
Posts: 2
Joined: Fri Dec 09, 2016 4:01 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by cdauv »

Hi

Great job

I am very interesting

Christophe


Envoyé de mon iPhone en utilisant Tapatalk
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, the good news is, the boards work :)
The bad news, they are bigger than I thought they would be.. :( Oh well :)
The problem is that I brought all the pins to pads. And that needs space. The good thing is, I can connect anything I want. If I use the LED sequencer, then the board is not so big anymore..
Here are a couple pictures.

João
Attachments
Pic_2.png
Pic_1.png
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
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder »

Nice job Joao

It is nice to have everything on one little board sometimes. I did something similar except I didn't want to attach a GY-63 so I put the sensor on my board as well. I got fed up with etching boards and making my own vias years ago though so I send them out.
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 »

I like the doing myself thing. For me it is still a challenge to make double sided boards and line both sides up 100%. I find it difficult specially when there are a couple tools missing :) I have been building some DIY Frsky compatible full range receivers with diversity and also some smaller low power ones outputting SBUS, that I install inside my radios for a trainer system. These require the vias to be 100% line up, as the little RF board I use has a pad spacing of 1.2mm. They all work great..
I have just designed another board that is a bit smaller than the first one, but I didn't put the GY-63 on the board this time, as well as pins 0,1, and 2. Maybe I should put at least pin 2, don't know. But if I need a pressure sensor on this one, I could just glue it on top and solder some thin wires. Will experiment with the ACC as well. The most important for me is that all the resistors to read the 3 cells are on the board.
I am also programming it with the 1 wire method and it is great.
Will post a pic later and some eagle files that you guys can use and improve as you like. If you improve them just post them back, so we can all benefit from that.

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
cdauv
Posts: 2
Joined: Fri Dec 09, 2016 4:01 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by cdauv »

Hi

Very nice
I am interesting about eagle files
I will try reduce PCB and adapt it for myself

Could you describe boot loader with one wire

Regards


Envoyé de mon iPhone en utilisant Tapatalk
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 »

have a look here. I used the same one that I use for programming the DIY Frsky receivers I build.
It uses Arduino Pin8 (Pin 12 of the Atmega328p)

You need to flash the bootloader uasing an ISP programmer. Then you just program using the one wire bootloader.. Very easy.

https://www.rcgroups.com/forums/showpos ... count=1782

João

EDIT: Will post eagle files in the next days. I am still improving them.. :)

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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Mstrens, there is a little annoying problem with oXs.
My oXs is powered from the 2 first Lipo cells. Schematic is attached to this post.
So, I turn the radio ON, then the receiver, and then plug the oXs to the battery's balance plug. when the oXs turns ON the radio reports immediately a low cell voltage alarm, and a FasV alarm of 0.00V. This is very annoying and it shouldn't happen??
According to Mike the problem is that the oXs is sending a voltage of 0.00 volts at power ON. Can this be fixed, and the oXs only sends the serial AFTER it actually read the voltage? It seems that it is starting serial before it reads the voltages, which is causing the false alarm at power on. Here is the post with Mike's explanation.

viewtopic.php?f=7&t=40&start=3000#p125112


Thanks

João
Attachments
oXs-Schematic.pdf
(14.38 KiB) Downloaded 220 times
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 »

jhsa wrote: Fri Feb 24, 2017 12:27 pm Mstrens, there is a little annoying problem with oXs.
My oXs is powered from the 2 first Lipo cells. Schematic is attached to this post.
So, I turn the radio ON, then the receiver, and then plug the oXs to the battery's balance plug. when the oXs turns ON the radio reports immediately a low cell voltage alarm, and a FasV alarm of 0.00V. This is very annoying and it shouldn't happen??
According to Mike the problem is that the oXs is sending a voltage of 0.00 volts at power ON. Can this be fixed, and the oXs only sends the serial AFTER it actually read the voltage? It seems that it is starting serial before it reads the voltages, which is causing the false alarm at power on. Here is the post with Mike's explanation.

viewtopic.php?f=7&t=40&start=3000#p125112


Thanks

João
I presume that you are using a D receiver.
I will look at the code
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 »

Yes, a D receiver :) And an RF Module in D mode, obviously :)

Thanks for looking

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 put a change on github (in master branch) that add 1 sec delay before sending data
Let me know if this is OK.
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 »

Will try a bit later, thank you.. I'm a bit busy building a couple more oXs's :D ;)

João

EDIT: So, i just have to download the zip file, right??
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 »

jhsa wrote: Fri Feb 24, 2017 4:43 pm EDIT: So, i just have to download the zip file, right??
If you have already version 8, you can just change line 658
There is
oXs_Out.sendData();

It should be
if ( millis() > 1000 ) oXs_Out.sendData();

Otherwise, on github, on tab clone, select branch master and then click on "Clone or Download"
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 »

Thanks, no, I still have version 7. The one before the one you're pointing to.
Will do as you say..

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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

mstrens wrote: Fri Feb 24, 2017 4:53 pm
If you have already version 8, you can just change line 658
There is
oXs_Out.sendData();

It should be
if ( millis() > 1000 ) oXs_Out.sendData();
This seems to have worked, thank you.No more false alarms at Power ON. If I see it comes back for some other reason, I know where the setting is now, will try changing, and will report. But for now it is working :)

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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Here are some pictures of my latest oXs board. This one doesn't have the pressure sensor soldered to the board, but it can be added with some wires. I am thinking about designing a board for the pressure sensor and ACC that solders on top of this one. That is why I put some vias near the A4 and A5 pads This way, it will still be smaller, just a little thicker :)
This one is configured to read 3 cells, but it has pads for 4 cells's voltage dividers. All analog and digital pins are on the board, except digital pins 0 and 1.

João
Attachments
IMG_20170224_203328.png
IMG_20170225_231259.png
IMG_20170225_021407.png
IMG_20170225_021336.png
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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

I have a couple questions

I have the MPU6050 (GY-521). Does this work with the vario?
If so, how does it connect? SCL and SDA to inputs A4 and A5, just like the pressure sensor?
Which axis point forward? Y?, or X?

Also how to configure the code for it to work with the vario?

Thank You

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 »

jhsa wrote: Sun Feb 26, 2017 3:25 pm I have a couple questions

I have the MPU6050 (GY-521). Does this work with the vario?
If so, how does it connect? SCL and SDA to inputs A4 and A5, just like the pressure sensor?
Which axis point forward? Y?, or X?

Also how to configure the code for it to work with the vario?

Thank You

João
I presume GY-521 should work but it is not 100% safe because this board does not have a I2C level converter.
So I expect that the voltage on SCL and SDA will exceed 3.3 volt (because your baro sensor has probably pull up resistors connected to 5 Volt.

The way to connect it and to activate it is explained in the file oXs_config_description.h in section 12 - IMU based on mpu6050 (accelerometer/gyro sensor).
If you want to use it just only for vario, the orientation of the device does not matter.
If you want to get Roll/Pitch or some Acc then the orientation matters.
X and Y axis are marked on the board.
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 »

mstrens wrote: Sun Feb 26, 2017 3:56 pm
I presume GY-521 should work but it is not 100% safe because this board does not have a I2C level converter.
So I expect that the voltage on SCL and SDA will exceed 3.3 volt (because your baro sensor has probably pull up resistors connected to 5 Volt.
So, do i have to put voltage dividers on its SCL and SDA lines??

It has a 3.3V voltage regulator on its PCB..
If you want to use it just only for vario, the orientation of the device does not matter.
If you want to get Roll/Pitch or some Acc then the orientation matters.
We never know the future ;) So, having that in mind, I want to place it the best I can. :)
X and Y axis are marked on the board.
Yes I know, but which of them point forward? Y?

Thank you very much..

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 »

About voltage dividers:
You can try adding 2 resistors; one between Ground and Arduino SCL and one between ground and Arduino SDA.
Resistor values should be selected in such a way that when baro sensor is connected (and Gy521 not) max voltage on SCL and SDA is about 3.3 volt.
Not sure if it will work. I never tested it.

About orientation of Gy-521, I think you can try orientation given at this link.
http://samselectronicsprojects.blogspot ... -6050.html
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 »

Thanks
Also, what is the "MP6050 INT" pin on the GY-521? Is this connection needed?

Thanks
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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

mstrens wrote: Sun Feb 26, 2017 5:09 pm About voltage dividers:
You can try adding 2 resistors; one between Ground and Arduino SCL and one between ground and Arduino SDA.
Resistor values should be selected in such a way that when baro sensor is connected (and Gy521 not) max voltage on SCL and SDA is about 3.3 volt.
Not sure if it will work. I never tested it.
I will try to place 2 real voltage dividers on my board. The GY-521 has 4K7 pullup resistors on the I2C lines.

Thanks for the link

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 resistors on gy-521 are connected to 3.3 volt. So they should not really matter to reduce the voltage down to 3.3 volt.
You have to look at the resistors that are on the baro sensor.
If you are using a gy-63, I think that the pull up resistors are 2.2K. So you have to use about 1.2k between I2C and ground.
It could be that the impedance becomes to low and that the I2C signal will be deformed. To be tested.
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 »

Yes, but If I add the voltage divider on the i2c lines, that doesn't matter?.
I did read somewhere that even a 10K resistor in series with both i2c lines would also

What is the INT pin of the 6050?? is it needed on the GY-521?

Thanks

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

Post Reply

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