I'd like to place two NiMh batteries in series to drive a string of single LEDs. I can charge them simply at C/20 or so and the output will be intermittant so the batteries will never reach half charge. However, this will be in a permanent fixture, soldered to a pcb. I worry that variation between the batteries, including internal leakage, could eventually (over a year or so) cause them to have significantly different charge. Is this a problem? Is there a simple circuit to eliminate this? Could high value resistors (10 meg?) in parallel with each battery help? Any suggestions?
NiMH has pretty high self-discharge. Read: the internal isolation is probably much lower than 10 MΩ. So those won't do anything.
I don't see any problems with NiMH cells in series – and the experience that all over the world, billions of battery packs are NiMH and NiCd series seems to indicate it's not a problem, too.
Notice that for battery applications, you'd design your LED system to be as energy-efficient as possible. Thus, you'd very much avoid having a voltage source higher than the forward voltage of the LEDs just to have a voltage to drop across series resistors – these really are nothing but wasters of energy.
Thus, you'd usually use a switch-mode current supply, which you can even buy as dedicated LED driver ICs – it's pretty common to e.g. find controllers that can take lower voltages and step them up for usage as smartphone flash drivers.
But basically, any LED driver really is just a switch-mode power supply in constant current mode. It's not really hard to build one that e.g. steps up 1.2V (a single NiMH cell) to something between 1.8 and 3V at a constant 30 mA to drive an LED with constantly the optimal current. Of course, you can also aim for higher voltage ranges, but usually, that implies that size goes up or efficiency goes down.
By the way, whether NiMH is the optimal battery chemistry choice is debatable: You usually use NiMH for high-current devices these days. For low current things, LiIon is commonly used – due to smaller size, lower self-discharge and also, often due to their higher voltage (something around 3.7 V, typically), which allows simple step-down converters for many applications. Charging is of course a bit more complicated, but that can usually be tackled by dedicated charging ICs or modules.
NiMH batteries are balanced simply by giving them a full charge. With cells in series they are all charged at the same current, so cells that need less charge must be overcharged to ensure that the other cells also receive a full charge. All you have to do is charge the battery long enough to top up every cell no matter how much charge it has left. This can be guaranteed by charging the battery to its rated capacity.
The only potential problem is that once a cell gets to full charge it has to dissipate the extra energy because it can't store it. If the charge rate is too high then it could be damaged by overheating. However at C/20 the temperature rise is low, so it is quite safe to charge for 20 hours even if some cells are already partially charged.
If you know that the battery will never be drained below 50% then you can charge for 10 hours, or even less if you know that less was taken out. However you should occasionally give it a 'balance charge' to full rated capacity, to make up for different leakage rates between cells.
Standard NimH cells have fairly high self discharge and can easily go out of balance over just a few weeks, but LSD (Low Self Discharge) cells such the Panasonic Eneloop are much better. The latest generation retain 90% charge after 1 year.