Shop OBEX P1 Docs P2 Docs Learn Events
reflective object sensors — Parallax Forums

reflective object sensors

rob264rob264 Posts: 4
edited 2011-06-23 09:24 in Accessories
Hi, I would like to know if anyone have experience using reflective object sensors, particularly OPB760T, http://datasheet.octopart.com/OPB760T-TT-datasheet-166455.pdf

i am trying to read the rpm from a shaft and was adviced to use this device however i do not know what the circuit should look like

thanks

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-22 12:24
    It looks like an IR LED with a phototransistor.

    I think pins 1 and 3 should be connected to ground. Pin 2 should have a resistor in series with it and Vdd (5V). I think a 330 ohm resistor would probably work okay.

    Pin 5 should be connected to 5V. Pin 4 is then monitored to detect the dark lines. My guess is pin 4 will be high when there isn't anything to reflect the IR light and pin 4 will be low when there is something white in front of it. But it might be the other way around.

    Maybe someone else who knows more about these will answer. I don't think you will hurt the sensor with above setup.

    Duane
  • LeonLeon Posts: 7,620
    edited 2011-06-22 12:30
    I've used a rotational speed checking instrument with something like that. I put a little strip of Al foil on the rotating part.
  • rob264rob264 Posts: 4
    edited 2011-06-22 14:35
    @ Duane, Thanks i will try the setup in you suggested way and will let you know! still dont know how i can get a frequency or a reading on the oscilloscope though.
    @ Leon, Yes thats the purpose of it. you normally do a small reflective strip on something that rotates and the device should be able to give a reading when connected to an oscilloscope. if you do have the circuit and can post it i would really appreciate your help!
    rob
  • LeonLeon Posts: 7,620
    edited 2011-06-22 14:46
    It was a commercial unit, with an LCD and rechargeable battery.
  • rob264rob264 Posts: 4
    edited 2011-06-22 16:06
    Duane Degn wrote: »
    I think a 330 ohm resistor would probably work okay.

    how did you estimate the 330 ohm please? thanks! rob
  • kwinnkwinn Posts: 8,697
    edited 2011-06-22 20:52
    Based on the information in the data sheet this is a led emitter and a 3 pin photosensor IC with TTL level output. All you should need is a current limiting resistor for the led and a 5V supply for the emitter and detector. Pinout is on the data sheet.
  • rob264rob264 Posts: 4
    edited 2011-06-23 03:02
    Hello Kwinn, Thanks for your information! can you provide some help in estimating the resistance? would appreciate if you could upload a circuit diagram. I am sorry for asking so much but i am from a thermo-mechanical background and have very little knowledge of electronics. thanks,rob
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-23 08:43
    rob264 wrote: »
    how did you estimate the 330 ohm please? thanks! rob

    Honestly, it was just a guess based on previous experience with powering LEDs at 5V.

    Here's the way to calculate it.

    Resistance needed = voltage across resistor / current through resistor
    = (total voltage - voltage drop across diode) / current

    According to the data sheet the voltage drop from the diode is 1.8V.
    It looks like the maximum current through the diode is 40mA.

    If you want to use the maximum current you'd use:

    (5.0V - 1.8V)/0.040A = 80 ohm

    This absolute lowest resistance you should use at 5V.

    If you want to reduce the current you'd increase the resistance. Let's say you want 10mA (something many microcontrollers can source directly).

    3.2V/0.010A = 320 ohm

    I used 330 ohm since it is a more common value of resistor.
    3.2V/330ohm = 0.0097A

    Using the 330 ohm resistor might depend on if 9.7mA makes the LED bright enough for your needs. I'd think it probably would.

    If you don't need to control the LED from a microcontroller and can just leave it on all the time then a lower value resistor (say 100 ohm) would be fine. You might need to see what works the best. A very bright LED might (though I doubt it) trigger the receiver even when the over a dark area of the shaft.
    I'd think the LED would last longer if you power it with less than 40mA.

    If you're using a 3.3V microcontroller you need to make some changes. Let us know if you are.

    Duane
  • kwinnkwinn Posts: 8,697
    edited 2011-06-23 09:24
    Here is a diagram. R1 should be in the 180 to 330 ohm range. Start with 330 ohms and if it is not sensitive enough try 220 ohms and then 180 ohms. With 330 ohms the led current will be around 10mA, which is usually adequate. With 180 ohms it will be around 20mA, which is almost always more than enough. I try to use the lowest led current that gives reliable operation in order to prolong the led life.

    R2 is needed if you have the open collector output version of this sensor. A resistor of 1K ohms or there about is a good choice.
Sign In or Register to comment.