Hi guys, wondering if anyone could help me understand a problem I'm getting with false readings on a ktir0611s opto coupler. I'm self taught so hopefully I'm getting the terminology correct.
So basically I'm using the slotted sensor to detect a slot cars (scalextric) guide blade passing through the slot; hopefully the diagram below shows the wiring.
The sketch sets input pullup on the input pins on the collector side of the sensor, and for the most part works; however occasionally the car when it is nowhere near the sensor causes a false reading. I'm assuming it's RFI caused by the slotcar motor, and some cars exhibit the problem more than others.
I'm guessing an oscilloscope would help me, but I don't have one (or know how to use it). I've re-routed all the wiring which is done with cat5 twisted pairs and played around adding a capacitor to the input, which seems to hide the issue but at the expense it misses some readings. I've also made sure the power to the arduino is separate from the power to the track.
Any tips would be gratefully accepted, and is this the sort of issue I can expect to deal with when sensors are around motors.