Maker Pro
Maker Pro

MOSFET/circuit troubleshotting :-\

D

Danny T

Jan 1, 1970
0
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)...

:-(
 
R

Rheilly Phoull

Jan 1, 1970
0
Danny T said:
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)...

:-(

Dare we ask for a circuit ??
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
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!

Power supply noise from the motor might be crashing the PIC. 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.
Check _both_ outputs using a logic probe. You can make a simple logic probe
consisting of an LED and a resistor in series. Do you have a multimeter?
Check the gate-source voltage with that. If you have enough spare outputs,
a slow binary count on three (or more) outputs would be a better check. 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.
 
A

Andrew Holme

Jan 1, 1970
0
Rheilly said:
Dare we ask for a circuit ??

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

Danny T

Jan 1, 1970
0
Rheilly said:
Dare we ask for a circuit ??


VCC
+ 4.5V Drop to 3.1V
------------------------>|-------->|--.
| | 1uF 100uF
| | Ceramic Electrolytic
| 100uF '------------------------.
| || .-----' | |
| .----||-----. | _-_ --- ---
| | || | - |___| 3V Motor --- ---
| | | ^ - | |
| |Vdd __ Vss | | | .--------'
.-------o--o| |o---o---. '-----' |
| .--------o| |o- | | |
| | -o| |o- | ||-+ S |
'-)--------o|__|o- | G||<- N MOSFET |
| MCLR | '---||-+ D |
| | | | |
'---------------------)------' | |
| | |
|-------------------------------------------------'
===
GND
(created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)
 
A

Andrew Holme

Jan 1, 1970
0
[snip:diagram]

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

Danny T

Jan 1, 1970
0
Andrew said:
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.

:-\
 
D

Danny T

Jan 1, 1970
0
Andrew said:
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 :(
 
D

Danny T

Jan 1, 1970
0
Andrew said:
[snip:diagram]

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... :-\
 
D

Danny T

Jan 1, 1970
0
Andrew said:
[snip:diagram]

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)
 
D

Danny T

Jan 1, 1970
0
Danny said:
[snip:diagram]

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 :(
 
D

Danny T

Jan 1, 1970
0
Danny said:
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 :(

And if I disconnect Gate from anything, the motor still spins! :(

If I take the MOSFET out and put my meter on it, it seems to have a
*very* resistance, so I'm not sure it's that :(
 
D

Danny T

Jan 1, 1970
0
Andrew said:
[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??
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
1.15V from gate to source

BINGO. That's wrong: that's not enough to switch the FET on; it should be
almost Vdd.
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Andrew said:
[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
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
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.
 
D

Danny T

Jan 1, 1970
0
Andrew said:
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?
 
M

Miles Harris

Jan 1, 1970
0
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.
 
D

Danny T

Jan 1, 1970
0
Danny said:
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 :(
 
Top