There is also another issue, many devices work good with alkaline batteries (nominal 1.50V / cell) but have faded display or a weak life with Ni-MH and Ni-Cd batteries (nominal 1.25V / cell) even if just charged.
For this reason is good to adapt your device to be connected to a wall power supply. Wall wart chargers for cellphones can be bought at every electronic fair for a pair bucks, and you probably already have some of them unused at home. Any wall wart from 4.5 to about 30V DC output will be good for this project.
So, let's see how to convert your batteries compartment to receive that wall-wart's plug.
Step 1: Components and Tools
The main component is a tiny voltage regulator, the L78L33 in my case, but you can buy one with an output voltage from 3.3 to 24V, to match voltage of your device. This regulator can deliver a current of 100mA, this means that it's suitable for devices which usually drain the batteries (let's say 2400 mA) in not less than one day, so I think all the clocks, alarms, wireless devices, etc.
If this won't work, you can use a powerful voltage subbply as the LM78XX serie (up to 1000 mAh).
Refers to the attached data sheets for pins layout.
Then we need two ceramic capacitors. You can buy them or find on some dismantled electronic stuff. The values of 100nF and 330nF are not mandatory and any similar value is good enough.
Furthermore these two capacitors improve the circuit safety and functionality, but they're not essential, so you can decide to avoid adding one of them or both.
Last component is a female socket suitable for my wall wart plug. Mine is a 2.1mm x 2.5mm power plug, but if you want to use an old Nokia cellphone's charger (for example) it's smaller, 1.3mm x 3.5mm if I'm not wrong. You can find any type of these sockets on eBay.
Step 2: Set Up for Connections
I prefer to use single-core wires since they're handy to insert behind batteries metal connections.
Step 3: Begin Twisting
In second step add the TO-92 packaged regulator, so that the 100nF is on the Vout side (pin1). Notice that the schematic in picture (on the datasheet) shows bottom view.
Then twist this central pin to capacitors' twisted legs.
Last step is to twist remaining capacitors' pins to regulator's external legs.
Step 4: Add Wires
Now you can inspect the DC-IN plug to see which is the central contact pin, which coincide with positive connection of the wall wart. Although this is true for 98% of wall warts, it's better you check on the psu label the connection schematic.
The regulator's leg on the 330nF side goes twisted on this pin (input +) and the central leg goes to one of the remain pins (ground).
Step 5: Drill Hole
So let's drill an hole with the proper diameter in center of the cover. My female socket has 8mm external diameter.
Insert the socket and screw it up.
Step 6: Close It
I noticed that you can easily push a wire end behind the metal connectors, so that they keep it firm. In this way you have no need to solder anything and you can replace the batteries whenever you wish.
Close the cover and insert the power plug.
Step 7: Partially Cloudy on a Bright Display!
If you want to check the voltage out of the circuit you can use a multimeter. As you see the voltage is pretty precise very near to 3.3V).
Step 8: Do You Want to Solder?
Following this tutorial you should be able to remove batteries from any your electrical device which has no power plug socket yet, so let me know if it worked!