openXsensor - Jeti -NTC

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

openXsensor - Jeti -NTC

Post by Dilbert »

Hi,
I am trying to setup openXsensor with NTC for Jeti. I have tried different configurations of the config file, without success. The measured voltage seems to be correct and the Steinhart parameters have been computed with a calibration. Could be a problem with the Jeti transmission protocol? Has someone a running NTC sensor with Jeti?
Thank you
Stefano

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

Re: openXsensor - Jeti -NTC

Post by mstrens »

Please give a copy of your config (basic and advanced) files.
I do not think there should be an issue for jeti protocol because when NTC is used, oXs stores the temperature into the field used for voltage.

There was a bug for jeti that did not let to transmit VOLT_2 ... VOLT_6 as voltage source but this has normally been fixed one or 2 days ago.
Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

Re: openXsensor - Jeti -NTC

Post by Dilbert »

Thank you for the help.
In my setup I am using an arduino pro mini (3.3V), a 100kOhm Thermistor and a reference resistance (to vcc) of 9.9 kOhm. The coefficients of the thermistor were calculated with the aid of a calibration performed in hot water (20 - 95 Degrees) (temperature in Kelvin, resistance in Ohm). I have checked with the given parameters (a,b,c): the returned temperature is correct. As suggested you will find as attachment both configuration files.

Stefano
Attachments
oXs_config_advanced.h
(18.52 KiB) Downloaded 373 times
oXs_config_basic.h
(11.17 KiB) Downloaded 388 times
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: openXsensor - Jeti -NTC

Post by mstrens »

Your config files seems ok except 2 items in config_basic.h (but this can't explain why you do not get temperature).
1) You have #define NUMBEROFCELLS 1
This has no sense when you use VOLT_1 to measure a temperature. Still during test, this is a way to get also the voltage on the Tx and so to check if the conversion in Temperature is ok.
2) You have #define CALCULATE_RPM SI
It should be #define CALCULATE_RPM NO

Please could you explain which data you get on your Tx display with your current config (so keeping #define NUMBEROFCELLS 1 ).
I expect that you should get Cell 1, LowestCell and Accu Volt (the 3 values should be equal when you have set number of cells to 1). The value should give the voltage on arduino pin A0/
Then on top of those 3 fields, you should also get "Temp." with the temperature.
I presume that this last one is present but that the value is wrong .

Please delete all telemetry fields from your Tx before testing and let the Tx dicover again the sensors (I think that in some cases the Tx does not dicover correctly new fields when some already exist - not sure about this).

I checked the program and I found a bug in the value being transmitted.
The value was divided by 10 and then declared as containing 2 decimal. It means that a temperature of 25 degree is transmitted as 2 and then the Tx should display it as 0,02.

If this is the bug that you discover, it should be fixed by the new version I just put on github.

If not let me know.
Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

Re: openXsensor - Jeti -NTC

Post by Dilbert »

I will do some tests these evening and I'll let you know.
Stefano

Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

Re: openXsensor - Jeti -NTC

Post by Dilbert »

Hi, I have performed several tests.
1) old software (NUMBEROFCELLS=1):
- T=-32.76
- Cell1=Cmin=CellAll=58.88

2) new software (NUMBEROFCELLS=1)
- T=16deg (correct!!!)
- Cell1=Cmin=CellAll=59.8

3) new software (NUMBEROFCELLS=0)
- T=16deg (correct!!!)

I have heated the NTC and the temperature rise (the feeling is that I am measuring the right temperature). The problem is solved!!!!!!
CALCULATE_RPM was set to YES because I would like to measure rpm too (of a gas engine). I have now checked the telemetry fields and I have only Temperature. I do not know why.

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

Re: openXsensor - Jeti -NTC

Post by mstrens »

About RPM, did you apply pulses on arduino pin 8?
When you let Tx dicover sensors, do you get a name "Revolution" or not ?

Normally RPM is supported in Jeti protocol.
If not I would have to debug it.
Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

Re: openXsensor - Jeti -NTC

Post by Dilbert »

It is connected to Gnd and Pin 8. Revolution does not appear. I have only temperature, also after a reset.

Inviato dal mio SM-G920F utilizzando Tapatalk

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

Re: openXsensor - Jeti -NTC

Post by mstrens »

OK, I will try to debug it to morrow.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: openXsensor - Jeti -NTC

Post by mstrens »

I made a test with
#define CALCULATE_RPM YES
and without having pulses on pin 8, it seems me ok because when I look at the flow of data generated by oXs (I do not have a Jeti) I get the expected data (with a RPM = 0 because I did not applied pulses).

I also tried overwriting the calculated RPM with a fixed value "1000" and I got it in the flow of data.
To make a test sending a fix dummy value (e.g. 1000) , you can make a small change in the file oXs_out_jeti.cpp.

Currently there is :
#if defined (PULSES_PER_ROTATION)
* fieldValue = sport_rpm.value * 60.0 / PULSES_PER_ROTATION ;
#else // if PULSES_PER_ROTATION is not defined, we assume 1
* fieldValue = sport_rpm.value * 60 ;
#endif
// }
* dataType = JETI22_0D ;
break ;

You can change to (adding line * fieldValue = 1000 ;)
#if defined (PULSES_PER_ROTATION)
* fieldValue = sport_rpm.value * 60.0 / PULSES_PER_ROTATION ;
#else // if PULSES_PER_ROTATION is not defined, we assume 1
* fieldValue = sport_rpm.value * 60 ;
#endif
// }
* fieldValue = 1000 ;
* dataType = JETI22_0D ;
break ;
Dilbert
Posts: 9
Joined: Sat Jan 12, 2013 7:48 pm
Country: Europe

Re: openXsensor - Jeti -NTC

Post by Dilbert »

Hi, I found a stupid mistake. I wrote calculate_rpm "si" instead of "yes".... free translation... :-)

It seems now to work. I still have to test it with running engine.

Ciao Stefano

Inviato dal mio SM-G920F utilizzando Tapatalk


Post Reply

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