background image

15 

 
APPENDIX E  

CRBASIC PROGRAMMING

 

 

Programming the MEMS Tiltmeter with CRBASIC 

 

Description:

 

 
CRBASIC is the programming Language used with Campbell Scientific CRBASIC Dataloggers. 
Campbell’s Loggernet Software is typically used when programming in CRBASIC. The MEMS 
sensor should be read with the VoltDiff instruction and the output averaged 100x. No Thermistor 
in this example. 
 

Sample Program: 
 
'Declare Public Variables for Reading MEMS Sensor 

 
Public MEMS_1 
Public MEMS_2 
Public MEMS_3 
Public MEMS_Output  

'Output of the MEMS Sensor

 

 

'Store MEMS Output every 2 minutes 

 

DataTable (MEMS_EXAMPLE,1,-1) 
 

Sample (1,MEMS_Output,IEEE4) 

EndTable 
 
BeginProg 
 
 

'2 min scan interval 

 
 

Scan (2,min,0,0) 

 
 

 

'Read MEMS Sensor on Differential Channel 1 and average 100x Readings 

 
 

 

Delay(0,100,mSec) 

 

 

MEMS_3 = 0 

 

 

For MEMS_1 = 1 To 100 

 

 

 

VoltDiff (MEMS_2,1,mV5000,1,False,0,250,0.001,0) 

 

 

 

MEMS_3 =  MEMS_2 

 

 

Next 

 

 

MEMS_Output = MEMS_3 / 100 

 
 

 

CallTable MEMS_EXAMPLE 

 

NextScan 

EndProg 
 
 
 

Summary of Contents for 6160

Page 1: ...contained herein is believed to be accurate and reliable However Geokon Inc assumes no responsibility for errors omissions or misinterpretation The information herein is subject to change without notification Copyright 2006 2008 2009 2010 2011 2015 by Geokon Inc REV O 7 15 Installation Manual Model 6160 6161 MEMS Tilt Sensor ...

Page 2: ......

Page 3: ...re are no warranties except as stated herein There are no other warranties expressed or implied including but not limited to the implied warranties of merchantability and of fitness for a particular purpose Geokon Inc is not responsible for any damages or losses caused to other equipment whether direct indirect incidental special or consequential which the purchaser may experience as a result of t...

Page 4: ......

Page 5: ...TALOGGERS 6 3 2 RB 500 READOUT BOX 6 3 3 MEASURING TEMPERATURE 6 4 DATA REDUCTION 7 4 1 TILT CALCULATION 7 4 2 TEMPERATURE CORRECTION 7 4 3 ENVIRONMENTAL FACTORS 8 5 TROUBLESHOOTING 8 APPENDIX A SPECIFICATIONS 10 A 1 MEMS TILT SENSOR 10 A 2 THERMISTOR SEE APPENDIX B ALSO 10 APPENDIX B THERMISTOR TEMPERATURE DERIVATION 11 APPENDIX C WIRING CODE 12 APPENDIX D 6160 STANDARD ADDRESSABLE SYSTEMS 13 SPE...

Page 6: ...ECTION SCHEME 6 EQUATION 1 INCLINATION VERSUS VOLTS 7 EQUATION 2 TILT VERSUS VOLTS 7 EQUATION 3 TILT VERSUS VOLTS CORRECTED FOR TEMPERATURE 7 FIGURE 6 SAMPLE MODEL 6160 OR 6150 CALIBRATION SHEET 9 TABLE A 1 MODEL 6160 AND 6161 TILT SENSOR SPECIFICATIONS 10 EQUATION B 1 CONVERT THERMISTOR RESISTANCE TO TEMPERATURE 11 TABLE B 1 THERMISTOR RESISTANCE VERSUS TEMPERATURE 12 TABLE C 1 CABLE 03 250V0 WIR...

Page 7: ...e a Nema 4 enclosure Both types are shown in Figures 1 and 2 Each style of housing contains either one MEMS micro electrical mechanical system sensor or two MEMS sensors oriented at 90 degrees to measure biaxial tilts All types include a thermistor for measuring temperatures They are designed to be attached to the structure so that they can sense and measure any tilting of the structure in uniaxia...

Page 8: ...alogger or the RB 500 readout box see section 3 and the current reading compared to the calibration readings Carefully hold the sensor in an approximately vertical position and observe the reading The sensor must be held in a steady position The readings should be close to the factory vertical reading The temperature indicated by the thermistor should be close to ambient Checks of electrical conti...

Page 9: ...ng out with compressed air if possible Insert the 1 4 drop in anchor which has a setting pin inside it into the hole The threaded end should be closest to the opening Use the supplied inch Rawl setting tool and a hammer to expand the anchor with 2 or 3 sharp blows on the setting pin Thread the supplied 2 inch long 1 4 20 threaded anchor rod into the anchor Attach the mounting bracket to the anchor...

Page 10: ...crews to secure the tiltmeter in place Check the reading again after tightening to make sure it still reads within 0 15 volts of the zero reading If the tiltmeter is installed in an exposed location in a construction area and or if the installation is in direct sunlight it should be covered with a protective enclosure and or insulation With a biaxial sensor the second B MEMS sensor is included in ...

Page 11: ... 3M Scotchcast model 82 A1 incorporate casts placed around the splice then filled with epoxy to waterproof the connections When properly made this type of splice is equal or superior to the cable itself in strength and electrical properties Contact Geokon for splicing materials and additional cable splicing instructions 2 4 Lightning Protection The Model 6160 MEMS Tiltmeter unlike numerous other t...

