Help with Meitrack VT310, please

Mugur7 years ago

Hello.

I have installed traccar server under Ubuntu. Configured my device VT310(only one) and everything works perfect. If i send web commands from the web-interface all of them works.

My device have 5 inputs, 3 digital and 2 analog inputs (ADC1 and ADC2). What i am trying to achieve is to display a temperature (based on formula of course) using ADC1. I have connected the temperature sensor. The resistive value of the sensor is 25Kohm at 0Celcius and 5Kohm at 200Celcius.

The sensor is connected as per Meitrack manual meaning: a resistor of the same value as the max value of the sensor is connected in series with the sensor and the ADC1 input is connected on the joining point. My understanding is that you need half of the voltage split in 2 so we will have max value actually 6V on the input.

What i need is and example of expression(formula) i have to use in Custom Attributes so it will display a temperature on that field. At this moment the ADC1 is showing 544 and are 24 degrees celsius on that sensor. If i get the sensor warmer or cooler the value of the ADC1 changes accordingly, so, i guess, from the electrical point of view everything i did was correct.

Any help from people that worked with ADC1 and ADC2 expressions before will be greatly appreciated.

Thank you !

Anton Tananaev7 years ago

What is the math formula to calculate temperature from ADC? Use same for the computer attribute expression.

Mugur7 years ago

Anton, that is my problem. i do not have a formula...
ADC1 is reporting 544 on the State section of the traccar manager.

The only reference to a formula that i can find in the manual is an example calculation of fuel left in percentage:
Percentage left = [(AD value) / (1024x2) -AD value] x 100% and another reference to calculate voltage:
Input voltage = (AD x 6)/1024

So i have found nothing (and believe me i tried hard before harrasing people here) about how to set a formula based on what i know about a sensor (min/max value at given temps)

I did created a computed attribute just to test: (using that 0.045 was trial and error till i've got real temperature)

Index
adc1 ? adc1 * 0.045 : null
Number

The result using the above shows 23.90 degrees celcius wich is correct.

I am sure it can't be that simple...

Anton Tananaev7 years ago

You should probably get 2 measures with high and low temperature and then derive a formula from those measurements. Simplest school math knowledge should be enough to do that.