Help needed wiring infrared encoder sensor

Discussion in 'General Electronics Chat' started by ceefna, Sep 6, 2012.

  1. ceefna

    Thread Starter Member

    Feb 21, 2012
    31
    0
    Hi guys, please have a look at the spec for an encoder I am trying to wire. here are links to the data sheet

    http://www.google.co.uk/url?sa=t&rc...sg=AFQjCNExAtl4oKIejIFBXV6MSGApAOpjtw&cad=rja

    My problem is I do not think the infrared diode is working, is this something i can see with the camera on my phone?
    I have a 7805 voltage regulator supplying 5.03V. I have wired the sensor as follows
    pin 1 cathode= ground
    pin 2 anode= through 150ohm resistor to Vcc
    pin 3 speed
    pin 4 ground= ground
    pin 5 Vcc= 5.03v
    pin 6 direction

    According to the data sheet I should get 4.5v at pin 3 for Tach level inactive and I have got 4.96V but it makes no difference if I block the sensor from the emitter which leads me to believe it is not emitting.

    Have I made an error in wiring the anode through a resistor to Vcc or is it ok to do so?

    Any Ideas as to how I can test if the emitter is working

    Thanks for your time

    Richard
     
  2. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    Test to see if you have about 1.5V across the IR LED when its on.
    The small difference in output volts shouldn't matter.
    The direction output is logic high or low so it should change state when the rotation changes. Pulses will take a scope or you could interpret a lower DC voltage on a DVM as a rough indicator of action on the tach line.
    I assume your encoder wheel has the appropriate resolution..

    This thing has internal logic to decode the quadrature waveforms generated by the slotted wheel interrupting the two detectors in sequence (A and B in the timing diagram). You probably won't be able determine the IR LED status just by blocking it (like you could with a simple interrupter). Its dynamic.
     
  3. ceefna

    Thread Starter Member

    Feb 21, 2012
    31
    0
    Hi John, thanks for the reply.I have checked voltage across the ir LED and have got the full 5V :(

    I decided to check the 150Ω resistors I bought from ebay and although they are the right colour code (brown/green/brown) they all measure about 90Ω.This would supply about 50Ma also the resistor is only 1/8W so too small for the current.
    I tested my meter on a few other resistors of known value and it is reading correctly so I am sure my meter is ok.
    Do you think the ir Led is fried? I have got 2 of these sensors but unfortunately I tried them both so they are probably both dead.

    Thanks again
    Richard
     
  4. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234



    According to the data sheet, forward current should be 12mA max, so the resistors should have been 330 ohms to (390 ohms for 10mA).... 1/8 watt would have been sufficient, but I would have gone with 1/4 watt..... so there is a possibility that you may have burned them out, if not, you should be able to see the IR with any cell phone camera.....

    Here is a good online LED/Resistor calculator >> http://led.linear1.org/1led.wiz
     
    JohnInTX likes this.
  5. ceefna

    Thread Starter Member

    Feb 21, 2012
    31
    0
    Hi BMorse, the datasheet says 12mA supply to the sensor not the ir LED.All the test conditions state 20mA and the below text is quoted in the led datasheet.
    http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCYQFjAA&url=http%3A%2F%2Fsensing.honeywell.com%2Findex.php%3Fci_id%3D50468&ei=UwZKUICRCsPQ0QX6lIDYCw&usg=AFQjCNEpyesLX5ns-o7hsnCMvbdMS6t7rQ&cad=rja
    ABSOLUTE MAXIMUM RATINGS
    (25¡C Free-Air Temperature unless otherwise noted)
    Continuous Forward Current 50 mA
    Power Dissipation 100 mW

    I know that absolute maximum ratings should be avoided but I am sure that even with a 90Ω resistor then it didn't go over 40mA. It doesn't show anything with my camera phone so I can only conclude it is burned out.
    Just to add when I test the 150Ω resistors with my meter then the take a while to count up to 90Ω. Whats that all about? Cheap ebay rubbish!!!! perhaps the slow build up of resistance is what killed them?

    Thanks for the link, that was the site I used to calculate the 150ohm resistor.
    Richard
     
  6. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    If you have 5V across the IRLED itself (not across the resistor+IRLED) then its either open or in backwards.

    I don't know why your resistors measure like that. Are you sure they are resistors and not axial ceramic caps? (Some are marked with color bands allthough I've not seen 1/8W size ones). Fresh battery in the DVM? Measuring on a non-conductive surface? The resistor is in series with the LED yes?

    When the LED is hooked up and running, you should measure about 1.5V across the LED and 3.5V across the R with a 5V supply (the voltages add up to the supply). The current through both is given by V/R.

    I'm not sure what they mean by the 15ma IRLED max Trigger Current. Its not the absolute max rating of the LED and its not defined, even on Honeywell's site. I wonder if its the max current recommended through the IRLED to keep it from saturating the detectors from too much light. If that's the case, you'll need a bigger resistor (350 for about 10ma).

    Whatever the case, the LED has to turn on before you can proceed.

    BTW Big Props to BMorse. I didn't know that about the cell phone camera. Thanks for pointing that out!
     
  7. ceefna

    Thread Starter Member

    Feb 21, 2012
    31
    0
    Hi John,
    I have got 5V across the LED itself and 5V across the resistor. Yes the resistor is connected in series from Vcc. As for the strange readings on the resistors who knows, the DVM works fine on all my other resistors. It's possible it could be backwards but I did test the second sensor with the diode tester on the DVM and couldn't get anything to happen with it connected either way round (viewed through my camera)
    I put in my first post about using a camera phone because I know you can see tv remote led's with a digital camera but couldn't see any activity. This was before I potentally burned them out.
    I will have one last try with a 350Ω resistor and swap polarity to see if I get any life.

    I am a firm believer that you can't kill something twice! :D

    Richard
     
  8. Rleo6965

    New Member

    Jan 23, 2012
    9
    0
    Check all continuity test in your circuit. You might have some loose connections. Verify if pin4 was really connected to ground wire or negative of supply.
    Probably you measured +5V on anode of LED even with series current limit resistor because pin4 was not properly connected to ground.
    If there's no complete path to ground, there will be no current flow and therefore no voltage drop across current limit resistor and LED. So you always measured +5V on resistor and in anode of LED.
     
    Last edited: Sep 7, 2012
  9. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Negative of supply is the same as ground.;)
     
  10. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    With a 5V supply, you can't have 5V across both the R and LED. That would add to 10V. If the cathode (Pin 2) was not grounded (as Rleo and BMorse correctly suggest), you would measure 0V across the R since there is no current in the circuit. (You would also measure 5V to ground on each resistor terminal, of course, for the same reason.. no current means no voltage drop across the R). When you say 'across' you mean from end to end on the R and between pins 2 and 1 (anode to cathode) on the sensor yes? Not from ground to each pin.

    Pin 4 also needs to be grounded for the detector circuitry but is separate from the IRLED and wouldn't account for what you are seeing.

    Forgive me if this sounds stupid (I only bring this up because of your voltage readings) but your circuit should be:
    +5V output from 7805 to one end of the R.
    Other end of the R to pin 2 (anode) of the sensor.
    Pin 1(cathode) of the sensor to the GND pin of the 7805.

    Hooked up like this, these possibilities are likely:
    Working: ~3.5V across the R, ~1.5V across the LED anode-cathode.
    LED open or reversed: 0V across R, 5V across LED
    LED shorted (or nearly so) ~5V across R, remainder across LED
    Resistor open: ~5V across resistor (it may be less with the LED in there)
    Resistor wrong value: ~3.5V across R (because the LED Vf is relatively constant when its on) but current will be V/R.

    If you have a visible LED, try the resistors on that to see if they are bogus.

    I've attached a 'drawing' showing how it should be hooked up. Note the pinout as well.

    Good Luck!
     
    Last edited: Sep 7, 2012
  11. ceefna

    Thread Starter Member

    Feb 21, 2012
    31
    0
    Hi again, and thanks for your drawing thats just how I had it wired. I have attached a picture of the circuit board with the terminals marked.

    I have spent most of the day trying different things. I started out by removing the irled and soldering one on from an old optical mouse. It worked straight away so the original one was burned out.
    I also need to say that the encoders are second hand so their condition is unknown. The mouse led must have been 5V as it worked great with just a 20Ω resistor( I was seeing how bright they ran)

    The mouse led would not fit in the sensor housing so I went to Farnell who had the proper led, I fitted it with a 300Ω resistor and it worked. I have only got 1.35V across the LED, do I need to lower the resistance to get to 1.5V?

    I have connected the encoder to a K8055 board but there is an issue. The direction signal works perfectly but there is no speed signal, either it is working but incompatable to the board I have to use or it too is burned the output is always at 4.93V. The board does not see a signal. So I thought I would swap the sensor from the second encoder to see if that was ok, Still no speed signal but that sensor is always at 0.46V. I think they are both scrap. I would have liked to get this working but I have wasted hours already

    I have had enough of messing about with junk.

    Thanks so much for your time on this issue

    Richard

    NEWSFLASH!!!!!!!!
    I have just been attaching the pictures and have seen what might be a broken trace to the Speed terminal, I will investigate further.

    Edit
    The trace is not broken just some smegma on the board!
     
    Last edited: Sep 8, 2012
  12. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    What you are seeing is the normal forward voltage (Vf) of the IRLED which results from the voltage across the PN junction (~constant volts) and a very small bulk resistance (adds to the total volts as I*R, but very small R). To increase the volts to 1.5 would likely require a large increase in current since after the diode is on, further Vf increases are largely due to the drop across that small internal R. That's why on current-voltage graphs, once the LED is on, you see a relatively constant forward voltage for a wide variance in current. Anyway, you don't need to get the voltage higher. As it is, your LED current is ~12ma.

    My first thought as well, is that its toast. The changing direction signal would indicate that at least some of the internal detector / logic is working (it determines direction by which opto leads the other so all of that is working). Presumably, you've looked at the spec and compared the mechanical requirements of the wheel/linear ruling to satisfy. You might try reducing the IRLED current.

    I've not used this part but have designed a few encoders and all of the troubles were in the mechanical area (light/dark opacity ratios, skew, wheel wobble etc.) so its important to know that your wheel/ronchi etc. generates nice light/dark signals, 90deg out of phase.

    All of that said, since you had a bad LED, other problems would be the first bet.

    Solution (after awhile, I like to smoke my own :) ).

    EDIT: From your middle pic, I see that your LED is on.. (purple dot - thanks again, BMorse) What's that red thing with the staggered holes? Not your encoder strip, I hope. This sensor is designed for vertical (or radial) bars, 50% light/dark ratio at least .036" wide (or bigger).

    And finally: If you are serious about this kind of stuff, don't buy parts on Ebay. Mouser, DigiKey, Farnell, Allied, Newark are more than happy to sell you first-rate stuff at decent prices. Not to put too fine a point on it but if you are struggling with junk-bin parts to the extent that you are replacing IRLEDs (how do you know that the alignment is correct?) in a $9 sensor, you're cutting your value/time ratio to nil.

    Good Luck!
     
    Last edited: Sep 9, 2012
  13. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    on the top picture, where it says "ANODE not used connected trough VCC", that anode is not connected directly to VCC, it is connected through the resistor to VCC.....
     
Loading...