New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

We are using an arduino.. GY-521 connected via I2c.
An arduino is more widely available equally cheap, and easy to deal with.. You can also adjust things the way you like..
You don't have to use the oXs to read the fuel level. Use a voltage divider to connect the sensor directly to the A1/A2 ports of a D8 receiver..
We might try that chip as well, but after we tried the way we're doing it.. :) Yeah I know, I'm stubborn :) ;)

Aliexpress don't accept Paypal and I'm not giving my credit card number to them :) Will try to find it on ebay..

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Thanks.. I'm not sure I like the multi sensor thing :) That seems to have each pad associated to each level.. At the moment we have some progressive level sensing.. We can also calibrate each tank..

Image

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Ordered these.. Do you think they are ok?

http://www.ebay.de/itm/3x-5x-10xThermis ... gJSou4RZXQ

I rfound others but they had a lower maximum temperature. These are good for 260º. They are made of glass though :) I think it will be fine if inside shrink tube :)
This is a 100K Thermistor. The 10K ones seem to be rated at lower temperatures?

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I think the thermistor will be ok.
100 k seems me a good value when you want yo measure quite high temperatures.

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Yeah, i think that the operating temperature for my engine is about 110 to 120ºC. 140º is already way too much..
But will have to measure with a thermometer and compare.. Been away from glow engines for a few years now :) Time to go back to them :)

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
wema1948
Posts: 5
Joined: Fri Dec 23, 2016 9:55 am
Country: Austria

current sensor

Post by wema1948 »

Hallo,
new to arduino and openXsensor as well I try hard to build a current sensor. I managed that the sensor is realized by the TX as soon as the RX is powered on. To proof this I deleted all sensors, did a new search an it was found again.
Unfortunately I get no value transmitted, current is always 0, what ever I do. So please give me a hint to find the error.

I have a got an arduino-clone from banggood, connected a 1k pot to simulate the voltage coming from the current sensor. The middle of the pot is connected to A3. Digital output 2 delivers the signal to SPort of an X8R Moving the pot changes the voltage at pin A3 but nothing in the displayed value at the TX although the sensor is online.

Thanks Max
Attachments
Layout.jpg
oXs_config.txt
(15.85 KiB) Downloaded 286 times
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

in your config, there is a line
#define USE_INTERNAL_REFERENCE // uncomment this line if you use 1.1 volt internal reference instead of Vcc

I suggest that you try putting this line as comment.
In your case, the voltage on pin 3 (from the current sensor) should be measured compared to Vcc and not to 1.1 internal voltage reference.

Still I am not sure this could explain the issue.

If not solved, can you try uncommenting this line in file oXs_curr.cpp (in the first lines)
//#define DEBUGCURRENT
and have a look at the messages sent by arduino to a pc terminal. Those messages will perhaps help me understand the issue.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: New beta version of openXsensor (=openXvario)

Post by kalle123 »

Code: Select all

#define USE_INTERNAL_REFERENCE  // uncomment this line if you use 1.1 volt internal reference instead of Vcc
Why this line in uncommented? That means, you are measuring arduino input on ....

Just see, that mstrens was faster ;)
User avatar
wema1948
Posts: 5
Joined: Fri Dec 23, 2016 9:55 am
Country: Austria

Re: New beta version of openXsensor (=openXvario)

Post by wema1948 »

Haha, this did the trick.
Sometimes it is much better really essential to have somebody else to look at the problem as you always read over it without seeing it!
Thanks a lot :D :D :D
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Ok, this is the datasheet of the Thermistor I bought.
It is a 3950 with a resistance of 100K at 25ºC.
The temperature range is -30ºC to 270ºC, so what temperature must be inserted in the config file?

the temperature range I need to measure is around 110 or 120ºC if the engine is not overheating, so a resistor to VCC of around 4K7??

Thanks

João
Attachments
NTC-Thermistor_3950_Datenblatt.pdf
(203.2 KiB) Downloaded 224 times
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: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Most Arduino Pro Mini that we can find on ebay have A6 and A7 available.. oXs doesn't seem to support these analog pins?
Would it be possible to make them available. I for example could make use of those pins in the near future.
As an example, I am installing sensors in one of my Glow powered models. So far I have.
Glow driver battery sensor on A0, Main battery sensor on A1, A sensor that detects a damaged glow plug on A2, The Fuel tank level sensor on A3, and the temperature sensor will be connected on A4. This means that it won't be possible to use I2c sensors anymore.
The same applies to those who are reading a 6 cell battery, or two 3 cell batteries..

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

