(please help)IR controller for robot switch case problem

update:i did change the motor output in every state to(0,0,0,0) which is OFF and the IR worked fine so the problem appear when one of the motor go high so i guess it is power problem,but i don't know why the motor work connected to the external battery and the sensors connected to the vcc.

any suggestion??