December 17, 2015 at 5:53 pm #11921
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??December 17, 2015 at 6:26 pm #11922
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,
December 18, 2015 at 8:08 am #11924
- Use separate 12V and 5V power supplies.
- Make sure that every components used in the circuit is able to provide peak current required during motor switching
- 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.
Please let me know whether the problem is solved or not.December 18, 2015 at 11:00 am #11925
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??
GeorgeDecember 18, 2015 at 12:20 pm #11926
checked with seperate power supply also……but no result.December 18, 2015 at 12:23 pm #11927
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.December 19, 2015 at 11:11 am #11928
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.
You must be logged in to reply to this topic.