motors browning out PIC


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Jul 2006
    Posts
    76

    Default motors browning out PIC

    I have a PIC16F628A connected to an H-bridge with two medium size motors connected to it. I have figured out that the PIC is being browned out by the motors. I understand I need capacitors somewhere on the circuit but I don't know where to put them or what size capacitors I should use. I know I could put them on the motors themselves and the PIC, but exactly where, I don't know. Any help is greatly appreciated!

    -Mike

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


    Did you find this post helpful? Yes | No

    Default

    I have had great success by feeding the PICs VCC (and MCLR) through a low voltage drop Schottky diode. On the PIC side of the diode, I use a 10uF tantalum and several .1uF ceramics.

    This has worked well for me in critical military applications controlling hundreds of amps.
    Charles Linquist

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Smile

    Hi Mike,

    If you are using MCLR, can you not use it?
    If it is a must, what is the resistor on MCLR, 4.7K, 10K?

    Also, why not turn off BOD ?


    Edit: I have a similar application with heavy DC motors, same PIC as yours. BOD_OFF, MCLR_OFF. No reset whatsoever.


    ----------------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mbw123
    I have a PIC16F628A connected to an H-bridge with two medium size motors connected to it. I have figured out that the PIC is being browned out by the motors. -Mike
    Hi,Mike

    THE stupid question ...

    Can your supply withstand the two motors " no-rotation current draw " ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Sorry for the late response.

    What is BOD?

    I don't need the MCLR, so I can probably turn it off. Won't the power be drawn from the PIC and restart it anyway? I mean, if there is no power to the PIC when the motors turn on, will it restart? Or the motors will not draw all the current?

    Thank you very much for the responses.

    -Mike

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


    Did you find this post helpful? Yes | No

    Default

    That is why the approach I have suggested (Schottky diode and capacitor) works. The motors can pull the power supply to zero volts for a very short time, and the PIC keeps on running due to the energy stored in the capacitor.

    I had an application where the power supply dropped to under 0.5V for 10 milliseconds. After I added the diode and the caps, the circuit worked perfectly.
    Charles Linquist

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi Mike,

    In that case, use these settings if you can and remove MCLR resistor;
    and if you can, use internal OSC.

    Code:
    @ DEVICE PIC16F628A, INTRC_OSC
    @ DEVICE PIC16F628A, MCLR_OFF
    @ DEVICE PIC16F628A, WDT_OFF
    @ DEVICE PIC16F628A, PROTECT_OFF
    @ DEVICE PIC16F628A, BOD_OFF
    @ DEVICE PIC16F628A, CPD_OFF
    and, as Charles said, use a cap.


    ----------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thanks guy's. I turned off BOD and MCLR like sayzer suggested. It is better but there are still errors. I bought the Schottky diode and the caps like charles suggested, but when I wired it up it didn't work. I measured the 10uF cap with my multimeter and it started at the correct voltage, but before long it went down to zero. How does this work if the capacitor goes to zero and the PIC gets no power? Thank you for the help.

    -Mike

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


    Did you find this post helpful? Yes | No

    Default More

    Quote Originally Posted by mbw123
    Thanks guy's. I turned off BOD and MCLR like sayzer suggested. It is better but there are still errors. I bought the Schottky diode and the caps like charles suggested, but when I wired it up it didn't work. I measured the 10uF cap with my multimeter and it started at the correct voltage, but before long it went down to zero. How does this work if the capacitor goes to zero and the PIC gets no power? Thank you for the help.

    -Mike
    Hi Mike,
    Put the diode in series with the power to the PIC, The capacitor hooks to the Power pin and to ground, on the diodes cathode side. The diode prevents the capacitor from discharging back into the motors, you may need a larger capacitor than 10uF. The only danger I see is if the capacitor is too large PIC might not boot due to too slow of power up. If this still fails, think good thoughts about using rechargable batteries instead of the Cap.
    JS
    Last edited by Archangel; - 15th November 2006 at 03:54.

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


    Did you find this post helpful? Yes | No

    Default

    No, you can use a capacitor as large as you want. There will be NO problem during start up.
    There is one drawback to this method, however - The Schottky diode will have a voltage drop of about 0.5V. This means that the PIC will see a power supply voltage of 0.5V less than the actual power supply.
    Charles Linquist

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


    Did you find this post helpful? Yes | No

    Default Super

    Quote Originally Posted by Charles Linquis
    No, you can use a capacitor as large as you want. There will be NO problem during start up.
    Thanks Charles,
    I wasn't sure about that one :-), in that case use a BIG one, or use a seperate PS for the PIC, Oh one more thing, take your PIC power and ground directly from the batteries, or power supply, not from the motors power bus.

  12. #12
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thanks again guys, you are very helpful. One last question. I bought the Schottky diode as suggested and it has a "cathode band" on it. Which direction should I put the diode in, the cathode band side facing the PIC or facing the power?

    I'll be sure to follow all of your advice.

    -Mike

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


    Did you find this post helpful? Yes | No

    Default

    Cathode toward the PIC.
    Charles Linquist

  14. #14
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thank you everyone. I got it working!!

    -Mike

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. PIC chips, stepper motors and precision
    By Demon in forum General
    Replies: 6
    Last Post: - 6th February 2005, 16:28

Members who have read this thread : 1

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