Detect the status of an exhaust fan

arduinoTime:
Hello! Thank you for all your reply! I'll be happy to try them later

Updates:

  • I tried using H21A1 opto-interrupter for rpm measurement. I detached the LED and transistor and placed them side by side.I used a 220 ohm pull up resistor on the anode side of the sensor, then I placed a 100K ohms resistor to the collector side and connected it to [digital] pin 12 of my arduino. The reading was stuck to zero so I changed the pin to A0 and got a reading from 200-300. I was happy. Then I tried running black and white stripes to the sensor; for the white area,

that is an IR sensor. did you try something that is black to IR ? and white to IR ?
can you post your wiring schematic for the sensor ? sounds like you have to get non-IR material and make that wring work digital not analog. but you are probably only a few minutes away from success.

before you start changing anything, use the current setup to get values for materials that will not reflect IR.

oh, most likely it will not be black. 100% cotton tee shirts will not reflect IR. the poly in them will. get different values based on your current setup. but post that schematic. you should be lighting an LED and detecting when that is on or off (when there is voltage on that pin and when there is none.

http://www.electronics-tutorials.ws/logic/logic_4.html

then you can use any pin,