How to charge 4 NiMh AA batteries with solar cell
Solar panel are current source rather than a voltage source.

This means, if you connect your solar panel to your battery, the solar panel will be forced to operate at whatever voltage your batteries are at.

To be more efficient, you should use a MPPT controller, but if you don't need a whole bunch of power you can just directly connect them.

What is more complex is on the battery side, as it needs some precise charging control, especially NiMh. If you use these batteries, you will need some complex circuitry.

However, if you can swap the batteries for more tolerant ones. If space and weight is not an issue, a Lead Acid battery would be the easiest to charge, otherwise a Li-Ion battery would also work. 

Here is a very simple schematic that you can hack together to charge lead acid or li-ion batteries by having a voltage cut-off, we consider the panel is small and that the current doesn't need to be limited.

You can limit the panel current output by shadowing it using some tape if needed.

It would be better to use opamp and correct circuitry but I consider given your application that you need something simple to build.







simulate this circuit &ndash; Schematic created using CircuitLab

Basically when the voltage on the battery reach a certain level, Q4 will conduct and short the panel to the ground, stopping charging the battery. You can adjust the desired voltage with R2. The Schtocky diode is there to prevent discharing the battery during night. Perhaos R2 can be significantly increased to reduce leakage current.