X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=e4jPFW1Hbtgs/8xAeeP+TrDw2CQHn4qvIag9sgDireg=; b=aJyHtpSJWppXeuAZIFjG3qWCV2CDyhFex9CmePMh4Tu//vM9nh1nzUh9mMYQXHhCfl DgesnfVOZKdRBWk76ODrmRTsZWq7/wyO+h7SdLpU2Lo6bFk6lv4y68AMXcU5PmldhhKB GlVAI4seA0X90YrkhMnXV3zZVkKodzUgoV3Dw= MIME-Version: 1.0 In-Reply-To: <4EF29256.8090001@verizon.net> References: <4EF29256 DOT 8090001 AT verizon DOT net> Date: Thu, 22 Dec 2011 16:15:59 -0500 Message-ID: Subject: Re: [geda-user] Design suggestions... From: Rob Butts To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=0015175936708b8fa904b4b4ce09 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --0015175936708b8fa904b4b4ce09 Content-Type: text/plain; charset=ISO-8859-1 So I think I can kludge this one with everybodies suggestions. Thanks On Wed, Dec 21, 2011 at 9:13 PM, Ethan Swint wrote: > On 12/21/2011 12:11 PM, Rob Butts wrote: > >> My application has two 12 v dc motors that I want to operate in both >> directions with speed control. I have two potentiometers to determine speed >> control for each motor. I have one push button and three to five switches >> for state control. >> >> I initially didn't plan on speed control for each motor and I had a >> PICKit 2 so I opted for the Low Pin Count development board with the setup >> for the pic16F690 microprocessor. The documentation for that >> microprocessor says the pmw can be set up for one, two or four channels but >> it has just one pwm module. >> >> The processor that microchip suggests has more pins and I'd have to >> purchase more development hardware. I have the code completed and working >> for the five input state controller and the two adcs monitoring the motor >> speed potentiometers. Does anyone have suggestions for speed and direction >> control of the two motors where I don't have to purchase new development >> hardware? I thought about two micros in a master slave configuration but >> that would make development and prototyping on my desk difficult. >> >> Thanks, >> Rob >> > The four pins will be sufficient - you'll need a gate driver. Put each > motor in an H-bridge configuration, i.e. totem-pole two mosfets on each > side. The low-side transistors will be your direction selectors - turn on > the left for CW, turn on right for CCW, low-frequency, run a GPIO pin from > the MCU. The hi-side transistors will take the PWM signals (2 for each > motor, 4 total) - the gate drivers will have a boot-strap power supply to > drive the hi-side gate. I'd suggest a toggle switch for direction & > running and the pot just to set the speed - otherwise finding 'zero' speed > on the pot will be hard. You can just take the max raw ADC value and scale > that to your max PWM counter value, a simple multiply-by-constant. PWM > frequency of 15kHz won't annoy most people over 30yrs, but 20kHz would be > better. > > On your layout, keep the loop tight from +12V across the 2-FET totem to > ground, bypass with a few hundred nF of ceramic caps so that the parasitic > inductance on the PCB won't over-voltage the FETs and toast them - > typically 10x capacitance of a FET's capacitance, given on the spec sheet. > Several caps in parallel will get their ESR lower so that they handle the > transient more effectively, too. > > The flyback current from the motor will go through the body diode of the > FETs, but make sure you have sufficient time of zero PWM on the top when > reversing, e.g. >50uSec. If you accidentally turn on the top FET while the > bottom is turned on (or the body diode reverse recovery), you can > over-current the FETs and toast them in one PWM cycle. > > No capacitors across the motor - you effectively have two mismatched > voltage sources in parallel and the current spike will kill the FETs. No > resistor in series with the motor is needed, either - that just wastes > energy. > > -Ethan > --0015175936708b8fa904b4b4ce09 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
So I think I can kludge this one with everybodies suggestions.
=A0
Thanks
=A0


=A0
On Wed, Dec 21, 2011 at 9:13 PM, Ethan Swint <eswint DOT ramu AT verizon DOT net= > wrote:
On 12/21/2011 12:11 PM, = Rob Butts wrote:
My application has two 12 v dc motors that I want to operate in both direct= ions with speed control. I have two potentiometers to determine speed contr= ol for each motor. I have one push button and three to five switches for st= ate control.

I initially didn't plan on speed control for each motor and I had a PIC= Kit 2 so I opted for the Low Pin Count development board with the setup for= the pic16F690 microprocessor. =A0The documentation for that microprocessor= says the pmw can be set up for one, two or four channels but it has just o= ne pwm module.

The processor that microchip suggests has more pins and I'd have to pur= chase more development hardware. =A0I have the code completed and working f= or the five input state controller and the two adcs monitoring the motor sp= eed potentiometers. =A0Does anyone have suggestions for speed and direction= control of the two motors where I don't have to purchase new developme= nt hardware? =A0I thought about two micros in a master slave configuration = but that would make development and prototyping on my desk difficult.

Thanks,
Rob
The four pins will be sufficient - you'll need a gate driver. =A0Put ea= ch motor in an H-bridge configuration, i.e. totem-pole two mosfets on each = side. =A0The low-side transistors will be your direction selectors - turn o= n the left for CW, turn on right for CCW, low-frequency, run a GPIO pin fro= m the MCU. =A0The hi-side transistors will take the PWM signals (2 for each= motor, 4 total) - the gate drivers will have a boot-strap power supply to = drive the hi-side gate. =A0I'd suggest a toggle switch for direction &a= mp; running and the pot just to set the speed - otherwise finding 'zero= ' speed on the pot will be hard. =A0You can just take the max raw ADC v= alue and scale that to your max PWM counter value, a simple multiply-by-con= stant. =A0PWM frequency of 15kHz won't annoy most people over 30yrs, bu= t 20kHz would be better.

On your layout, keep the loop tight from +12V across the 2-FET totem to gro= und, bypass with a few hundred nF of ceramic caps so that the parasitic ind= uctance on the PCB won't over-voltage the FETs and toast them - typical= ly 10x capacitance of a FET's capacitance, given on the spec sheet. =A0= Several caps in parallel will get their ESR lower so that they handle the t= ransient more effectively, too.

The flyback current from the motor will go through the body diode of the FE= Ts, but make sure you have sufficient time of zero PWM on the top when reve= rsing, e.g. >50uSec. =A0If you accidentally turn on the top FET while th= e bottom is turned on (or the body diode reverse recovery), you can over-cu= rrent the FETs and toast them in one PWM cycle.

No capacitors across the motor - you effectively have two mismatched voltag= e sources in parallel and the current spike will kill the FETs. =A0No resis= tor in series with the motor is needed, either - that just wastes energy.
-Ethan

--0015175936708b8fa904b4b4ce09--