How to buiild own 18650 charger without specialised ic?

I want to build my own 18650 charger without using any specialised IC at start I'm looking fo solutions to two problems:

  1. How to build PWM regulated currency source with regulation at least from 250mA to 3A

  2. How to build 4.20 - 4.25 voltage limiter

The first one is for CC (constant current) charging phase and the second is for CV (constant voltage) charging phase

Can any one help me with this two problems?

Since the Arduino does not have the capability to do either without external circuitry. It's going to be tough to find detailed circuit design information on a forum focused on programming (the Arduino).

I wish you luck, but don't think you will find it here directly.

Why re-invent something that already exists at a cost of just a few cents per unit?

I understand we're all here for learning and the best way of learning is doing but this idea seems doomed to blow up a few lithium cells and maybe anything else flammable nearby.

You need to start with measuring current and voltage. Voltage is easy. Just any analog input on the Arduino. Assuming you have a 5V Arduino then you don't need any more components. For current, you will need a shunt or hall effect sensor. You also need to understand the relationship between frequency and sample rate as the PWM will give pulses of power and the Arduino inputs only measure instantaneously, without any averaging over time.

Once you have tested your current measurement system, then you can start putting together the actual charger.

As others have quoted, one can buy 2 of these on Ebay for $1.00. Have all the necessary control built in and indicators for charging/ full charge. Can be run from the usb socket or one van add external feed from a 5v source. Provision also for any load circuitry.

https://www.ebay.com.au/itm/Lots-2PCS-5V-Micro-USB-1A-18650-Lithium-Battery-Charging-Board-Charger-Module/352079934996?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

I have few chargers based on TP4056 but I'm not happy how it works. This chargers offten turn off to early, cell doesn't have 4.2V when the same cell after full load on other charger have 4.22V, with the "other" charger I also have problem but in diffrent situation, its mean when cell is not in 100% condition and it never get up tu 4.2V but max for it is eg. 4.1V then this charger never stop charge it. If I build my own charger then I can do my own logic for charge.

I don't worry too much of cell blow, flame etc. I work with hundreds 18650 cell and I know how to deal with it.

I already build my own discharger and after discharge more than 100 18650 cell I can tell that it works perfect for me that's why I want to try build my own charger.

From what I have read the TP4056 is the old stand by. One add-on board maker is using the MCP73831. Have you looked into that chip or for any other chips? There must be more than one out there.

MorganS is correct and what he mentions are the easy parts. The more difficult part is getting the 250mA to 3A current from an Arduino pin. Ain't going to happen. Which means you need some serious external circuitry, which is not the bread and butter of this site. There are electronic circuit forums which is more likely where you will be able to get your answers.