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 10-14-2008, 01:04 AM
 
Join Date: Oct 2008
Location: India
Posts: 4
amitgoradia is on a distinguished road
How to generate fast step/direction signals

Hi,

I am new to CNC machining so please pardon my naive questions.

I want to control a 20,000 ppr ac servo motor which came with its driver using a PC.

However, the parallel port motion controllers provide very low frequency step/direction signals (~25 KHz) which gets me to about 1 rps or 60 rpm.

the motor is capable of doing 3000 rpm.

So, my question is how to generate a very high pulse rate ie about 1Mhz to 3Mhz (like the propriety controllers). I realize that the propriety controllers use dedicated hardware to generate such high pulse rate and communicate with the PC over the PCI bus.

However, my intuition (supported by calculations) tells me that it should be possible to convey position data to a hardware board using USB and then use the dedicated microcontroller to generate step and direction signal.

I have designed PC to USB device communications int he past using PIC 18f4550 and Atmel ARM AT91SAM7 series as well as Atmel AVR32 UC3A and AP7000 processors. So I can definitely design the communication of position data (1 ms intervals) of the various axes as well as I/O sampling over USB to the microcontroller.

However, I am drawing a blank when it comes to the generation of high speed step/direction signals.

Any ideas on this?

Regards,

amit
Reply With Quote

  #2   Ban this user!
Old 10-14-2008, 04:08 AM
Jason3's Avatar  
Join Date: Aug 2007
Location: New Zealand
Posts: 544
Jason3 is on a distinguished road

Hi Amit,

Many drives have an electronic 'gearing' function that will multiply the pulses received by any factor you set. I assume your drive does not have this capability, or you want to retain the full resolution. In this case, the easy way out is a Smoothstepper from www.warp9td.com

Regards,

Jason
Reply With Quote

  #3   Ban this user!
Old 10-14-2008, 01:29 PM
 
Join Date: Oct 2008
Location: India
Posts: 4
amitgoradia is on a distinguished road

Hi Jason,

Thanks for the response.

The site that you suggested is somewhat similar to what I want to build.

However, I want to do it open source using an open source front end like EMC2 (or atleast use the G-code converter from there).

Currently I am not able to figure out how to generate high speed pulses for pulse and direction output at a rate of 1MHz (EMC2 can at best do 50 KHz).

I am also open to using a different controller chip for each axis with one master coordinator which coordinate the various axes and synchronize them.

However, even with separate microcontrollers for each axis, I would still need a lot more horsepower per microcontroller to generate a 1 - 3 MHz pulse rate by toggling a bit in code.

I believe that there should be a timer/counter peripheral based algorithm that can be used. However, I am not aware of it.

I looked up the EMC2 algorithm which actually uses feedback from the pulses generated to ensure that the position counters are where they should be (you can find the stepgen algorithm in the Integrators manual for EMC2). However, such an algorithm where the pulses are generated completely under software control would require a lot of horsepower while not being able to run faster than 100us on a computer or even a 20 - 60 MHz processor.

So, I am looking for recommendations on how to do this.

Regards,

amit

Is there a simillar algorithm
Reply With Quote

  #4   Ban this user!
Old 10-14-2008, 04:38 PM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

Why limit your self to a position mode motion control system, (step/dir)?

Where Emc really sets itself apart from most all the other motion control software that is affordable at a hobby level is that it can do torque and velocity mode control.

If you do need to stay with step/dir you could do something as simple as having EMC output an analog velocity command and a digital direction command the velocity signal you feed to a voltage to frequency converter to get your step signal. The encoder signals then need to be feed to an up/down counter (hardware if you want to go really fast) which EMC can then read at its servo control loop rate. The up/down counter needs to have enough bits so that it cannot overflow between the times EMC reads it.
Reply With Quote

  #5   Ban this user!
Old 10-15-2008, 02:09 PM
 
Join Date: Oct 2008
Location: India
Posts: 4
amitgoradia is on a distinguished road

Hi Andre' B

Thanks for the information. This is exactly what I was looking for. I will look up velocity to frequency conversion and see if the frequency can be directly be generated by a timer and a direct feedback be provided by an up/down counter directly in hardware. That is a very good idea.

However, you have raised a very important point with regards to velocity control or torque control v/s position control.

It is true that EMC2 provides a complete servo controller for each axis and the servo rate on each axis is also quite acceptable at 10 KHz. However, the servo controller is also implemented by most drives which is also acceptable for most applications which do not require dynamic or kinematic compensation for various axes.

The thing I dont like about EMC2 is that you need to have a complete computer dedicated to something that can be done by a low level processor.
The high level task of motion processing should be done by the computer but after that the computer should switch to a supervisory role and let the low level processors handle the strict timing requirements of servo control.

Further many CAD softwares are not directly available for LINUX (WINE is not an option for most CAD/CAM s/w). This brings about a forced separation in the work flow between the design and execution which may not be acceptable for some tasks.

Further parallel ports and PCI cards are starting to become rare on newer computers and are being replaced by the ubiquitous USB. So, to stay ahead of the curve, we should design some hardware that can process position commands over USB. Due to the inherent latency in the USB bus protocol (anywhere from 4 to 20 ms and even 100 ms in rare instances), velocity / torque control (or direct servo control) will not be possible directly over USB. Hence we will require to transfer the motion data (be it position or Gcode) over USB to some intelligent hardware which will then play out the position or process the Gcode using a motion processor and then play out the positions. The servo (if implemented) in this setup will have to be done on the hardware level.

This is my motivation to try to develop a USB based servo controller.

It will be interesting to hear peoples comments on my viewpoint.

Regards,

amit
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-17-2008, 02:58 AM
hesham morsy's Avatar  
Join Date: Apr 2006
Location: egypt
Age: 41
Posts: 141
hesham morsy is on a distinguished road

http://www.usbcnc.com/index_products.html#cpuv4
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Step or Direction? ardor Viper Servo drives 3 07-25-2007 03:04 PM
Fast Switching Direction stabilization motors Ragnarok Servo Motors and Drives 0 03-12-2007 11:51 AM
To convert Quadrature Encoder signals to Tachogenerator signals Babar General Electronics Discussion 4 02-21-2006 12:05 AM
How fast before step loss creep_pea Bridgeport and Hardinge Mills 8 01-05-2006 07:13 PM
step in what direction craftech Stepper Motors and Drives 5 10-13-2004 05:45 AM




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