Unexpected behaviour of 12V DC Motor with PIC Microcontroller

Home Forums Microcontrollers PIC Microcontroller Unexpected behaviour of 12V DC Motor with PIC Microcontroller

This topic contains 6 replies, has 2 voices, and was last updated by  George Mathew 1 year, 2 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11921

    George Mathew
    Participant

    Dear Sir,

    I am trying to make a robotic car with two 12V dc motors(30 rpm) and an L293D  and using PIC16F877A.

    My problem is that when motors are disconnected,The voltage levels on on the output of  L293D (already connected its inputs to outputs of PIC) is changing as per the sequence in the Program. But Once the motors are connected, The sequence sometimes change,may not change and may sometime stay constant and voltage levels not changing according to program.

    For eg if  ‘1’ ‘0’ is the condition for motor to rotate in anticlock wise direction.and suppose we change it to ‘0’ and ‘1’,If the motors are not connected,the program is working fine and output is behaving properly else not.

    Actually what is the problem,Is there any solution??

     

    #11922

    Ligo George
    Keymaster

    Hi,

    Your problem seems to be with Power Supply. Hope you are using same power supply for powering DC Motor and PIC Microcontroller. There will be a sudden drop in the supply voltage when the motor is powered, this will reset the microcontroller and program starts from the beginning again and again.

    Try the following,

    1. Use separate 12V and 5V power supplies.
    2. Make sure that every components used in the circuit is able to provide peak current required during motor switching
    3. Increase the capacitance of both 12V and 5V rail. Eg : Put 1000µF for 12V and 100µF for 5V. Add 0.1uF near each ICs.
    #11924

    Ligo George
    Keymaster

    Please let me know whether the problem is solved or not.

    #11925

    George Mathew
    Participant

    Thank you for your response sir…

    As you said,I am using a 12V common power supply.By using a 7805 regulator,it is cut down to 5V and is supplied to PIC board section and IC supply voltage .

    For 12V   pin (Vs) in L293D,It is taken in parallel from 12V dc power in the board and there is no connection with PIC section.then how this will happen??

    Also Is capacitances necessary??

    Rgds,

    George

    #11926

    George Mathew
    Participant

    checked with seperate power supply also……but no result.

    #11927

    Ligo George
    Keymaster

    Ripples in the 12V rail will be coupled to 5V rail also and DON’T FORGET to make ground common when you are using separate power supplies.

    #11928

    George Mathew
    Participant

    Dear Sir,

    I connected power supply like that only.Ground was common. But that was not the problem.I connected back the supply as earlier in parallel.

    As you said, problem was that ripples.When I connected a 1000uf(25V) capacitor  in parallel with Vs Pin(12V) and the Ground pin of  L293D, the problem was solved.

    Thanks for your support.

    Rgds,

    George

     

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.