Opto interrupter circuit

Discussion in 'Electronics Resources' started by camerart, Aug 1, 2014.

  1. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi,

    I am about to use photo interrupters for use in quadrature encoders, to control motors.

    I am going to use Sharp GP1S096HCZOF interrupters for this. Can anyone help me, to use the correct components for this as they will be built into sealed containers, and reliability is hoped for. The outputs will be connected to PIC pins for the control.

    Cheers, Camerart.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,498
    2,364
    Voltages used on either side of the opto is needed?
    Max.
     
  3. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Max,

    There is a 7805 on the circuit, so 5V and 0v on the LED side.

    I've attached the PDF

    Cheers. Camerart.
     
  4. RichardO

    Well-Known Member

    May 4, 2013
    1,228
    382
    Are you sure that you want to make your own quadrature encoder?

    You could buy a shaft encoder and couple it to your motor through gears, belts or a friction roller.

    Another possibility is to put one of these on one of the shafts in your system:

    http://uk.rs-online.com/web/p/rotary-encoders/2056881/
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,498
    2,364
    You need two for quadrature pulses, you can also get dual opto's and use for this purpose however you have to use the slotted disc with exact amount of pulses dependent on the diameter of the disc and distance between the two opto's.
    This also governs your resolution.
    The ones you have can have a 220/330Ω on the diode side and 470/1kΩ on the transistor side.
    Max.
     
  6. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Richard,

    I'm making them, because for me it is the best option. All of the mechanics and disks are made, I've only got to fix the interrupters and it's done.

    C
     
  7. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Max,

    I'm fitting two to each motor/gearbox. The slotted disk has only 9 dark and 9 light slots, and the two optos are opposite each other on the shaft, giving 3600 after gearing. (It's for counting degrees)

    Thanks for your resistor calculations, this answers why I popped the first set of diodes:)

    Camerart.
     
  8. RichardO

    Well-Known Member

    May 4, 2013
    1,228
    382
    I had to ask. :)

    I hope it works as intended.
     
  9. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi,

    Still not working:confused:

    Added new interrupter!

    When 5v is connected through pins 1 and 4 with a 600Ω resistor in series, I get 5V. With 5V connected through pins 2 and 3 with a 330Ω in series, still 5V at 1 and 4, no change when opto gap is blanked.

    Any ideas?
     
    Last edited: Aug 2, 2014
  10. bertus

    Administrator

    Apr 5, 2008
    15,638
    2,343
    Hello,

    You have the opto the wrong way around.
    1 and 4 are the led and 2 and 3 the transistor.

    [​IMG]

    When the led is correctly connected , you should measure between 1.2 and 1.4 volts accross pins 1 and 4.
    You might even want to use a 180 or 220 Ohms resistor on the led side.

    Bertus
     
    Last edited: Aug 2, 2014
  11. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Bertus,

    Embarrassed:rolleyes: they're working now.

    I've tried many permutations of connecting, but not that one:)

    Could I have have damaged them, do you think I should get fresh ones or will they be ok?

    Thanks to you and all that replied.

    Cheers, Camerart.
     
  12. bertus

    Administrator

    Apr 5, 2008
    15,638
    2,343
    Hello,

    They might be OK, because you only used 5 Volts.

    Bertus
     
  13. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Bertus,

    The data sheet shows led forward voltage as 1.2V. 20-50ma.

    Cheers, Camerart
     
  14. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    As a matter of interest, I was cutting the beam with a sheet of paper, and soon found it not to be dark enough. I tried different 'mediums' brown electrical tape didn't work, black does.

    I had the opto disks made from 300 dot/inch laser film, this didn't work. I made ortho film disks from the laser prints, this works.

    Cheers, Camerart.
     
  15. bertus

    Administrator

    Apr 5, 2008
    15,638
    2,343
    Hello,

    The led may have a max of 6 Volts in reverse:

    [​IMG]

    Bertus
     
  16. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Are you saying that because it shows reverse voltage of 6v and I've been using 5V, there is little chance of damage?
     
  17. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,498
    2,364
    Looks like you were lucky just being under the reverse rating, I suspect you would have seen any irreversible damage by now.
    Max.
     
  18. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Ok, thanks.
     
  19. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    You can reduce the sensitivity by reducing the LED current. just increase the LED series resistor.

    It can be a good idea to put a trimpot for the other resistor (photodiode side) to allow you to trim the HI/LO voltages on the output, and to square up the wave duty.

    I did that on the quad encoders on this project;
    http://www.romanblack.com/onesec/DCmotor_xtal.htm

    [​IMG]

    Using two 20k trimpots. :)
     
    camerart likes this.
  20. camerart

    Thread Starter Active Member

    Feb 25, 2013
    517
    30
    Hi Roman,

    I didn't know that! I'll do that, thanks.

    C
     
Loading...