OpenXSensor project page on google code

Development & General Chat for the superb openxvario project.

Moderator: rainer

Sierra
Posts: 9
Joined: Tue May 04, 2021 9:12 pm
Country: United Kingdom

Re: OpenXSensor project page on google code

Post by Sierra »

If it makes things easier, I may be able to access a Windows laptop!
Location: Ross-shire, Scotland

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

Re: OpenXSensor project page on google code

Post by kalle123 »

Sierra wrote: Tue May 18, 2021 6:37 pm Forgot about the common ground, in my prototype, I used the 5V from the USB to power the Arduino and a receiver battery in the receiver. with the actual build, the receiver battery (6V) will power the Arduino. I didn't think the configurator worked with the newer versions of oXs, also I assume it is PC only, I am on an iMac!
I am NOT forgetting about a common ground! I asked for a pic and that pic you posted is NOT working, because there is NO common ground between arduino and receiver. So what is the use of posting a pic like that? That is fooling me.

I don't know what you are doing there, prototype and/or actual build. I only can guess. You are asking for help, so please give information to give a hand.

I am on Win and Linux and with both OS, I don't see any issues with oXS. And as far as I know, there are no issues macOS, neither with the arduino IDE nor with oXs.

br KH
Sierra
Posts: 9
Joined: Tue May 04, 2021 9:12 pm
Country: United Kingdom

Re: OpenXSensor project page on google code

Post by Sierra »

Kalle,

Please accept my apologies, what I was saying is that I forgot about the common ground when connecting it up as I used a separate battery in the receiver. That picture shows an Arduino Uno which is for testing purposes. I will be using an Arduino Pro Mini to build the actual altimeter/vario.

I will construct it again, this time with the common ground and I will try the configurator in macOS. Hopefully it will work.

Please realise that i was not trying to fool you, the help you are offering is very much appreciated and I apologise if I have offended you.

Best regards

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

Re: OpenXSensor project page on google code

Post by MikeB »

I've just got a version of the openXsensor working using FrSky FPort1. I'll now see if I can get FBUS(FPort2) working as well.
The downside is I've needed to make use of the hardware UART in order to read all the FPort/FBUS data (41 bytes) that is sent at 115200 baud. This means you are not able to have GPS connected to the serial input.

To use the serial receive, I have a very short interrupt on pin change that outputs the inverted signal on another pin that is then connected to the serial receive pin.

Anyone interested in using FPort/FBUS with the openXsensor?

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: OpenXSensor project page on google code

Post by MikeB »

I've now managed to get FPort2 working (115200 baud) on both 16MHz and 8MHz processors. I've coded some interrupt routines in assembly language to make them fast enough to "bit-bash" the serial data at 115200 baud.

In general, I do have some questions on the use of a GPS sensor. This appears to use "serial.begin" at 38400 baud. The serial routines, I believe, use interrupts. These may take long enough that the SPort serial interrupts may be delayed long enough that they don't work. It may be they work often enough, receive only receives two bytes and send only sends 8 bytes so if the GPS doesn't send data too often errors on the SPort are not critical.
Has anyone investigated this?

With FPort2, the baud rate is higher, and the receive needs to handle 41 bytes every 7mS, so there is a much greater chance that GPS data will corrupt things.

As I've needed to use timers 0 and 2 to help handle FPort2, this means that the analog output (using PWM) won't be available. Also the PPM input cannot be used, although this is not needed with FPort2 as all 16 channel data is available, SBUS encoded, from the FPort2 signal. I'm not sure where RPM fits either in regard to interrupt handling. I've also looked into places where interrupts are disabled in "normal" code and reduced the time for which they are disabled.

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: OpenXSensor project page on google code

Post by mstrens »

@Mike,
you are probably right that GPS uses interrupts and that there is a risk of corrupted software serial.
I never had complains on it.
Probably it was not noticeable with a protocol like sport.

About RPM, the code is in oXs_general.cpp and it uses an interrupt.
See line
ISR( TIMER1_CAPT_vect, ISR_NOBLOCK )

I do not plan to continue to make changes to oXs on AVR.
I think, it makes more sense to use oXs on RP2040.
There are so many advantages using RP2040.
- no need to compile (in most cases)
- no need for a configurator
- plenty of ressources for development (dual core, more ram, more rom, 32 bits, 133Mz, 3.3V, plenty of UART with pio,...)
- not more expensive.

The current version already support Fbus protocol. I could easily support Fport2 if there is a request for. I presume it is just changing the baudrate.

The most important sensors are already supported in rp2040 version.
I think that the functionalities from avr version that are missing in RP2040 version are nearly not used.
Anyway, if they would be really requested, I could look to add them into rp2040 version.

Post Reply

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