I want to build a solar powered charger for a niMh battery pack to run a microcontroller. What are the fundamentals of building a smart circuit that will not overcharge the battery and will also allow current to be pulled directly from the panel
In most cases with a small panel and a NimH battery the peak charge rate is below 1C and the supply varies with insolation (sunshine level). In addition, if the battery is near the panel the battery temperature varies with insolation. All these factors make most usual NimH charge termination algorithms and methods inapplicable.
In such cases a very reasonable charging strategy is to terminate charge at 1.45V per cell.
This can be adjusted for temperature. In my designs I also add charge current sensing and adjust the threshold down if the cell is still accepting large charge currents when almost charged. This helps compensate for a degree of variability between cells. Cells of different models and different manufacturers are usually reasonably consistent with the 1.45 / cell setting but some are fully charged at as little as 1.35V/cell.
If the cell output is wanted for other purposes when not needed for charging then charge control can use a series regulator or on/off series switch. If the battery is the only load then a shunt regulator to dissipate excess power can be