trouble running motor, IR sensor, and PIC on same voltage source
September 27, 2011
Well the thing is that 6 months ago i couldn't finish my project because of something wrong with the circuit.
I'm controlling 2 DC motors (Gearbox 200:1) with a L298N, where the logic part is recieved by a signal from a pic16f876A, the code is simple, it starts with sending logic 1 to the enable pins, then it sends 1 and 0 to the input pins, and every second the motor's direction changes. The problem is, each time the motors change its direction the voltage Vo of my LM2940CT-05 goes up and down (about 700mV (multimeter measure)) and the battery as well, so that affects the Sharp sensor and the PIC. I can solve that problem using 2 battery sources one for the logic and sensors and the other only for motors voltage , but one of the rules that were given to me was to use only one Voltage source. I have tried almost everything, i regulated my source like this post http://letsmakerobots.com/node/3880 and i noticed a little change now it only goes up and down (500 mV) then i decided to increase the capacitors to 1000 uF even 1000 uF + 470 uF, and no change.
My power supply was 6V, acid battery then change to 9 V and still have the same problem.
I put diodes on the L298N and also capacitors somthing like this (this is not my schquematic , i dont have one right now) the motor's voltages is 6V form my battery and the logic 5V from the LM2940CT-05 (same source).
I have tried with a new l298n and motors and still the same problem.
I dont know what to do, all .1 uF capacitors are ceramic instead of monolithic.
I put .1 uF ceramic capacitors on the motor's terminals.
Note: I put a LED in my circuit with a 300 resistor and every time the motor change it's direction the led turns on and inmediatally turns on.
My conclusion is that, there's some noise from the motors and i can't filter it. I need some help please i really want to finish this project.