Works fine powered from USB works bad powered externally

Yes but I need to stay the USB port available in this project.