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 > Computers and Networking


Computers and Networking Discuss computer and Networking related questions here!


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-14-2004, 06:12 AM
Verboten's Avatar  
Join Date: Jul 2003
Location: OR, USA
Posts: 51
Verboten is on a distinguished road
Parallel Port / Relay Control Question

I have been trying to learn about controlling my PC's parallel port and have run into a problem.

I am currently trying to control a relay on an adjustable timer and the output from pins 2 -9 trigger my solid state relays no matter what state they are supposed to be in.

When I measure the voltage between the ground pins 18 - 25 and 2 - 9 when they are supposed to be low they are at 3.68 to 3.7 volts (fluctuating) and 4.08 when high.
I can get pin 1 to .075 low, 4.09 high - which works, but I would like to use the data pins.

Could this be a problem with the type of parallel port that my PC has or how it is set up?

The relays that I have are IDEC RSSD with 3 to 32 vdc control at 1 mA. Do I need to or should I use an IC between the port and the relay? I had tried a circuit with a 74LS367 but the one at http://www.southwest.com.au/~jfuller/sio.html seems far better. Is it wrong to wire a relay of this type directly between one of the data pins and the ground pins?

I have what I would consider to be very little knowledge about electronics, programming, and computers in general.

Any help will be appreciated.
Thanks,
Jason
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 12-14-2004, 08:01 AM
 
Join Date: Jun 2003
Location: Boalsburg PA
Posts: 844
unterhaus is on a distinguished road
Parallel port pins don't like to source current. Your best bet is to pull the low side of the relay input down to ground through the data pin. The high side of the input would then be hooked to the power supply. I think it is wise to put some kind of IC to buffer the computer port.

It's been a while since I've programmed the parallel port. You have to set it up for output. Are you using someone else's code?
Tweet this Post!Share on Facebook
Reply With Quote

  #3  
Old 12-14-2004, 06:42 PM
sol sol is offline
Gold Member
 
Join Date: Sep 2003
Location: USA
Posts: 226
sol is on a distinguished road
Check out this thread
http://cnczone.com/forums/showthread...92&page=5&pp=5
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 12-14-2004, 06:51 PM
Verboten's Avatar  
Join Date: Jul 2003
Location: OR, USA
Posts: 51
Verboten is on a distinguished road
Hello and thanks for the reply

I want to use a timer in visual basic.net along with the IO.DLL from here:http://www.geekhideout.com/iodll.shtml to operate the data pins. That seems to work because I do have control over that 4 tenths of a volt (wow!).

Their parallel port monitor: http://www.geekhideout.com/parmon.shtml can also toggle the pins.

I have never wired anything in the way that you described. I saw it mentioned in a parallel port faq and thought that it would be difficult for me to do - calculations and accurate testing. It certainly did seem like a better way to do it though. If I remember right you can draw more than 2x the current.

But, even if I did this wouldn't I still not have enough difference in voltage between the two states ( High/Low) to make the relay turn off? - not sure if that is the right way to phrase it.

Thanks Again,
Jason
Tweet this Post!Share on Facebook
Reply With Quote

  #5  
Old 12-14-2004, 07:33 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 15,696
Al_The_Man is on a distinguished road
Buy me a Beer?
The 2n7000 mentioned in the link has a threshold of 0.8v to 3.0v anything below .8 is off above 3.0 is on.There is essentially no loading of the port.
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   Ban this user!
Old 12-14-2004, 07:49 PM
pminmo's Avatar  
Join Date: Jun 2003
Location: St. Peters, Mo USA
Age: 59
Posts: 3,325
pminmo is on a distinguished road
Verboten,
This might be of help to you, go to my website:
http://webpages.charter.net/pminmo/cncelectronics.htm
Looks at the 3 or 4 axis interface board. This is the link for the document:
http://members.tripod.com/pminmo/4axisBOBdata.pdf

The aux1 driver is specifically for driving a relay. It will work with a ssr or mechanical relay. By connecting your relay between the x5-1 pin and x5-2 pin you would be able to switch your relay. All you really need is a npn transistor and a resistor.

http://www.beyondlogic.org/spp/parallel.htm Is an excellent primer on the parallel port as well as http://www.hut.fi/Misc/Electronics/c.../lptpower.html

Phil
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 12-21-2004, 07:37 AM
Verboten's Avatar  
Join Date: Jul 2003
Location: OR, USA
Posts: 51
Verboten is on a distinguished road
Thanks for the replies, they have all been helpful.

I did get the relay to work. I switched to a pc running dos and made a simple program in qbasic. The pins on that pc operated like I wanted (low below 0.8v , high above 4v). That made the 74LS367 circuit work and then the relay.

I will try a 2n7000 when I place another order.

I'm still not quite sure why my windows xp pc didn't work. I think that it might be because of the type of parallel port that it has or possibly something in the io.dll file that I was using - I have no clue how or exactly what it does. I'm kind of glad that it didn't work because it seemd to be needlessly complex - maybe I should study about Linux.

Qbasic and dos allowed me to directly address the port, the timer seems to be much better, and I really didn't need a windows form. I was really amazed how easy it was.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 12-21-2004, 05:17 PM
pminmo's Avatar  
Join Date: Jun 2003
Location: St. Peters, Mo USA
Age: 59
Posts: 3,325
pminmo is on a distinguished road
An application can't call a parallel port directly in XP. You need a driver.

Phil
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNC with parallel port (Bridgeport BOSS 5)? hobbymat General CAM Discussion 3 07-20-2009 12:16 PM
Relay question shortbus General Electronics Discussion 3 04-26-2005 05:14 AM
Parallel port circuit Kerri Ann General Electronics Discussion 12 03-19-2005 01:23 AM
Parallel Port Options JasonCroyle General Electronics Discussion 4 01-12-2005 08:23 AM
E-Stop Hard Wire and to Software? Sanghera General Electronics Discussion 20 10-30-2004 12:22 AM




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