Inclinometer

Status
Not open for further replies.
Can you show me exactly on the data sheet where it mentions the point you have made above. I am interested to know how it measures static acceleration.
It's like you saying you can work out how much money I have in my pocket by rubbing my head.

Just read the data sheet. I have no desire to rub your greasy head.
 

hi,
Perhaps this will explain.

Measuring accelerations - Classroom - TiePie engineering
 
It is not clear if the output of the device produces a tilt reading when the device is static. It seems the device must be rotated and during rotation it produces a value. On top of this the change in output is extremely small for even a rotation of 15 degrees and certainly would not be suitable for an inclinometer.
I have been asked to design an inclinometer before and the requirement was for an accuracy of 1 degree and this device would certainly not fulfull this requirement. This is what my whole topic was about.
 

Here you go.......... first lag at a sin table value, using the Dimension Engr. DE-ACCM2G sensor in the y-axis. It doesn't sound like the you can be convinced this will work, so I will not try.
 

Attachments

  • IM000176.JPG
    135.8 KB · Views: 344
  • IM000174.JPG
    119.4 KB · Views: 331
The acceleration of gravity is always there, colin, and the accelerometer measures that. You put two at right angles to determine the vector. Doen't matter if you're rotating it or not.
 
If the device (chip) were able to measure the force of gravity by static detection from each of the sensors, and you say that each of the sensors can re-measure the force of gravity when each sensor is rotated, then why do you need two sensors?
The sensors cannot measure the force of gravity in static mode.
It always measures acceleration and does a calculation.
 
The sensors cannot measure the force of gravity in static mode.
It always measures acceleration and does a calculation.

If you are saying that if you put the sensor on the table and it will not measure anything because it is not moving - you are dead wrong ... (check the picture nickelflippr showed to you) ....

I also use accelerometar as a tilt meter .. completely stationary, the whole thing is that if you "move" it you lose precision as then it calculates "movement" + gravity...

so, you put it on table, flat - it show valueX, you tilt it 2 degrees (and leave it tilted - do not move it) it show X+dY ... if you measure it in 2 known positions you have very accurate "tilt meter" (under 1 degree accuracy)

I use this breakout board: **broken link removed**

Check out the description:
Measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration.


here is the example code in mikroC (first you calibrate it and then you measure tilt in 3 axes):
Code:
const char *msg1="Board to pos    ";
const char *msg2="and press RD0   ";
const char *msg3="Zero G values : ";
const char *msg4="One G values :  ";
const char *msg5="Angles:";
const char *msg6="X=     Y=     Z=    ";

char positionNo=1;

signed int x, y, zz;
signed int zeroG_x, zeroG_y, zeroG_z;
signed int oneG_x, oneG_y, oneG_z;
signed int meas_x, meas_y, meas_z;
char text[32];

void Usart_Write_Text(char* wr_txt) {
  while (*wr_txt)
    Usart_Write(*wr_txt++);
    
  Usart_Write(10);
  Usart_Write(13);
}

// --- Copying strings from ROM to RAM
void strConstCpy(char *dest, const char *source) {
  while(*source)
  *dest++ = *source++ ;
  
  *dest = 0 ;
}

void DoMeasureXYZ() {
  meas_x = Adc_Read(0);   // Measure X_out
  meas_y = Adc_Read(1);   // Measure Y_out
  meas_z = Adc_Read(2);   // Measure Z_out
}

void WriteXYZ(signed int wr_x, signed int wr_y, signed int wr_z) {
  strConstCpy(text,msg6);
  if (wr_x < 0) {
     text[2] = '-';
     wr_x = -wr_x;
     }
  else   
     text[2] = wr_x/1000+48;
     
  text[3] = (wr_x/100)%10+48;
  text[4] = (wr_x/10)%10+48;
  text[5] = wr_x%10+48;


  if (wr_y < 0) {
     text[9] = '-';
     wr_y = -wr_y;
     }
  else   
     text[9] = wr_y/1000+48;
     
  text[10] = (wr_y/100)%10+48;
  text[11] = (wr_y/10)%10+48;
  text[12] = wr_y%10+48;
  
  
  if (wr_z < 0) {
     text[16] = '-';
     wr_z = -wr_z;
     }
  else
     text[16] = wr_z/1000+48;

  text[17] = (wr_z/100)%10+48;
  text[18] = (wr_z/10)%10+48;
  text[19] = wr_z%10+48;
  
  Usart_Write_Text(text);
}

void Calibrate() {

  strConstCpy(text,msg1);         //  1__ Put the Accel board in the position 1 :
  text[13] = positionNo++ + 48;   //      parallel to earth's surface
  Usart_Write_Text(text);         //      Z_axis is vertical with Z label UP
  strConstCpy(text,msg2);         //      to measure the Zero Gravity values for X and Y
  Usart_Write_Text(text);         //      and 1G Z value
  while (PORTD.F0 == 0);          //      Loop until RD0 becomes 1

  DoMeasureXYZ();
  zeroG_x = meas_x;
  zeroG_y = meas_y;
  oneG_z  = meas_z;
  Delay_ms(1000);


  strConstCpy(text,msg1);         //  2__ Put the Accel board in the position 2 :
  text[13] = positionNo++ + 48;   //      X_axis is vertical with X label UP
  Usart_Write_Text(text);
  strConstCpy(text,msg2);         //      to measure the 1G X value
  Usart_Write_Text(text);         //      and Zero Gravity value for Z
  while (PORTD.F0 == 0);          //      Loop until RD0 becomes 1

  DoMeasureXYZ();
  oneG_x = meas_x;
  zeroG_z = meas_z;
  Delay_ms(1000);

  strConstCpy(text,msg1);         //  3__ Put the Accel board in the position 3 :
  text[13] = positionNo++ + 48;   //      Y_axis is vertical with Y label UP
  Usart_Write_Text(text);
  strConstCpy(text,msg2);         //      to measure the 1G Y value
  Usart_Write_Text(text);
  while (PORTD.F0 == 0);          //      Loop until RD0 becomes 1

  DoMeasureXYZ();
  oneG_y = meas_y;

  strConstCpy(text,msg3);         // Display ZeroG values
  Usart_Write_Text(text);
  WriteXYZ(zeroG_x, zeroG_y, zeroG_z);
  Delay_ms(3000);

  strConstCpy(text,msg4);         // Display OneG values
  Usart_Write_Text(text);
  WriteXYZ(oneG_x, oneG_y, oneG_z);
  Delay_ms(3000);
}

