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! > Machine Controllers Software and Solutions > Machine Problems, Solutions , Wireless DNC, serial port


Machine Problems, Solutions , Wireless DNC, serial port Need help with your Machine or need a Machining solutions for , Serial Port, Cable problems between PC and all others DNC problems disucss them here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-24-2006, 08:24 AM
 
Join Date: Feb 2004
Location: RI, USA
Posts: 155
mwalach is on a distinguished road
simple serial interface

Anyone know where I can find a sample schematic for a serial interface? I just want to grab some data that I send out the serial port and manipulate it. I basically need a test rig to better understand how to interface with the serial port. I am writting a cnc driver that will work off a serial port (usb or serial). I would like to make or find a cheap way of taking serial position/step data and convert it to step direction pulses to drive a gecko or xylotex board. I have found some ready made boards like the simplestep, but they are around $200-$250. I am trying to see if I can make a cheaper interface. Anyone know of one, or interested in this type of thing?

thanks,

mw

www.bigbearcnc.com
Reply With Quote

  #2  
Old 03-24-2006, 08:38 AM
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?

Have you looked at going the PIC Micro route? There should be alot of application sheets on the site.
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

  #3   Ban this user!
Old 03-24-2006, 10:21 AM
 
Join Date: Feb 2004
Location: RI, USA
Posts: 155
mwalach is on a distinguished road

Microcontroller, I never thought of that. They are probobly a good, cheap way to go about this.

Question,

I always thought a microcontroller was programed with the pc, then disconnected and run on its own. What I want to do is have constant communication with it. Is this possible?

Basically I would want to send step information for x,y,z axis to the microcontroller. Then it would read my data and generate a step pulse and a direction pulse for each axis. I would also want to be able to control the speed of the steps so that the motors arrive at their destination at the same time. ie, if I want to go from 0,0 (x,y) to 1,2 (x,y) it would move y twice as fast as x. I would then have data outputs coming from the microcontroller that I would feed to my motor driver board (step x, direction x and the same for y and z). I have never done any work with pics, but does this sound like a reasonable app?
Reply With Quote

  #4  
Old 03-24-2006, 11:30 AM
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?

Pic micro's have built in RS232 & USB interfaces to communicate to the PC.
http://www.microchip.com/stellent/id...PAGE&nodeId=64
Also, another method could be with an industry Standard machine control network like Canopen that is also supported by PICmicro.
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

  #5   Ban this user!
Old 03-24-2006, 12:39 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

060324-1300 EST USA

mwalach:

Your question is not very clear in terms of the device that you are going to control. For example does it include a microprocessor or PC or whatever? Probably not from your description so far.

If you want some broad information on a UART go to www.national.com
put in PC16550D in the search box. Next click on download under PDF, and you will get the data sheet.

I have not read the data sheet lately. But years ago, in the early days of UARTs, very good descriptions of the operation were given. More recently the assumption is made that you have considerable a priori knowledge.

Generally serial transmission means that one bit of information ( 0 or 1) is transmitted in one time interval. To be useful this serial data needs to be assembled in some grouping. This occurs at various levels. Typically in an RS232 communication channel data is sent asynchronously in batches of about 10 bits. Some of these bits do not contain information. Typically in a 10 bit asynchronous word the construction is as follows:
1 Start bit --- required
7 Data bits --- the individual values will fluctuate from one word to the next
1 Even parity bit --- this is an option that is suggested --- varies from word to word to make parity even
1 Stop bit --- required

Asynchronous means that automatic resynchronization occurs every transmitted 10 bit word (or whatever the length is).

The the amount of information contained within this one word is up to 128 combinations, 2 to the 7th power. Adequate for all the characters in the basic ASCII alphabet.

Inherently there has to be a precision clocking signal at each end and it has to be agreed upon before transmission of data. Any arbitrary amount of time is allowed after one word is transmitted before another is sent.

To work form RS232 levels to the 16550 you need RS232 interface chips or other devices. The 16550 parallel side is compatible with 5 V logic circuits. The serial input is also 5 V compatible and that is why interfacing is required to the RS232 levels.

.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-24-2006, 01:31 PM
 
Join Date: Feb 2004
Location: RI, USA
Posts: 155
mwalach is on a distinguished road

Your question is not very clear in terms of the device that you are going to control. For example does it include a microprocessor or PC or whatever? Probably not from your description so far.
I am writing a software application that will run on both macs and pcs. It takes a dxf file and converts it to gcode. Then, it takes the gcode file and generates step and direction pulses to drive a stepper motor controller (such as a xylotex or gecko). These stepper drivers need a step direction bit (0,1) and a stream of pulses for stepping movement. Most people design controllers to run off the pc parralel port because you can drive the stepper controller directly by toggling the bits of the parallel port. In the past I wrote a cnc control to do just that. However, I want to control my stepper driver through a USB port (or serial) as most apples, and even pc now do not have a parallel port. I am also hoping to have smoother motor control because some external electronics can hold the drive bits in a buffer. Operating systems get in the way of the bit stream when using the parallel port, and make the stepper motors run choppy.

So, basically I want an inexspensive device that can be plugged into a computers USB port on one end, and then connected to a stepper motor driver. Then, people could use my software and this "go-between" board to control any of the great stepper drivers already on the market. No one seems to make a good, cheap serail controller for the hobby cnc enthusist.

Anyone interested in what I am doing can visit my website at www.bigbearcnc.com

I will release an alpha version of my software soon which will contain the dxf to g-code converter (this will be shareware).

once the driver portion is complete I will likely charge a small amount for it, but not much. I want this to be available to the hobbiest.
Reply With Quote

  #7   Ban this user!
Old 03-24-2006, 02:48 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

060324-1538 EST USA

mwalach:

I believe you will need a microprocessor at the end of whatever your serial connection is for the following reason:

In a Windows system you have multiple processes sharing the main processor time. Thus, it is hard to get precise timing control in some random programmed function at high rates. You want a dedicated system to generate these multiple pulses that require precise time correlation with each other.

I would suggest you use Ethernet from your PC to this remote processor. This will provide electrical isolation, high speed, and up to 328 ft of copper wire cable. Or fiber can be used.

Obviously the remote processor will have sufficient buffer memory to never be starved for data from the main PC.

Your timing information would be generated at the local processor.

.
Reply With Quote

  #8  
Old 03-24-2006, 03:30 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 would consider looking into the available open architecture bus systems that are out there, of which there are many.
Canopen, MODbuss and Sercos etc (or at least model it on same)..
For example Sercos (SErial Real time COmunication System), offers practically real time closed loop of Axis controllers with the ability to close the loop back to the controller, due to the intelligent digital drives reporting position status back to the controller.
There are application sheets around for integrating a PIC micro onto some of these standards.
I guess we've overstepped the original premise, the operative word was 'Simple' Interface.
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 08:18 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 354 355 356 357 358 359 360 361