CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > General Electronics Discussion


General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-04-2011, 01:55 PM
 
Join Date: May 2010
Location: England
Posts: 98
Simon C is on a distinguished road
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
Reply With Quote

  #2   Ban this user!
Old 02-05-2011, 07:28 PM
 
Join Date: Sep 2010
Location: usa
Posts: 838
mike_Kilroy is on a distinguished road
Buy me a Beer?

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)
Reply With Quote

  #3  
Old 02-05-2011, 08:10 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,538
Al_The_Man is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #4   Ban this user!
Old 02-06-2011, 08:18 AM
 
Join Date: Sep 2010
Location: usa
Posts: 838
mike_Kilroy is on a distinguished road
Buy me a Beer?

Da - boy am I dumb! Thanks Al.
Reply With Quote

  #5   Ban this user!
Old 02-09-2011, 12:14 PM
vger's Avatar  
Join Date: Jan 2006
Location: usa
Posts: 664
vger is on a distinguished road

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
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-09-2011, 01:45 PM
 
Join Date: May 2010
Location: England
Posts: 98
Simon C is on a distinguished road
Thumbs up

That helps alot, Thanks so much Steve!
Reply With Quote

  #7   Ban this user!
Old 02-20-2011, 10:57 AM
 
Join Date: May 2010
Location: England
Posts: 98
Simon C is on a distinguished road

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
Click image for larger version

Name:	Index sensor set up diagram.jpg‎
Views:	370
Size:	95.6 KB
ID:	126975   Click image for larger version

Name:	index sensor pics 004.JPG‎
Views:	64
Size:	340.7 KB
ID:	126976   Click image for larger version

Name:	index sensor pics 006.JPG‎
Views:	50
Size:	332.3 KB
ID:	126977   Click image for larger version

Name:	index sensor pics 005.JPG‎
Views:	47
Size:	282.0 KB
ID:	126978  

Reply With Quote

  #8   Ban this user!
Old 02-20-2011, 11:46 AM
 
Join Date: Jan 2010
Location: USA
Posts: 10
GEBrown is on a distinguished road

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
Reply With Quote

  #9   Ban this user!
Old 02-21-2011, 10:47 AM
 
Join Date: May 2010
Location: England
Posts: 98
Simon C is on a distinguished road

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
Click image for larger version

Name:	Lathe pics smaller size 004.JPG‎
Views:	73
Size:	235.9 KB
ID:	127055  
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 03:32 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361