I designed a food dispenser using a rPi+touchscreen, a h-bridge L293DN and a Mercury stepper motor SM-42BYGO11 (from Sparkfun). The system works great except that I need to have it powered by a battery. I have a 5V LiPo rechargeable micro-USB battery for the rPi and a 9V alkaline battery for the stepper motor through the h-bridge. Unfortunately something draws a lot a power on the batteries and if I leave them plugged in, they both discharge overnight even though the system is turned off. I'm unclear why and it's inconvenient because the system enclosure is hard to open so I don't want to have to unplug them all the time.
The h-bridge is powered by the rPi, so is the touchscreen. So when I turn it off they should stop drawing power, yes? And because the h-bridge is off, it should also stop drawing power on the 9V battery. So why are the batteries discharging so quickly and how could I prevent it? Also, when I turn off the rPi I have to unplug and replug the battery to boot it again. Is there an easy way to make the rPi boot without having to unplug the battery?