I am trying to create an optical tachometer using a QRB1114 IR reflectance sensor, a Teensy 3.1, and the FreqMeasure library to count the rotations of a spindle that has reflective tape on it between 1Hz and 300Hz.
Before amplification, the sensor (phototransistor) outputs 0.2V when hitting the tape and 0.02V when not hitting the tape. These are my questions:
1. When trying to register an analog signal as a digital input--not only for this application but also, say, if I want to trigger an interrupt with an Analog signal--what is the "threshold voltage" I should be aiming to amplify my signal to to cross the line between digital LOW and HIGH? I assume that this is important for FreqMeasure to work.
2. Is the FreqMeasure library doing something functionally different from a CHANGE pin interrupt in terms of the voltage threshold it looks for? Before I found the FreqMeasure library I was planning on using an interrupt like this.
3. Do I need to use a Schmitt trigger, and if so, how do I find the best one for my purposes?
Thanks so much!
Before amplification, the sensor (phototransistor) outputs 0.2V when hitting the tape and 0.02V when not hitting the tape. These are my questions:
1. When trying to register an analog signal as a digital input--not only for this application but also, say, if I want to trigger an interrupt with an Analog signal--what is the "threshold voltage" I should be aiming to amplify my signal to to cross the line between digital LOW and HIGH? I assume that this is important for FreqMeasure to work.
2. Is the FreqMeasure library doing something functionally different from a CHANGE pin interrupt in terms of the voltage threshold it looks for? Before I found the FreqMeasure library I was planning on using an interrupt like this.
3. Do I need to use a Schmitt trigger, and if so, how do I find the best one for my purposes?
Thanks so much!