>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 12 April 2006 17:00 >To: Microcontroller discussion list - Public. >Subject: Re: [EE] Mosfet driver > > >> >> Hello guys >> I have a strange problem when trying to use the attached >circuit as a >> small forward-only driver for a DC motor. The Mosfet is an >IRF 540 and >> the PIC is 18F452. The pin RC2 in set as output from TRISC >and i made >> a small program in C18 to issue a "zero-logic" for one >second and then >> "one-logic" (+5v) for another second and so on. My problem >is that the >> motor starts turning when the 1 is issued on RC2 but instead of >> stopping when i issue 0 it just turns a bit slowly... After 1 second >> the 1 is sent again on RC2 and the motor turns again fast. >> Can you guys help me with a suggestion ? What should i do ? > >Hi Dumitru, > >You have the source and drain reversed on the mosfet. > >BTW, although the IRF540 has a fairly high breakdown voltage, >it's good practice to use a freewheel diode across the motor. > >Another thing, the IRF540 is not a logic-level mosfet, so you >will not be getting full turn-on. True, but from the curves it looks like it's should be good for at least a couple of amps with Vgs=5v. 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. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist