New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Wed Nov 01, 2017 5:18 pm

ddano007 wrote:
Wed Nov 01, 2017 4:45 pm
I think not many people are flying gas models even with fuel level sensor.
Well, I am.. :) If that counts of course :mrgreen: I do use fuel level with my methanol models.. and with D protocol

So, would you like an X receiver with more analog inputs?? ;)

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
ddano007
Posts: 37
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 » Wed Nov 01, 2017 6:05 pm

jhsa wrote:
Wed Nov 01, 2017 5:18 pm
Well, I am.. :) If that counts of course :mrgreen: I do use fuel level with my methanol models.. and with D protocol
OK, it counts :oops: So for such guys can be option FUEL LEVEL or... Your suggestion?
jhsa wrote:
Wed Nov 01, 2017 5:18 pm
So, would you like an X receiver with more analog inputs?? ;)

João
Yes, why not, but maximum analog inputs on X-receivers nowadays is 1, and it`s on G-RX8 and X4R-SB, if I am right. So D-receivers are my most favorite RXs now ...

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Wed Nov 01, 2017 6:14 pm

well, you have oXs for more analog inputs.. Perhaps there will be more analog inputs on receivers in the near future, who knows :) ;)

Also, as mstrens said, you could use other fields for what you want. So, I don't understand why it has to be FUEL.. Maybe I missed something :(

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Thu Nov 02, 2017 11:07 am

I just put a new version on github in order to send all 0x00 for Sport protocol when oXs has no data ready when a pooling occurs.
I have not tested it.
Let me know if it works.

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

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

Post by jhsa » Thu Nov 02, 2017 12:33 pm


MikeB wrote:https://www.rcgroups.com/forums/showpos ... ount=10107,
Change shown below as well

Please try changing the timing in Frskyx_cc2500.ino:
(5500 to 5200 and 2800 to 3100)

Code: Select all

			state++;
			return 5200;
		case FRSKY_DATA2:
			CC2500_SetTxRxMode(RX_EN);
			CC2500_Strobe(CC2500_SIDLE);
			state++;
			return 200;
		case FRSKY_DATA3:		
			CC2500_Strobe(CC2500_SRX);
			state++;
			return 3100;
		case FRSKY_DATA4:
			len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
Mike.
Mstrens, did you also see this one?

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


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

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

Post by mstrens » Thu Nov 02, 2017 5:35 pm

jhsa wrote:
Thu Nov 02, 2017 12:33 pm
MikeB wrote:https://www.rcgroups.com/forums/showpos ... ount=10107,
Change shown below as well

Please try changing the timing in Frskyx_cc2500.ino:
(5500 to 5200 and 2800 to 3100)

Code: Select all

			state++;
			return 5200;
		case FRSKY_DATA2:
			CC2500_SetTxRxMode(RX_EN);
			CC2500_Strobe(CC2500_SIDLE);
			state++;
			return 200;
		case FRSKY_DATA3:		
			CC2500_Strobe(CC2500_SRX);
			state++;
			return 3100;
		case FRSKY_DATA4:
			len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
Mike.
Mstrens, did you also see this one?

Thanks

João
I do not understand why this is oXs related.

User avatar
ddano007
Posts: 37
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 » Mon Nov 06, 2017 7:11 pm

Maybe stupid question:
I want to use DS18B20 for two temperature measurement in OXS, I found DS18B20 support files for OXS here, but...
1, how can I download it? Only Crtl-C and Ctrl-V to txt file?
2, and how to integrate it to my OXS files?
Thanks for your patience ...

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Mon Nov 06, 2017 7:41 pm

This code has been written by a member but is not (yet) supported in an "offcial" version of oXs.
So, if you want to use it, you should cut and paste all the changes.
Changes are showed with a color (green = code to be added, red = code to be removed)

Note : oXs support NTC wich allows to measure temperature quite easily and NTC is cheap.
It is also easy to use a chip (e.g. lm35) that returns a voltage depending on temperature. Measuring this voltage and applying scaling parameters give you the temperature. This solution is very cheap too.

User avatar
ddano007
Posts: 37
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 » Mon Nov 06, 2017 8:06 pm

Thanks a lot for your response, by the time I found, how to download it. Yes, I know, that XOS support NTC sensors, but digital is digital :roll:
DS18B20 is not so expensive, I`m going to try it. Great thanks for all your work at OXS.

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Wed May 01, 2019 5:15 pm

