Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Hello everyone, I'm working on a project where I've got to control a DC motor with the PWM controller on the '128. I've got limit switches for max travel indication, a potentiometer to give me the current shaft position, and potentiometers to adjust the speed in each direction. I've got the PWM working fine, and I can move the motor back and forth without any problems at various speeds. My problem is I've never actually implemented a control system for a motor, and I'm wondering if there are any materials/books/websites/etc that might give me some direction as I'm having a hard time getting started. I've come up with a few ideas, such as generating a table to compare the current position against the desired, and changing the drive appropriately, but I'd like to know if others have come up with an optimal solution. Thanks, Jason |
|
|
|
look on jr kerr's website (jrkerr.com) for inexpensive motion control chipset. Nick -----Original Message----- From: Gaiser, Jason [mailto:] Sent: Monday, November 18, 2002 1:40 PM To: ' Subject: [68HC12] Motor control books? Hello everyone, I'm working on a project where I've got to control a DC motor with the PWM controller on the '128. I've got limit switches for max travel indication, a potentiometer to give me the current shaft position, and potentiometers to adjust the speed in each direction. I've got the PWM working fine, and I can move the motor back and forth without any problems at various speeds. My problem is I've never actually implemented a control system for a motor, and I'm wondering if there are any materials/books/websites/etc that might give me some direction as I'm having a hard time getting started. I've come up with a few ideas, such as generating a table to compare the current position against the desired, and changing the drive appropriately, but I'd like to know if others have come up with an optimal solution. Thanks, Jason -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu <http://www.motorola.com/mcu > . [Non-text portions of this message have been removed] |
|
In a message dated 11/18/02 3:20:49 PM Eastern Standard Time, writes: > My problem is I've never actually implemented a control system for a motor, > and I'm wondering if there are any materials/books/websites/etc that might > give me some direction as I'm having a hard time getting started. I've > come > up with a few ideas, such as generating a table to compare the current > position against the desired, and changing the drive appropriately, but I'd > like to know if others have come up with an optimal solution. Well, some people make a living doing this... control systems is a big field...but just for fun, do a search on PID control.... the controller motor drive is Proportional to the error between demanded and current position, but if gravity or something is holding the motor back, the error signal integrates over time and eventually gets big enough to move the motor... this is the Integral part... and the Derivative part applies reverse current to slow down as the demanded pos is approached (but I'm too sure about that, so lets not start a 'you're stupid' war...). Anyway, just get a pot for demand, compare it to the position pot, bango, you've got an error signal... stuff that into the motor drive dac... maybe use another pot as the 'proportional' constant... how much of the error goes to the drive... might be all you need.... [Non-text portions of this message have been removed] |
|
|
|
Here's how I do it...Many ways to rome...Hope this helps. Micro-Mo (and others) have a series with opto(s) built into the motor. So say 512 per revolution. Your cpu gets these and counts. Starts motor with FFFFFFFF to D/A (TL7528) then buffer with (TLO84) then a current driver like the OPA551 (bump is 4 volts @ 200ma). Now with the dc motor turning (2V basic bias, you can superimpose a correction voltage with the D/A.... But this is only the way I have it implimented. Code is case of 4...: Initialize, OK, speed up, slow down. Word is written out the 8 bit bus into a latch, then double buffer to D/A (uses the invert of latch strobe to strobe the D/A). Patrick Nefos, EE EI Medical Loveland, CO (970)669-1793 -----Original Message----- From: [mailto:] Sent: Monday, November 18, 2002 3:08 PM To: Subject: Re: [68HC12] Motor control books? In a message dated 11/18/02 3:20:49 PM Eastern Standard Time, writes: > My problem is I've never actually implemented a control system for a motor, > and I'm wondering if there are any materials/books/websites/etc that might > give me some direction as I'm having a hard time getting started. I've > come > up with a few ideas, such as generating a table to compare the current > position against the desired, and changing the drive appropriately, but I'd > like to know if others have come up with an optimal solution. Well, some people make a living doing this... control systems is a big field...but just for fun, do a search on PID control.... the controller motor drive is Proportional to the error between demanded and current position, but if gravity or something is holding the motor back, the error signal integrates over time and eventually gets big enough to move the motor... this is the Integral part... and the Derivative part applies reverse current to slow down as the demanded pos is approached (but I'm too sure about that, so lets not start a 'you're stupid' war...). Anyway, just get a pot for demand, compare it to the position pot, bango, you've got an error signal... stuff that into the motor drive dac... maybe use another pot as the 'proportional' constant... how much of the error goes to the drive... might be all you need.... [Non-text portions of this message have been removed] -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu |
|
Jason There is a lot of information on motor control on the Motorola Web site, but related to the new 68HC908 chip. I believe this chip is made expressly for motor control, while it is not the chip you are using there are a number of C rtns and relavent architectural descriptions for motor control. Look at ap not AN1858 on the PC Master s/w, also SDKHC08AUG.pdf is a description dedicated to motor control. You can find a lot of information under the documentation links on the 08 product descriptions. The principles apply across MCU family lines. Bob Lewis <Message: 5 < Date: Mon, 18 Nov 2002 10:39:53 -0800 < From: "Gaiser, Jason" <> < Subject: Motor control books? < < Hello everyone, < < I'm working on a project where I've got to control a DC motor with the PWM < controller on the '128. I've got limit switches for max travel indication, < a potentiometer to give me the current shaft position, and potentiometers to < adjust the speed in each direction. I've got the PWM working fine, and I < can move the motor back and forth without any problems at various speeds. < < My problem is I've never actually implemented a control system for a motor, < and I'm wondering if there are any materials/books/websites/etc that might < give me some direction as I'm having a hard time getting started. I've come < up with a few ideas, such as generating a table to compare the current < position against the desired, and changing the drive appropriately, but I'd < like to know if others have come up with an optimal solution. < < Thanks, < Jason |
|
Hi Jason, There are a lot of control gurus on the comp.dsp newsgroup . They use DSPs a lot for motor control. You might also check out the TI web site for app notes and code for motor control. Especially switched-reluctance motors. The control theory stuff is a subset of controlling those. Bob White ----- Original Message ----- From: "Lewis, Bob" <> To: <> Sent: Tuesday, November 19, 2002 7:27 AM Subject: [68HC12] RE:Motor control books? > Jason > > There is a lot of information on motor control on the Motorola Web site, but > related to the new 68HC908 chip. I believe this chip is made expressly for > motor control, while it is not the chip you are using there are a number of > C rtns and relavent architectural descriptions for motor control. Look at ap > not AN1858 on the PC Master s/w, also SDKHC08AUG.pdf is a description > dedicated to motor control. You can find a lot of information under the > documentation links on the 08 product descriptions. The principles apply > across MCU family lines. > > Bob Lewis > <Message: 5 > < Date: Mon, 18 Nov 2002 10:39:53 -0800 > < From: "Gaiser, Jason" <> > < Subject: Motor control books? > < > < Hello everyone, > < > < I'm working on a project where I've got to control a DC motor with the > PWM > < controller on the '128. I've got limit switches for max travel > indication, > < a potentiometer to give me the current shaft position, and > potentiometers to > < adjust the speed in each direction. I've got the PWM working fine, and > I > < can move the motor back and forth without any problems at various > speeds. > < > < My problem is I've never actually implemented a control system for a > motor, > < and I'm wondering if there are any materials/books/websites/etc that > might > < give me some direction as I'm having a hard time getting started. I've > come > < up with a few ideas, such as generating a table to compare the current > < position against the desired, and changing the drive appropriately, but > I'd > < like to know if others have come up with an optimal solution. > < > < Thanks, > < Jason > > > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu |