Searching \ for '[PIC] Lowside PWM motor controller for go-cart' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=motor
Search entire site for: 'Lowside PWM motor controller for go-cart'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Lowside PWM motor controller for go-cart'
2009\08\04@172546 by Chris Loper

flavicon
face
A few weeks back, I asked for advice on building an
H-bridge for an electric go-cart (24V 500W motor).
Heeding the sage advice I received, I have instead built this
PWM'ed lowside driver using a 16F88 and an IRF540.
  low_side.png
Running on my desk, with no load (drawing ~1A), it runs great!

I'm sure that there are all kinds of problems with it;
I've never done anything like this before and
I would appreciate any suggestions.

I would like to test with a load, but haven't figured out
a way to do that yet. (The cart is not ready yet.)
Anybody know how to put load on a 500W motor sitting on a desk?

I know that driving the gate at only 5V is not good,
and I plan to replace the IR540 with a logic level FET.
I did a search on Digikey and found this one:
  DIGIKEY IPP0165N03L G   30V   50A   Rdson=.0065   $1.03
  search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IPP065N03LGIN-ND
Datasheet:
www.infineon.com/dgdl/IPP065N03L_rev1.02.pdf?folderId=db3a30431441fb5d01148c401f250e27&fileId=db3a30431441fb5d011492371ebc0fe2
One US dollar!  It seems almost too good to be true.
Are there other parameters that I need to check?

For the freewheeling diode, I'm using this one that I found attached
to a IRFZ34 scrounged from some unknown device a long time ago.
It just says C8255 and I was unable to find a datasheet for it.
I don't know if it is sufficient.
I ordered a MBR2545CT (dual schottky rectifier, 25A 45V).
Is that the right kind of diode for this application?

What else should I do to protect my PIC from this high power stuff?
Especially when I replace the 9V battery with a connection to +24V?

Thank you,
Chris

2009\08\04@180946 by Jinx

face picon face
> PWM'ed lowside driver using a 16F88 and an IRF540.
>    low_side.png

Hi Chris, <secular> is there a missing link ? </secular>

> I would appreciate any suggestions.

The gate is often where much attention is paid. Fast rise and fall
gate times to keep the FET out of heat-generating linear mode
for example, As the gate (and some protection components)
may have quite some capacitance, a driver with more current
capability than the PIC pin will help in that regard. Also, driving
it through a low resistance and protecting it from spikes. A zener
is common (?), maybe varistors/transorbs too

2009\08\05@061455 by Alan B. Pearce

face picon face
>Anybody know how to put load on a 500W motor sitting on a desk?

Go to a car wrecker and get a brake disk assembly. You will need something
that large to dissipate the heat.

2009\08\05@073100 by Michael Rigby-Jones

flavicon
face


> -----Original Message-----
> From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu] On
Behalf
{Quote hidden}

search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IPP065N
03
> LGIN-ND
> Datasheet:
>
www.infineon.com/dgdl/IPP065N03L_rev1.02.pdf?folderId=db3a3043144
1f
> b5d01148c401f250e27&fileId=db3a30431441fb5d011492371ebc0fe2
> One US dollar!  It seems almost too good to be true.
> Are there other parameters that I need to check?
>

How many FETs are you planning to use?  Bear in mind that whilst the
full load current of the motor is only ~21Amps, the stall current will
be much, much higher.

What are you driving the FET(s) with?  A PIC pin does not have
sufficient current capability to switch a typical power FET quickly
enough to minimise time in the linear region.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\08\05@073312 by Luis.Moreira

picon face
Maybe a motorbike disk brake assembly will be easier.
Best Regards
               Luis



-----Original Message-----
From: piclist-bouncesspamKILLspammit.edu [.....piclist-bouncesKILLspamspam.....mit.edu] On Behalf
Of Alan B. Pearce
Sent: 05 August 2009 11:15
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Lowside PWM motor controller for go-cart

>Anybody know how to put load on a 500W motor sitting on a desk?