It is foreseen since a very long time that you can use A6 and A7.
If fact you can even use A4 A5 if you do not use an I2C sensor so you could e.g. measure 6 voltages + 1 current (if you do not use an I2C sensor).

Here the documentation:
* oXs can measure up to 6 input voltages (please note that depending on manufacturer, some Arduino pro mini have less analog pins available)
* In order to measure voltages, you :
* - must specify the Analog pins (A0 to A7) connected to a battery (e.g. a multicell lipo) or to a sensor (e.g. a temperature sensor convert the temperature in a voltage that can be measured)
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

jhsa wrote: Sun Apr 23, 2017 7:32 pm Ok, this is the datasheet of the Thermistor I bought.
It is a 3950 with a resistance of 100K at 25ºC.
The temperature range is -30ºC to 270ºC, so what temperature must be inserted in the config file?

the temperature range I need to measure is around 110 or 120ºC if the engine is not overheating, so a resistor to VCC of around 4K7??

Thanks

João
I expect that the demo values put in the current config just fit your requirement

Just use the same value for FIRST_NTC_ON_VOLT_NR and for LAST_NTC_ON_VOLT_NR if you have only one thermistor.
#define FIRST_NTC_ON_VOLT_NR 5 // uncomment this line when thermistor are used; specify index of first voltage being used for conversion to temperature (e.g. 5 means VOLT_5)
#define LAST_NTC_ON_VOLT_NR 6 // specify index of last voltage being used for conversion to temperature (e.g. 6 means VOLT_6)
#define SERIE_RESISTOR 4700 // resitance connected to Arduino Vcc (in Ohm)
#define TERMISTOR_NOMINAL 100000 // nominal resistor of NTC (in Ohm)
#define TEMPERATURE_NOMINAL 25 // nominal temperature of NTC (in degree Celcius)
#define B_COEFFICIENT 3950 // B coefficient of NTC
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

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

Post by jhsa »

mstrens wrote:It is foreseen since a very long time that you can use A6 and A7.
If fact you can even use A4 A5 if you do not use an I2C sensor so you could e.g. measure 6 voltages + 1 current (if you do not use an I2C sensor).

Here the documentation:
* oXs can measure up to 6 input voltages (please note that depending on manufacturer, some Arduino pro mini have less analog pins available)
* In order to measure voltages, you :
* - must specify the Analog pins (A0 to A7) connected to a battery (e.g. a multicell lipo) or to a sensor (e.g. a temperature sensor convert the temperature in a voltage that can be measured)
Thank you, I might have missed that one :( I do apologize..
Maybe because it is the first time I need so many analog inputs on just one model ;)
Thanks
João.

Sent from my thor 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
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

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

Post by jhsa »

mstrens wrote:
jhsa wrote: Sun Apr 23, 2017 7:32 pm Ok, this is the datasheet of the Thermistor I bought.
It is a 3950 with a resistance of 100K at 25ºC.
The temperature range is -30ºC to 270ºC, so what temperature must be inserted in the config file?

the temperature range I need to measure is around 110 or 120ºC if the engine is not overheating, so a resistor to VCC of around 4K7??

Thanks

João
I expect that the demo values put in the current config just fit your requirement

Just use the same value for FIRST_NTC_ON_VOLT_NR and for LAST_NTC_ON_VOLT_NR if you have only one thermistor.
#define FIRST_NTC_ON_VOLT_NR 5 // uncomment this line when thermistor are used; specify index of first voltage being used for conversion to temperature (e.g. 5 means VOLT_5)
#define LAST_NTC_ON_VOLT_NR 6 // specify index of last voltage being used for conversion to temperature (e.g. 6 means VOLT_6)
#define SERIE_RESISTOR 4700 // resitance connected to Arduino Vcc (in Ohm)
#define TERMISTOR_NOMINAL 100000 // nominal resistor of NTC (in Ohm)
#define TEMPERATURE_NOMINAL 25 // nominal temperature of NTC (in degree Celcius)
#define B_COEFFICIENT 3950 // B coefficient of NTC
Great, thank you. You even guessed that the temperature sensor will be connected to VOLT_5 :) Joking ;)
Just have to change the LAST_NTC setting to 5, the same as the FIRST_NTC, right?
Apart from that, it seems we might go for some engine run today or tomorrow :)
A lot to test. This, fuel tank level, RPM (which is working very well), etc, before all this gets installed inside the model.

Thank you

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

