User Tools

Site Tools


vatt:mirror_cell_thermal_reader

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 8D590K thermal sensors. Four of these sensors are located on the telescope struts and 3 are in the mirror cell. The Arduino board communicates with vatttel through an RS-232 serial port. vatttel (TCS) requests the thermal information from each thermal sensor over the serial port by sending a 't' followed a carriage return '\r'. The arduino board then sends a string of white space separated temperatures. +The VATT Thermal System is controlled by an Arduino Mega board located in the mirror cell. It is connected to 7 analog AD 590K thermal sensors. Four of these sensors are located on the telescope struts and 3 are in the mirror cell. The Arduino board communicates with vatttel through an RS-232 serial port. vatttel (TCS) requests the thermal information from each thermal sensor over the serial port by sending a 't' followed a carriage return '\r'. The arduino board then sends a string of white space separated temperatures. 
  
  
Line 20: Line 20:
  
 ===Firmware=== ===Firmware===
-Firmware as of 9-2-2014+Firmware as of 9-3-2014
 <code> <code>
 #include <Wire.h> #include <Wire.h>
Line 31: Line 31:
 #define MV_PER_CNT 0.188 #define MV_PER_CNT 0.188
 #define KELS_PER_CNT MV_PER_CNT/MV_PER_KEL #define KELS_PER_CNT MV_PER_CNT/MV_PER_KEL
 +
 +/*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 't\r' via its serial port  it returns a string 
 +of 7 white space seperated temperatures followed by a '\n'
 +
 +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://soweb.as.arizona.edu/~tscopewiki/doku.php?id=vatt:mirror_cell_thermal_reader
 +
 +
 +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.00.0, 0.00.00.00.00.0, 0.0};+//Offsets. Most of this is counter-acting the hard coded offsets in 
 +//vatttel 
 +float temp_offsets[NCHAN] = {0.42.7, 0.4-1.53.33.3-1.5, 0.0}; 
 + 
  
 void setup(void)  void setup(void) 
Line 176: Line 193:
     {     {
       toggle13();//toggle the light for debug         toggle13();//toggle the light for debug  
-      Serial3.print('t\r');+      //Serial3.print('t\r'); 
 +      //vatttel expects an echo. 
 +      printTemps( adc ); 
 +      
       printTemps( adc );       printTemps( adc );
              
vatt/mirror_cell_thermal_reader.1409726605.txt.gz · Last modified: 2014/09/02 23:43 by scott