Hi there,
If you are looking to embed something in your application, I would think that starting with a supervisory circuit IC like this: http://www.myermountain.com/node/24 would be a good place to start.
Disclaimer: This is listed on my website with other surplus components that I have for sale. (I have a $5.00 minimum order and ship as much as possible in a single USPS flat rate box)
I cannot advise on the exact circuitry that you need to use but I am sure a copy of the data sheet would guide you well.
HTH- Jeff