Back in May I did use TCST 2103 infrared light barrier to measure real rpm numbers of a micromotor. The measurements did make sense (14700rpm was measurable), and putting something between the forks and removing it resulted in exactly one interrupt.
Yesterday I did test with new Infrared Speed Sensor Module I got from aliexpress. That module has the beauty of only 4 connection lines (GND, VCC, D0 and A0), with all supporting electronic on the module itself. Also the 2nd LED besides the power LED goes off when something is between the forks.
I glued a paperboard stripe on a motor wheel and was surprised that PWM=80 was enough to get 0 interrupts from the module -- with slower speed I did get interrupts:
Next I did single measurements whithout the wheel:
What I cannot explain and ask you for an explanation are the following observations:
- if I move a cent from top beteen the forks and remove back to top, I get 4 interrupts
- if I move a cent from left beteen the forks and remove it to the right, I get 5 interrupts
I tried RISING, FALLING, CHANGE -- all with the same result on single measurement.
So today I thought maybe the battery I glued the module on can have some bad connection to the module and influence the measurements. After I removed the battery, the repeated measurements did not show any difference.
Is the module just bad?
What can be done to get a single interrupt for a single test?
(The A0 values are <50 or >900)
When back at home on weekend I can try the other module, I bought two of them (1.15$/pc).
Forgot to mention that I did connect pin D0 of module (digital line) to pin D3 of Arduino Uno and used "attachInterrupt(digitalPinToInterrupt(3), incVarA, RISING);" to attach ISR