Let's Make Robots!

L293D question

I have build my own board with a PICAXE-18M and L293D motor driver.
The motor driver uses a seperate power source to power the motors.
When an output signal from the PIC is send to the L293D a LED shows the output is high.
All seems to work without problems; the motors do exactly what i tell them to do and so do the LEDs.

Now for the question.
When i disconnect the PIC's 4.5v power supply and only leave the motor power supply connected, the PIC keeps running.
In other words, the LEDs are still blinking.
I double checked the circuit and the motor power supply + is only connected to the driver IC (and to the correct pin)

Is this normal? 
I measured the voltage and it seems around 2v (the motor power supply is 4.5v at this point).

Seems to me this shouldn't happen?


Here is a schematic of the circuit:


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I found that the L293 does not seperate the logic circuit from the motor circuit. Not like you would expect as a novice anyway. I discovered how important it is to tie your inputs to high or low (V+ or GND) using a resistor. Only then will your L293 start to behave (more) predictably.

My L293(D) would leak current from the motor circuit to the logic circuit. I am not sure it stops ding that when pulling all inputs low, but it's worth a try.

So do i need to pull it high or low with a resistor?
And how much Ohm should it be? 

Would  a diode from the PIC output to the L293 input also work?
The circuit board is completely done so i got to do it right the first time cause it's a nasty job to make any changes to it :)

I deliberately left out such details because I do not remember them too well. I do remember however extensive experimenting on a breadboard + multimeter and lots of data sheet reading. Which I always recommend.

When the data sheet says an input pin is "on" when "high", then make it turn "off" by pulling it "low". Tie the pin to ground with a resistor that has enough resistance to limit the current to less than 0.1 mA. For a 5 V circuit that would be approx. 5 kOhm or more. Find a resistor value you have lying around.

The value of 0.1 mA is one I just pulled out of my hat. Low enough to not overload the chips or drain the batteries. But still high enough to cause a steady voltage to be registered by the chip.

Ok, i guess i'll have to try that then.
Wish i found out about this while the stuff was still on the breadboard :) 

Added schematic for clearifaction

If you power-down the whole circuit (logic, motor and pic), so that everything is off, then reconnect the motor power source, does the pic start working?

Or is it only when you disconnect the pic while everything is up and running that the observed behaviour happens?

Indeed, when i power-down the whole circuit and reconnect only the motor power, the PIC starts working...
It worries me cause the motor power supply won't be 5V and i'm afraid it can damage the PIC.
I know you said you checked the circuit already,but is it possible you have a short between your two power lines? It is best to eliminate the easy stuff first.
Double and triple checked ;-)
I guess the most sensible thing to do is put the thing on a breadboard again.

I have breadboarded the entire thing again and it shows the same behaviour.
So at least that says its not just my PCB.
Also tried pulldown resistors on the PIC outputs and to put the LED between output and input, but the result was the same.
I think i'll just leave it like this for now, also because it will be very difficult to change the soldiered circuit.
The voltage is very low and the motors will be 6V so i guess it will be fine.

When i build a new circuit in the future i'll try to figure out exactly how to fix it.
@OddBot: i have already ordered a few SN754410's with the parts for my robot :)