Draw a schematic with pen and paper and post a photo of it.
If the problem is a hardware issue we need a schematic to see how you wired everything up.
If you're using a Lipo battery you should have a comparator voltage monitor circuit to alert you when the voltage drops too low.
You could have it turn on a LED and piezo beeper if the voltage drops too low.