- Is there a way to charge a battery while still in the camera?
Yes, it's definitely doable. It carries some risk but it's something I'd happily do if required.
[My day job is an EE with much involvement with batteries and charging - having somebody who knows their stuff help on this would be "a good idea"[tm]
Some cameras have DC input for a remote power pack - this may also provide in-camera charging BUT probably doesn't.
If the camera uses a standard Lithium Ion battery (as the Canon 1000D and just about every modern DLSR does) then it IS possible to charge the battery in camera "safely enough" if you can access the battery contacts.There are some safety issues but these may well be acceptable to you.
Gaining access to the contacts can be done by trepanning* (probably not desirable) or by running wires from the in camera contacts or by adding wires to the battery before it is inserted, If you use the same battery each time to do this then modifying the battery is probably the best solution.
The battery MAY have enough room for wires to be run along its outer surface, or copper tape with insulation as requisite, may be feasible. However, the easiest method would be to open the battery and add wires and connections and then bring the wires out of the battery at the best point.
If you are lucky you may be able to bring the wires out around the edge of the battery door without modification. A quick test with a Sony A77 shows it will work well, and a look at a Nikon D700 suggests its doable. I imagine it would work in most but not all cases. However, making a tidy hole on the edge of the battery door at an optimum point would be easy and acceptable to some but not all. Replacement doors probably only cost an arm and half a leg.
A standard charger COULD be used but a modified one would be a far better idea. Having some EE capability or asking someone who has would be a good idea. Having a "4 wire" battery connection for the 2 main wires would allow remote sensing of the voltage so that wiring drop (liable to be small) can be eliminated. Most batteries have 3 connections, with the 3rd used to access an internal thermistor temperature sensor and/or in other cases to talk to an internal intelligent device which assists battery management and allows them to charge more for batteries.
I'd be tempted to drop the maximum charge rate somewhat, and I'd want to take a good look at battery temperature rise and cooling aspects. If you are accessing the battery via the battery door the very enthused may wish to add a cooling air line. This would be an extremely easy thing to do, need not take up much room and may be worthwhile.
For extra points it may be psosible to detect when the battery is in use by the camera and be able to provide enough current to operate it fully or partially from the external supply. You do need to know when the camera is drawing current as it will draw several times the max permissible battery charge current in many cases - and you do not want the N times current going into the battery.
"Vent with flame" is a know LiIon party trick and charging in-camera has the possibility of increasing this happening. That said, I have had a long and varied EE career and have never yet seen a LiIon battery incident or know anyone who has had one.
an alternative to the in-camera charging as above is to remove the battery from teh camera and to use an external battery near or just outside the camera proper. Your circumstances are unknown, but in most cases I'd expect your system to be stationary or tethered if your are doing external charging, so an external battery would probably be very acceptable. Again, having a competent EE as part of the project would be 'a good idea' [tm].
More or much more on request ...
- Do you think there will be a problem having the camera turned on for a long time (more than months) but taking 10-20 photos a day?
I'd expect the camera would be OK in the N per day x Many Months mode.
Depending on the latency that you can afford (and assuming that you have standby powerdown and wakeup on shutter half-pressure (as many DSLRs have))you may wish to let the camera go into standby then letting the camera go into standby after a while and waking it up with a half pressure activation prior to taking each shot is liable to cause less problems. Depending on the camera, wakeup from standby takes say 0.2s to several seconds. You could detect that it is awake by eg current draw or just wait a known long enough period for it to wake up.
Leaving it on all the time and not in standby may be OK but this is less usual and may affect life of displays or sensors - and may not. I'd expect it would be OK for most displays and hope it would be OK for most sensors. Most other electronic components will be happy enough. Modern DSLRs probably do not use aluminum electrolytic capacitors so their dry-out lifetime issues should not apply.
If I was doing this and wanted best battery lifetime I'd modify the charger so that it stopped charging completely when the battery reached say 4.1V/cell and cut back in again at say 4.0V/cell. This hold the battery at the "knee" between constant current charging (70% to 80% of capacity) and the constant voltage, declining current tail that adds maybe 20% more capacity. A battery has substantially longer life if operated in this way.