NorthStart-Requirements/Documents/2025-02-ADC-Study-HardwareSoftwareInterface.md

3.6 KiB

Adc-Study-HardwareSoftwareInterface

Table of Content

  1. Adc Study, hardware software interface
    1. History
  2. Introduction
    1. Reference order
  3. Hardware Software Interface
    1. ADC software interface
    2. ADC software configuration
    3. Data acquisition loop
    4. Data acquisition loop
  4. Tests to be performed
    1. Values at max voltage
    2. Values at min voltage
    3. Valuees with a known resistor value

History

Rev Date Author Description
01 23/02/2025 Ebersold A. Creation, initial version

Introduction

The aim of this document is to study the delta temperature measurement between the real temperature and the Condictivity board temperature measures.

Reference order

This document is referenced as 2025-02-ET-0001-Adc-Study-HardwareSoftwareInterface.md. It was created to answer nehemis request regarding poor temperature measurement results on Conductivity board. The delta between the real temparture and the measure value of the board is 2C°.

Hardware software interface

The eletronic part is depicted below. It shows the resitor devider and the

drawing drawing

Fig 1. Electronic block

The TEMP pin is directly connected to pin PA0. Hence it must be configured as an analogue input.

ADC software configuration

As of today, the ADC is configured to perfom single acquisitions. Hight precision measurement is expected by the ADC. Hence it shall use the 12Bits resolution.

Remarque : There is a possibility to perform a tempature compensatation on VintRef value. This requires a two value aquisition for one measurement. TODO verify if this is required or not.

Data acquisition loop

Looking at the firmware, it appears that the temperature acquisition happens after each scheduler loop. A acquisition period should be defined.

Motivation: The temperature changes slowely and it's not necessary to aquire a temperature every 10ms or even lesser.

Data conversion blocks

The temperature computation goes through 3 basic blocks.

  1. The raw value acquisition from the ADC

  2. The conversion of the raw value into a Voltage

  3. The conversion of the voltage into a resistor value

  4. The conversion of the resistor into Kelvin

    This block uses the Steinhard-hard method to convert the resistor value into a temperature.

  5. The conversion from Kelvin to Celsius

Tests to be performed

In order to identify the root cause of the temperature measurement, I would suggest to create readable Open CAN disctionnary registers to be able to readout the ADC raw value, the computed Voltage.

For each test below, compare the voltage computed by the board with the value measure with a voltmeter at TEMP.

Values at max voltage

Connect CTN_A to 3.3V or VCC and read out the raw value and the voltage.

Values at min voltage

Connect CTN_A to ground and read out the raw value and the voltage.

Values with a known Resistor value

Connect a know resistor between CTN_A and CTN_B and read out the raw value and the voltage.