586,117 active members*
3,444 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Wiring Optical interupt switch to BOB
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2010
    Posts
    0

    Question Wiring Optical interupt switch to BOB

    Hey guys, Im trying to figure out how to wire my Optical interupt switch to a BOB, it will be used for spindle index for threading. The switch i have is a OPB917BZ from RS, this particular switch has been discused before on cnc zone but i cannot seam to find the thread anymore, it mentioned useing a limiting resistor of 220r so i got some of those at the same time. the switch has 5 wires, red,black,green,white,blue, to my knowledge (and my knowledge of electronics is VERY limited) the red and black will go to a 5v ps (il use a usb charger) one of the 220 resistors will go in the red line between the ps and the switch. the other 3 wires i have no idea about, i assume just 1 of them will go to the BOB as the signal pulse at a spare pin and il enable it in mach,but wich one of the 3 i duno.
    Any help on this will be much appresiated,
    thanx in advance
    Simon

  2. #2
    Join Date
    Sep 2010
    Posts
    1765
    simon,

    I have seen this name BOB often on this site but have no clue what a BOB is??

    What the heck is a BOB? (thanks)

  3. #3
    Join Date
    Dec 2003
    Posts
    24221
    BOB= Break Out Board or interface, usually between PC and the rest of the system, and usually opto isolated.
    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
    Sep 2010
    Posts
    1765
    Da - boy am I dumb! Thanks Al.

  5. #5
    Join Date
    Jan 2006
    Posts
    738
    Simon,

    The red wire is the anode of the LED, Black is the Cathode of the LED. Yes you will need a limiting resistor between the supply and the red lead to limit the LED current to around 20 ma. A 220 ohm resistor would make it about 16 ma which should be fine.

    The other 3 leads are:
    White --- Vcc (5V)
    Blue --- Output (light on output high)
    Green --- Ground (Power / signal ground)

    If you take a look at this PDF (it covers 4 different part #'s) on the first page at the bottom, your's is the upper left diagram.

    http://www.alliedelec.com/Images/Pro...K/387-0118.PDF

    Hope that helps...

    Steve

  6. #6
    Join Date
    May 2010
    Posts
    0

    That helps alot, Thanks so much Steve!

  7. #7
    Join Date
    May 2010
    Posts
    0
    Well i got the sensor working now thanks to Steve's reply so i thought i would do a little diagram to show exactly how i did it and what components i used. the sensor its self i baught from RS components, this is a link to it Optek | Optoelectronics and Displays | Optoelectronics | Photointerrupter | Slotted Optical Switches & Reflective Sensors |OPB917B and the resistors are also from RS RS | Passives | Resistors | Through Hole, Fixed | Axial 1W/2W and the power supply i got from Maplins. Electronics are not my strong point but anyway here is the simple diagram for all us mechanical geniuses.
    Attached Thumbnails Attached Thumbnails Index sensor set up diagram.jpg   index sensor pics 004.JPG   index sensor pics 006.JPG   index sensor pics 005.JPG  


  8. #8
    Join Date
    Jan 2010
    Posts
    44
    Where was this post a couple of months ago when I was trying to figure this all out!!! LOL

    With this model of optical switch, is the input HIGH or LOW when the beam is interrupted?

    Or if you are using Mach3, how did you configure that input?

    Thanks!!

    Gary

  9. #9
    Join Date
    May 2010
    Posts
    0
    Gary,

    This switch is 0V when the beam is blocked and 5V when unblocked. and yes im useing Mach3 also. Im useing it as an index pulse on my lathe spindle so mach gets 1 pulse per turn of the spindle so it can see exactly what rpm the spindle is doing and mach also uses it for threading to sincronize the lathe carrage with the chuck. As for the active high or low setting in mach, i will set it to active high (leave the active low box un checked) because on my lathe spindle i made an aluminium disc and cut a 10mm slot into one side so the beam is blocked for most of the rotation of the spindle until the slot in the disc passes the sensor and the beam is unblocked for that short time as the slot passes. this way mach only uses the slot in the disc as the signal.


    Im going to use more or thease switches as home switches, when i use them as home switches the switch will be unblocked most of the time and blocked only when i am at home position, i will just fix a piece of aluminium to block the switch at the home position (doesnt have to be aluminium it can be anything as long as light cannot pass through it) so with this set up i will set mach to active low.

    To set this switch up in mach i did this: Top left corner of the mach screen click on "Config" then in the pop up box click on "Ports and pins" then in the ports and pins box you click on the "Input signals" tab and scroll about half way down and you see "Index" the index is for a spindle rpm sensor that has only 1 pulse per revolution like the one i made. next you will need to click on the "Enabled" box so that it puts a check mark next to index. then the next box to the right is "port#" put a number 1 in that box unless u are useing two paralell ports. next box to the right is "Pin number" i have mine on pin 15 but yours might be diffrent depending on wich pin you connect the sensor to on your break out board. after you entered the pin number click "Apply" and then click "Ok" and it should work. to check if it works you can click on the "Diagnostics" tab near the top of the mach screen, on the right side of the diagnostics screen you can see the state of the input signals and the green light next to "Index" should flash on or off as you block or unblock the sensor.

    Im still quite new to Mach and CNC in general so please dont take everything i said as "concrete" as im still learning this stuff myself

    Heres a few pics of how i mounted the switch on the lathe and this is a link to my build thread on converting this lathe to cnc http://www.cnczone.com/forums/mini_l...onversion.html
    Attached Thumbnails Attached Thumbnails Lathe pics smaller size 004.JPG  

Similar Threads

  1. Optical Switch
    By boozeboy in forum CNC Machine Related Electronics
    Replies: 5
    Last Post: 05-07-2010, 12:40 PM
  2. Optical home switch wiring to G540
    By mhackney in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 01-19-2010, 02:31 AM
  3. Optical interupt switch implementation.
    By owhite in forum CNC Machine Related Electronics
    Replies: 26
    Last Post: 07-26-2009, 10:27 PM
  4. Please help with an optic interupt switch
    By antichip in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 09-03-2008, 03:47 AM
  5. optical switch
    By natchez in forum Xylotex
    Replies: 3
    Last Post: 05-01-2004, 01:45 PM

Posting Permissions

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