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! > WoodWorking Machines > DIY-CNC Router Table Machines > Joes CNC Model 2006



This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-19-2007, 11:43 PM
 
Join Date: Dec 2006
Location: Boise, ID
Posts: 121
gacrwell is on a distinguished road
Current Reduction, HobbyCNC - Mach3

MODIFYING THE HOBBY CNCPro DRIVER BOARD TO USE MACH3 CURRENT CONTROL

Before I can suggest anyone try this modification, conscience requires me to fully explain the background and logic behind it. I will try to make it as non-technical as possible, and I apologize in advance for its length. Or, you can skip the whole thing and go straight to the mod instructions at the end; short story: It works. It's worth it.

The circuit background:
The Hobby CNC Pro driver board (hereafter HCNCP) uses a timing circuit that activates when it receives a step pulse. When activated, this circuit stays active for ten seconds. While active, it turns off the driver chip sync function, and holds the driver current at a high level. This is the normal 'step activity' state. If there is no step activity for ten seconds, the circuit 'times out', which turns on the sync function (reducing noise), and reduces the driver current (reducing heat). Each axis of the HCNCP has its own timer circuit which operates independently for that axis only.
This timer circuit is taken from the Allegro data sheet for the SLA7078 driver chip. In that data sheet, the circuit's use was intended for the sync function only, not the combination of sync-current reduction. Also, the time setting of this circuit was suggested to be something just longer than the average time between step pulses; something like a few tenths of a second (or less), rather than ten seconds.

The problem:
So, why is the HCNCP's timer set for ten seconds? I suspect the reason for that is because the timer-sync function has been bundled with the current reduction function. Remember, the timers for each axis are independent, so, if there is no activity on one axis, it could go to reduced current while another axis is in motion. Due to a total lack of experience in such matters, I can't say for certain, but it seems to me that you would always want all axes at full current while any are in motion. And, I believe this is the reason for the '10-second' timer on the HCNCP: If any one axis is idle for ten seconds, it's likely that all cutting and motion has ceased, and it is OK to reduce the current.

That's probably a pretty good assumption, so why is it a problem? Well, the issue is, that it is the step pulse that triggers the timer, turning off the sync and restoring full current. That step pulse also goes directly to the driver chip, which immediately starts the commanded step, and that action doesn't wait for the timer/sync/current functions to return to a normal operating state.

So, what happens is, you have an axis that functions normally most of the time, but when it has been idle for ten seconds, it stalls when attempting to begin motion again. This apparently happens because the current ruduction or sync functions have not really turned off when the step action starts. The common suggestion is to "reduce the acceleration" or "reduce the step rate", which is an attempt to slow down the initial motion to allow the circuit to 'catch up'. Apparently this is inadequate in some situations, or the driver software doesn't support it; regardless, it's what's technically known as a 'kludge'.

The difficulty in diagnosing this problem is that it manifests itself differently on different systems; and all systems are different: Different motors, screws, nuts, lubrication, cables, masses, voltages, currents, etc. Some will never see an issue, while for others it appears to be a persistent problem. In testing on my own system, it's pretty easy to set up a step rate and acceleration that will jog reliably when there are no delays between jogs, but which will nearly always stall when attempting to jog after a 10 second idle time. This can be nearly always fixed by reducing the acceleration, or, by disabling the current reduction (placing J4). Since the problem is fixed by disabling the current reduction, we can be pretty sure that sync is not a part of the stalling problem (disabling current reduction does not affect the sync function). The question is though, why, should I have to live with reduced acceleration all of the time to accomodate this single problem case, or, why should I have to forego the temperature reduction advantage of a reduced current control to get back that acceleration?


The solution:
Briefly, the object is to eliminate the timer circuit on the HCNCP, and control the current and sync function directly with the current reduction control built into the driver software. Mach3 has an optional current reduction output - I have no idea about other driver software.

On Mach3, if you assign the current reduction fuction to an output pin, it will command high current before any step activity takes place, will remain at high current when step activity is taking place on any axis, and will switch to low current only when step activity has ceased on all axes. There is also no reason why sync couldn't be combined to operate off of the same control.

There is zero information on this control in the Mach3 documentation that I have found. I asked about it once on the Mach3 forum and got no response. The above description is the way I assume it works, based upon setting it up and observing it's action with an oscilloscope. I could be wrong.

What this means: If you use the Mach3 current reduction output to control the HCNCP, there will be no ten-second delay before low current and sync are activated; they will activate when there is no step activity for some period (short and unspecified, but observed to be no more than a few hundred milliseconds). Since there is no ten second wait, and it will switch to low current even for short pauses, this probably means lower temperatures and less noise overall. The difference is that all axes must operate in concert - all will go to low current/sync only when none are active. When step activity begins on any axis, all will go to full current, before the step activity begins. Which, I believe, is exactly the type of operation you really want.


HCNCP hardware modification for Mach3 current control:
Tools/materials required:
  • fine-tip soldering iron, solder
  • fine-tip diagonal cutters
  • fine-tip needle nose pliers, or tweezers
  • wire strippers
  • small hook-up wire, ~12 inches (solid, 28-30 guage wire-wrip wire would work best)
