A bicycle that can recharge itself while riding is called a regenerative pedal bike. Regenerative pedalling can help recover up to 5-10 percent of energy lost during braking.
Depending on the brand, an electric bike can work even when the power is off. It can have an extended range of about 10 miles by using rechargeable batteries.
Other types of e-bikes require the rider to pedal while recharging the battery. They can be expensive and need to be stored properly when they are not in use.
As a general rule, it’s best to charge your battery about once a week, or once every two weeks.
When you recharge your battery, you should turn off the bike. Lithium batteries don’t like to be left discharged. To prevent damage, make sure you charge it as soon as possible.