Driving a DC motor /w 16f84a


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    On the assumption you are using PP3 type 9v batteries, and that the FETs are getting hot, I would conclude that a fair amount of amps are being drawn and possibly taking the voltage down causing the PIC to shut down. Again, as Steve says, without a schematic and or details of the code its hard to give a more exact answer.

  2. #2
    Lilmanmgf's Avatar
    Lilmanmgf Guest


    Did you find this post helpful? Yes | No

    Default

    I don't know how to post pictures here, so here is a link to the circuit. Sorry it looks bad, but I only had ms paint.

    http://69.65.40.73/lilman/motorpushpull.jpg

    At the moment I was just using on-off to keep the motor on. I wasn't sure if the 16f84a was capable of PWM. The circuit will only run for 15 second intervals. Thank you for all the help.
    -Chris

    Edit- I'm using two AA batteries to power the PIC. The datasheet said it can operate between 2v and 5.5v. I was thinking of using a separate 5v or 6v battery for the motor and transistors.
    Last edited by Lilmanmgf; - 29th April 2007 at 17:59.

  3. #3
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I came across this on a web site, which sounds similar to what you describe. Note it suggest the use of a seperate supply to the motor

    http://www.tigoe.net/pcomp/code/arch...4/000294.shtml

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    A couple of things:

    Unless you want the motor to have dynamic braking, you don't need the "bottom" transistor.

    You could reduce your dissiplation (heat generation) somewhat by putting the PNP transistor in the "top" position, and connecting the emitter directly to the +5V source, and the collector to the motor. If you build the circuit this way, you should also connect a 1K (or so) from the base to the emitter to guarantee that the transistor completely shuts off. Pulling the base LOW will turn the motor on. Make certain that you leave the 1K resistor (that you already show in your schematic) in place.

    The darlington transistors you use will certainly dissipate more heat than FETs in this application because the transistors will have a saturation voltage of at least 1V. If the motor draws 2A, then you will dissipate 2A X 1V = 2W.
    The motor will also get a maximum of 4V (or so) in this circuit as well.

    FETs will improve the circuit. Choose "logic level" FETS with a low ON resistance. If you use an N-channel FET (recommended), put it in series with the GROUND side of the motor. You won't need a resistor between the PIC output pin and the FET gate, although a 1-10K resistor between the gate and 5V will improve the circuit because it will insure a full 5V on the gate when the PIC pin is high. The ON resistance of the FET can be as low as 20 milli-ohms. That means that if your motor draws 2A, then the voltage drop across the FET will be 40mV and the dissipation will be .040 * 2 = 80mW. It will barely get warm - even without a heatsink.

    Regardless of the transistors used, you should always put a diode across the motor in the "reverse" direction. This is just good practice and prevents turn-off transients from destroying the transistors.

    And as to whether or not your chip supports PWM - any PIC can do PWM in software. You could have looked in the manual and found if supports hardware PWM in less time than it took you to make your post.
    Charles Linquist

  5. #5
    Lilmanmgf's Avatar
    Lilmanmgf Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    FETs will improve the circuit. Choose "logic level" FETS with a low ON resistance. If you use an N-channel FET (recommended), put it in series with the GROUND side of the motor. You won't need a resistor between the PIC output pin and the FET gate, although a 1-10K resistor between the gate and 5V will improve the circuit because it will insure a full 5V on the gate when the PIC pin is high. The ON resistance of the FET can be as low as 20 milli-ohms. That means that if your motor draws 2A, then the voltage drop across the FET will be 40mV and the dissipation will be .040 * 2 = 80mW. It will barely get warm - even without a heatsink.
    What FET would you recommend in this application?

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Sorry, I'm an engineer, not a secretary.
    Charles Linquist

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    But.. Just to insure you don't get it hooked up wrong.

    Source to GROUND
    Gate to PIC
    Drain to motor (-)
    Motor (+) to 5V

    1-10K resistor from Gate to +5
    Charles Linquist

  8. #8
    Lilmanmgf's Avatar
    Lilmanmgf Guest


    Did you find this post helpful? Yes | No

    Default

    I have a TRF510, but I was unable to get it to work. I'm really not sure how to read mosfets. It says the gate threshold voltage is from 2v to 4v. I'm assuming this means at least 2 volts is required to turn the mosfet on. In my current setup the PIC is powered by a 3 volts, so shouldn't this be sufficient to turn it off? Perhaps I unknowingly fried it previously.

Similar Threads

  1. DC to AC convertor
    By The Master in forum Off Topic
    Replies: 11
    Last Post: - 6th February 2010, 17:44
  2. Replies: 24
    Last Post: - 1st December 2009, 08:01
  3. from 5v dc to 1.00v dc precise vref 10mA ?
    By phoenix_1 in forum Schematics
    Replies: 10
    Last Post: - 28th July 2009, 08:11
  4. PIC data along dc line
    By sswcharlie in forum General
    Replies: 0
    Last Post: - 30th August 2008, 08:38
  5. H-Bridge control DC motor
    By Paul F in forum General
    Replies: 8
    Last Post: - 11th March 2005, 12:50

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts