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 06-01-2011, 11:38 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road
6amp 60v 10 microstep bipolar drive

After a 3 year absence, I finally got around to building a drive based on the information presented by Mariss in the "5 Microstep drive CPLD tutorial" threads. The circuit is essentially the one presented at the end of that document. I added the JTAG programming port and the voltage regulators. The board is double sided, made by toner transfer, with .05" vias and 12 mil traces. The layout is very roughly based on the Geckodrive G251. As it turned out, this is not suitable for my toner transfer board because the unevenness and the lack of through hole plating made it impossible to clamp the fets down. I will try a different fet layout on the next iteration.

The verilog code is the one posted by Pminmo. I made changes to support 10 instead of 5 microsteps. I am currently testing it on a Keling kl23h276-30-8b nema 23, 280 oz-in, 4 amp stepper.

Driving it with 33v and 2 amps, I am able to reach 1800 rpm unloaded, which is the maximum limits of the demo version of Mach 3. I applied a very simple mechanical resonance damper to prevent the motor from stalling.

It is still work in progress. Because I don't have a ground plane, it is difficult to avoid parasitic inductances which resulted in periodic oscillations from the mosfets. I was able to stop them by using gate resistors, but seems to cause severe shoot through. I am experimenting with different solutions. I will probably need to redo the power section.
Attached Images
File Type: jpg stepper_bd.jpg‎ (37.3 KB, 406 views)
Reply With Quote

  #2   Ban this user!
Old 06-02-2011, 08:33 AM
doorknob's Avatar  
Join Date: Jan 2010
Location: USA
Posts: 1,240
doorknob is on a distinguished road
Buy me a Beer?

Originally Posted by H500 View Post
After a 3 year absence, I finally got around to building a drive based on the information presented by Mariss in the "5 Microstep drive CPLD tutorial" threads. The circuit is essentially the one presented at the end of that document.
My search for a "5 Microstep drive CPLD tutorial" document brought up a PDF that does not contain such a circuit diagram. Maybe I need to work on my search skills, but could you post a link to the circuit diagram that you are using?
Reply With Quote

  #3   Ban this user!
Old 06-02-2011, 09:34 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Originally Posted by doorknob View Post
My search for a "5 Microstep drive CPLD tutorial" document brought up a PDF that does not contain such a circuit diagram. Maybe I need to work on my search skills, but could you post a link to the circuit diagram that you are using?
The full pdf file is located in the "cpld tutorial" thread, posting 116. Be sure to get the corrected code from posting 183.

At least 2 others have photo evidence of their project, but I did not see any writeup on a fully working one yet. I'm surprised that there hasn't been more activity with this design. In my opinion, it is one of, if not the most capable open source stepper drive presented on the web. The project require more development before it's ready, but it's a great leaning tool for learning verilog and mosfet power design.
Reply With Quote

  #4   Ban this user!
Old 06-02-2011, 10:21 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Here's a shot of the resonance damper that I've been playing with. It's simply a gear from the mini-lathe. I had an assortment to pick from. The one in the photo is about 2" in diameter. The gear fits loosely on the shaft. The key slot is slightly oversized relative to the key. The disc (gear) normally rotates with the shaft. But when resonance occur, the key rattle against the slot. This dissipates the energy and dampens the oscillation.

It worked very well.
Attached Images
File Type: jpg damper.jpg‎ (78.1 KB, 134 views)
Reply With Quote

  #5   Ban this user!
Old 06-02-2011, 10:27 PM
doorknob's Avatar  
Join Date: Jan 2010
Location: USA
Posts: 1,240
doorknob is on a distinguished road
Buy me a Beer?

Thanks for the pointer to the info.

I'm not quite ready to learn about CPLD programming, but I would like to know more about working with power MOSFETs, and figured that this might be a useful source...
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-03-2011, 02:34 PM
James Newton's Avatar  
Join Date: May 2005
Location: USA
Posts: 756
James Newton is on a distinguished road
Buy me a Beer?

Originally Posted by H500 View Post
The full pdf file is located in the "cpld tutorial" thread, posting 116. Be sure to get the corrected code from posting 183.
In the interests of saving your time and not overloading the cnczone search engine, here are direct links to those two posts... and the thread (via the thread link in the upper right corner of either of these)

http://www.cnczone.com/forums/632482-post116.html

http://www.cnczone.com/forums/660885-post183.html



Last edited by ger21; 01-29-2012 at 12:56 PM. Reason: advertising
Reply With Quote

  #7   Ban this user!
