Page 15 of 19

Re: New beta version of openXsensor (=openXvario)

Posted: Wed Nov 01, 2017 5:18 pm
by jhsa
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

Re: New beta version of openXsensor (=openXvario)

Posted: Wed Nov 01, 2017 6:05 pm
by ddano007
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 ...

Re: New beta version of openXsensor (=openXvario)

Posted: Wed Nov 01, 2017 6:14 pm
by jhsa
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

Re: New beta version of openXsensor (=openXvario)

Posted: Thu Nov 02, 2017 11:07 am
by mstrens
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.

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

Posted: Thu Nov 02, 2017 12:33 pm
by jhsa

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




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

Posted: Thu Nov 02, 2017 5:35 pm
by mstrens
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Nov 06, 2017 7:11 pm
by ddano007
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 ...

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Nov 06, 2017 7:41 pm
by mstrens
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Mon Nov 06, 2017 8:06 pm
by ddano007
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Wed May 01, 2019 5:15 pm
by Avionic78
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 9:25 am
by jhsa
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)..

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 10:25 am
by tonnie78
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?

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 12:59 pm
by jhsa
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

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 1:53 pm
by tonnie78
I found that on my reservoir it does not change much with changing angle

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 2:21 pm
by jhsa
do you have a picture of your reservoir?

João

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 2:29 pm
by tonnie78

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 3:25 pm
by jhsa
That tank, the same as mine and the same as the other project above, will do a different reading when not level :)

João

Re: New beta version of openXsensor (=openXvario)

Posted: Thu May 02, 2019 3:25 pm
by jhsa
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

Re: New beta version of openXsensor (=openXvario)

Posted: Fri May 03, 2019 4:56 am
by Avionic78
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Fri May 03, 2019 5:14 am
by Avionic78
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.

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

Posted: Fri May 03, 2019 9:31 am
by jhsa
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..





Re: New beta version of openXsensor (=openXvario)

Posted: Sat May 25, 2019 6:31 am
by Avionic78
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.

Re: New beta version of openXsensor (=openXvario)

Posted: Sat May 25, 2019 11:42 am
by jhsa
Please let us know how it goes :)

João

Re: New beta version of openXsensor (=openXvario)

Posted: Thu Jun 06, 2019 4:35 am
by Avionic78
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)

Re: New beta version of openXsensor (=openXvario)

Posted: Thu Jun 06, 2019 5:41 pm
by jhsa
Thanks.. Very interested here :)

João

Re: New beta version of openXsensor (=openXvario)

Posted: Tue Jun 25, 2019 8:54 pm
by Avionic78
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.

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

Posted: Sat Jun 29, 2019 1:49 am
by bluejets
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..??

Re: New beta version of openXsensor (=openXvario)

Posted: Wed Sep 04, 2019 5:36 pm
by Avionic78
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

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Sep 07, 2019 5:44 am
by Avionic78

Re: New beta version of openXsensor (=openXvario)

Posted: Sat Sep 07, 2019 11:17 am
by jhsa
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