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! > OpenSource CNC Design Center > Open Source Controller Boards


Open Source Controller Boards Discussion for Open Source CNC type Controller Boards and other related items. (for personal use only)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-13-2006, 11:24 PM
 
Join Date: Dec 2005
Location: USA
Posts: 6
farmallfan is on a distinguished road
Optoisolator question

Hi all,

Newbie question for you... I've designed a controller board with 4N27 optoisolators between the parallel port leads and machine-side circuitry. I'm a software guy, and this hardware stuff is pretty new to me, so this question may do nothing other than show off my ignorance: I'm running motor-level voltage to the machine-side of the isolators. On the other side, for signals that are input to the parallel port (e.g. for limit switches), I know I can get a separate ground from pins 18-25, but where should I be getting positive power? Is it good enough to have separate grounds and share the positive voltage? (I am cutting the motor power down via a 7805 for logic.)

I appreciate any enlightenment you can send my way.

Many thanks,

- David
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 02-14-2006, 12:28 AM
abasir's Avatar  
Join Date: Apr 2003
Location: Malaysia
Posts: 361
abasir is on a distinguished road

There should not be ANY electrical link between the input & output!

For the PC side, you can get the +5V from the power connecter in the PC (the red wire). For the motor side, you can use the output from the 7805.

Please note pin 18-25 are all connected to the same ground at the PC power supply. Do not connect any of them to the ground circuit on the motor side!
__________________
Stupid questions make me smarter...
See how smart I've become at www.9w2bsr.com ;-P
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 02-14-2006, 08:03 AM
 
Join Date: Dec 2005
Location: USA
Posts: 3,319
NC Cams is on a distinguished road

If you want to limit your 5v to being provided by the parallel port, simply tie all the "output" pins to a capacitor (say 100uf) THRU a bunch of 1N914 diodes. Use a diode array to save space/facilitate assembly.

Each time any output pin goes high, it will shoot 5v to the cap and the diode prevents voltage drain when pin goes low - been there, done that, works fine.

Probably should limit it with a zener. Otherwise, you'll need to hack into the PC to find a 5V source (wouldn't do it it it were my deal).

Other option is to provide remote 5V source from external mini DC transformer or 9v battery and 7805 regulator. As long as you tie negative of external P/S to same ground as pins 18-25, this will work as well.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 02-14-2006, 11:07 AM
 
Join Date: Dec 2005
Location: USA
Posts: 6
farmallfan is on a distinguished road

Excellent! Thanks very much gents.

- David
Tweet this Post!Share on Facebook
Reply With Quote

  #5  
Old 02-14-2006, 07:47 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 15,714
Al_The_Man is on a distinguished road
Buy me a Beer?

As abasir said, if you need a 5v source referenced to PC side, any of the 4 pin power supply connectors should supply it. As this is what the parallel port is referenced to.
Al.
__________________
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6  
Old 02-14-2006, 08:22 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,669
Mariss Freimanis is on a distinguished road

You can find 5VDC on:

1) Pin 1 of your game port (DB17 connector)
2) The red wire in a decapitated PS2 mouse cable
3) Any USB port

Connect a 220 Ohm resistor +5VDC, connect the opto-LED anode to the other end of the 220 Ohm resistor. Take the opto-LED cathode to the parallel port output pin of your choice.

Caveat: Many / most new PC parallel port outputs are 3.3V logic now. Toggle the port output pin, set a multimeter to DC Volts and measure the pin voltage. If you do not read at least 4V for a logic '1' ouput, you have a cursed 3.3V port.

If so, then do the following:

Connect a 470 Ohm resistor to the 220 Ohm / LED anode junction. Take the other end of the 470 Ohm resistor to parallel port ground. Then it will work with 3.3V logic as well as 5V logic.

Mariss
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 02-14-2006, 10:28 PM
 
Join Date: Dec 2005
Location: USA
Posts: 6
farmallfan is on a distinguished road

Ah...great suggestions -- I'm using a laptop, so I'm not particularly excited about hacking in to the internal power supply leads, but I hadn't thought about the USB port. That's a great idea.

Thanks,

- David
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 07-24-2010, 07:50 PM
 
Join Date: Dec 2008
Location: CHILE
Posts: 2
lete002 is on a distinguished road

Hi Mariss
I know this is an old topic, but I want to ask you a question about your setup for 3.3-5V, compared to the one PMinMO uses in his opto board. I think yours is better, only not sure why.
The other setup is:
5V (USB port), anode of opto-LED, 470 Ohm resistor, pin of the parallel port. There is also another 2k2 resistor between the parallel port pin and 5V, I guess to avoid conduction of the opto-LED with the 1,7 V difference, in case is a 3.3V port.
Which one would you use?
Thanks

Rafael
Tweet this Post!Share on Facebook
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 08:16 AM.





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