Electronic Load  1.0
Programmable Constant Current Sink
Functions
sensors.c File Reference

Routines for handling Sensor values. More...

Include dependency graph for sensors.c:

Functions

uint16_t ADCfromTemp (double temp)
 Computes the ADC-Value for a given Temperature. More...
 
double HSTempFromADC (void)
 Converts the ADC-Temp Value of the Heat Sink NTC to Celsius. More...
 
double P12FromADC (uint16_t val)
 Converts a Unreg-Raw ADC Value to Voltage. More...
 
double P5FromADC (uint16_t val)
 Converts a P5-Raw ADC Value to Voltage. More...
 
double RNTCfromTemp (double t)
 Computes the NTC-Resistance for a given Temperature. More...
 
double TempFromADC (void)
 Converts the ADC-Temp of the Display NTC Value to Celsius This function also calculates the derating factor. More...
 

Detailed Description

Routines for handling Sensor values.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ P5FromADC()

double P5FromADC ( uint16_t  val)

Converts a P5-Raw ADC Value to Voltage.

Parameters
valThe ADC Value
Returns
The Voltage

◆ P12FromADC()

double P12FromADC ( uint16_t  val)

Converts a Unreg-Raw ADC Value to Voltage.

Parameters
valThe ADC Value
Returns
The Voltage

◆ TempFromADC()

double TempFromADC ( void  )

Converts the ADC-Temp of the Display NTC Value to Celsius This function also calculates the derating factor.

Note
This function takes extensive floating point operations and may thus block for about 400us.
Returns
The Temperature in Celsius
Here is the call graph for this function:

◆ HSTempFromADC()

double HSTempFromADC ( void  )

Converts the ADC-Temp Value of the Heat Sink NTC to Celsius.

Note
This function takes extensive floating point operations and may thus block for about 400us.
Returns
The Temperature in Celsius
Here is the call graph for this function:

◆ RNTCfromTemp()

double RNTCfromTemp ( double  t)

Computes the NTC-Resistance for a given Temperature.

Note
This function takes extensive floating point operations and may thus block for about 4ms.
Returns
The Resistance in Ohms

◆ ADCfromTemp()

uint16_t ADCfromTemp ( double  temp)

Computes the ADC-Value for a given Temperature.

Note
This function takes extensive floating point operations and may thus block for about 4ms (mostly spent in RNTCfromTemp()).
Returns
The Temperature in Celsius
Here is the call graph for this function: