Page 1 of 1

Closed loop question

Posted: Sun Nov 12, 2017 3:25 am
by Mooselake
Another off the wall kinematics question.  I have a maslow CNC router that uses brushed DC motors with a worm drive gearbox and an (around) 8K PPR encoder.  The current firmware doesn't have any acceleration or planning but it's being discussed on their very active forum.  With the current motors it's limited to somewhere in the 40 ipm range by hardware.  There's two motors off the upper corners and a polarbot style 2 chain drive.

I can see where deceleration and path planning could be useful, but what about acceleration (first or higher order)?  Does it fall out of the closed loop drive, just start up fill tilt and let the encoder feedback sort out, and continue to where it's time to start slowing down.

It sounds (to me) like it's essentially a servo.  How did the big iron handle it?

Kirk

Re: Closed loop question

Posted: Wed Nov 15, 2017 7:16 am
by steve323
I suppose it depends on the controller if it will eventually catch up to the exact position or if the motors will just position to the closest full shaft rotation. 

It also could depend on the machine.  My CNC router has 2 X motors.  If one motor skips, the gantry will bind and there is no recovery.

Steve

Re: Closed loop question

Posted: Wed Nov 15, 2017 9:09 am
by ArtF
Generally, you have to take into account acceleration in order to do planning,
otherwise your accuracy will depend on the motor and its current directional load. Not a good way to move anything. In any motion firmware or software you need at least first order bang-bang acceleration and to take it into account in positional calculations.
  I prefer higher if heavier in order to get speed. But allowing the encoder to sort things out would be very bad, the X and Y axis wouldn't be equal in step
count during load, and lines would become ellipses..

  May not be noticed depending on speed or power, but it'd be there. (If Im understanding the question..)

Art

Re: Closed loop question

Posted: Wed Nov 22, 2017 5:08 am
by Mooselake
Sorry to take so long to get back, been having some recent medical adventures that seem to be working out fine, subject to the perpetual "just another test" they like so well.  As a sort of electrical engineer (degree, but became a programmer) the problem is, of course, electrical in nature and was fixed with the equivalent of sticking my fingers in an outlet.

This machine is quite slow, I was assuming that any positioning error would be sorted out by the encoders and the several PID algorithms (besides speed and position the cutting head is also a pendulum, although there's a several new linkage designs to solve that) that I don't understand very well.  If that were true (sounds like it's not...) then accelerating from a stop would sort itself out, while stopping, at least at higher speeds, would require planning.  Sorta like the early no-acceleration. no planning, always full stop MCU controllers.  I see I need to do some more research...

It's driven by two chains in the top corners, brushed DC motors with encoders, and a worm drive gearbox to hold position when not powered.  Top calculated speed is around 40 inches/minute, the practical limit is currently around 25.  A complete 4' x 8' (think that's about 1.2 x 2.4 meters, but it's a standard plywood sheet) machine is right around $500 US including the router.  More if you pay small lumber yard prices for 3/4 ACX like I do, but still under $600.  In my case it's hanging on a wall waiting for the build a shop project (including hauling off around 700 drywall buckets worth of sand, dirt, and a lot of round glacially tumbled rocks).  Found another concrete floor 8 inches under the broken up one that I was removing, adding a lot more work but giving a much better surface to build the new wood floor up from.  Like all Mooselake projects it's taking far longer than planned.

Kirk