Go Down

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

tschiggi

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

johnwasser

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

Docedison

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

Krodal

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.

MarkT

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 won't respond to messages, use the forum please ]

Go Up