On Tue, 9 Oct 2007, Sebastian Kuzminsky wrote: > Date: Tue, 09 Oct 2007 00:07:08 -0600 > From: Sebastian Kuzminsky <[EMAIL PROTECTED]> > Reply-To: "Enhanced Machine Controller (EMC)" > <emc-users@lists.sourceforge.net> > To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net> > Subject: Re: [Emc-users] hal servo questions > > "Peter C. Wallace" <[EMAIL PROTECTED]> wrote: >> What is happening is this: > > Thanks for the explanation, that helped a lot, I think I got most of it. > :-) > > >> To solve your problem there are a couple of things to try: >> >> 1. Live with it and offset you PDM > > As you say, it actually works ok with the deadband. I tuned the PID loop > and I get positional errors of up to 0.067 revolutions (25 degrees), > this is with no load on the motor shaft. With a 1:1 coupling from the > motor shaft to a 20 tpi leadscrew that gives me +-0.004" positioning > precision (not counting mechanical slop, backlash, etc). >
You should be able to do a lot better, but if your PWM is crude (3 bits), a higher servo sample rate will improve things, 'dithering' the drive between PWM values. > >> 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. > > I'll give PWM a try. My pulse-generating thread runs at 20 KHz currently, > does a PWM carrier frequency of 2 KHz sound reasonable? That'd give me > 10 levels of power. I will definately have some ripple and will sing... > > >> 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. > > I thought "both bottom switches on" was active braking. How does > this help? Think of it as maintaining the current at a constant level in the off period. It _WILL_ brake the motor abruptly if you stop the PWM. > > I don't get it, but I'll give it a try too. :-) > > >> 4. Use an HBridge with current feedback > > Hm, I need to read up on motor drivers... > > > Thanks for all your advice, I appreciate it! > > > -- > Sebastian Kuzminsky > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users