Relay not switching correctly, controlled from ATtiny85, output to motor
I have two suggestions for you:

1) check to make sure that the relay is able to handle the current the DC motor is pulling.

2) use the variable power supply to run the control circuit, and the battery to run the motor with relay. if this proves to be working, you can then work your way back to re-integrate the motor back to your system.