The DC motor is a ready-made generator that will generate electricity. All that you have to do is turn the axle of the generator using an outside source of energy such as water, wind, or a bicycle. The problem is that many people don't know how to regulate the power that comes out of the battery into a usable source of energy.
Hook up the face of the generator (DC motor) onto a power source that will turn it. The power source could be a water wheel or a pair of blades that spins in the wind.
Make a motor current usable and turn the chaotic flow of a generator into a usable form. Let the flow of electricity from the generator charge the batteries and then to let the batteries run the devices to which they are attached.
Hook up a car's rectifier from an alternator to make sure that the current generated by the motor does not change direction and use up the power to make the motor to spin. This rectifier needs to be hooked up between the battery and the generator so that the current travels in one direction (towards charging the battery).
Add a transformer to the circuit after the batteries. Select a transformer so that the power you generate works with the items that you will plug in. Base the transformer selection on the input and output voltages to make the battery current into a voltage that is compatible with your appliance/equipment. Look at the combined voltage of the batteries. If there are four 12 volt batteries, select the input as 48 volts, for example. Select the output of the transformer based on the voltage needs of the appliance(s) that you will run. Many items used in cars are able to run off of a single 12 volt current. The output voltage would then be 12 volts. The transformer would be a 48 volt input with a 12 volt output.