No modifications are made to the printed circuit board itself. The modification is reversible simply by removing any added wires, and replacing the removed components.

The modification may be applied to a single axis at a time. Try it on one, and if that works, it can be added to the remaining axes.

Got all that? Ready? Confident? Here's how to do the mod:
Remember you can mod and test one axis only, or all at once, your choice.
  • For the X-axis, remove R9 (100K), C15 (100uF), and Q1 (BS250P)
  • For the Y-axis, remove R10 (100K), C16 (100uF), and Q3 (BS250P)
  • For the Z-axis, remove R11 (100K), C17 (100uF), and Q5 (BS250P)
  • For the A-axis, remove R12 (100K), C18 (100uF), and Q7 (BS250P)
  • If you are building a new board, the mod is simple, just don't install the indicated components. On an assembled board, you have to remove those components, but it's not very hard. If you want to be extra careful, you can unsolder and remove the components without damage, but it's hardly worth the trouble; they are common, inexpensive components that are easily replaced. The resistor and transistor can just be clipped out using small diagonal wire cutters. The capacitor is likely sitting flush with the board without the leads exposed, so it will probably have to be unsoldered - you can alternately heat one leg at a time from the bottom and 'rock' it out a little bit each time.
  • Now, for each axis, run a wire from the '+' hole of the removed capacitor location, to the #1 input location (near the parallel port connector, just above where it says "no pullups"). You could run these wires on the top or bottom of the board; I chose the top so it would be easier to insure I had the correct locations. You could also 'daisy-chain' one wire from cap-to-cap-to-cap-to-cap-to-#1, but using four separate wires is just as easy. No particular routing of the wires is necessary; you'll note from the pictures that I threaded them through the legs of other components to keep them dressed against the board.
  • That's it!
If you are not confident to make this modification yourself, or, don't have the tools to do so, I'd be happy to install it for anyone that wants to give it a try. No charge, just pay the shipping here and back.


Configuring the Mach3 software:
  • from the main menu, select config\ports & pins
  • select output signals tab
  • scroll down to Current Hi/Low
  • column 1, click to get green 'enable' check
  • column 2, set to port #1 (or whatever port you're using)
  • column 3, set to pin #1
  • column 4, click to get green 'active low' check
  • Apply, OK, close, whatever
The pics:
  • removed components and added wire. this is the Z-axis; the others are very similar.
  • all of the wires go to pin 1.
  • Mach3 output configuration screen
  • my current arrangement reduces the cutting area somewhat.
Attached Thumbnails
Click image for larger version

Name:	IMG_0201_800x600.JPG‎
Views:	1126
Size:	140.4 KB
ID:	48899   Click image for larger version

Name:	IMG_0203_800x600.JPG‎
Views:	1046
Size:	113.2 KB
ID:	48900   Click image for larger version

Name:	IMG_0206_800x600.JPG‎
Views:	1118
Size:	92.3 KB
ID:	48901   Click image for larger version

Name:	IMG_0207_800x600.JPG‎
Views:	1171
Size:	111.0 KB
ID:	48902  

Reply With Quote

  #2  
Old 12-20-2007, 05:41 AM
Moderator
 
Join Date: May 2006
Location: USA
Posts: 954
bp092 is on a distinguished road

is that a work bench or a joe cnc?
Reply With Quote

  #3  
Old 12-20-2007, 08:28 AM
joecnc2006's Avatar
www.joescnc.com
 
Join Date: Aug 2004
Location: usa
Posts: 3,056
joecnc2006 is on a distinguished road

very good info, will be interesting to see the machine running it, and see your final results on the mod.

Joe
Reply With Quote

  #4   Ban this user!
Old 12-20-2007, 11:13 AM
 
Join Date: Dec 2006
Location: Boise, ID
Posts: 121
gacrwell is on a distinguished road
HCNCP - additional step modes

Looking through the HCNCP instructions and the Allegro SLA7078 data sheets I noticed something curious: There are additional step modes available that aren't mentioned in the HCNCP instructions.

Those instructions list the following positions for the step mode jumpers J1, J2, J3: (J4 is the unrelated current reduction disable jumper)
  • Full Step: ON, ON, OFF
  • Half Step: ON, OFF, OFF
  • 1/4 Step: OFF, ON, ON
  • 1/8 Step: OFF, ON, OFF
  • 1/16 Step: OFF, OFF, ON
The other obvious combination of OFF, OFF, OFF; puts the drivers in Sleep mode, with no lockup current. A few users get worried when they first power-on their boards and don't get lockup; later finding out that at least one jumper is necessary to avoid the sleep mode.

The Full and Half step modes selected by the jumper combinations above are called 'Mode F' in the data sheet. There are alternate selections for what is called 'Mode 8':
  • Full Step: ON, OFF, OFF (Mode 8)
  • Half Step: ON, OFF, ON (Mode 8)
I'm not entirely clear on the difference between the modes. It appears that Mode F, provides 100% current all the time, while Mode 8 modulates the current to better balance it during a step. What I've read elsewhere indicates that Mode F gives maximum torque, while Mode 8 gives smoother operation. I suspect the difference would be imperceptable or nearly so, depending upon your system. Maybe worth a try though.

Gary
Reply With Quote

  #5   Ban this user!
Old 12-20-2007, 01:00 PM
DeWalt58's Avatar  
Join Date: Feb 2004
Location: USA
Posts: 136
DeWalt58 is on a distinguished road

Great work Gary!!! I really didn't noticed the problem till I switched to the 1/2-8 (2 start) acme, but its there for sure and like you say turning down accel does reduce the problem but its still there, just a smaller hic-up. I'll do the mod for sure. Glad you investagated this problem, thanks!!!!!

Cheers
dewalt58
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-20-2007, 01:28 PM
 
Join Date: Sep 2007
Location: USA
Posts: 740
BobF is on a distinguished road

Thanks for the extremely detailed info Gary.
I am one of the ones who had problems initially. Your threads in particular led me to try turning off the HCNC current reduction (J4) and this solved the startup issues.
I will try this mod next time I get the solder station out.
Reply With Quote

  #7   Ban this user!
Old 12-20-2007, 03:38 PM
pminmo's Avatar  
Join Date: Jun 2003
Location: St. Peters, Mo USA
Age: 59
Posts: 3,325
pminmo is on a distinguished road

Allegro doesn't write the clearest data sheets in some aspects....I believe the difference between mode 8 and mode F is phase currents. Allegro runs full step at phase equal current angles, 45 degrees as example. So mode F has each phase at 45 degrees at 100% phase current and mode 8 has each phase at 70.7% phase current. They also change the off time between the two modes.

An automatic current reduction isn't necessarily a good thing and it depends on the circuit of the driver. As for the 7078, the data sheet says that if the refence input value is changed, there needs to be a 100us delay between the time it changed and a clock pulse. So internally the 7078 must have an analog response time based on that 100us figure.
__________________
Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
Vist my websites - http://pminmo.com & http://millpcbs.com
Reply With Quote

  #8   Ban this user!
Old 12-27-2007, 07:45 PM
 
Join Date: Jan 2007
Location: usa
Age: 24
Posts: 198
Adamj12b is on a distinguished road

Thanks for the great work! I just got my 4 axis board and did this to it while building it. -Adam
__________________
www.adambrunette.com - Converting My Harbor Freight X2 And My Jet Jvm-830 Knee Mill, As well as many other projects.
Reply With Quote

  #9   Ban this user!
Old 12-28-2007, 12:58 AM
 
Join Date: Dec 2006
Location: Boise, ID
Posts: 121
gacrwell is on a distinguished road

What, you mean it works? I was just joking...

Gary
Reply With Quote

  #10   Ban this user!
Old 01-23-2008, 08:49 PM
 
Join Date: Sep 2007
Location: USA
Posts: 740
BobF is on a distinguished road

I must admit I never did try this. Things are working reasonably well now and I have not taken the time to open up the controller and get out the soldering station.
Did anyone else try this? How's it working?
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-29-2008, 04:19 PM
 
Join Date: Aug 2007
Location: usa
Posts: 19
Paulds is on a distinguished road
Smile New to cnc zone

I had bought and extra hobby cnc boarda while back as a back up for my router cnc project that i am doing and just did the mod on that board will try it tonight or next week and leave feedback thanks for the great info. I have seen this problem on my other non modded board sometimes it seem like it just stalled, but the info here explains why this is happening.
Thanks a lot for the GREAT INFO.

Paul
Reply With Quote

  #12   Ban this user!
Old 03-01-2008, 11:35 AM
 
Join Date: Jun 2007
Location: Denmark
Posts: 81
CNCDevil is on a distinguished road

Originally Posted by gacrwell View Post
The problem:
So, why is the HCNCP's timer set for ten seconds? I suspect the reason for that is because the timer-sync function has been bundled with the current reduction function. Remember, the timers for each axis are independent, so, if there is no activity on one axis, it could go to reduced current while another axis is in motion. Due to a total lack of experience in such matters, I can't say for certain, but it seems to me that you would always want all axes at full current while any are in motion. And, I believe this is the reason for the '10-second' timer on the HCNCP: If any one axis is idle for ten seconds, it's likely that all cutting and motion has ceased, and it is OK to reduce the current.

Interesting thread. I have always assumed that the independable current reduction on each axis was particularly meant to be smart when making a 2-d job, where e.g. the z-axis could be idle for several minutes at a time.

It's a while since this thread was written, so it would be interesting to hear if anybody did try out this mod?


CNCDevil
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
automatic idle-current reduction & belt drive ?? Georg DIY-CNC Router Table Machines 1 11-06-2007 03:11 PM
Current Reduction, HobbyCNC - Mach3 gacrwell General Electronics Discussion 0 07-12-2007 11:35 PM
Gear reduction set-up scrambled CNC Plasma and Waterjet Machines 7 05-05-2007 10:34 AM
Auto current reduction, How? toolbox911 Stepper Motors and Drives 3 03-06-2006 06:23 PM
2:1 or 3:1 reduction...I'm not sure? Bird_E General Metal Working Machines 5 08-18-2004 08:32 AM




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