MOSFET/circuit troubleshotting :-\

D

Danny T

Guest
Things just aren't going that well *sigh* :(

I've got a simple circuit with an IC controlling a motor via a MOSFET.
The motor has a diode for back emf protection, two caps, etc., etc.

Anyway... When I power it up, the motor doesn't spin as expected. If I
replace the source/drain legs of the MOSFET with a piece of wire, the
motor runs, suggesting to me either the MOSFET is bust or the chip isn't
outputting a high.

If I wire the pin up to an LED instead of the MOSFET, the LED lights
fine. This suggests the MOSFET...

I replaced the MOSFET with a new one - same problem. I tried
disconnecting the gate and connecting it to 4.5V via a 10M resistor -
motor spins fine!

I'm at a loss... The MOSFET seems to respond to being connected directly
to something, but not to the IC's output. It definately worked at some
stage this morning (until I started fiddling)...

:-(
--
Danny
 
"Danny T" <danny@nospam.oops> wrote in message
news:41e12416$0$14605$ed2619ec@ptn-nntp-reader01.plus.net...
Things just aren't going that well *sigh* :(

I've got a simple circuit with an IC controlling a motor via a MOSFET.
The motor has a diode for back emf protection, two caps, etc., etc.

Anyway... When I power it up, the motor doesn't spin as expected. If I
replace the source/drain legs of the MOSFET with a piece of wire, the
motor runs, suggesting to me either the MOSFET is bust or the chip isn't
outputting a high.

If I wire the pin up to an LED instead of the MOSFET, the LED lights
fine. This suggests the MOSFET...

I replaced the MOSFET with a new one - same problem. I tried
disconnecting the gate and connecting it to 4.5V via a 10M resistor -
motor spins fine!

I'm at a loss... The MOSFET seems to respond to being connected directly
to something, but not to the IC's output. It definately worked at some
stage this morning (until I started fiddling)...

:-(
--
Danny
Dare we ask for a circuit ??

--
Regards ..... Rheilly Phoull
 
Rheilly Phoull wrote:
"Danny T" <danny@nospam.oops> wrote in message
[snip]
:-(
--
Danny

Dare we ask for a circuit ??
A digital photo of the breadboard layout could be as, if not more,
revealing.
 
Danny T wrote:
Rheilly Phoull wrote:

Dare we ask for a circuit ??
[snip:diagram]

MOSFET source S and drain D are the wrong way around (in the diagram).
 
Andrew Holme wrote:

A digital photo of the breadboard layout could be as, if not more,
revealing.
http://dantup.me.uk/tmp/breadboard.jpg

I've tried to mark as much as I can, since any angle I took the pic from
obscured something! Under the larger cap is another diode, like the one
you can see. These two diodes are slightly different to the one used for
back EMF protection, since I was using up some old bits.

As I said, replacing the MOSFET with a cable between S/D causes the
motor to spin. Moving the cable connected to G to and LED, also works fine.

:-\

--
Danny
 
Andrew Holme wrote:

Power supply noise from the motor might be crashing the PIC.
I thought that's what all the caps where for? :-\


Write a simple
test program which toggles two outputs on for 1-second, off for 1-second.
Make sure the watchdog is disabled. Connect one output to the MOSFET gate.
That's what this essentially does. Both outputs are high, and when I
connect a loose ground wire to the middle input pin on the other side,
both motors switch off. This all works correctly with LEDs in place of
the MOSFETs, and the motors disconnected.


Check _both_ outputs using a logic probe. You can make a simple logic probe
consisting of an LED and a resistor in series.
This works fine. It's only replacing the led with a wire to the MOSFET
that breaks it. If I take the end from the PIC and connect it to + with
a 10M resistor, the motor spins :(


Do you have a multimeter?
Check the gate-source voltage with that.
1.15V from gate to source


If you have enough spare outputs,
a slow binary count on three (or more) outputs would be a better check.
I could change other things for outputs, but I don't think it'll help,
given LEDs work fine going on and off as I connect/disconnect the input.

I haven't tried an LED on one output and the motor on the other - this
might show if the motor is crashing the PIC... I'll give it a try and
post back in a min...

Do
you have (or can you borrow) an oscilloscope? Look at the power supply
lines on a 'scope. Are they clean? You are blind without test equipment.
I don't know anyone with one :(

--
Danny
 
Andrew Holme wrote:

MOSFET source S and drain D are the wrong way around (in the diagram).
Well, before I got to change them around, I think I've just goose
something - I heard a fizzing and a funny smell (much like when I blow
an LED last week). I can't find which component it might've been -
everything looks ok... :-\

--
Danny
 
Andrew Holme wrote:

MOSFET source S and drain D are the wrong way around (in the diagram).
My motor now spins... *But* it doesn't stop when the pin goes low :-\
(if I replace it with an LED, the LED goes off)

--
Danny
 
Danny T wrote:

MOSFET source S and drain D are the wrong way around (in the diagram).

My motor now spins... *But* it doesn't stop when the pin goes low :-\
(if I replace it with an LED, the LED goes off)
Looking at my diagram, surely the motor is grounded via the diode then
the capacitor? Wouldn't this cause it to always be on?

When the pin goes low, the motor slows down, but it's far from stopped :(

--
Danny
 
Andrew Holme wrote:

MOSFET source S and drain D are the wrong way around (in the diagram).
If I take everything out and have just a motor connected in series with
the mosfet, and nothing connected to gate...

+ve -> Motor -> MOSFET(D), MOSFET(S) -> -ve

The motor still runs... This doesn't seem right??

--
Danny
 
Danny T wrote:
Andrew Holme wrote:
Do you have a multimeter?
Check the gate-source voltage with that.

1.15V from gate to source
BINGO. That's wrong: that's not enough to switch the FET on; it should be
almost Vdd.
 
Danny T wrote:
Andrew Holme wrote:

[snip:diagram]

MOSFET source S and drain D are the wrong way around (in the
diagram).

If I take everything out and have just a motor connected in series
with the mosfet, and nothing connected to gate...

+ve -> Motor -> MOSFET(D), MOSFET(S) -> -ve

The motor still runs... This doesn't seem right??
Components sometimes go open or short-circuit when you destroy them;
however, before you throw it away: connect the gate to the source. Does
that stop the motor?

You should never leave the gate un-connected: it's static-sensitive. Static
electric charge (e.g. from just touching it) can switch it on or off, and,
in extreme cases, destroy it. Observe handling precautions for
static-sensitive components.


.. You can give it It can pik up enough charge to switch off or no The gate
is static-sensitive
 
Danny T wrote:
When the pin goes low, the motor slows down, but it's far from
stopped :(
This suggests you've destroyed the MOSFET. I hope you bought plenty of
spares.
 
Andrew Holme wrote:

Power supply noise from the motor might be crashing the PIC.
You said I want a 100nF cap from Vdd to Vss.. Just noticed I've got a
100uF... Guess I ordered the wrong ones...

All I currently have are 100uF, 1000uF and 1uF (ceramic). Is what I'm
using ok, or should I use one of the others?

--
Danny
 
On Sun, 9 Jan 2005 20:42:43 +0800, "Rheilly Phoull"
<Rheilly@bigpong.com> wrote:

Dare we ask for a circuit ??
Absolutely!
Without one we can only guess. I'm tempted to infer that maybe the
MOSFET needs a driver, such as a 2n7000. But that's simply a shot in
the dark based on incomplete data.
BTW, I assume the OP has observed proper handling precautions for the
MOSFET? There's a lot of static around at this time of year.
 
Danny T wrote:

You said I want a 100nF cap from Vdd to Vss.. Just noticed I've got a
100uF... Guess I ordered the wrong ones...

All I currently have are 100uF, 1000uF and 1uF (ceramic). Is what I'm
using ok, or should I use one of the others?
I've changed it to a 1uF, since I *think* 100nF is 0.1uF... It doesn't
change my problem though - motor only slows down, doesn't stop :(

--
Danny
 
Danny T wrote:
Andrew Holme wrote:

A digital photo of the breadboard layout could be as, if not more,
revealing.

http://dantup.me.uk/tmp/breadboard.jpg
The S and D of the MOSFET are the wrong way around (according to the
annotation).

The wiring around the small cap looks totally wrong !
 
Danny T wrote:
Danny T wrote:

You said I want a 100nF cap from Vdd to Vss.. Just noticed I've got a
100uF... Guess I ordered the wrong ones...

All I currently have are 100uF, 1000uF and 1uF (ceramic). Is what I'm
using ok, or should I use one of the others?

I've changed it to a 1uF, since I *think* 100nF is 0.1uF... It doesn't
change my problem though - motor only slows down, doesn't stop :(
Yes, 100nF = 0.1uF.

1uF is a good substitute, in the circumstances.
 
On Sun, 9 Jan 2005 15:01:13 -0000, "Andrew Holme" <andrew@nospam.com>
wrote:

Yes, 100nF = 0.1uF.

1uF is a good substitute, in the circumstances.
No it isn't! In the circumstances, there's far too much capacitance in
the output circuit as it is. This will make for sluggishness. I'd
suggest simply 100nF (*maximum*) ceramic in this case.
 
Miles Harris wrote:
On Sun, 9 Jan 2005 15:01:13 -0000, "Andrew Holme" <andrew@nospam.com
wrote:

Yes, 100nF = 0.1uF.

1uF is a good substitute, in the circumstances.

No it isn't! In the circumstances, there's far too much capacitance in
the output circuit as it is. This will make for sluggishness. I'd
suggest simply 100nF (*maximum*) ceramic in this case.
I was referring to the power supply decoupling capacitor on the PIC. It
won't hurt to use 1uF there.
 

Welcome to EDABoard.com

Sponsor

Back
Top