In my opinion the voltage offset should also be in the basic config.h file, along with scale voltage.
Question, for the NTC, using VOLT_5, shall I set both resistor to voltage and to ground with a value of "0 (zero)??

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
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Also, for sending the temperature to the radio (HUB protocol), do I need to configure a field, or is this one of the default fields??

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

jhsa wrote: Mon Apr 24, 2017 2:34 pm In my opinion the voltage offset should also be in the basic config.h file, along with scale voltage.
Question, for the NTC, using VOLT_5, shall I set both resistor to voltage and to ground with a value of "0 (zero)??

Thanks

João
The doc gives already the reply I think

* Therefore, in section 6.1 and 6.2 ,
* USE_INTERNAL_REFERENCE must be as comment (so with // in front off)
* USE_EXTERNAL_REFERENCE must be as comment (so with // in front off)
* REFERENCE_VOLTAGE must be as comment (so with // in front off)
* RESISTOR_TO_GROUND must be set on 0 (for the index being used)
* OFFSET_VOLTAGE must (normally) be set on 0 (for the index being used)
* SCALE_VOLTAGE must be set on 204.6 (=1000 * 1023/5000) (for the index being used)

About offset in basic config: I put it in advanced because for a normal usage (measuring a voltage) offset should be 0 (or close to 0)
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

jhsa wrote: Mon Apr 24, 2017 2:45 pm Also, for sending the temperature to the radio (HUB protocol), do I need to configure a field, or is this one of the default fields??

Thanks

João
Hou need to configure it. There is no default for voltages (and derived measurements)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

mstrens wrote: Mon Apr 24, 2017 3:48 pm
jhsa wrote: Mon Apr 24, 2017 2:45 pm Also, for sending the temperature to the radio (HUB protocol), do I need to configure a field, or is this one of the default fields??

Thanks

João
Hou need to configure it. There is no default for voltages (and derived measurements)
So, which field should I use to send temperature then?

Ahhh, ok, I see T1 and T2 on the radio.. I suppose i can use these?

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
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

mstrens wrote: Mon Apr 24, 2017 3:46 pm
The doc gives already the reply I think

* Therefore, in section 6.1 and 6.2 ,
*
* RESISTOR_TO_GROUND must be set on 0 (for the index being used)
Yes, you mentioned resistor to ground, what about the other one? I did set both to 0, but other people might not get there and you will have this same question over and over again ;)
* SCALE_VOLTAGE must be set on 204.6 (=1000 * 1023/5000) (for the index being used)


I'm not getting this one I suppose :) Where is the "1000" coming from? I guess the 5000 is the voltage, right?

In my case I am inserting the exact voltage of my regulator's voltage (I do this also for the voltage measurement) which is 5026mV. I guess this difference is irrelevant but some regulators might have a bigger difference..

So, for my setup should I insert (1000*1023/5000) = 203.54?? Is this correct??
About offset in basic config: I put it in advanced because for a normal usage (measuring a voltage) offset should be 0 (or close to 0)
I did have to use an offset of -80 on one of the fields, even if I inserted the real resistance from the resistors.. I believe the offset field needs to be quite often used if you want a correct reading..

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
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Here are my settings..
// ***** 6.2 - Voltage parameters *****
#define OFFSET_VOLTAGE 0 , -80 , 0 , 0 , 0 , 0 // optionnal, can be negative, must be integer, in principe in mv
#define SCALE_VOLTAGE 1.0 , 1.0 , 1.0 , 1.0 , 203.54 , 1.0 // optionnal, can be negative, can have decimals

// ***** 6.3 - Max number of Lipo cells to measure (and transmit to Tx) ***** Is defined only in oXs_config_basic.h file

// ***** 6.4 - Convert voltage to temperature (° Celcius) *****
#define FIRST_NTC_ON_VOLT_NR 5 // uncomment this line when thermistor are used; specify index of first voltage being used for conversion to temperature (e.g. 5 means VOLT_5)
#define LAST_NTC_ON_VOLT_NR 5 // specify index of last voltage being used for conversion to temperature (e.g. 6 means VOLT_6)
#define SERIE_RESISTOR 4626 // resitance connected to Arduino Vcc (in Ohm)
#define TERMISTOR_NOMINAL 100000 // nominal resistor of NTC (in Ohm)
#define TEMPERATURE_NOMINAL 25 // nominal temperature of NTC (in degree Celcius)
#define B_COEFFICIENT 3950 // B coefficient of NTC
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: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

About resistors, the doc says
* If no divider is used for some voltage, set both resistors to 0 (zero)
and the config
#define RESISTOR_TO_GROUND 36 , 20 , 0 , 0 , 0 , 0 // set value to 0 when no divider is used for a voltage; can contains decimals
#define RESISTOR_TO_VOLTAGE 670 , 100.1 , 200 , 39 , 500 , 0 // set value to 0 when no divider is used for a voltage; can contains decimals

It seems me clear.
But in fact, when resistor to ground is 0, the other value is discarded.

5000 is supposed to be the Vcc voltage (mvolt)
1000 is just a factor to improve internal accurary (because some internal fields are integers and not float).

NB: If you specify a value other than 5000 for REFERENCE_VOLTAGE, then you have to calculate offset (for NTC) using the same value.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Thanks, yes the doc does say that :)

I'm not using 5000mV because sometimes the voltage regulator outputs something a bit different.. In this case it is quite close..
So is this SCALE value correct for my setup?

(1000*1023/5000) = 203.54??

I have just been fighting with the sensor to find a way to attach it to my test engine.. :) But i think I got it now :)
I don't expect this to be very accurate by the way.. If it can be used just as a reference, I will just see what reading I get when the engine is setup correctly, and when it is running a bit lean.. then note those values. The temp reading itself doesn't need to be 100% accurate..