Old 06-03-2011, 02:35 PM
James Newton's Avatar  
Join Date: May 2005
Location: USA
Posts: 756
James Newton is on a distinguished road
Buy me a Beer?

Originally Posted by H500 View Post
I'm surprised that there hasn't been more activity with this design. In my opinion, it is one of, if not the most capable open source stepper drive presented on the web. The project require more development before it's ready, but it's a great leaning tool for learning verilog and mosfet power design.
It does look really interesting... what specific further development is needed at this point?
Reply With Quote

  #8   Ban this user!
Old 06-03-2011, 05:50 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Originally Posted by James Newton View Post
It does look really interesting... what specific further development is needed at this point?
There are several items that need work

1. EMI. There's more ringing in the waveform than I would like. It manifest as snow on a weak TV channel.

2. I had to disable the fast decay mode. When enabled, the pwm freq becomes 10khz instead of 20. I think it's caused by shoot through or ringing, causing the winding to need 2 cycles to reach the set point.

Athough the slow decay waveform does not good on the scope, I actually think it works pretty well. But I don't have anything to compare to. Perhaps the vibration damper would not rattle as much if the waveform stayed sinusoidal at higher frequencies.

3. The drive has a very soft hiss at one of the microstep postion. This is minor, but I like to see if I can eliminate it.

I think all the issues are related to the layout of the power section. I think I will try grafting on other layouts to see what works best.
Reply With Quote

  #9   Ban this user!
Old 06-11-2011, 09:52 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

I added gate resistors to each of the upper mosfets. This eliminated the 1Mhz oscillations that produced the intermittent hissing noise.

The big issue remaining is why the PWM frequency falls to 10 Khz when the fast decay mode is enabled. The attached trace shows the waveform across the current sensing resistor. Vertical scale is 1 amp/div. Timebase is 50uS/div.

I suspect that it's due to the lack of slope compensation when the motor is stepping. The PWM duty cycle appears to be alternating between zero and 100%.
Attached Images
File Type: jpg fast_decay.jpg‎ (95.6 KB, 81 views)
Reply With Quote

  #10   Ban this user!
Old 06-12-2011, 11:43 AM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

I added slope compensation during stepping. That corrected the PWM frequency problem.

The fast decay mode actually seems to vibrate more than the recirculating one. I noticed no improvement in performance. However, I notice a glitch at the 0 and 90 degree sine positions. .

The cause is a mystery at this point.
Attached Images
File Type: jpg fast decay.jpg‎ (80.0 KB, 72 views)
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 06-12-2011, 02:06 PM
James Newton's Avatar  
Join Date: May 2005
Location: USA
Posts: 756
James Newton is on a distinguished road
Buy me a Beer?

On a more general level: Is there a real point to learning / using CPLD's these days given the availability of very low cost, very fast microcontrollers? It would seem like most of what you are doing could be accomplished in uC firmware using C or ASM without having to learn an HDL like verilog / VHDL. Or is there some advantage that the CPLD brings that a uC can't possibly provide?
Reply With Quote

  #12   Ban this user!
Old 06-13-2011, 06:48 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

The key is to use the proper tool for the job. Both has strengths and weaknesses.

Technically, you could do everything with a micro, but even a fast mcu is much slower since the code is executed sequentially. Verilog code translate into hardware connections inside the cpld which runs in parallel. A simple example would be the pwm sine wave code. On a mcu without PWM, much of your cpu cycles would be used up. You would need to worry about responding to other events fast enough to avoid jitter. With a cpld, your primary concern is running out of gates to connect. Speed is not an issue when doing motor controllers.

Learning verilog is no harder than learning another assembly language. You only need to learn a small subset in order to do a lot. I'm a pure novice at this point.

The biggest limitation of cplds is that you have very limited resources to work with when compared to a mcu. This make experimentation more difficult. My next project will involve using a DSP to do the same thing. The ones designed for motor control have so much goodies on board. I like to see how well they work.
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
6A 80V bipolar microstep drive, vote hope price beliefdrive Product Announcements & Manufacturer News 3 12-09-2009 05:46 PM
Does bipolar wiring of a unipolar motor create more torque if you microstep? christ371 Xylotex 0 11-18-2009 02:37 PM
Bipolar Microstep 48 volt 5Amp /phase, 4 axis board kreutz Stepper Motors and Drives 571 08-17-2009 04:49 PM
NEW Microstep Drive Module jafgraphics Product Announcements & Manufacturer News 0 02-02-2007 12:36 PM




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