The question is: how would I modify the below circuit to make it work with an 18650 3.7V 2500mah battery which I want to charge at 1C during constant current phase? Note, 1C should be fine as datasheet says battery can be charged in rapid-charge mode with 4A, 4.2V.
I want to build a battery charging circuit with an Arduino Uno, IRF510 mosfet, temperature sensor, and some resistors, based on this article. The original setup is to charge a AA battery. Here is the design, the battery goes between 5V and analog pin 1 reader:
The cool thing is you can use the Arduino to measure current by measuring the voltage on both sides of a resistor (R2 in the schematic). Depending on the battery voltage, you then adjust the current up to some maximum.However, I want to charge an 18650 battery, which should be charged to 4.2V, not 1.6V. The problem is the resistor would drop the voltage from 5v to below 4.2V, so it won't be able to charge the battery. Does it make sense to add a step up voltage regulator somewhere in the circuit to circumvent the issue?
What should I add to the circuit to make this work? Sorry, I'm an electrical noob. Note, in terms of safety, I will follow the multi-phase charging profile as specified by the battery manufacturer (i.e. trickle, pre-charge, constant current, constant voltage, cutoff at max time or min current or max temperature).