Battery charging/discharging/protection and voltage conversion for 3.3v and 5v logic can be tricky.
Generally speaking the circuit is broken down as following:
. +-----> Buck boost -> 3.3v consumer
|
USB -> Charging circuit -> Bypass -> Step-up -> 5V consumer
|
Protection
|
Actual cell
Each compoenent here has certain purpose:
In many cases consumer can be connected without voltage regulation:
From Aliexpress you can also find some suitable boards with IC-s of unknown origin, eg this 5V 2.1A board
Note that we are using step down conversion because linear regulation is not power efficient. In case of linear regulation the voltage drop over the regluator is dissipated as heat. Basically if the device is not making use of any inductors it's linear regulator for sure. If you don't care about the power loss, you can make use of AMS1117, it has multiple versions with different fixed voltage outputs including 2.5V, 3V, 5V etc. Note that 1117-s are manufactured by different vendors and some of them haven't bothered to include short circuit protection. Accidental short-circuit of the outputs will cause the input voltage to be passed down to the output pin. The voltage drop over 1117 regulator is usually more than 1V, which means that rather empty LiPo at 3V will result probably less than 2V on the output. In that case you could look for low dropout regulators (LDO-s), in which case the voltage drop is shaved down to couple hundred millivolts.