This problem has been driving me nuts. I'm using an Arduino Nano to control two motorized ball valves with an L293D driver. The Arduino receives feedback from flow sensors to adjust the rate of flow. When the flow rate is in the correct range it sets the Enable pin on the L293D for the respective valve LOW to stop any more movement. One of the valves is functioning as intended, but the other will not disable. I checked with an oscilloscope and saw that ENABLE2, which is connected to PIN 9 on the Arduino, does not go below 2 volts when pulled low. It does go to 5 volts when pulled high.
When I test the Nano on its own PIN 9 does go to ground when pulled low.
When I remove the Nano from the circuit Enable 2 on the L293D is still at around 2 volts.
I soldered in a DIP socket so I could pull the L293D and test the circuit. With the L293D pulled the circuit tests out fine. PIN 9 goes to ground with no issue
So I believe I have determined that the L293D itself is providing the 2 volts on Enable 2. When the L293D is removed everything tests out ok.
I have tried multiple Nano boards. I have tried multiple L293D drivers. Always the same result. The code for this project is quite lengthy and in multiple modules, but I am confident it is not a code issue, as the anomaly is still there when the Nano is removed entirely.