distance of pwm cable carrying seria data

I have the CMUCAM hooked to a VEX via the TX RX ports hooked up via PWM cable.

It is flakey at times. Either works or doesn’t work but not consistent is its operation.

The cmucam is about 4-6 ft away on pwm cable.

I was wondering if that was too far away using pwm cable that is carrying 115kb serial data.

What do you guys think?

Probably a REALLY stupid question, have you switched cables? 4-6 feet should be fine unless the cable is broken. I would also check all the connections, make sure the camera isn’t losing power. Other than that I don’t know the maximum distance but I have a hunch it is a bit longer than 6 feet.

Nope 4-6 feet isn’t too long a run for PWM cables.

You really don’t want to go beyond 6 foot as that is about the maximum(recommended).

I would double check all the connections, make sure none are lose etc…

I would also look where these cables run and what they run near.
They could be picking up noise from motors, electrical wiring etc…

RS-232 has distance vs. data rate charts. There’s no specification I know of for the distance TTL-level serial data can travel reliably, especially without knowing the output characteristics of the devices at each end. My expectation is that 115kbps for six feet over the equivalent of ribbon cable ought to be just fine, unless there’s a noise problem. Do you have motors running? Are there other wires running past the data lines?

Bear in mind that a typical serial cable has a shield, whereas a PWM signal does not. Also, digital communication has a very steep slope with respect to noise - it works great until it doesn’t. Try sticking an oscilloscope on the lines to see how it looks.

If you really want to scumbag it, you could try wrapping foil around it and grounding it on either end. People will rightfully laugh at you for this, but sometimes it is just enough to eek you over that working/not working divide.

A lot of teams in the past have experienced communication problems when running the PWM cable too close to motors or speed controllers. This can cause some interference and cause errors in the communications. As someone suggested, if this is the problem you can try shielding the cable and/or re-routing it.

Thanks guys.

Doug,
The limiting factor here is the shunt capacitance of the wire you are using. For 115K and six feet of wire, I doubt there should be a problem. If you are using premade PWM cable, know that there is a high failure rate in the construction of these cables. As others have pointed out, noise from motors and motor wiring will have an effect. This is particularly bad for wiring running in parallel. If that is unavoidable, some teams have reported the addition of a small value cap (.001 mfd or less) at the end nearest the noise source helps. Also you might try using some of those noise cores available from Radio Shack and others. Simply wind a turn or a few through the core to kill noise traveling along the wire.