Go Down

Topic: Accelerometer attached to 1m cable (Read 1 time) previous topic - next topic


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?



Not all accelerometers are the same.  What signals are passing through the wire?
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


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...

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


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).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up