To measure the level of methanol in the tank you can visit my blog :
https://superair78.wordpress.com/4-la-t ... n-arduino/
I will probably published an update beginning of June for S, R frsky receivers.

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu May 02, 2019 9:25 am

Nice, I was doing something like that myself a couple years ago with the help of another user.. :) And we were using exactly the same approach as your project. But we found out that calibration was not easy to keep consistent.. I guess the capacitance is not always constant. something else that we did was to add a little gyro (I think) board so the sensor takes measurements only when the tank (plane) was level. You see, if the plane is not level, the measurements won't be accurate. So, with the additional position sensor the arduino only took the reading when the plane was in level flight. That kinda eliminated false readings.
As you can see on the video, at the beginning we used aluminum foil, but then I ordered copper foil. It is much better, also because we can solder to it :)
Here is also a picture of my current setup. This project is obviously not finished, and it has been collecting dust (literally) for a while.. :)

João

EDIT: actually, this setup is ready to be installed in the model, but still never did it.
This project goes together with some other projects. Temperature sensor, Glow plug driver with broken plug detection, dual receiver battery + 1 cell LiPo battery for the glow plug driver, and all with voltage readings to my radio with Ersky9x. all this is managed by another cool open source project, which is the openXsensor (oXs)..
Attachments
Capacitive Sensor. Test 3.mp4
(15.79 MiB) Downloaded 84 times
IMG_20190502_111159.jpg
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

tonnie78
Posts: 100
Joined: Mon Jan 12, 2015 9:33 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by tonnie78 » Thu May 02, 2019 10:25 am

Cool, i did a simular test. Got to the point where I could trigger a led but no connection to FrSky telemetry. Is there a place where I can find your code?

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu May 02, 2019 12:59 pm

You mean the code for my project or Avionic78's code??
Mine is not finished.. I will also try his method, it seems to be simpler that the method used on my project :) But I still think some ACC sensor should be implemented so the fuel reading is only done when the model is level :) This would avoid false readings.

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

tonnie78
Posts: 100
Joined: Mon Jan 12, 2015 9:33 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by tonnie78 » Thu May 02, 2019 1:53 pm

I found that on my reservoir it does not change much with changing angle

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu May 02, 2019 2:21 pm

do you have a picture of your reservoir?

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

tonnie78
Posts: 100
Joined: Mon Jan 12, 2015 9:33 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by tonnie78 » Thu May 02, 2019 2:29 pm


User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu May 02, 2019 3:25 pm

That tank, the same as mine and the same as the other project above, will do a different reading when not level :)

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu May 02, 2019 3:25 pm

Avionic78 wrote:
Wed May 01, 2019 5:15 pm
To measure the level of methanol in the tank you can visit my blog :
https://superair78.wordpress.com/4-la-t ... n-arduino/
I will probably published an update beginning of June for S, R frsky receivers.
By the way, thanks for posting.

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

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Fri May 03, 2019 4:56 am

Kalman filter helps to smooth the fast variations of capacitance. I will keep you informed of my trials after the update of the hardware. It will comply with X and S receivers. On the other hand I will use 2 mini pro 3.3V 8MHZ to suppress the boost converter.

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Fri May 03, 2019 5:14 am

I'm really surprised that it works with gasoline. Permittivity of methanol is much higher than gasoline so it's an important feature to get variations of capacitance.

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

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

Post by jhsa » Fri May 03, 2019 9:31 am

