![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| 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 |
|
#3
| ||||
| ||||
| BOB= Break Out Board or interface, usually between PC and the rest of the system, and usually opto isolated. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#5
| ||||
| ||||
| 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 |
| Sponsored Links |
|
#7
| |||
| |||
| 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. |
|
#8
| |||
| |||
| 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
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Optical Switch | boozeboy | General Electronics Discussion | 5 | 05-07-2010 06:40 AM |
| Need Help!- Optical home switch wiring to G540 | mhackney | General Electronics Discussion | 3 | 01-18-2010 07:31 PM |
| Optical interupt switch implementation. | owhite | General Electronics Discussion | 26 | 07-26-2009 04:27 PM |
| Newbie- Please help with an optic interupt switch | antichip | General Electronics Discussion | 7 | 09-02-2008 09:47 PM |
| optical switch | natchez | Xylotex | 3 | 05-01-2004 07:45 AM |