587,655 active members*
5,877 visitors online*
Register for free
Login
Results 1 to 18 of 18
  1. #1
    Join Date
    Feb 2006
    Posts
    12

    optical interrupter switches

    Hi,
    Just wondering if there is a circuit diagram for wiring up optical interrupter switches? Switches i am using are these http://www.jaycar.com.au/products_uploaded/ZD1901.pdf

    I am using a 5 volt power supply and a 100 ohm resistor on the Diode side with a pull up resistor between the collector and the battery. Just cant make it work

    Thanks,
    Ar

  2. #2
    Join Date
    Jan 2006
    Posts
    738

    opto wiring

    Change your limit resistor to 330 ohms. The pull-up will depend on what you are driving with it. If it's TTL, use a 4.7 K pull-up, for CMOS try a 10 K, FET go with 39 K.

    After changing to the 330 ohm pullup, check the diode current (you can look at the voltage across the pullup) should be about 15 ma.

    Steve

  3. #3
    Join Date
    Dec 2003
    Posts
    24220
    Make sure you have the diode forward biased, also they do not show clearly the transistor type, NPN/PNP? The fact they show 30v collector emitter voltage, I am assuming it is NPN?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  4. #4
    Join Date
    Jun 2007
    Posts
    22
    Hi,

    Here is a link about what you are looking for. I tried it. With the part I used, the LED is ON when the slot is NOT interrupted.

    Alain

    http://www.fignoggle.com/workshop/ar...-wiring-how-to


  5. #5
    Join Date
    May 2006
    Posts
    1469
    AR

    Here is a quick sketch made from the PDF you posted.

    Use the pull down as recommended by Steve

    Greg
    Attached Thumbnails Attached Thumbnails opto.JPG  

  6. #6
    Join Date
    Dec 2003
    Posts
    24220
    Quote Originally Posted by Greolt View Post
    AR

    Here is a quick sketch made from the PDF you posted.

    Use the pull down as recommended by Steve

    Greg
    But then as opposed to Alains post you show an emitter follower, where there should be a load resistor from emitter to common.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    May 2006
    Posts
    1469
    OK obviously I bow to your electronics knowledge here.

    I just know that is how I hooked mine up and they are working.

    If this is wrong I had better do some more reading.

    Hopefully I am not stressing some component by overloading.

    Greg

  8. #8
    Join Date
    Dec 2003
    Posts
    24220
    Quote Originally Posted by Greolt View Post
    If this is wrong I had better do some more reading.
    Greg
    Not that it is wrong, just that you missed out the emitter connection, the way you have it drawn there would be a resistor from emitter to common, unless the receiving device has a pull down (sink) resistance.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  9. #9
    Join Date
    Feb 2006
    Posts
    12
    Thanks Heaps!
    I have got it set up as in Alain's Diagram, using 270 Ohm Resistor (its all i had)
    and its switching the Led on and off nicely.
    My next question is that i need to hook it up to a parallel port. To do this i need to pull it down to under .8V? (Active Low)? At the monent it is still at 1.4V When Interrupted (measuring across the LED)
    So is this correct ?
    Attached Thumbnails Attached Thumbnails Parallel Port Setup.jpg  

  10. #10
    Join Date
    Dec 2003
    Posts
    24220
    Its not the LED that is the output, it is the transistor, referring to Alains print, your output would be the emitter to common, this is the level you should measure.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  11. #11
    Join Date
    Jun 2007
    Posts
    22
    As I found out, you can use the "switch" side as a normal switch (more or less!). Power up the LED side, put some voltage on one side of the switch and a volt meter on the other side and ground and you will read your voltage or 0 volts whenever you interrupt or not the slot. If it is not working, just invert the switch wires. The switch is polarised. Block the slot with a piece of metal. With cardboard or paper you will not reach 0 volts.

    My 0,02$ (CAD), with the parts I used!

    Alain
    Attached Thumbnails Attached Thumbnails SlotSwitch.jpg  

  12. #12
    Join Date
    Feb 2006
    Posts
    12
    It works!!!
    :banana:
    Thank you very much, It took me about an hour to get it to work, until i read Alain's post

    "If it is not working, just invert the switch wires. The switch is polarised."

    Ar

  13. #13
    Join Date
    Jun 2007
    Posts
    22
    Hi,

    I am happy to see you so exited!

    I must say that I get Banana too every time I catch something new in electronic.

    As you can see in the picture, it is possible to put those switch in serie. BTW those switches are real transistors.The LED is acting as the base and the 2 pins are the collector and the emitter.

    There is a small voltage drop betwen each switch but I think that the residual voltage is enough after 6 switches to keep the pin high. I test that with my old 486 laptop and TurboCNC 3 and it is working. Not 6 switches, just 2! I used the pin 10 but it is not mandatory.

    My knowledge in electronic is extremely small so this circuit even if it is working fine is probably not perfect. There must be something missing or wrong. I would be very happy to see it improved.

    Alain
    Attached Thumbnails Attached Thumbnails 2_Optical_Switches.jpg  

  14. #14
    Join Date
    Jan 2006
    Posts
    738

    Opto's in series

    Yes you can put them in series, within limits. That voltage drop will eventually call for a higher voltage and an additional transistor to interface to the port.
    I recall seeing a circuit that used a whole slew of phototransistors in series so that they could switch a much higher voltage (2000 V) and were switched by firing a strobe light.

    Steve

  15. #15
    Join Date
    Dec 2003
    Posts
    24220
    Quote Originally Posted by AlainB View Post
    Hi,

    As you can see in the picture, it is possible to put those switch in serie. BTW those switches are real transistors.The LED is acting as the base and the 2 pins are the collector and the emitter.
    In an opto-isolator, there should be no electrical connection between LED and transistor, otherwise you get no isolation, i.e. the circuit is capable of being used with two completely different supplies if you need to.
    I found it strange that the data sheet did not show the transistor properly. IOW what was the polarity, PNP/NPN, and does not identify the emitter or collector. Trial & Error??
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  16. #16
    Join Date
    Feb 2006
    Posts
    12
    I don't think Opto-isolation is all that important in a Home/limit switch. You would then need two separated power supplies and there wouldn't be much point to it that i can think of?
    I have it set up now using a 5V voltage regulator and using the 24V power supply for the stepper drive board. The plan is to make up a Small PCB with the voltage regulator and resistors for 2 opto interrupters, for X & Y axis.
    I havent got them mounted yet, but while i was playing with them i was wondering just how accurate they will be? Because the emitted light is interrupted slowly, does the transistor turn off at the exact same point every time? With the LED in the circuit the LED dims slowly as the light is interrupted. So it is not like a contact switch that is either Definately on or off. It is not an issue for what i am doing, but just a thought... I have seen in other posts that they are more accurate then other types of switches, so maybe i am wrong??
    Ar

  17. #17
    Join Date
    Mar 2004
    Posts
    1806
    I use an opto on my Z axis for tool length compensation and did a series of tests to see what kind of repeatability I could get. Using a 10 ipm rate on the reseting, I got a maximum deviation of about .0008" and an average of less than .0002". This was calculated over an average of 10 tests. I am using an opto that was salvaged out of an old copier or printer (don't remember which) and turbocnc as my controller. The flag is nothing more than a piece of 1/8" Al that is on the end of a rotating arm with the 2.5:1 ratio between the flag end and the contact point for the tool.
    Art
    AKA Country Bubba (Older Than Dirt)

  18. #18
    Join Date
    Jan 2006
    Posts
    738

    accuracy

    Arbus,
    They are pretty accurate. You may find a bit of "hysterisus" or backlash in them which may be partially to the way the input circuit they are connected to works. For instance, driving into the obscured condition, it may apear to switch off at 6.3754, driving back it may appear to on at 6.3721.

    Steve

Similar Threads

  1. optical limit switches
    By woffler in forum Benchtop Machines
    Replies: 7
    Last Post: 12-18-2007, 12:01 AM
  2. optical limit switches
    By phantomcow2 in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 03-05-2006, 01:48 PM
  3. The relationship of limit switches to home switches.
    By MikeAber in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 11-04-2004, 08:28 PM
  4. Home switches and limit switches.
    By ynneb in forum CNC Machine Related Electronics
    Replies: 5
    Last Post: 04-08-2004, 11:32 PM
  5. Optical Limit/Home/Reference Switches
    By redbaron in forum DIY CNC Router Table Machines
    Replies: 5
    Last Post: 02-07-2004, 02:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •