PWM - Arduino Lithium Ion Battery Charging Circuit - Ideas / Modifications?

I’ve got a large assortment of 3.7v lithium batteries in all shapes and sizes laying around so I decided to have an attempt at a rudimentary battery charger circuit yesterday using the arduino to make a smart charger. A quick search yields a myriad of overly complicated behemoth circuits, all using additional hardware that I don’t have handy. I want to keep it as simple as possible without ordering any specialty IC’s. Let’s have the arduino do all the work.

So this is what I came up with. I’ve thrown it all on a breadboard and it seems to work as expected. The arduino is precisely monitoring/controlling the charge current with PWM by measuring the voltage across the .47ohm resistor which I’m using as a shunt. It’s also monitoring the state of battery charge/level by intermittently pausing the charge current every few minutes and sampling the battery voltage. Its maxing out at about 750mA charge current (I want 1A), but I think this is primarily due to the resistance in the breadboard connections. It’s tough to squeeze out 1A with only a 1v potential difference (5v - 4v = 1v potential), any slight resistance derived from inadequate contact connections contributes to a large current loss. P = V2/R - this rule becomes quite noticeable when in need of high current and low voltage potential.

Anyways, everything runs cool as a cucumber on the breadboard while charging, the transistors and battery are cool to the touch, no noticeable heat. But before I go soldering this up on a circuit board I’d like to get some input from this forum. Any suggestions or changes to the components I’m using? Different approaches? Additional components I should add or switch out?

Please let me know what you think. The schematic is attached below…

Hi, How did you get on with this idea? This is something I'd like to try but my programming skills are not that good, if possible could you post some or all the code.