Go to a car wrecker and get a brake disk assembly. You will need
something
that large to dissipate the heat.

2009\08\05@083856 by Jinx

face picon face
> How many FETs are you planning to use?  Bear in mind that whilst
> the full load current of the motor is only ~21Amps, the stall current
> will be much, much higher

Some time ago I helped a friend out repairing golf carts (trolleys,
not cars) of various makes. All had at least 3 FETs, the better ones
had 4 or 6. Although none of them used a micro and had less-than-
optimum power bands. If it were me I might use a look-up table to
set the PWM. For example, maybe the first 10% of the pot makes
very little difference in terms of getting the motor going against the
load, so linearly converting pot position to PWM duty is not the
best way. And monitoring motor demand, even simply comparing
factors such as current drawn versus revs versus PWM (eg going
up or down inclines), can help minimise the need for constant manual
speed controlling


2009\08\05@111759 by Harry H. Arends

flavicon
face
Maybe it would be wise to determinate the exact voltage where the
motor starts moving with the load and that would be the value where
the PWM should start. We use that fine tuning DCC controlled model
locomotievs that are using a H-Bridge and DC motor.

Harry
{Quote hidden}

> -

2009\08\07@135154 by Chris Loper

flavicon
face
FET DRIVER

>> Why is 'a true totem pole MOSFET driver' necessary?
>> Could not a small logic level FET driven directly from a PIC pin drive the power FET?

> Imagine that the MOSFET gate is one end of a capacitor and the other end goes to ground ...
  and
> BTW you need a totem pole (or push pull) driver for a MOSFET because you
> need to be able to turn it on and off as quickly as possible, and that
> means having a strong current source and sink capability.

I see now. I was ignoring the drain requirement for turning it OFF quickly.
Thanks for your patience.


> Also look at the FET drive chips that Microchip make, such as MCP1401 and MCP1402.

$0.62 from Microchip in ones. I can live with that.



PWM

> When you are doing PWM and switching the FET on and off thousands of times per second, ...

Mine operates at 500hz right now.
It looks to me that the switching loss is directly (linearly) related to the PWM frequency.
I don't think the possible hum will be an issue in a go-cart, so
I'm planning to keep the PWM frequency low unless there is a good reason to increase it.



MOTOR LOADING

> It does not have to be a special "alternator" - it can simply by a
> second motor with a shorted output or a resistor across its output.

That was actually my first thought, but I didn't have any comparable motor to use.
(I do have an old alternator, but physically linking the motor
and alternator together would be a little sketchy.)
But we are getting another motor, with the same gear, so I will be able to do this soon.


>> Is there some trick to get a more accurate reading for low resistance values?

> Do you have an accurate current limited power supply?
> If you put a controlled current through the motor (say, 1 Amp),
> and then use your meter in voltage mode to read the voltage drop across the motor ...

I don't, but I think I can make one from an LM317.



CURRENT SENSING

> I have used the Allegro current sensors and they are nice.
> Digikey does sell some which work for much higher currents.
> Take a look at the ACS756 series.

Ok, here is one, ACS758 100A:
  search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=620-1237-ND
$7.00  Ouch, but worth it.



MOTOR CONTROL DESIGN

{Quote hidden}

This will take quite some time to digest.
It really helps and I appreciate you taking the time to go through all this.



NEW STRAWMAN CIRCUIT

Through BAJ's link to ecomodder, I ran into this circuit, designed and used
to replace the old controller in a golf cart type 'electric trolley'.
24V 500W motor - same as mine.
This is the first circuit I've seen that I think I can actually understand and build.
I would of course substitute a PIC for the ATMEL and probably an MCP140x for the IXDD414PI mosfet driver.
  http://www.zeva.com.au/speedy/

Opinions on this design would be most welcome.

2009\08\09@191125 by M.L.

