ADXL377 produces random value

I’m testing out an ADX377, and I’m getting seemingly random values from all three axes. I’m following the tutorial here

learn.sparkfun.com/tutorials/adxl337-and-adxl377-accelerometer-hookup-guide/all

And this arduino sketch from the tutorial

One weird thing is the pin configuration, which doesn’t match the examples in the tutorial. There is a VIN pin and a 3V pin instead of a 3.3V pin. The pin configuration is more similar to that shown here:

www.arduinoos.com/2012/08/tilt-sensor-part-9/

I realize that the page I’ve just listed is for ADX335, not ADX377. My device is has ADXL377 printed on it, but otherwise looks like this example.

Another weird aspect is that my arduino builder application produces non-standard character stream unless I change the line in the arduino sketch that reads " Serial.begin(115200);" to “Serial.begin(9600);” I don’t know if this is related.

I’ve double-checked all the connections, and the result is the same. I’d be grateful for any advice!

Have you tried the [hookup guide?](ADXL337 and ADXL377 Accelerometer Hookup Guide - SparkFun Learn)

I have, that’s the tutorial that I’ve been working from.

I change the line in the arduino sketch that reads " Serial.begin(115200);" to “Serial.begin(9600);”

To get readable output from the serial monitor, the serial baud rate in the sketch “Serial.begin()” must match the serial baud rate setting in the serial monitor window, lower right corner.

Thanks, that does clear up that issue.

The values I’m getting are still seemingly random. It looks like that was unrelated.

Can you provide pictures of your hookup?

The ADX377 is a +/- 200g sensor. What are you doing to create acceleration values large enough to measure?

Just sitting on a desk, expect random measurement noise. Please post some example output so that we can see what you are talking about.

I’ve copied a sample of the output below. However, when I first made this post, the output values were in the hundreds of g’s. I’m not sure what’s changed. Could these values be random noise? I guess that’s an error of only a few percent. The earlier values in the hundreds of g’s were too great to just be errors, though.

I’ll post a picture of the hookup tomorrow.

X: 2.09 g

Y: 2.68 g

Z: 2.19 g

X: 4.28 g

Y: 4.96 g

Z: 4.16 g

X: 5.45 g

Y: 5.92 g

Z: 5.06 g

X: 5.28 g

Y: 5.56 g

Z: 4.82 g

Looks to me like you have floating inputs. Triple check the wiring and use your multimeter to check connectivity and power.

Here’s an image of the circuit. I’ve checked all the the connections, and they’re solid. I am still unsure about the difference between the VIN pin and the 3V pin, since the hookup tutorial just shows the 3.3V pin (which is an input).

I also identified the reason for the 100x change in values between the experiments. I had changed the scale variable to 3, which would correspond to the ADLX337. For my ADLX377 this should be 200. When I changed it back to 200, the values were in the hundreds. So, it seems to be noise that ranges from roughly -200% to +200% of the maximum value.

Why are there two rows of header pins?

Did you solder the header pins to the sensor board? If not, that is the problem.

I didn’t solder the pins to the board. I wanted to test it out first. The top row of pins is connected to the accelerometer, and the bottom row is holding it in place. Do you think that a touch contact could create this much noise?

Also, any thoughts on the VIN and 3V pins?

You MUST solder the pins to the board for it to work, simply sticking headers through the holes will not provide a stable electrical connection.

The connector is not making any contact at all, so you have floating analog inputs. As I said earlier.

Before I solder it, any sense of what the VIN versus the 3V pin means? It’s really weird that this accelerometer’s hookup doesn’t match the tutorial.

any sense of what the VIN versus the 3V pin means?

All this time, and you STILL have not looked at the product page? https://www.adafruit.com/product/1413

Based on the photo you posted, it looks like you have https://www.adafruit.com/product/1413. Looking at the documentation for that, it looks like Vin should be connected to 5v on the Arduino UNO and optionally also connect the 3V to the AREF on the arduino. See https://learn.adafruit.com/adafruit-ana … ino-wiring

If you do that optional AFEF/3V connection, read the big red block on the wiring guide first.

Thanks for pointing me toward that product page, I somehow missed that in my original search!

Soldering the pins seems to have done the trick. Here are the sample outputs:

X: -0.20 g

Y: -0.20 g

Z: 0.98 g

Does this look reasonable to you folks? In this orientation, the z axis is up, so 1g makes sense. When I tilt it, the 1g value goes over to either x or y, depending on how it tilt it.

Looks OK.

The tutorial is for the sparkfun part, you might want to check the adafruit tutorial.