ADXL377

I’m looking at building an inclinometer based on the ADXL377 and was wondering if anybody has had any experience with chip ?

I’ve tried the MPU6050 which seems to read fairly accurate compared to my brought inclinometer but once I get passed about 80 degrees it starts read about 1.5 degrees higher then my brought one so was looking at the ADXL377.

For accurate tilt measurements, accelerometers must be carefully calibrated. Tutorial here.

Thanks for that I shall have a read though that,
I have calibrated the MPU6050 from some code that was posted on here, it records the offset’s and I enter this into my code.

I have a steel plate that is bolted to my bench with another plate mounted on that with springs where I trued it 0.00 on my brought inclinometer in all directions and once calibrated the MPU6050 reads between -0.01 to 0.01, which is good and when I tilt the bed to 1.25 degrees both units read 1.25.

But once I get to about 80 degrees that’s when it starts to read about 1.5 degrees higher then my digital 360 pro inclinometer and looked at the ADXL377 IC and wondered how good these are

it records the offset's

The offsets are half the story. There are at minimum 6 parameters that need to be accurately determined, three scale factors and three offsets.

A quick test is to place the accelerometer on a table and record readings with X, Y and Z pointing exactly up and down. If the readings are not all + or -1.00 g (in whatever units you choose), then it needs to be calibrated.

The ADXL377 probably won't work much better, if at all, and also would need to be calibrated.

But once I get to about 80 degrees that's when it starts to read about 1.5 degrees higher

Post the code, using code tags. You may not be doing the calculation correctly.

Sorry I’m away from that computer at the moment where the full code is,

This is part of the code of the Calibration routine

scaled for min sensitivity use MPU6050_calibration.ino
// -4232  -706  1729  173 -94 37
//                       XA      YA      ZA      XG      YG      ZG
int MPUOffsets[6] = {  -4232,  -706,   1729,    173,    -94,     37};

It’s based on the code from here
https://forum.arduino.cc/index.php?topic=446713.0

It’s basically the same apart from I’ve added an LCD & NRF24L01 to send the data wirelessly.

Once I get back I will upload my code, I’m still reading through that excellent link you posted very interesting

Thanks
Steve

It's based on the code from here

That code is the problem.

Oh I see, is that the Calibration code or the actual code that runs the MPU6050 ?

The trouble I found there’s that many variations of code not sure which is the best method as the reading I’ve done and they say it’s quite hard to do the maths to obtain correct results

Thanks for your input

See reply #3. That code calculates and uses only the offsets, but not the scale factors.

For a simpler tutorial on calibrating accelerometers, this one will work, but not as well as the one previously linked.

Of course you will need to use the appropriate code to read your accelerometer.

jremington:
See reply #3. That code calculates and uses only the offsets, but not the scale factors.

For a simpler tutorial on calibrating accelerometers, this one will work, but not as well as the one previously linked.

Of course you will need to use the appropriate code to read your accelerometer.

I've read those links you posted and they are very detailed.

But I think I may have added some confusion, Because those links seem to read the data via the Analog inputs and I mentioned about the MPU6050 which is where the confusion may have came from.

Ive got an MPU650 working but the readings seem to read higher than what they should, This is why I was asking about the ADXL377 or even the ADLX345.

Just so there is no confusion I've started a new topic here as I would like to try and stick the MPU6050.

http://forum.arduino.cc/index.php?topic=607160.new#new