Searching \ for '12C509 to MOSFET H-Bridge ... how to avoid shorts?' 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/io/motors.htm?key=h%2Dbridge
Search entire site for: '12C509 to MOSFET H-Bridge ... how to avoid shorts?'.

Truncated match.
PICList Thread
'12C509 to MOSFET H-Bridge ... how to avoid shorts?'
1998\10\03@023459 by James Cameron

flavicon
face
I wish to have bi-directional PWM control over a small toy 9V DC motor,
from a PIC 12C509, so I guess I would set up a H-Bridge using four logic
level MOSFETs, but I have a few newbie questions;

a) can I use MOSFETs of the same polarity top and bottom of the bridge?

b) are there any simple tricks I can use to reduce damage in case the
  prototype code manages to switch MOSFETs so as to short the supply?

(This is another Technical Aid to the Disabled project.  For a disabled
child so they can run their toy railroad.  The control unit will receive
a UHF remote control signal as three TTL inputs, a valid transmission
line and two contact closure signals.  One switch will mean go forward,
the other switch go backward, but I don't really want to use relays to
do it; the effect would be far too abrupt.)

--
James Cameron                                    (spam_OUTcameronTakeThisOuTspamstl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

1998\10\03@035153 by Mark Willis

flavicon
face
Rusty on MOSFET control stuff (Seattle Robotics would be a good
resource here again, http://www.seattlerobotics.org/ and look at links,
those folks love H-bridges <G>)  One post in their mailing list
suggested the Zetex ZHB6718 H-Bridge (it's a PNP/NPN bridge, however.)
I need more info (Might be a good way to do one project.)  One quote
from there mentions making sure you diode protect MOSFETs more than
bi-polar transistors, as back EMF can peak pretty high (>>2x supply
voltage.)  Also suggested: .1 uF caps across the motors to damp
transients (or even 3, 1 Hot-neutral, 1 hot-motor's case, 1
neutral-motor's case, to further reduce RF noise.)

 You might look at the SGS-Thompson L298.

 The "Mobile Robot" book is well-recommended, I need to buy one myself
<G>

 On protection from shorts, it's hard (from what I've seen of Sumo
robots at least, where the startup currents "resemble" short circuit
currents;  You could do thermal limiting I suppose?  Others here are
better at this than I <G>  I'll suggest one trick in your code:  I'd
think about having a "velocity" number in the code, i.e. you have One
and only One place you look to see what the desired speed of the train
is;  You need a second number for what the current speed setting is, as
well.  (Two 8-bit numbers should do.)  If you get a "Go Forward", set
the Desired speed to Full Speed Ahead, and increment the Current
velocity every quarter second or so until they match; if a "Go
Backwards", set Desired Speed to slower or to Stop, and slowly decrement
the Current Velocity.  (Maybe one Go Forward means speed up until you
reach full speed, the first Go Back means slow down to a stop, a second
Go Back would mean reverse once you've stopped.)  And only enable one
pair of MOSFETs if the -current velocity- number's "positive", or the
other if it's "negative".  And energize the MOSFETs to a proportional
time to your "current velocity" number.  Pretty simple then to not short
circuit, if you debug the code somewhat, you initialize that number on
startup/watchdog, and you only increment/decrement the "Current" number
every 1/4 second or so (and watch it more often to control the PWM)  You
get inertia as a side benefit <G>

 Happy to help if you want more, or to quiet down if I'm confusing <G>

 Mark

James Cameron wrote:
{Quote hidden}

1998\10\03@041030 by James Cameron

flavicon
face
Thanks for your input.

--
James Cameron                                    (cameronspamKILLspamstl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

1998\10\03@063651 by Ned Seith

flavicon
face
> a) can I use MOSFETs of the same polarity top and bottom of the bridge?
>

YES, See below...

> b) are there any simple tricks I can use to reduce damage in case the
>    prototype code manages to switch MOSFETs so as to short the supply?
>

YES  Use optoisolators to drive the MOSFETS. A package such as an ISP817-3
or anISP847-3 both available from http://www.jameco.com will provide independant
drive of each
MOSFET in the bridge allowing the use of same polarity devices and assuring
the desired
safety isolation. Only one diagonal pair of MOSFETs in the bridge can be
"on" at any
given time. The primary control signal should be routed to the two
optoisolators that drive one diagonal pair of MOSFETs and the "inverted"
primary control signal routed to the two remaining optoisolators that drive
the second diagonal pair of MOSFETs.
For maximum MOSFET protection, reversed biased Schottky diodes should be
properly orientated from the source to the gate, from the gate to the drain
and from the source to the drain.
An alternative method is to use a transformer such as a small audio coupling
transformer available from  Radio Shack or Jameco. The control signal is
routed to the tranformer's
primary winding. The gates of one diagonal pair of MOSFETS are connected to
one end of the transformer's secondary winding and the gates of the other
diagonal pair are
connedted to the other end of the secondary winding.
The use of the optoisolaters is easiest as the biasing of the transformer's
secondary winding inconjunction with the MOSFETs is a bit tricky.
Do not add capacitors to the MOSFET gate circuitry as this will effect turn
on/turn off performance and contribute to high speed short circuit currents
that may not be readily detectable but will shorten the MOSFETs useful life.
If capacitors are added to the source or drain circuits for noise suppresion
they should be Tantulum capacitors.
Excessive capacitance in the load circuitry should be avoided as the sum of
the load impedance should be resistive and/or inductive but not capacitive.
I have used both the optoisolator and the transformer methods to control
loads up to
10 KW with supply voltages as high a +/- 800 VDC. The bridges consisted of a
vast
array of MOSFETs mounted on a 2 inch thick aluminum heat transfer substrates
that were chilled with circulating glycol. In the past International
Rectifier had the most authoritive free literature available regarding
MOSFETs.

>

1998\10\03@113706 by Bob Blick

face
flavicon
face
At 05:22 AM 10/3/98 +0000, you wrote:
>I wish to have bi-directional PWM control over a small toy 9V DC motor,
>from a PIC 12C509, so I guess I would set up a H-Bridge using four logic
>level MOSFETs, but I have a few newbie questions;

Hi James,

I've enjoyed the responses you've gotten so far. Why not use $$$ of parts
to control a $ motor? Because it's not sensible!

If you want a small H-bridge, get an H-bridge IC. DO NOT use an L293D(an
H-bridge that is popular on this and the Stamp list) if you are using
battery power - it will consume more quiescent current than your motor.

There are lots of available parts, I am most familiar with those made by
ROHM. The company I work for uses lots of BA6208 and I think they cost
about US$0.35 in 5000 quantity. Even if you buy them in onesies from
PartsExpress they will cost about US$1.35

The BA6208 will not self destruct from any logic combination. It draws no
quiescent current. I've found it to work up to 300mA pretty well. If you
need bigger devices, ROHM makes them.

If you really want to make an H-bridge yourself, take a look at:
www.bobblick.com/bob/projects/hbridge/hbridge.html
or for a pc board layout:
www.bobblick.com/bob/projects/hbridge/hb01.html
for some ideas(it shows a 100 watt h-bridge, but the idea is the same), and
you can follow a link for a PWM generator in case you don't want to
generate PWM from your PIC.

Cheers,
Bob

1998\10\04@005748 by Brian Scearce

picon face
James Cameron asks:
> a) can I use MOSFETs of the same polarity top and bottom of the bridge?

Yes, but the gate drive of the high-side n-type MOSFETS needs to
be 14V (9V + 5V).  The current requirements are so low that you
can build or buy a voltage booster pretty easily; with my 12V motor
controller, I've taken the easy way out and used a 9V battery in
series.

> b) are there any simple tricks I can use to reduce damage in case the
>    prototype code manages to switch MOSFETs so as to short the supply?

A trick I used was to construct a two-input, four-output gadget
from gates that would never put the four outputs into an illegal
state.  There really are only four useful states for the MOSFETs
anyway: all open (coast); top (or bottom) pair closed (brake); and
the two diagonals.  This also saves two IO pins, a real consideration
with the 12C5XX.

> One switch will mean go forward, the other switch go backward, but
> I don't really want to use relays to do it; the effect would be
> far too abrupt.)

