This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vatt:mirror_cell_thermal_reader [2014/09/02 23:43] scott created |
vatt:mirror_cell_thermal_reader [2014/09/03 10:11] (current) scott |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====VATT Thermal System===== | =====VATT Thermal System===== | ||
- | The VATT Thermal System is controlled by an Arduino Mega board located in the mirror cell. It is connected to 7 analog | + | The VATT Thermal System is controlled by an Arduino Mega board located in the mirror cell. It is connected to 7 analog |
Line 20: | Line 20: | ||
===Firmware=== | ===Firmware=== | ||
- | Firmware as of 9-2-2014 | + | Firmware as of 9-3-2014 |
< | < | ||
#include < | #include < | ||
Line 31: | Line 31: | ||
#define MV_PER_CNT 0.188 | #define MV_PER_CNT 0.188 | ||
#define KELS_PER_CNT MV_PER_CNT/ | #define KELS_PER_CNT MV_PER_CNT/ | ||
+ | |||
+ | /*This is the firmware that resides on the Arduino mMega | ||
+ | VATT Thermal system board. It reads in temperatures from | ||
+ | seven analog sensors located on the VATT Telescope. When | ||
+ | Querried with a ' | ||
+ | of 7 white space seperated temperatures followed by a ' | ||
+ | |||
+ | The order of the sensor data located in the return string is as follows: | ||
+ | |||
+ | MIRROR_TEMP MIRROR_AIR_TEMP MIRROR_TEMP AIR_TEMP STRUT_TEMP STRUT_TEMP AIR_TEMP | ||
+ | |||
+ | For more information on the VATT thermal system please go to this website: | ||
+ | https:// | ||
+ | |||
+ | |||
+ | Author Scott Swindell | ||
+ | Date 9-3-2014 | ||
+ | */ | ||
+ | |||
Line 46: | Line 65: | ||
short sum_iter = 1;//keeps count of how many we have summed | short sum_iter = 1;//keeps count of how many we have summed | ||
- | /*these are offset values inherit | ||
- | in the electronics. The value 0.56mv | ||
- | was measured fot the first channel | ||
- | only and needs to be measure for all | ||
- | 8 channels. | ||
- | */ | ||
- | //Temps look good but just in case we need offsets in the future. | + | |
- | float temp_offsets[NCHAN] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; | + | //Offsets. Most of this is counter-acting the hard coded offsets in |
+ | //vatttel | ||
+ | float temp_offsets[NCHAN] = {0.4, 2.7, 0.4, -1.5, 3.3, 3.3, -1.5, 0.0}; | ||
+ | |||
void setup(void) | void setup(void) | ||
Line 176: | Line 193: | ||
{ | { | ||
toggle13();// | toggle13();// | ||
- | Serial3.print(' | + | |
+ | //vatttel expects an echo. | ||
+ | printTemps( adc ); | ||
+ | | ||
printTemps( adc ); | printTemps( adc ); | ||
| |