flavicon
face
On Fri, Aug 7, 2009 at 1:50 PM, Chris Loper<@spam@cloperKILLspamspambellsouth.net> wrote:
> PWM
>
>> When you are doing PWM and switching the FET on and off thousands of times per second, ...
>
> Mine operates at 500hz right now.
> It looks to me that the switching loss is directly (linearly) related to the PWM frequency.
> I don't think the possible hum will be an issue in a go-cart, so
> I'm planning to keep the PWM frequency low unless there is a good reason to increase it.
>
>

This is too slow. The inductance of your permanent magnet motor is
very low. When the MOSFET is ON, the current rises linearly by i(t) =
v * t / L. So if 't' is large then you have high a very high maximum
current.

If you switch at perhaps >5kHz then the ripple current will be smaller
and your motor, wires, batteries, transistors, capacitors will all
operate cooler because the peak current level will be lower.
--
Martin K.

2009\08\10@003712 by Sean Breheny

face picon face
Martin is correct.

Too low a PWM frequency is bad. Too high a PWM frequency is also bad.

If the PWM frequency is so low that the PWM doesn't average out
electrically (i.e., if the current goes up and down significantly
during each PWM cycle), then the resistive losses are higher, the
magnetic hysteresis losses are higher (in the motor), and you get
physical torque ripple which may cause vibration in your system and
will also be audible and annoying. The relevant number here is the RL
circuit time constant of the motor. This equals L/R, in seconds. So,
for example, if your motor has 500 microHenries of inductance and 0.2
ohm resistance, then L/R=0.0005/0.2=2.5 milliseconds. You will want
your PWM period to be roughly at least 10 times less than this, say
250 microseconds, which is 4kHz.

If the PWM frequency is too high, then you get higher switching losses
in your FET or FETs. You also have a higher frequency ripple which
your battery-side wiring and capacitors must deal with. In your case,
I'd think it unlikely that the switching losses would begin to be
significant below about 20kHz. To know for sure, you need to do the
kind of analysis which I tried (very roughly) to explain a few days
ago. You look at how long your FETs take to turn on and off, as well
as the resistive losses in the FETs. You then compare the switching
loss to the resistive (I^2*R) losses. The switching losses should be
about 10% to 25% of your total loss in the FETs. (If they are too low,
you aren't switching fast enough and likely have too much motor ripple
current. If they are too high, it is wasteful and if over 50%, you may
get special thermal runaway problems, especially if paralleling FETs)
Note that simply turning the FETs on and off VERY fast is not always
the answer as it makes tiny inductances in the circuit very critical.

As an example, I designed a very high performance motor driver
recently which can do about 60 Amps continuous at a 48V bus voltage.
It's FETs switch on and off in about 150 nanoseconds and the switching
losses are still about 30% of the total loss! Going from -60 to +60
Amps in 150 nanoseconds is 800 million amps per second! At this dI/dt,
a 10 nanoHenry PCB trace has an inductive voltage drop of 8 Volts! If
that 8 Volts shows up in the wrong place (like between two ground pins
on an IC or between the gate-drive power supply ground and the motor
ground), it can destroy ICs by latchup or accidentally boosting the
gate drive over the max Vgs of the FETs. The simple way to deal with
this is to keep to a more reasonable turn on/turn off time (say 500
nanosec to 1 microsec) and accept the higher losses (and in this case,
it would make sense to use FETs with a higher Rds_on), but because of
the performance required for this PCB, I had to push the limits and
take every high current path inductance into account as best as I can.

Sean


On Sun, Aug 9, 2009 at 7:11 PM, M.L.<KILLspammKILLspamspamlkeng.net> wrote:
{Quote hidden}

> -

2009\08\10@213043 by M.L.

flavicon
face
On Mon, Aug 10, 2009 at 12:37 AM, Sean Breheny<spamBeGoneshb7spamBeGonespamcornell.edu> wrote:
> Martin is correct.


I like that.

You could add an inductor in series with the motor by wrapping some
wire around a large ferrite rod. This would improve your overcurrent
sensing because you wouldn't have to sense the current as quickly.

--
Martin K.

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...