Y Cable with Encoder?

Is it possible to use a y cable to plug in an encoder to the Cortex with it still being functional?

This would not work. The Y Cables were made for motors to be connected, not sensors.

It would be possible to use a Y cable on an encoder. It would act as an OR function, so you would only get a count of distance not direction, (like if you only plug in 1 wire of the 2)

Now it would be possible to use Y cables on 2 different encoders hooking 1 wire from each together so you have 2 sensors going to 2 Y cables. This would allow reading of either sensor assuming the opposite sensor is stationary.

Jpearman may be correcting me on this though :wink:

This would be buggy in any configuration.

There’s the possibly for ticks to become lost in both directions.

EDIT: If you only move one encoder at a time, this would be OK and act like an OR but you’d have to be very sure that the other encoder didn’t move AT ALL, even a small move could cause two ticks to collide which may or may not be OK.

Pretty sure. James is your best bet to confirm.

This definitely won’t work for a couple reasons:

  1. If the output of the encoder is actually driven high and low (versus being “open collector” where you’d get the OR behavior), then tying two lines together can actually damage the sensor.

Even if it were the case that the encoders can be electrically connected without damage, it still wouldn’t work because:
2) The encoder doesn’t put out pulses (eg. low-high-low) when counting, it cycles low and high with each edge meaning something moved (light is/is-not passing through the slit in the wheel). Either output wire from the sensor can remain high or low for an indefinite period while the encoder is not moving. Thus if one of the encoders was holding a line low, it would completely mask any edges from the other sensor.

Bottom line:

  • worst case - sensors will damage each other
  • best case - the Y-ed sensor signals will randomly step on and mask each other causing a large number of missed counts and unusable rotation information.


Terry’s explanation pretty much sums it up. It’s not a good idea, the only sensors you can use on a y cable are switches.

I’m not sure why you would want to Y encoders, and as others have explained very well it doesn’t work.

However, if your goal is to save ports on the Cortex, there is an easy way to do so. You only need to plug in one of the two wires, and they still function, but you can’t tell direction and the resolution is half, 180 units per rotation.