Well, i've seen it done before, though it is very difficult with presise timing(i don't know how to do any of this, but this is the general idea) for full and nearly completly drained batteries. If you need an example, i know that ti exlporer(83 null only) had a battery thing that did that, but i don't know if it has the source, sorry.