Thank you.

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

indeed , if you have
#define REFERENCE_VOLTAGE 5026

then you should use scale
1000*1023/5026 = 203.54

If #define REFERENCE_VOLTAGE is set as comment, then oXs supposes that Vcc = 5000.

If you only measures NTC, in fact the value for reference voltage does not matter because arduino ADC will return the same value for different Vcc (arduino ADC and NTC voltage are both ratiometric).

REFERENCE_VOLTAGE play a role when you want to measure an abolute voltage (like a lipo).
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Ok, thank you.. For now I have good news :)

Sending temp as T1, the radio is reporting the room temperature quite correctly I think.
I put the sensor in my mouth (didn't chew it :D ) and the temp went up to 35 degrees C. I know that my normal body temperature is just above 36 degrees C.
The resistor I used, 4k7, should give me better accuracy at about 110 degrees C, correct? So if I have 1 degree difference at 35 degrees, this is a good sign, right??

Thanks

João

Sent from my thor 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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I have no feed back on accuracy but I expect that good results should be achieved when the resistor is selected in order to get about Vcc/2 on arduino pin for the expected temperature.

Do not expect an accuracy of 1°C. I think that there are some tolerances on NTC, that the temperature of NTC is not exactly equal to the temperature of the motor where is is fixed, that the way temperature is calculated (based on B parameter) is just an approximation.

Best would be to test it with boiling water (need to be isolated for sure) . It should give about 100 °c (still it depends of atmospheric pressure).
If requires, you could adjust offset and scale parameters to get better values.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Of course..
But as I said, the important thing here is not accuracy, but to know what is a good reading for this specific engine, and what would be too hot. It doesn't matter how accurate the reading is as long as it is consistent, that means, that I get the same reading for the same temperature all the time. Then I can program an alarm that can be trusted..

I know that the NTC resistance variation with temperature is not linear.. We just have to look at the datasheet to see that..
But at room temperature it seems to be OK, so i expect it to be more accurate at the temperature that should give VCC/2, which is about 110 degrees C..


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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

mstrens wrote: Mon Apr 24, 2017 5:35 pm indeed , if you have
#define REFERENCE_VOLTAGE 5026

then you should use scale
1000*1023/5026 = 203.54

If #define REFERENCE_VOLTAGE is set as comment, then oXs supposes that Vcc = 5000.

If you only measures NTC, in fact the value for reference voltage does not matter because arduino ADC will return the same value for different Vcc (arduino ADC and NTC voltage are both ratiometric).

REFERENCE_VOLTAGE play a role when you want to measure an abolute voltage (like a lipo).
Ok, using this calculation, and those are my actual values, the scaling seems to be NOT correct.
I just had a chance to run one of my engines with an NTC installed on the cylinder head, near the base of the glow plug.

At room temperature the reading seems to be quite close. Compared with my temperature measuring gun (chinese, don't know how accurate it is), at 36 degrees, I already noticed a 1 degree difference.
At 100 degrees, the radio displays around 120. At 130 degrees, the radio displays around 170. This is quite a difference. it seems obvious that the higher the temperature, the grater is the difference between radio and temp gun..
I will run some more tests today, but can't start the engine anymore.. too noisy and I don't want to bother my neighbors.. But I can try to heat up the top of the engine with my heat gun, or stick another NTC to a metal plate and heat it up, just for testing..

Any ideas please??

Thank you..

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

Post Reply

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