I am exploring the possibility of using an ESP8266 in place of an Attiny1634 and nRF24L01+ for my model train controller. The ESP8266 is marginally smaller and requires a lot less connections because the MCU and the wireless are all in one package.
I wonder if anyone has any ideas about why my QRE1113 reflective optical sensor reliably triggers interrupts to detect pulses when connected to an Atmega 328 (3v, 8MHz) but not when connected to an ESP8266 running virtually the same program. The QRE1113 is detecting a white spot on a disk rotating on the shaft of a small motor to measure the speed. It is wired like this (same as this Sparkfun circuit, but I am not just using their breakout board).
I wrote a short program for the Atmega 328 so it could output pulses equivalent to what come from the QRE1113 and the ESP8266 detected them with rock solid reliability and accuracy (i.e it was registering the same intervals as the Atmega 328 was generating).
When I look at the output of the QRE1113 with my oscilloscope it is producing a very clean HIGH and LOW at a very consistent interval (motor running at constant speed). The only difference between the output from the QRE1113 and the Atmega 328 is that the transitions with the Atmega 328 are much sharper - almost instantaneous.
From all of this I reckon there is something about the QRE1113 behaviour that is at the margin of what is acceptable to the ESP8266. But I cannot think what it might be, how to test for it, or how to improve things.
One thought is to feed the QRE1113 output into a Schmidt trigger, or an OpAmp - but I don't want a solution that requires extra parts as I don't have space for them and I don't have the ability to use small SMD components.
Thanks.
...R