For reference, here is what I ordered and am returning tomorrow.
https://www.amazon.com/dp/B0CHDRF497?ref=ppx_yo2ov_dt_b_fed_asin_title
From the Amazon listing:
As long as a non-transparent object passes through the slot, it can trigger to output a low TTL level.
This is what you want for an "active low" encoder like your X-Arcade encoder, an IPac, and most other modern encoders.
- Ground (logic LOW) applied to the encoder input triggers the output.
The only downside to this one is that the slot is rather narrow (5.9mm) compared to the 2nd one linked below. (10mm)
- If your encoder wheel is 3mm thick, the outermost edge of the encoder wheel only has less than +/- 1.5mm clearance assuming you mount it perfectly square and get the height of the encoder wheel perfect.
- With a 3mm thick encoder wheel and a 10mm slot, you have +/- 3.5mm clearance. It's still close, but
much more likely to work well.
See if you can find one that acts like this one (blocked=LOW), but has the wider 10mm slot.
- Post what you're thinking about ordering and I'll verify that it is good so you can order with confidence.
Here is what I ordered to replace.
https://www.amazon.com/dp/B0813L4XQC?psc=1&smid=A22F6H401YLDXJ&ref_=chk_typ_imgToDp
From the Amazon listing:
The OUT pin is low leve when there is no object between the photoelectric sensor, and the OUT pin is high leve when there is a object between the photoelectric sensor
This is the opposite of what you want.
It would work for an "active high" encoder like some of the "Zero Delay" encoders where applying 5v to the input triggers the output.
The one good thing about this one is the 10mm width of the slot.
- It would be a lot easier to keep the one tooth encoder wheel from hitting the sides on this one.
Here's a link to a video of the optical sensor doing its thing:
https://www.youtube.com/shorts/Ba4h01zKVYM
The wiring diagram was just a sketch my brother made me. It shows a 4 AA battery power supply with a positive (red) and negative (black) wire coming out of it. The positive wire connected to the optic sensors VCC pin. the GND wire went to the battery negative wire. The OUT pin on the sensor went to the light Positive wire, and the lights Negative wire went to the negative terminal at the battery pack.
Either they shipped you a different part or you got something mixed up in your description.
If you have a multimeter, disconnect the sensor out wire from the lights and check the voltage -- it should be around 5v when unblocked and close to 0v when blocked.
If you don't have a multimeter, get one. There are decent ones on Amazon for <$50. You may also want to get a set of probes similar to
this one with alligator clips, micrograbbers, etc.

Obviously, I know very little about wiring stuff, which does lead me to my (hopefully) last question... I have a button on the Tankstick that isnt being used, How would I wire the optical sensor (once its working) to replace the unused button? I assume I start by disconnecting the ground and power wires of the unused button?
Have you read through the FAQ?
This section should help you understand how to wire microswitches to an encoder.
https://wiki.arcadecontrols.com/index.php/FAQ#How_do_I_wire_microswitches_to_an_encoder.3FWhen you press the microswitch, ground (from wire 3) is applied to the encoder input (wire 1 for the left button) which triggers the associated output.
When you block the sensor, ground (from the sensor) is applied to the encoder input (wire 1 for the left button) which triggers the associated output. (same as pressing the button)
When you
don't block the sensor, logic HIGH is applied to the encoder input (wire 1 for the left button) which
does not trigger the associated output. (same as not pressing the button)

Four schematics:
1.) No button pressed, no input triggered.
2.) Button 1 pressed, input 1 triggered. (red)
3.) Button 2 pressed, input 2 triggered. (green)
4.) Both buttons pressed, both inputs triggered.

Scott