void Read_Angles() {
 double div_x, x_rad, div_y, y_rad, div_z, z_rad ;

  DoMeasureXYZ();
  div_x = (float)(meas_x-zeroG_x) / (oneG_x-zeroG_x);  // measured_G / one_G
  x_rad = asin( div_x );                               // x angle in radians
  x = (x_rad*180) / 3.14;                              // x angle in degrees

  div_y = (float)(meas_y-zeroG_y) / (oneG_y-zeroG_y);  // measured_G / one_G
  y_rad = asin( div_y );                               // y angle in radians
  y = (y_rad*180) / 3.14;                              // y angle in degrees

  div_z = (float)(meas_z-zeroG_z) / (oneG_z-zeroG_z);  // measured_G / one_G
  z_rad = asin( div_z );                               // z angle in radians
  zz = (z_rad*180) / 3.14;                             // z angle in degrees

  WriteXYZ(x, y, zz);
}

void main() {
  CMCON  = 7;
  ADCON1 = 0x00;      // configure VDD as Vref, RA0, RA1 and RA2 as analog inputs
  TRISA  = 0b00000111;
  PORTD = 0;          // configure RD0 is digital input
  TRISD = 1;

  Usart_Init(9600);   // Initialize USART module
  Delay_ms(100);
  Calibrate();
  strConstCpy(text,msg5);     // Display Angles
  Usart_Write_Text(text);
              
  //--- main loop
  while(1) {
    Read_Angles();
    Delay_ms(1000);
    }
}

Now, if you still do not believe that accelerometer measure gravity while standing still on your desk ... the only thing I can tell you is - go purchase one and try it yourself as we tried and it works
 
Last edited:
No-where does any of the documentation you have presented, say the device measures inclination. It only measures tilt during the process of tilting. It is actually measuring acceleration during this time.

Show me a positive description where it catagorically detects inclination. It may be possible but I have not seen it done and I don't know how it can be done.
This is the point I am making.
 
colin, Measure the static acceleration of gravity in tilt-sensing applications .... donno what more positive you want ...

on top of the documentation ... I have it here, on the table, it measures tilt not while you are tilting it, it measure tilt by "being still on the table" .... it is not moving relative to anything in the room... (it is moving relative to the stars but that's not what we are talking about right) ... the accelerometer that is stationary relative to earth show different measurement depending on the tilt toward the earth. ... donno how more clear I can tell you that ..

- you place it on the desk, it does not move it show 0 degrees
- you place it on the desk tilted 10 degrees, it does not move, it show 10 degrees

This is not "reading / decodeing / understanding" documentation, this is real life experiment with the board I gave you link for. I have no idea what is in the chip, how it measure the gravity / what technology it uses to measure it ... but it does
 
It looks like the chip can be used as an inclinometer. It seems to be very sensitive, and if this is what he wants, all he needs do is interface it to a display and the project is complete.
 
Last edited:
Static Acceleration - Sounds like a contradiction of terms.

Accelerometers usually measure a force experienced as a result of acceleration. The problem with the older established devices, ie Piezo Electric accelerometers, the output signal leaks away (Charge transfer) so they are unsuitable for static measurements.

This new device seems to be able to measure a static gravitational force. With a dual axis aligned correctly, it should be possible to calculate the angle of tilt.

To what resolution and accuracy will be an important part of your project.
 
To what resolution and accuracy will be an important part of your project.

I have no idea how they work (I saw some long texts that I skimmed and decided not to spend time reading) but they are very sensitive .. check out the youtube movies

the problem of making tiltmeter with accelerometer is that it has to be "stationary" in order to measure tilt, if you move it then the g is mixed with the "movement" acceleration ...
 
thanks for all your inputs....very helpful, the first sensor i've made is an optical disc with 3 leds at different angles, the disc has 60 slots...so this more than gives me an accuracy of 1 degree which is required. The second sensor i'm fabricating is similar to a potentiometer design, the housing of a pot. will be modified if possible to incorporate a bearing that is attached to the shaft and the wiper in a pot. So, differing voltage values would correspond to different angles as the device rotates. I have a template of the code I can use, the code was written to use the a pic as a voltmeter. The purpose of the project is to use "cheap" resources when compared to gyroscopes and accelerometers to create a sensor of detecting angles of inclination. The final objective Of which I was informed today, is that the device is to be attached to a powerdrill. Now the problem of the vibration of the drill plays a major role in the sensor design. With the pot design i can spring load the wiper. But with an optical disc, I'm going to have to dampen it's rotation. I'm sorry I wasn't very clear before on the scope of this project wrt accuracy and objectives.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…