Every now and then I get to fly two DH82a Tiger Moth that are retro fitted with batteries and alternators to provide power for the radio and transponder as this type originally was not fitted with any electronic systems -- along a few other things e.g. brakes, tailwheel, flaps, a reasonably-sized windscreen, adjustable seats, some useful avionics and of course cabin heater or air conditioning.
The aeroplane's electronics are driven by the battery which usually gives us 5-6 hours of operation time I guess, however, with the installed alternator -- given they are not broken, the batteries get recharged mid-flight and once in a while on the ground using battery chargers too -- batteries should be detached in order to be charged on the ground.
The alternator is basically a small windmill turbine located under the belly of the aeroplane and between the undercarriage. I believe the alternate doesn't start properly recharging the batteries until you have a good healthy airspeed, although it windmills after the engine starts. You can see it actually in this photo of one of our two Tiger Moth:

Also these aeroplanes don't have any USB outlets, so we usually recommend the pilot and passenger to fully charge their mobile devices before each flight, specially if it is a long-haul flight.