Driving a DC motor /w 16f84a


Closed Thread
Results 1 to 19 of 19

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    An International Rectifier IRF3706 would be a good choice.
    Charles Linquist

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Marching Onward . .

    Hi Lilmanmgf,
    This Sumobot you are building, Is it going to have reverse and forward, or only forward and stop? I ask because if you want it to have reverse, then an H-Bridge is what you are looking for. If it only goes forward, you might do as well or better with a fast acting relay, and lose the heatsink, MOSFETs and some of the confusion, you would likely still need a small switching transistor and a snubber diode. I know these bots are pretty small, and the space and weight saved might be useful for something else.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Lilmanmgf's Avatar
    Lilmanmgf Guest


    Did you find this post helpful? Yes | No

    Default

    Yeah, it just needs to go forward and stop.

  4. #4
    Join Date
    Feb 2006
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    If you find MOSFETs confusing you may wish to use an H-Bridge IC. The SN754410 is a full H-bridge in a DIP package. I have successfuly used this chip to drive two motors forwards and backwards on a small robot. Heat dissipation has not been an issue. The operation of this chip is extremely easy to understand and the inputs can be driven directly from the PIC.
    If you would prefer to put your own H-bridge together you should definantly use MOSFETs. If you are having trouble with the on gate voltage from the PIC being to low you may try to connect a pull-up resistor from the gate of the MOSFET to the positive supply (this is assuming you are still running off of 9v). The pull-up would bring the gate to a full 9v when the PIC signal goes high but when the PIC ouput goes low the gate would be driven low. You should test your ideas out on a breadboard and find what works best.
    Hope this Helps.

  5. #5
    Join Date
    May 2007
    Location
    Harvest, Alabama
    Posts
    10


    Did you find this post helpful? Yes | No

    Cool Mosfets and some tricks

    here are a few tricks you may wish to try.
    (1) MOSFETS love to be in parallel. This allows you to get the heat down a lot.
    (2) Overdriving the control a bit on MOSFETS (50% or less) is generally safe and causes really fast response. Read the specs on you MOSFETS yours may be able to do this.
    (3) Just for fun on the DC segment rather than killing the current entirely while running leave a modest few milliamperes hanging in the main drive coil at all times you are running the motor. It will drag the coil slightly but may affect current demand in the circuit a lot. This might well be worth the effort. This is a trick to prevent the collapse of the magnetic field in the coil of the DC motor. If it requires a voltage reversal, time this reversal when you are already into the next drive position some.

  6. #6


    Did you find this post helpful? Yes | No

    Post Oh my God please PWM it!

    I didnīt read much of it, but you could do so many things!!.

    First of all i would recommend a PWM always for this DC motors, they are really Current eaters, if the 16f84 donīt has it (it doesnīt) you can provide something with a simple timer, and a word counter. increase the counter on each interrupt an play with its value to decide if the pin goes HIGH or LOW. I really recommend to meet at last the 16f628 you get so many more stuff that you will never go back to 16f84, youīll get for example a great PWM in one sentence.

    I have in my hands the irf530 right now, it should make the work; I donīt have the greatest memory but i do remember that this Motor is an inductor and it will help you to use a diode (1n4004 or a Switcher if using PWM) to reduce peak currents on the level change from ON to OFF, you might have used this diode on relays for the same purpose.

    If you canīt use different batteries for the motor and control (if you can then use an optocoupler) then be sure to add some capacitors to the uC Vcc-Vdd as close as possible (this is a classic one).

    Donīt know if you are also using a Vreg if you are he is the one shutting down after heating.

    Working with small batteries and getting power out of them is a real challenge, if you can go for a better source (you can usually do this for college asignments)
    Last edited by Josuetas; - 15th May 2007 at 05:04.

  7. #7
    Join Date
    May 2006
    Location
    Kedah, Malaysia
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Josuetas View Post
    I didnīt read much of it, but you could do so many things!!.

    First of all i would recommend a PWM always for this DC motors, they are really Current eaters, if the 16f84 donīt has it (it doesnīt) you can provide something with a simple timer, and a word counter. increase the counter on each interrupt an play with its value to decide if the pin goes HIGH or LOW. I really recommend to meet at last the 16f628 you get so many more stuff that you will never go back to 16f84, youīll get for example a great PWM in one sentence.

    I have in my hands the irf530 right now, it should make the work; I donīt have the greatest memory but i do remember that this Motor is an inductor and it will help you to use a diode (1n4004 or a Switcher if using PWM) to reduce peak currents on the level change from ON to OFF, you might have used this diode on relays for the same purpose.

    If you canīt use different batteries for the motor and control (if you can then use an optocoupler) then be sure to add some capacitors to the uC Vcc-Vdd as close as possible (this is a classic one).

    Donīt know if you are also using a Vreg if you are he is the one shutting down after heating.

    Working with small batteries and getting power out of them is a real challenge, if you can go for a better source (you can usually do this for college asignments)
    I don't understand by what you guys mean PIC16F84a doesn't have PWM.
    We can use the pulseout command right?

    PULSOUT Pin,Period

    I have create a robot using the DC servo motor using PIC16F84a and the Motor speed (modified DC motor) and position can be controlled using the PWM command.

    To control DC Motor speed and to safe the power consumption we also can use the PWM method. But for DC motor we cannot easily control the angle of the rotation as the DC servo motor.

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