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 > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-08-2008, 06:50 PM
 
Join Date: Mar 2007
Location: Canada
Posts: 50
TZak is on a distinguished road
Pluto Servo - Motors won't servo correctly????

Still trying to tame this machine.

I have yet to figure out how to get the pluto-p board to work with the newer version of emc.2.2.2??? So I have resorted to using my old setup for testing.

I have managed to get all my servo amps and all the power issues working on this three axis setup, however my problem is I can't get the motors to servo properly.

I manage to get a servo however when I turn the motor by hand it starts to oscillate. I have tried playing around with the PID but none of my numbers seem to work.

A friend was telling me that the pluto-servo response feed-back my be too much for the amps that I am using. I would like to find this out ( and change is necessary) however I don't know how to test it? Any suggestions would be great.


Hopefully someone out the has some advice on how to tame these motors.

Thanks in advance
Reply With Quote

  #2   Ban this user!
Old 01-09-2008, 07:46 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,081
samco is on a distinguished road

I have not had a chance to look at your hal file.. But here is something to think about.

someone on the emc-users list had a similar problem.. (I think)

Hi folks, I'm trying to build my first EMC-controlled servo, and I've
got some questions. I'm building it out of a small brushed DC motor
(a Pittman 8322 with shaft encoder [0]) and a home-made copy of Jeff
Epler's L298-based servo driver [1]. I'm controlling it with EMC 2.1.6,
feeding it PDM & direction signals over a parallel port.


My first question is, does this seem like a reasonable motor to make
a servo mechanism from? Given the limitations of its torque output,
of course. The motor specs:

reference voltage: 19.1 V DC
no-load current: 0.16 A
Peak/Stall Current: 2.51 A
Continuous Torque: 1.6 oz*in
Stall Torque: 7.4 oz*in
no-load speed: 7847 rpm
encoder: 256 lines per revolution


The first step was to read the encoder, that was easy and works fine. The
encoder produces 1024 edges per revolution. I'm sampling the A and B
lines at 40 KHz, so by my calculations I should be able to reliably keep
track of position up to about 1100 or 1200 rpm.


The next step was to spin the motor, and that's where I'm running into
issues. At 0% duty cycle the motor is stopped, and at 100% it runs fast,
so that's good. However, the mapping from duty-cycle to rpm is confusing.
Duty cycles from 0 to about 55% give me increasing whining from the
motor but no movement at all. 55 to 100% gives increasing motor speed
and torque.

I'm using a driver circuit basically identical to the one published by
Jeff Epler (thanks Jeff!). The only power supply I have access to right
now is an ATX one scrounged from some dead computer, so I'm driving
the motor at only 12 V; it's rated for 19.1 V so that's probably part
of my problem. Just like in Jeff's example, I run a PDM pulse train
into the H-bridge enable pin, and direction and not-direction signals
into the two H-bridge inputs. The resolution of my pulse generation
is 100 us, so the pulse train has transitions at no more than 10 KHz,
well below the 25 KHz nominal commutation frequency of the L298 H-bridge.

So my main question is: What, if anything, can/should I do about the
dead band from 0 to 55% duty cycle? Live with it and tune it out in the
PID loop?

I built this big goofy HAL "circuit" that adds 0.56 to duty cycles above
0.01, it worked but feels kind of kloodgy.

What causes this motor behavior? I guess at those low duty cycles
(especially given the low input voltage) the energy being fed to the
motor is not enough to overcome inertia or static friction or something.

I tried increasing the pulse-generating period, up around 1 KHz the motor
became more responsive but also more "clicky" and it ran kind of rough.
I think 10 KHz is about as slow as I want to go.


If I can get this servo moving reliably I'll build two more, and put
them on a McWire Mill [2].


0: http://pittmannet.com/series8000motors.html
1: http://emergent.unpythonic.net/projects/01142347802
2: http://www.instructables.com/id/Easy...hine/?ALLSTEPS
Petew (of mesa fame http://www.mesanet.com/) came back with this answer.. (probably why I never saw this behavior either as my h-bridge turns on the bottom 2 fets durring the 'off' cycle.

This is the expected behavior of an simple HBridge operating in
'Fast-Decay-Mode' that is the switch elements are turned off in the off part
of the PWM cycle.


What is happening is this: In the ON time portion of the cycle the current
through the motor increases at a rate of Vsupply/Lmotor. In the off time
the current decreases at the same rate. At duty cycles up to ~50% the current
has dropped back down to 0 before the next ON part of the cycle begins. This
means that the average current in the motor is quite low (and current ripple
quite high). If you look at motor current on an oscilliscope you will see that
at 50% duty cycle, the current will look like a triangle wave with the peak
current being Vsupply*Ton/Lmotor and a minimum of 0. If your PWM frequency is
high enough, the average current in this region will be quite small (So your
motor will not move)

Once you get to PWM duty cycles greater than 50%, the current triangular wave
never decays to 0 in the off portion of the PWM cycle, so the average current
increases quickly with greater duty cycle.

To solve your problem there are a couple of things to try:

1. Live with it and offset you PDM

2. Use PWM instead of PDM (If the software PWM rate is not too low). The
ripple will be higher, but the average current in the 0 to 50% duty cycle
range will be will be higher as well.

3. Setup your HBridges to use 'Slow decay mode' if possible. This usually
means that the bottom 2 switch elements are turned on in the off part of the
PWM cycle, (shorting out the motor) causing the stored energy on the motor
inductance to be 'saved' between PWM cycles. This results in lower ripple, and
more linear current versus duty cycle.

4. Use an HBridge with current feedback
Reply With Quote

  #3   Ban this user!
Old 01-10-2008, 02:34 PM
 
Join Date: Mar 2007
Location: Canada
Posts: 50
TZak is on a distinguished road
Changing the PWM rate on the Pluto servo

Samco


Thanks for the psoting.

Just another quick question. Is there a way to set /change the pwm rate on the pluto -servo.

I am trying to change this speed. Let me know if you know which setting in the hal or ini files to change.

Thanks
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
Pluto Servo - Any luck with EMC 2.2.2 TZak LinuxCNC (formerly EMC2) 6 01-05-2008 10:09 AM
EMC2 -- Pluto Servo -- Need Help TZak LinuxCNC (formerly EMC2) 4 03-02-2007 01:54 PM




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