Accelerometer attached to 1m cable

Hello folks!

I'm trying to read values from an accelerometer that is attached to a 1m (unshielded) cable. The Serial Monitor shows values that go up and down like crazy. Is it possible to read values from a cable that is that long or is there simply too much noise on that distance?

Regards,
Tschiggi

Not all accelerometers are the same. What signals are passing through the wire?

and do you have Vcc well bypassed at the device as well? a serious but frequently by-passed idea, perhaps in haste? I do hope with an external PSU and not the umbilical...

Doc

A digital signal (I2C, SPI) could be a problem.
You could use an accelerometer with analog outputs. A few meters of cable would only introduce noise to the analog signal, but would not disturb any digital communication.

Definitely too long for standard fast logic like SPI, for an open-collector bus (like I2C) you can try decreasing the value of the pull-up resistors to 2k2 (no smaller) which might help. Also adding 100 ohm resistors in series with the SDA and SCL lines at either end should reduce ringing.

For long wires like this carrying logic signals you must use either shielded cable or (better) twisted pairs (each pair one signal wire and one ground wire). (This increases the chance of getting it to work and more importantly stops you running an illegal radio transmitter!)

Considering shortening the wires to 30cm where things are likely to just work.

And yes you must have decoupling directly at the accelerometer (probably already on the breakout board though).

For analog signal you might want to add 1nF capacitors to ground at the receiving side to reduce RF and noise pickup (and longer wires less of an issue).