How can I generate electricity at home for free?

You could take out an off-grid solar panel, or buy a solar panel with PV capacity (say, 4 kW) at an off-grid power store in your area, and then plug a battery pack into your phone. The power pack, which will charge your phone every 2-3 hours on a sun-powered solar panel for 12 hours at a time, will provide you with the electricity for free, so you can make and sell some extra money. (It will take a bit of work to wire up, unless you are familiar with how to wire it up, so we recommend that you get some experience first.)
17.1 Equilibrium and Gibbs free energy (HL) - YouTube

If you want to be technically perfect, you could also be interested in the 3rd option (this one is technically available for purchase), if you are very ambitious and want to be able to charge your phone at home. For more detail on how this is achieved in this video from a recent TEDx talk in London, (in English), click: (if you speak an other language it may sound a bit tricky so it might be easier to translate this video with a dictionary)

How does battery storage work?

Batteries work by storing energy from solar panel power, solar power that is collected by a battery module and returned to solar panels in the form of charge (voltage) and current (voltage). If you plug a large quantity of electricity into a battery, the electrons get drawn from the battery in very small amounts to deliver electricity to your smartphone. For example, by charging a solar panel 10 times, the battery will produce enough power to power a smartphone (say 4 kW) for almost 12 hours (12.5 hours on a 1.7kW solar panel with solar power collected).

In order to charge and discharge it, you need a “power source”. If you have a battery pack, a battery, or even a battery with solar power you can use it either as a “base station” where it is kept for a few hours and then used to charge and charge the battery (using that battery as a “charge controller”), or the battery can be used as storage for electricity (using it to draw electricity to power your smartphone).

As it has been stated in all of the previous video presentations, charging and discharging can be done with the help of a “power source”. You could also have a power source with you