i have made a rpm counter with a tcst2103 light sensor.
It is connected to an arduino interrupt via a 10k pullup.
Everything is working fine but if i use a long (<20cm) cable to connect the sensor
then i get very high rpm counts.
My levels are still good. Low 0,65V and High 4,81V
I have tried different pullup values but this did not help.
What could be the problem?
Is it possible that there are such high interferences even with a shielded cable?
Unfortunately i dont have an oscilloscope for measuring the signal.
Any help is welcome!
I would drive it with IF=17mA (use 220 ohm series resistor for the LED), then use 4.7K from emitter to GND in the transistor circuit (collector connected to 5V). This will give a stronger signal. With these connections, try using "RISING" if using interrupts. If noise persists, try a 1K-10K series resistor to the input. If noise still persists, loose the series resistor and connect a 0.01µF capacitor from the input to GND.
Sorry, I was rushed and didn't answer correctly. Away from my pc ... I suggest using your original circuit and add the 10nF from the Arduino input to GND.