An easier trick I've seen used (but I haven't done it myself, so
I can't give you a "here's what to watch out for") is to use relays
as the H-bridge switches, then add just *one* MOSFET or BJT at the
"bottom" of the bridge, interrupting the ground path, to do PWM
on.  All that this costs you is the ability to do microsecond
switches between forward and reverse, which probably isn't useful
anyway.  If you don't want to do active braking, you can even use
just two DPST relays (one relay per diagonal) instead of four SPST
relays.

1998\10\04@060408 by paulb

flavicon
face
Brian Scearce wrote:

> An easier trick I've seen used (but I haven't done it myself, so
> I can't give you a "here's what to watch out for") is to use relays
> as the H-bridge switches, then add just *one* MOSFET or BJT at the
> "bottom" of the bridge,

> If you don't want to do active braking, you can even use just two DPST
> relays (one relay per diagonal) instead of four SPST relays.

 If you *do* want to do active braking or even if you don«t, you use
two *dirt common* SPDT relays.

 Otherwise, one DPDT relay to reverse.  Arguably, a relay is as
efficient as an H-bridge in most cases.  If for example you rarely want
to reverse, it«s *very* efficient!
--
 Cheers,
       Paul B.

1998\10\04@155750 by John Payson

flavicon
face
part 0 1206 bytes
|a) can I use MOSFETs of the same polarity top and bottom of the bridge?

