The design is completely analogue so no programming is needed. Very few parts are also needed.
The characteristics of the circuit that I've observed are as follows:
-The circuit has 4 connections externally: input VCC, input GND, output VCC and output GND. The output is the total voltage of all the batteries in parallel. when voltage is applied through the vcc and gnd input, the circuit will switch to parallel - the output will also become the voltage of 1 cell - and all the batteries will be charged in parallel.
Before I go on, here is a list of pros and cons that influence the ability of the circuit:
-The circuit only needs voltage greater than the value of 1 cell to charge all the batteries
-The circuit can be designed to be linked together, allowing you to amp up the voltage however high(as long as the parts can handle it. this means for example, you can use a bunch of 1.5v batteries and make maybe 20 volts while still charging them at about 3 volts to fully charge the batteries - I haven't tried this though and it'd probably charge pretty slow. And DISCLAIMER: if it does work out for you and you do decide to amp it up too high, (and maybe for some reason lick it...) I am not responsible for any damages or injuries set upon yourself. )
-All the batteries must be the same as they will be charged in parallel.
-The resistor used (will be later explained) needs to be rated at higher-than-usual wattage as well as the transistor to withstand higher power demand
-The charger may get somewhat hot as the design of the circuit bridges the power supply with the resistor.
-The circuit can only either be used or charged at a given time, as it is switching between parallel and series and the output would be equal to the voltage of 1 cell as preforming both parallel and series would cause a shortage in the charging connections.
-there are 4 connections total, which could cause problems in certain projects (typically those that need a common gnd).
If after reading the pros and cons you still feel that this is beneficial to whatever you're doing, lets get to the build!
-Diodes. (5 for the circuit with 2 cells connected)
-1 high current transistor if the purpose of the circuit is high current.(2n2222 has a decent amperage rating)(both NPN or PNP would work but I will only be showing the NPN version)
-1 high-wattage 1-2K ohm resistor. (Higher the wattage the better!)
Step 1: Breadboarding
-As earlier mentioned, the resistor was recommended to have higher than typical rating. This is because the resistors purpose was to feed power to the base of the transistor. Another key thing to note about the resistor is that it is indeed a bridge between the power supply. So if the power gets hot while you charge the batteries with an adapter, that's why.
Step 2: Testing It
Step 3: Assembling Multiple Circuits to Amplify Total Voltage
If you're able to find a better method around this flaw, please notify me!
B2 is the connection that powers the transistor. V and V- are the charging connections. As noted below, the diodes are only put at the end of the circuits put together: For example, if I were to add another circuit to the top, the diode would be removed from that current circuit and placed on the third circuits connection.
The images of the circuit show 3 batteries assembled to make an output voltage of near 4.5volts using 2 circuits.