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 07-19-2004, 07:50 PM
 
Join Date: Jan 2004
Location: United States
Posts: 231
owhite is on a distinguished road
Optical interupt switch implementation.

We all need limits...

This is a continuation of a thread that was started here.

As I am sure many of you know, limit switches detect the position of moving parts when they are near the extreme ends of their linear positions. This prevents collisions of things like ballnuts at the ends of the ball screws, and are also used as points of reference for when the software resets the table to go to the "home" position. Some systems use mechanical switches but in my case I chose to use optical interupter switches made by Fairchild. The advantages of optointerupters like the H21LOB are that they create TTL logic and are fairly accurate.

After some testing I came up with this circuit diagram ( jpg pdf ) for the interupters. In this circuit you'll note that in order to daisy chain the optointerupters together it was useful to solder a resistor directly to the interupter. The H21LOB wiring was bundled up with lots of heat shrink tubing (also shown here). The circuit diagram also shows the pinouts for each of DIN connectors which eventually will plug into the back of the electronics enclosure.

Although its very difficult to see in the picture, my cnc table came with a nice mounting bracket (note red arrow) which had some old school interupt switches. I pulled off the bracket, removed the switches, and strung in my interupter circuit into the mount (view here and here). Hot glue was used to make all the wiring that was crammed into the rail stay in place.

The pictures look kind of crappy but once the rails were bolted into place everything looked really good. There are two rails, one for each axis, and each rail has three switches: limit+, limit- and home. The table comes equiped with small pieces of sheet metal that project down onto the rails. When the table slides towards the ends of its total possible travel (around 18 inches) the sheet metal tabs travel between the opto-interupters. The state of the opto-interupters changes, the universal stepper controller picks up the change, and my software throws a complaint.

owen
Reply With Quote

  #2  
Old 07-20-2004, 02:24 AM
*Registered*
 
Join Date: Apr 2004
Location: Norway
Posts: 678
ESjaavik is on a distinguished road

These interrupters are very accurate and dependable. But it may be worth mentioning that this is for a laser cutter. I don't think Lasers don't generate swarf or dust, so it will be fine. But for others reading this and thinking of using it for metal or wood cutters, please consider this: A small piece of debris landing in the reading fork, and it will signal "limit! end operation.".
Reply With Quote

  #3  
Old 08-01-2004, 06:54 PM
High Seas's Avatar
Gold Member
 
Join Date: Sep 2003
Location: Malaysia/Australia/NZ/USA
Age: 62
Posts: 1,124
High Seas is on a distinguished road

owhite -
Say Owen, thanks for that great summary! I've salvaged a bunch of similar opto-limit switches from printers and 5.25 floppy drives (thanks to Big AL for his connection notes too), so I may have a purpose for them now!
And Einar, sure understand your point regarding swarf and dust. I'll mount "high and dry" overhead - SYSTEM2 sorta sits "above" some of the mess.
Thanks guys! - Jim
__________________
Experience is the BEST Teacher. Is that why it usually arrives in a shower of sparks, flash of light, loud bang, a cloud of smoke, AND -- a BILL to pay? You usually get it -- just after you need it.
Reply With Quote

  #4   Ban this user!
Old 01-18-2006, 04:05 PM
 
Join Date: Mar 2004
Location: Delta BC Canada
Posts: 150
impact is on a distinguished road

Sounds interesting. I think I am going to try something like this.
Reply With Quote

  #5   Ban this user!
Old 04-08-2009, 08:02 PM
 
Join Date: Apr 2009
Location: United States
Posts: 10
AlmostHandy is on a distinguished road

I'm not sure I understand what the OP means when he says "The advantages of optointerupters like the H21LOB are that they create TTL logic and are fairly accurate. "

I'm not familiar with the use of that type of opto interrupter. It looks like the phototransistor side is set up like a darlington pair. Is that for current gain?

How do the H21LOBs compare to a 4 wire slotted optical switch, like an H21A1 (commonly found inside old computer mice). I would really like to implement this type of limit switch in my design, but I'm having trouble wrapping my tiny brain around the wiring of the switches.

Can anyone help out on this?