If you use N-channel MOSFETs for the top of the bridge, you will
need to have a way of switching their gate voltage above the
positive rail.  This is not too hard if you use optoes, but it's
a little tricky.

|a) are there any simple tricks I can use to reduce damage in case the
|   prototype code manages to switch MOSFETs so as to short the supply?

I know you said you'd like to avoid relays, but for your appli-
cation I think it might be best to use one MOSFET to control
speed and a relay to control direction.  You may avoid abrupt
changes of direction by only switching the relay when the MOS-
fet duty cycle is at zero.

For truly optimal results, you would want to measure the back
EMF from the motor and regulate the train's speed based upon
that, but that could be somewhat tricky and most likely isn't
needed for this application.  The one feature that you might
want to add, though, would be a peak-current sensor: the peak
current at the start of each PWM cycle will correlate pretty
strongly with the speed of the locomotive (max==stopped).
Using such a device could help avoid overheating the motor if
it stalls.

1998\10\05@005104 by tjaart

flavicon
face
Brian Scearce wrote:

> James Cameron asks:
> > a) can I use MOSFETs of the same polarity top and bottom of the bridge?
>
> Yes, but the gate drive of the high-side n-type MOSFETS needs to
> be 14V (9V + 5V).  The current requirements are so low that you
> can build or buy a voltage booster pretty easily; with my 12V motor
> controller, I've taken the easy way out and used a 9V battery in

You can easily put 5V on top of your supply with a charge pump. Have a lookat
http://www.wasp.co.za/~tjaart/CurrentLimiter.html where I use it in a current
switcher.

BTW I have been away on leave for a week and a half, if anyone wonders why
I suddenly went quiet. I unsubscribed from the PIClist during this time, so if
anyone had any comments on the schematic or software on this page, I'm back
now.

--
Friendly Regards

Tjaart van der Walt
.....tjaartKILLspamspam.....wasp.co.za

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS EraseMEtjaartspam_OUTspamTakeThisOuTsms.wasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1998\10\05@070606 by James Cameron

flavicon
face
John Payson wrote:
> For truly optimal results, you would want to measure the back
> EMF from the motor and regulate the train's speed based upon
> that, [...]

Yeah, I had some fun with that ... placed a red LED with a dropping
resistor backwards across the motor driving MOSFET ... very instructive
means to see this back EMF and the way it changes with motor load and
PWM duty cycle.

No further replies required ... I'm going with one MOSFET and will add a
latching DPDT relay when reverse is required.

Thanks for the feedback, guys.

Hint for newbies: connect your multimeter to ground on your circuit
board, not to your power supply ... I had an open at one stage on my 10V
supply ground return and hence measured 10V at output of my 7805.  ;-}

--
James Cameron                                    (cameronspamspam_OUTstl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

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