Avionic78 wrote:Kalman filter helps to smooth the fast variations of capacitance. I will keep you informed of my trials after the update of the hardware. It will comply with X and S receivers. On the other hand I will use 2 mini pro 3.3V 8MHZ to suppress the boost converter.
On my project, to make it accurate in flight, I really had to add the ACC sensor, so the arduino only take readings when the airplane is in level flight. If the plane is for example on its side (high banking angle), the readings will be way off because the fuel is not in the proximity of one of the plates. So any reading that is taken at this moment will be completely wrong, no matter what smoothing the kalman filter is doing :)
And as far as I am concerned, no information is way better than bad information.. ;)
If I build this, I won't be using an arduino, but an ATtiny85. And arduino with all its pins will be a complete waste when we need only a couple pins for the project. And the ATtiny is smaller. :)

João

EDIT: Of course with ACC, I would need to use an arduino, not sure if the ATtiny can do i2c communication..




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

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Sat May 25, 2019 6:31 am

I will check your technical solution with an IMU GY521 and 2 mini pro. One is dedicated for the measurement of the capacitor (with a PWM signal on the output) and the attitude of the plane (with roll pitch angular thresholds), the second one is used to convert the PWM signal to SPORT protocol thanks to openXsensor. I wrote the C code for the arduino and the lua script for the transmitter. I'm expecting a quick delivery of the components. If I get good results I'll keep you informed and I'll update my blog.

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Sat May 25, 2019 11:42 am

Please let us know how it goes :)

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

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Thu Jun 06, 2019 4:35 am

I performed my first tests with an arduino pro mini 8MHz and the IMU GY521. It works fine on the table with the measurements of pitch and roll angles. On the other hand I add some librairies to transmitt the (capacitance value) VFAS to the transmitter. Unfortunately the speed of the arduino is too low and from time to time the telemetry is lost. The tip was to add a flip flop in the main loop to measure alternatively the capacitance value and the angles values for reducing the cycle time of the loop. I intend to use a pro mini 16MHz to robustify the telemetry. I will update my blog in the future to share the information (wiring and code descriptions)

User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jun 06, 2019 5:41 pm

Thanks.. Very interested here :)

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

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Tue Jun 25, 2019 8:54 pm

Still optimizing the system. Several scripts have been tested to get a reliable telemetry transmission without flipflop (the timing of the loop is critical). To protect the SPORT input of the receiver I add a resistor 4.7K (pro mini 16MHz 5V). I wrote a calibration script (measurement of initial angle) to simplify the installation of the GY 521 inside the plane. At the end of my tests, I will share the information on my blog including the lua script for the transmitter.

bluejets
Posts: 6
Joined: Mon Apr 02, 2018 2:36 am
Country: -

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

Post by bluejets » Sat Jun 29, 2019 1:49 am

jhsa wrote:
Fri May 03, 2019 9:31 am


EDIT: Of course with ACC, I would need to use an arduino, not sure if the ATtiny can do i2c communication..

Yes, have used before.

Interested in following your project here.
Have an application for a scale model boat I've been building for quite a few years.

Only saw the openxsensor stuff a couple of weeks ago for the first time and working on an altimeter for the rc aircraft at the moment.

Used an ATTiny85-20 module in another project for a ppm meter and had a few problems. Not sure if it had to do with pullup resistors ( or lack of) .
Have yet to get back to that and check the module to see if they are included or not.

The tank in the boat is all brass and originally I had fitted probes for full/empty digital indicator. Also have a 6mm clear tube running bottom to top on the exterior for visible indicator.

Wondering how the capacitive sensor would handle that with the copper strips previously mentioned running up the exterior of each side of the clear 6mm tubing...?? or could the probes be used..??
Attachments
Attiny85.jpg

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Wed Sep 04, 2019 5:36 pm

As promised you will find the link for the last version of the fuel sensor with GY521, arduino and C script
https://superair78.wordpress.com/4-la-t ... eview=true
Please wait a while, till I update the LUA script for the transmitter.
I will inform you when the job will be done

Avionic78
Posts: 9
Joined: Wed May 01, 2019 2:57 pm
Country: Europe
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by Avionic78 » Sat Sep 07, 2019 5:44 am


User avatar
jhsa
Posts: 19291
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Sat Sep 07, 2019 11:17 am

Nice, but I don't use OpenTX.
ErskyTX uses another script language. I guess we don't need a script to use this with our radios, right?

João

Sent from my BLN-L21 using Tapatalk

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!!”