Page 12: ...onitoring The RB 500 readout box is also useful during initial installations and for setting up Datalogger systems 3 3 Measuring Temperature Although the temperature dependence of the MEMS tilt meter is tiny and usually does not require compensation it sometimes happens that temperature effects can cause real changes of tilt therefore each MEMS tilt sensor is equipped with a thermistor for reading...

Page 13: ...he Model 6160 tiltmeter Note that for measurements of tilt i e changes of inclination where R0 is the initial reading and R1 is a subsequent reading the small zero reading Rzero at zero inclination cancels out so that Calculated Tilt G R1 R0 Equation 2 Tilt versus volts 4 2 Temperature Correction The Model 6160 MEMS Tiltmeter has very small temperature sensitivity equal to 1 arc second per degree ...

Page 14: ...es of electrical noise are motors generators and antennas Make sure the shield drain wire is connected to ground whether using a portable readout or datalogger Does the readout work with another tilt sensor If not the readout may have a low battery or be malfunctioning Symptom Tilt Sensor Fails to Read Is the cable cut or crushed This can be checked with an ohmmeter The nominal resistance of the t...

Page 15: ...9 Figure 6 Sample Model 6160 or 6150 Calibration Sheet ...

Page 16: ...Electrical Cable 3 twisted pair 6 conductor 24 AWG Foil shield Polyurethane jacket nominal OD 6 3 mm Or 6 twisted pair 12 conductor 24 AWG Foil shield Polyurethane jacket nominal OD 7 9 mm Table A 1 Model 6160 and 6161 Tilt Sensor Specifications Notes 1 Depends on readout equipment For best results requires a 4 digit digital voltmeter Averaging will yield resolution on the order of 2 arc seconds 2...

Page 17: ...43 342 2 83 107 9 123 77 66K 36 8006 4 1363 44 331 5 84 105 2 124 72 81K 35 7618 5 1310 45 321 2 85 102 5 125 68 30K 34 7252 6 1260 46 311 3 86 99 9 126 64 09K 33 6905 7 1212 47 301 7 87 97 3 127 60 17K 32 6576 8 1167 48 292 4 88 94 9 128 56 51K 31 6265 9 1123 49 283 5 89 92 5 129 53 10K 30 5971 10 1081 50 274 9 90 90 2 130 49 91K 29 5692 11 1040 51 266 6 91 87 9 131 46 94K 28 5427 12 1002 52 258 ...

Page 18: ... Diff C A Out Diff White s Black D A Out Diff D A Out Diff Bare E Shield E Shield Green J Thermistor F B Out Diff Green s Black K Thermistor G B Out Diff Table C 1 Cable 03 250V0 Wiring 06 312V0 Cable Connector Pin Designation Biaxial MEMS with Thermistor Red A 12VDC Red s Black B Ground White C A Out Diff White s Black D A Out Diff Bare E Shield Green F B Out Diff Green s Black G B Out Diff Blue ...

Page 19: ...e the 1st channel Once the channel is selected a delay of 100 mS is required for the sensor to warm up The sensor s A axis is read 100 times and then the average of these readings is stored The sensors B axis is then read Finally the sensor s thermistor is read through a bridge completion circuit and the temperature is calculated using a polynomial formula Examples of CRBASIC programming can be fo...

Page 20: ...cuit Figure D 1 Thermistor Bridge Circuit Specifications for Addressable System Logic Level Style Circuit Board Board Dimensions 4 5 L x 1 155 W x 0 4 H Power Requirements 12V 3V 110mA max when active 700uA max standby Operating Temperature 20 to 70 C Contact Resistance 100 mΩ typ Contact Breakdown Voltage 1500 Vrms Relay open close time 4mS max ...

Page 21: ...n this example Sample Program Declare Public Variables for Reading MEMS Sensor Public MEMS_1 Public MEMS_2 Public MEMS_3 Public MEMS_Output Output of the MEMS Sensor Store MEMS Output every 2 minutes DataTable MEMS_EXAMPLE 1 1 Sample 1 MEMS_Output IEEE4 EndTable BeginProg 2 min scan interval Scan 2 min 0 0 Read MEMS Sensor on Differential Channel 1 and average 100x Readings Delay 0 100 mSec MEMS_3...

Page 22: ...el 2 and the Thermistors are read with Single Ended Channel 5 and the bridge excited with EX1 The string is enabled with Control Port 1 and clocked with control port 8 Declare Public Variables for Reading MEMS Sensor and Thermistor Public MEMS_1 Public MEMS_2 Public MEMS_3 Public THERM_1 Public THERM_2 Public THERM_3 Public Channel Counter Public Reading_A Output of the A Axis Public Reading_B Out...

Page 23: ...fferential voltage measurement on DIFF1 VoltDiff MEMS_2 1 mV5000 1 False 0 1000 0 001 0 Sum the readings MEMS_3 MEMS_3 MEMS_2 Increment To 100 Next Calculate the Average reading value Reading_A MEMS_3 100 Read the B axis Reset the temporary storage location MEMS_3 0 counter For MEMS_1 1 To 100 differential voltage measurement on DIFF2 VoltDiff MEMS_2 1 mV5000 2 False 0 1000 0 001 0 Sum the reading...

Page 24: ...V2500 5 VX1 1 2500 0 1000 250 2 5 0 0 Calculate the temperature THERM_2 THERM_1 5000 THERM_3 2 5 THERM_2 1000 THERM_1 THERM_2 Reading_THERM 1 0014051 0002369 LOG THERM_3 0000001019 LOG THERM_3 3 273 2 2nd clock using C8 PortSet 8 1 Delay 0 10 MSEC PortSet 8 0 Delay 0 10 MSEC Next sensor Next Disable String PortSet 1 0 CallTable MEMS_EXAMPLE NextScan EndProg ...

Reviews: