DC2100A  1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Reference Application File for Monitoring Temperature Sensors through the LTC6804-2 Battery Monitor on the DC2100A PCB. More...

Go to the source code of this file.

Detailed Description

Reference Application File for Monitoring Temperature Sensors through the LTC6804-2 Battery Monitor on the DC2100A PCB.

Definition in file Temperature.h.

Functions

void Temperature_Init (void)
 Initializes the parts of the Temperature Module, that need to be initialized upon power-up of the PIC. More...
 
BOOLEAN Temperature_Wakeup_Init (void)
 Initializes the parts of the Temperature Module, that need to be initialized upon wakeup of the LTC6804. More...
 
void Temperature_Monitor_Task (void)
 Executes the Temperature Monitor task. More...
 
int16 Temperature_Get (int8 board_num, int8 temperature_num)
 Gets one temperature from one DC2100A PCB. More...
 
int16 * Temperature_Adc_Value_Get (int8 board_num)
 Gets the raw ADC values for all of the thermistors on one DC2100A board. More...
 

Macros

Temperature Monitor Module Constants

On DC2100A board, R35 and C30 form a 100ms time constant (thermistor resistance is insignificant to R35 at 0°C).

Wait 6 time constants before attempting to read thermistors. 3 time constants was determined to give unacceptable error at temperatures below -20°C.

#define TEMPERATURE_THERMISTOR_DELAY   600
 in ms, the delay to wait between thermistor measurements More...
 
#define TEMPERATURE_TASK_RATE   TEMPERATURE_THERMISTOR_DELAY
 in ms, the rate at which the temperature monitor task is executed. More...
 

Variables

unsigned int32 temperature_timestamp
 Timestamp taken when last temperature measurement was started. More...
 

Function Documentation

int16* Temperature_Adc_Value_Get ( int8  board_num)

Gets the raw ADC values for all of the thermistors on one DC2100A board.

Returns
a pointer to the thermistor ADC values for this board. Returns NULL if all ADC values have not yet been taken.
Parameters
board_numThe logical address for the PCB containing this Temperature.

Definition at line 298 of file Temperature.c.

int16 Temperature_Get ( int8  board_num,
int8  temperature_num 
)

Gets one temperature from one DC2100A PCB.

Returns
the temperature in °C.
Parameters
board_numThe logical address for the PCB containing this Temperature.
temperature_numThe temperature number to get from this PCB.

Definition at line 286 of file Temperature.c.

void Temperature_Init ( void  )

Initializes the parts of the Temperature Module, that need to be initialized upon power-up of the PIC.

Returns
void

Definition at line 167 of file Temperature.c.

void Temperature_Monitor_Task ( void  )

Executes the Temperature Monitor task.

  • Measures one thermistor value on each DC2100 board in the system.
  • Calculates the temperature from the thermistor ADC value..
  • Sets up LTC1380 analog mux channel for the next thermistor measurement.
  • This task must be executed at a maximum of TEMPERATURE_THERMISTOR_DELAY, to allow circuit to settled after analog mux is switched.
    Returns
    void

Definition at line 217 of file Temperature.c.

BOOLEAN Temperature_Wakeup_Init ( void  )

Initializes the parts of the Temperature Module, that need to be initialized upon wakeup of the LTC6804.

Returns
TRUE if initialization was successful.

Definition at line 184 of file Temperature.c.

Macro Definition Documentation

#define TEMPERATURE_TASK_RATE   TEMPERATURE_THERMISTOR_DELAY

in ms, the rate at which the temperature monitor task is executed.

Definition at line 81 of file Temperature.h.

#define TEMPERATURE_THERMISTOR_DELAY   600

in ms, the delay to wait between thermistor measurements

Definition at line 80 of file Temperature.h.

Variable Documentation

unsigned int32 temperature_timestamp

Timestamp taken when last temperature measurement was started.

Definition at line 97 of file Temperature.c.