We know that the phone needs 5 volts in order to charge. But we don't know how much current it draws or it's equivalent load resistance
. So we can't charge the cellphone directly from the phone line. We need to use a voltage regulator
to bring the output of the phone line down to 5 volts and keep it there. A LM7805 5 volt regulator should work fine.
To make this simple phone line adapter you will need the phone cord that we have been working with, the 5V voltage regulator and a USB connector cable with a female end. Just connect the red wire from the phone line to the first lead on the regulator and connect the green wire from the phone line to the second lead. Then connect the black wire from the USB cable to the second lead on the regulator and connect the red wire from the USB cable to the third lead on the regulator. If you can't solder the wires together (because the power is out), you can just wrap the wires around each lead. If you do this, you should bend the leads of the regulator away from each other. This will help you avoid accidentally crossing the wires.
This simple regulator circuit is able to safely convert the base phone signal into something that can be used to charge your phone. However, many voltage regulators are not able to handle the AC signal that they would receive if the phone rang. So if you are worried that you might receive a call while your regulator is hooked up to the phone line , then you may wish to add a diode between the red wire from the phone line and the first pin on the voltage regulator. This will protect your circuit from problems that may be caused by reverse polarity.