OxS Five temperature sensor and one voltage sensor
Moderator: rainer
OxS Five temperature sensor and one voltage sensor
Hi great guys. I came to this project like a snail after all these years.
I manage to build with Arduino nano i manage to pull to the tx two temp readings through T1 and T2 strings .is there a way to pull all five temperature readings to tx? my other voltage pins directed as VFAS,A3,A4 and T1,T2 only T1 and T2 shows in Celsius rest in voltage how to show all temperature telemetry?
below is the code section from advance and basic config files.
thanks for the help
Nesan
I manage to build with Arduino nano i manage to pull to the tx two temp readings through T1 and T2 strings .is there a way to pull all five temperature readings to tx? my other voltage pins directed as VFAS,A3,A4 and T1,T2 only T1 and T2 shows in Celsius rest in voltage how to show all temperature telemetry?
below is the code section from advance and basic config files.
thanks for the help
Nesan
Last edited by nesan on Thu Nov 19, 2020 2:08 pm, edited 1 time in total.
Re: OxS Five temperature sensor and one voltage sensor
I think, it would be easier, if you attach the complete oXs_config_basic.h and oXs_config_advanced.h file here as attachments
br KH
![Wink ;)](./images/smilies/icon_e_wink.gif)
br KH
- Attachments
-
- oXs_config_basic.h
- (11.34 KiB) Downloaded 1091 times
-
- oXs_config_basic.h
- (11.34 KiB) Downloaded 238 times
Re: OxS Five temperature sensor and one voltage sensor
HI thanks for responding!
I have updated the files as you direct.
thanks
Nesan
I have updated the files as you direct.
thanks
Nesan
Re: OxS Five temperature sensor and one voltage sensor
The Arduino nano not measuring temperature from pin 3 ! when I run another configuration it seems it measure the voltage at all the pins. can you check if I conflict anything in my config file please.nesan wrote: ↑Thu Nov 19, 2020 2:31 am Hi great guys. I came to this project like a snail after all these years.
I manage to build with Arduino nano i manage to pull to the tx two temp readings through T1 and T2 strings .is there a way to pull all five temperature readings to tx? my other voltage pins directed as VFAS,A3,A4 and T1,T2 only T1 and T2 shows in Celsius rest in voltage how to show all temperature telemetry?
below is the code section from advance and basic config files.
thanks for the help
Nesan
oXs_config_basic.h
oXs_config_advanced.h
or is it possible nano A3 "hardware" went bad?
Re: OxS Five temperature sensor and one voltage sensor
I do not see a conflict in your config files.
Do you get a value from A3 if you run another configuration (e.g. reading only A3 as volt_1 and sending it as VFAS)
Do you get a value from A3 if you run another configuration (e.g. reading only A3 as volt_1 and sending it as VFAS)
Re: OxS Five temperature sensor and one voltage sensor
So, your arduino is not defect.
Perhaps, it is the Rx that does not accept that oXs uses the telemetry fields A3 or A4.
To check this, try to send VOLT_x (from Arduino pin A3) on another telemetry field (e.g. fuel source)
Perhaps, it is the Rx that does not accept that oXs uses the telemetry fields A3 or A4.
To check this, try to send VOLT_x (from Arduino pin A3) on another telemetry field (e.g. fuel source)
Re: OxS Five temperature sensor and one voltage sensor
Hi first of all thanks to you mstrens for coming to my help!
I comment these two lines all the voltages in pin A0 to A7 except "A4 andA5" mesure voltage
//#define FIRST_NTC_ON_VOLT_NR 2
//#define LAST_NTC_ON_VOLT_NR 6
if I un comment these lines one of the pin not measures temp. in this case volt_3 Pin A2.
-----------------------------------------
if I push the
0 , 1 , 2 , 3 , 6 , 7 // Fill all 6 values; set to 0 up to 7 for analog pins A0 up to A7 ; set the value to 8 for the voltage(s) not to be measured.
#define RESISTOR_TO_GROUND 0 , 0 , 0 , 0 , 0 , 0
#define RESISTOR_TO_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define OFFSET_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define SCALE_VOLTAGE 204.6 , 204.6 , 204.6 , 204.6 , 204.6 , 1
and in
config basic
#define T1_SOURCE VOLT_1
then all the pins measure "Volt_1 pin AO" temperature except A6 and A7???? ?/???
why
I comment these two lines all the voltages in pin A0 to A7 except "A4 andA5" mesure voltage
//#define FIRST_NTC_ON_VOLT_NR 2
//#define LAST_NTC_ON_VOLT_NR 6
if I un comment these lines one of the pin not measures temp. in this case volt_3 Pin A2.
-----------------------------------------
if I push the
0 , 1 , 2 , 3 , 6 , 7 // Fill all 6 values; set to 0 up to 7 for analog pins A0 up to A7 ; set the value to 8 for the voltage(s) not to be measured.
#define RESISTOR_TO_GROUND 0 , 0 , 0 , 0 , 0 , 0
#define RESISTOR_TO_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define OFFSET_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define SCALE_VOLTAGE 204.6 , 204.6 , 204.6 , 204.6 , 204.6 , 1
and in
config basic
#define T1_SOURCE VOLT_1
then all the pins measure "Volt_1 pin AO" temperature except A6 and A7???? ?/???
why
Re: OxS Five temperature sensor and one voltage sensor
I tried as you said
// --------- 2 - Data to transmit --------- uncomment the lines below if you want to transmit some extra oXs measurements into some telemetry fields
// ***** 2.1 - Frsky data *****
#define VFAS_SOURCE VOLT_1
#define FUEL_SOURCE VOLT_2
#define A3_SOURCE VOLT_3
#define A4_SOURCE VOLT_4
//#define ACCX_SOURCE YAW
//#define ACCY_SOURCE ROLL
//#define ACCZ_SOURCE PITCH
#define T1_SOURCE VOLT_5
#define T2_SOURCE VOLT_6
// ***** 6.2 - Voltage parameters *****
#define PIN_VOLTAGE 0 , 1 , 2 , 3 , 6 , 7
#define RESISTOR_TO_GROUND 0 , 0 , 0 , 0 , 0 , 0
#define RESISTOR_TO_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define OFFSET_VOLTAGE 0 , 0 , 0 , 0 , 0 , 0
#define SCALE_VOLTAGE 1 , 204.6 , 204.6 , 204.6 , 204.6 , 204.6
// ***** 6.4 - Convert voltage to temperature (° Celcius) *****
#define FIRST_NTC_ON_VOLT_NR 2
#define LAST_NTC_ON_VOLT_NR 6
#define SERIE_RESISTOR 4700
#define STEINHART_A 7.00111E-4 .
#define STEINHART_B 2.1644E-4
#define STEINHART_C 1.0619E-07
pin A2 VOLT_3 not working.
Re: OxS Five temperature sensor and one voltage sensor
So, you can try to send some VOLT_x on ACCX, ACCY and/or ACCZ if those are not used for another purpose.
There is still an attention point using ACCX,Y. If remember wel, it requires using a scale (255?) on Tx side to get the expected value.
There is still an attention point using ACCX,Y. If remember wel, it requires using a scale (255?) on Tx side to get the expected value.
Re: OxS Five temperature sensor and one voltage sensor
Here something puzzling me. how come I could measure voltages when I disable temperature calculation part?
only happen when un comment temperature calculation.
one more thing I am measuring either volt or temp pin by pin. Do I have to connect all temp probe at once for any internal loop hardware need in Arduino ?
Re: OxS Five temperature sensor and one voltage sensor
I tried to send through VOLT_3 by ACCX and VOLT_6 by ACCY . ACCY shows in g I do not know how to scale it
ACCX shows 0.00g then I switch VOLT_3 TO VOLT_6 ACCY and ACCX also change accordingly.
all this with another new Arduino nano.
so if it is not the code then could it be so I have to connect all the sensors at once for desire result?
Re: OxS Five temperature sensor and one voltage sensor
in the line #define PIN_VOLTAGE 0 , 1 , 2 , 3 , 6 , 7 you declare which voltages have to be measured (here 6 voltage e.g)
In the lines (e.g)
define FIRST_NTC_ON_VOLT_NR 2
define LAST_NTC_ON_VOLT_NR 5
you declare which voltages have to be converted into degree. So here oXs will calculate degree based on VOLT_2, VOLT_3 , VOLT_4 and VOLT5 which are measured on pin A1, A2, A3 and A6).
Then oXs will use the results of the calculation in following way (extract of the config_description.h file)
* When you use 1 or 2 NTC, the temperature(s) will be registered in VOLT_X and VOLT_Y where X is the value of FIRST_NTC_ON_VOLT_NR and Y the value of LAST_NTC_ON_VOLT_NR
* If you use more than 2 NTC, oXS will register in :
* VOLT_X the lowest temperature
* VOLT_X+1 the index of the highest temperature (1 being the index of the first NTC)
* VOLT_Y the highest temperature
So yo can't get all temperatures but only the highest and lowest.
In the lines (e.g)
define FIRST_NTC_ON_VOLT_NR 2
define LAST_NTC_ON_VOLT_NR 5
you declare which voltages have to be converted into degree. So here oXs will calculate degree based on VOLT_2, VOLT_3 , VOLT_4 and VOLT5 which are measured on pin A1, A2, A3 and A6).
Then oXs will use the results of the calculation in following way (extract of the config_description.h file)
* When you use 1 or 2 NTC, the temperature(s) will be registered in VOLT_X and VOLT_Y where X is the value of FIRST_NTC_ON_VOLT_NR and Y the value of LAST_NTC_ON_VOLT_NR
* If you use more than 2 NTC, oXS will register in :
* VOLT_X the lowest temperature
* VOLT_X+1 the index of the highest temperature (1 being the index of the first NTC)
* VOLT_Y the highest temperature
So yo can't get all temperatures but only the highest and lowest.
Re: OxS Five temperature sensor and one voltage sensor
oh! my goal is to make a temp sensor for 5 cylinder and 7 cylinder radial engines I have. so what is your suggestion here?mstrens wrote: ↑Fri Nov 20, 2020 9:42 pm in the line #define PIN_VOLTAGE 0 , 1 , 2 , 3 , 6 , 7 you declare which voltages have to be measured (here 6 voltage e.g)
In the lines (e.g)
define FIRST_NTC_ON_VOLT_NR 2
define LAST_NTC_ON_VOLT_NR 5
you declare which voltages have to be converted into degree. So here oXs will calculate degree based on VOLT_2, VOLT_3 , VOLT_4 and VOLT5 which are measured on pin A1, A2, A3 and A6).
Then oXs will use the results of the calculation in following way (extract of the config_description.h file)
* When you use 1 or 2 NTC, the temperature(s) will be registered in VOLT_X and VOLT_Y where X is the value of FIRST_NTC_ON_VOLT_NR and Y the value of LAST_NTC_ON_VOLT_NR
* If you use more than 2 NTC, oXS will register in :
* VOLT_X the lowest temperature
* VOLT_X+1 the index of the highest temperature (1 being the index of the first NTC)
* VOLT_Y the highest temperature
So yo can't get all temperatures but only the highest and lowest.
measuring cell voltages and use lua script to convert them in Celsius in TX side .
or
is there any way to use analog multiplexer and drive through i2c digital for decode in tx? or any other way?
Re: OxS Five temperature sensor and one voltage sensor
If you really want to get all temperatures (instead of min, index n and max), you can change some lines of code in file oXs_voltage.cpp
You just have to remove the lines (from 271 up to 275)
if ( numberOfNtc > 2) {
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR - 1].value = minTemp ;
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR ].value = maxNtcIdx ;
voltageData.mVolt[LAST_NTC_ON_VOLT_NR - 1].value = maxTemp ;
}
Then VOLT_X, X+1, X+2, .....Y will store the expected temperatures. You can then transmit them in the way you expected (using VOLT_X , ....)
You just have to remove the lines (from 271 up to 275)
if ( numberOfNtc > 2) {
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR - 1].value = minTemp ;
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR ].value = maxNtcIdx ;
voltageData.mVolt[LAST_NTC_ON_VOLT_NR - 1].value = maxTemp ;
}
Then VOLT_X, X+1, X+2, .....Y will store the expected temperatures. You can then transmit them in the way you expected (using VOLT_X , ....)
Re: OxS Five temperature sensor and one voltage sensor
Oh that is the good news!mstrens wrote: ↑Fri Nov 20, 2020 9:59 pm If you really want to get all temperatures (instead of min, index n and max), you can change some lines of code in file oXs_voltage.cpp
You just have to remove the lines (from 271 up to 275)
if ( numberOfNtc > 2) {
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR - 1].value = minTemp ;
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR ].value = maxNtcIdx ;
voltageData.mVolt[LAST_NTC_ON_VOLT_NR - 1].value = maxTemp ;
}
Then VOLT_X, X+1, X+2, .....Y will store the expected temperatures. You can then transmit them in the way you expected (using VOLT_X , ....)
I will try and let you know. do you thing the 6th voltage in this case VOLT_1 can be used for other purpose? I would like to use for pneumatic retract low presser activator function.
Re: OxS Five temperature sensor and one voltage sensor
For 5 cylinder, you can get them with one single oXs (see my previous mail)
For 7 cylinder, the easiest would be to use 2 oXs. In this case, you should have to change the device ID in the second one in order to avoid that both reply on the the same polling request from the RX.
Othewise, in order to get more than 6 VOLT_X, it is also possible to add an ADS1115 (ADC) to oXs.
This provide 4 extra ADS_VOLT measurement.
It would then be possible to add a few lines of codes to oXs in order to let oXs convert the ADS_VOLT to degree too.
For 7 cylinder, the easiest would be to use 2 oXs. In this case, you should have to change the device ID in the second one in order to avoid that both reply on the the same polling request from the RX.
Othewise, in order to get more than 6 VOLT_X, it is also possible to add an ADS1115 (ADC) to oXs.
This provide 4 extra ADS_VOLT measurement.
It would then be possible to add a few lines of codes to oXs in order to let oXs convert the ADS_VOLT to degree too.
Re: OxS Five temperature sensor and one voltage sensor
The voltages that are not used for temperature can be used for other purpose. So, for a 5 cylinder, you still have 1 VOLT available (5 if you add a ADS1115 chip)nesan wrote: ↑Fri Nov 20, 2020 10:08 pmOh that is the good news!mstrens wrote: ↑Fri Nov 20, 2020 9:59 pm If you really want to get all temperatures (instead of min, index n and max), you can change some lines of code in file oXs_voltage.cpp
You just have to remove the lines (from 271 up to 275)
if ( numberOfNtc > 2) {
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR - 1].value = minTemp ;
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR ].value = maxNtcIdx ;
voltageData.mVolt[LAST_NTC_ON_VOLT_NR - 1].value = maxTemp ;
}
Then VOLT_X, X+1, X+2, .....Y will store the expected temperatures. You can then transmit them in the way you expected (using VOLT_X , ....)
I will try and let you know. do you thing the 6th voltage in this case VOLT_1 can be used for other purpose? I would like to use for pneumatic retract low presser activator function.
Re: OxS Five temperature sensor and one voltage sensor
All work as you said thanks for your help and generosity ! I will let you know the progress and expect your help for all my projects. thanks again.mstrens wrote: ↑Fri Nov 20, 2020 10:14 pmThe voltages that are not used for temperature can be used for other purpose. So, for a 5 cylinder, you still have 1 VOLT available (5 if you add a ADS1115 chip)nesan wrote: ↑Fri Nov 20, 2020 10:08 pmOh that is the good news!mstrens wrote: ↑Fri Nov 20, 2020 9:59 pm If you really want to get all temperatures (instead of min, index n and max), you can change some lines of code in file oXs_voltage.cpp
You just have to remove the lines (from 271 up to 275)
if ( numberOfNtc > 2) {
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR - 1].value = minTemp ;
voltageData.mVolt[FIRST_NTC_ON_VOLT_NR ].value = maxNtcIdx ;
voltageData.mVolt[LAST_NTC_ON_VOLT_NR - 1].value = maxTemp ;
}
Then VOLT_X, X+1, X+2, .....Y will store the expected temperatures. You can then transmit them in the way you expected (using VOLT_X , ....)
I will try and let you know. do you thing the 6th voltage in this case VOLT_1 can be used for other purpose? I would like to use for pneumatic retract low presser activator function.
Nesasn
![Razz :P](./images/smilies/icon_razz.gif)
Re: OxS Five temperature sensor and one voltage sensor
Hi Dears!
I only need to program one temperature sensor for my plane.
Does anybody already have the code to be added in the arduino?
I only need to program one temperature sensor for my plane.
Does anybody already have the code to be added in the arduino?