I read about li-ion battery charging and it requires monitoring for the voltage and current, How does those extremely cheap phone chargers do that? Or Is it just an adapter and the charging circuitry are embeded into the phone?
The device (phone, etc.) has the special charging circuit built-in. And the battery pack typically has a special circuit inside to prevent excessive discharge (or charging). Li-ion battery cells are inherently unstable/dangerous and require special circuits somewhere (often built into the battery pack) to make them safe to use.
The key to how it is possible to have cheap phone chargers made, is a combination of economies of scale, and cutting corners. Cheap chargers (and some expensive chargers) will generally work but the compromises made to reduce costs are generally at the cost of safety, particularity in poor isolation between mains power & the regulated output (ever had a bit of a tingle while touching charging devices?). They will generally also offer a shorter lifespan due to running components much closer to their maximums.
However these cheap phone chargers, simplify provide a constant voltage supply (at 5V to the device being charged) it is then the devices responsibility to regulate the current and control the cut off point. In general phones are a more expensive and better engineered device but faults do still occur.
Chips that handle common, simple logic cost pretty much the cost of the materials. There are few things more common than charging logic, so any logic circuits you use cost mere cents.
Of course phones charge through USB, which in this case is
nothing little more than a glorified 5 Volt DC wall socket. That means any charging logic has to be on the device side. But even standalone battery chargers are dirt cheap to manufacture. (I'm not endorsing that specific product, all I know is it's a standalone battery charger and it's dirt cheap).
So everything is true:
- Charging logic is in the phone.
- Protection logic is in the battery.
- Battery chargers are dirt cheap to manufacture.