I only ask about the H21A1's because that is what I have, but I'd really like to understand the differences between the two types, before I make a final decision. What is the benefit of using one type over another?
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-08-2009, 08:20 PM
 
Join Date: Apr 2009
Location: United States
Posts: 10
AlmostHandy is on a distinguished road

Also, my circuit will require the limit switches on all axises to be chained together in series, so that if one switch is closed, the whole machine stops.

This is what I had so far. Does this look like it would work?
Attached Thumbnails
Click image for larger version

Name:	untitled2.JPG‎
Views:	182
Size:	32.1 KB
ID:	79393  

Last edited by AlmostHandy; 04-08-2009 at 08:54 PM.
Reply With Quote

  #7  
Old 04-08-2009, 10:22 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,540
Al_The_Man is on a distinguished road
Buy me a Beer?

I do not see this working at all, you have the LED's all in series across the 5v supply, with no resistance in series you will most likely blow one.
You need three wire between each switch, and you have the NPN transistors which have no final load resistor.
See post #7 http://www.cnczone.com/forums/showthread.php?t=77324
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

  #8   Ban this user!
Old 04-09-2009, 03:06 PM
 
Join Date: Apr 2009
Location: United States
Posts: 10
AlmostHandy is on a distinguished road

Thank you Al! That file is just what I was looking for! I understand how to connect them one at a time now, which is a step in the right direction.

My problem is that my circuit calls for limit switches to be connected in series, so that if one of them is broken, the whole loop is broken. They are all connected to the same pin on the parallel port (S6), and a 5v source with a 4.7K pull up resistor.

Is there a way to connect the opto-interrupters in series, so that they are all connected to the same loop? I can't figure out how to daisy chain them all together in series.
Reply With Quote

  #9  
Old 04-09-2009, 04:48 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,540
Al_The_Man is on a distinguished road
Buy me a Beer?

I will repost with the series circuit.
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

  #10  
Old 04-09-2009, 07:57 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,540
Al_The_Man is on a distinguished road
Buy me a Beer?

This is a series circuit, it has been tested, the resistor values may have to be adjusted if any opto's are added or subtracted.
Al.
Attached Files
File Type: dxf slotiso.dxf‎ (69.5 KB, 141 views)
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 04-09-2009, 10:33 PM
 
Join Date: Apr 2009
Location: United States
Posts: 10
AlmostHandy is on a distinguished road

Originally Posted by Al_The_Man View Post
This is a series circuit, it has been tested, the resistor values may have to be adjusted if any opto's are added or subtracted.
Al.
Awesome! That makes sense! Even seems, dare I say, simple?


I found a box in my junk that has 6 of the same type of opto-switch. They are Sharp, model number GP1S58. I've looked at the datasheet, and it says that the typical rating is 1.2Vf @ 20mAIf on the LED side. Now, my math isn't that great, but I'm pretty sure that since I'm using a +5V supply, I'll only be able to chain together four of these in series, before the forward voltage becomes too low for the LEDs to make any light, closing the circuit.

Does that make sense? I'll be trying to put 6 of them in series.

What I've done is attempt to separate the power to the LED half of the switches, without breaking the chain in the output side. My attempt seems logical, but again, these little optical switches baffle me for some reason. Do you think this would work?
Attached Thumbnails
Click image for larger version

Name:	untitled4.PNG‎
Views:	193
Size:	20.0 KB
ID:	79442  
Reply With Quote

  #12  
Old 04-09-2009, 10:58 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,540
Al_The_Man is on a distinguished road
Buy me a Beer?

You could probably go with three LED's in each string with a 50 ~ 70ohm resistor.
Unless you want to keep them in pairs?
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

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
limit switch override swarfmacdaddy TurboCNC 5 12-12-2004 03:47 AM
Optical Switch w/Interrupt mechanism cnczane DIY-CNC Router Table Machines 1 11-10-2004 08:51 AM
WHATS THIS?? - Optical Switch?? High Seas General Electronics Discussion 5 07-13-2004 07:54 PM
optical switch natchez Xylotex 3 05-01-2004 07:45 AM
Optical Limits IndHobby Product Announcements & Manufacturer News 0 02-10-2004 12:51 AM




All times are GMT -5. The time now is 11:01 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