MOSFET/circuit troubleshotting :-\

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
Reply to
Danny T
Loading thread data ...

I don't see how the motor runs, even if you short the mosfet drain ot source.

It looks like the positive lead on the motor (the one that ties to the cathode of the reverse voltage clamping diode and the small blue bypass cap has no connection to the diodes to the positive supply.

--
John Popelish
Reply to
John Popelish

It makes sense if the gate oxide has been blown and there is a low resistance, now, between gate and source. Take the mosfet out and check the gate to source resistance with an ohm meter.

--
John Popelish
Reply to
John Popelish

Without a scope to look at these outputs, you have little assurance that you are really getting a continuous logic high out of the pins, and not a train of slim pulses. You might connect a small capacitor in series with your meter, set to AC volts, and see if you get no AC (steady voltage) on the logic high test. If you measure more than a few millivolts AC, you are not getting a steady state output. You are troubleshooting both software and hardware, simultaneously.

--
John Popelish
Reply to
John Popelish

The capacitors are okay, and your connections match your schematic, but you didn't follow my directions. Your connections force the motor noise to go out to the ground bus and back on their way to the capacitors. Those capacitors should be plugged directly into the source row to keep that noise current local.

--
John Popelish
Reply to
John Popelish

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.

Reply to
Andrew Holme

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

Reply to
Andrew Holme

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

Reply to
Danny T

[snip:diagram]

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

Reply to
Andrew Holme

formatting link

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
Reply to
Danny T

I thought that's what all the caps where for? :-\

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.

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

1.15V from gate to source

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...

I don't know anyone with one :(

--
Danny
Reply to
Danny T

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
Reply to
Danny T

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
Reply to
Danny T

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
Reply to
Danny T

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 :(
--
Danny
Reply to
Danny T

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
Reply to
Danny T

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

Reply to
Andrew Holme

Yes, it actually does. And the length of the leads on the capacitors matters, too. Sometime you might calculate the inductance of those wires and how much voltage that inductance can produce when an ampere turns on or off through it in a few tens of nanoseconds. Wires are inductors.

I would lay out a circuit board for this circuit that put the positive motor lead adjacent ot the source pin, and jump that small distance with a low ESR capacitor. That is the only way to keep all that current pulsing out of the rest of the system.

--
John Popelish
Reply to
John Popelish

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

Reply to
Andrew Holme

This suggests you've destroyed the MOSFET. I hope you bought plenty of spares.

Reply to
Andrew Holme

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.