Something I don't understand about L293D

I’m using a L293D to drive a bipolar steppr motor. The circuit I’m using is the standard (see attached image).
It seems to work, but to my surprise, if I don’t connect the GND pins 4,5,12,13 to ground, the engine still works !
Somehow, it must be using power from USB instead of the DC external source.
This is annoying as I was trying to measure the current that goes through the coils using a shunt resistor between GND line and pins 4,5,12,13.
Do you understand what is going on here ?
Thanks !


Yes, you are attempting to melt the input protection diodes on the logic inputs by using them as a high-current ground connection. Don't do this! Measure current on the high-side motor supply.

MarkT, I'm not sure I understand you. As I saw the L293D was using too much current from the digital arduino pins, I have used 10K resistors to limit it. Now it seems to work fine. I think that a differential ADC plus a shunt resistor is needed to measure the current in a bipolar stepper. So for the moment I won't be able to detect stall condition.

Ah - perhaps the current's returning to the +5V rail or some such - either way that's not going to do the chip any good having the ground disconnected - especially as the ground pins are also heat-dissipating.