I very seldom disagree with Olin technically. In this case there may be special circumstances which make part of his advice correct in general but specifically wrong in this case.
As he notes, first it is necessary to establish the voltage across the battery to ensure it is in fact a single cell and not a number in series. As you say that the razor operates OK on the new battery then it is extremely likely that the old one is also a single cell.
15 VDC at 420 mA sounds just plain wrong. The voltage is high by a factor of about ten times, so maybe it's 1.5V.
For a 2300 mAh cell the 420 mA would be C/(2300/420) ~= C/5.
This is an OK charging rate BUT if the charging is not COMPLETELY terminated when the cell is charged the cell will "cook" in short order.
For capacities up to 1500 mAh, maybe 1800 mAh NimH calls had special arrangements (chemicals and structures) which allowed recomination of Hydrogen when "gassing" occurred when a cell was left on charge when fully charged. This allowed manufcxaturers to specify a trickle-charge rate of say C/10 (230 mA for a 2300 mAh cell). At or below this rate the cell could be left on charge indefinitely with little or no damage. HOWEVER as the typical battery capacity arms-race occurred and capacities were pushed up to 2100 2300 many_lies 2500 2600 all_lies ... mAh the manufacturers looked for more space to fit active material into. Something had to go, and it was the gas recombination mechanism. Modern NimH cells above about 2000 mAh from reputable manufacturers have data sheet advice of the form:
- Do not trickle charge at all! or
Trickle charge at no more than C/20 or whatever for some_very_small_period or
Can be trickle charged at <= C/100 on a good day downhill with the wind behind you.
Any battery manufacturer whose data sheet says ... 2500 mAh ... trickle charge at <= C/10 can be safely shunned as a source of supply for all future time.
SO when Olin says " ... In that case, the highest capacity battery is best since it will be abused less at the same current." - this is good advice in the general case BUT not so when using NimH where the charger is badly behaved. In such cases use of an older style 1500 mAh cell would probably [tm] give a much longer life.
However - IF the charger really is a true 1.5V charger and if this is tightly controlled (rather than edging upwards as load current drops, then it MAY be OK.
At say C/10 the terminal voltage of a NimH cell at room temperature at the end of charge will be ~= 1.45 V. 1.4 is safer and 1.5 is a bit high. Actual value varies slightly with manufacturer. Temperature much above 25C vary this voltage BUT also are best avoided. Higher charge rate lead to higher voltage st end of charge.
SO - measure charger output. If it is 1.5V and no more your battery may last OK. If it rises to > 1.5V at light loads you MAY be able to load it down with a suitable resistor. But using a 1500 mAh cell is probably wise.
Added:
The 1.46 Volts after 4 hours sounds very good. That's 420 x 4 = 1680 mAh BUT the 1.46 volts sounds like a fully charged cell so presumably the cell was partially or filly charged originally.
Try an overnight charge - if it's still at 1.46V they seem likely to have done a reasonable job of charge control.
If you are able to measure the battery current on charge at the end of an overnight charge you will be able to tell if it is trickle charging. This can be accomplished by eg a battery interceptor / continuity break insulator against the +ve battery terminal and add a conductor on either side and take wires out to an ammeter. OR locate the battery externally and bring out two wires to it via an ammeter.
Here's an example of a battery interceptor, From here
= http://www.instructables.com/id/Remote-Power-Control-For-Battery-Powered-Devices/
If you read the datasheet, it gives information on the typical and maximum current consumption for the IC. It also gives power down consumption and other details. I'd also check the other documentation (app notes, etc) to see if there is more information/advice on power characteristics.
On page 3 note 7, it says typical current consumption is below 100mA. 60mA is given as the typical consumption for the transmitter supply, digital and analog ~7mA each, and the pin supply up to 40mA. With this info you can get a pretty good idea of what capacity battery you need for 10 hours operation.
Assuming maximum consumption, and less than 100% efficiency (e.g. regulator used) we can do some calculations. We'll assume 80% efficiency and 100mA continuous draw:
100mA * 10h * (1/0.8) = 1250mAh
This is probably very, very conservative, but gives you a figure which will certainly be plenty. However the only way to get very accurate figures is to run some tests yourself, since consumption will depend on how many IO pins you are using, other circuit activity, regulator efficiency, temperature, etc, etc.
I would probably look at using a 3.7V Li-Ion cell, since it's a good voltage, they are conveniently sized and there are plenty of options around 1000mAh (eBay, Sparkfun, Digikey, etc) There are also cheap charging ICs available (Microchip do some good ones) Of course it's up to you, anything that provides the required capacity would work, but you have to consider what is most suitable for your project (size, weight, cost, etc)
Best Answer
After having watched this teardown of an electric fence controller and listening to this podcast which is an interview with a designer of electric fence controllers, I think I might have an answer.
The reasons why electric fence controllers mostly use 12 V lead-acid batteries as their power source are:
Li-Ion cells are nowhere near as robust as lead-acid batteries. They require much more delicate charging and handling. A charge controller/balancer is a must-have. A battery protection circuit is also a must-have.
I also think that the electric fence controller manufacturers are quite conservative, if there's no pressing reason to change then they prefer not to. If you watch the video and listen to the podcast I linked above you'll notice how safety and reliability is very important.