A direct-current (DC) generator is a rotating machine that supplies an electrical output with unidirectional voltage and current. The basic principles of operation are the same as those for synchronous generators. Voltage is induced in coils by the rate of change of the magnetic field through the coils as the machine rotates. This induced voltage is inherently alternating in form since the coil flux increases and then decreases, with a zero average value.

The field is produced by direct current in field coils or by permanent magnets on the stator. The output, or armature, windings are placed in slots in the cylindrical iron rotor. A simplified machine with only one rotor coil is shown in Figure 6. The rotor is fitted with a mechanical rotating switch, or commutator, that connects the rotor coil to the stationary output terminals through carbon brushes. This commutator reverses the connections at the two instants in each rotation when the rate of change of flux in the coil is zero—i.e., when the enclosed flux is maximum (positive) or minimum (negative). The output voltage is then unidirectional but is pulsating for the simple case of one rotor coil. In practical 2-pole machines, the rotor contains many coils symmetrically arranged in slots around the periphery and all connected in series. Each coil is connected to a segment on a multi-bar commutator. In this way, the output voltage consists of the sum of the induced voltages in a number of individual coils displaced around half the periphery. The magnitude of the output voltage is then approximately constant, containing only a small ripple. The voltage magnitude is proportional to the rotor speed and the magnetic flux. Control of output voltage is normally provided by control of the direct current in the field.

For convenience in design, direct-current generators are usually constructed with four to eight field poles, partly to shorten the end connections on the rotor coils and partly to reduce the amount of magnetic iron needed in the stator. The number of stationary brushes bearing on the rotating commutator is usually equal to the number of poles but may be only two in some designs.

The field current for the generator may be obtained from an external source, such as a battery or a rectifier, as shown in Figure 7A. In this case, the generator is classed as separately excited. Alternatively, it may be noted that the output of the DC generator is unidirectional and therefore may be used as a source to supply its own field current, as shown in Figure 7B. In this case, the generator is referred to as shunt-excited. It has the advantage of requiring no independent electrical supply. Residual magnetic flux in the iron poles produces a small generated voltage as the machine is brought up to speed. This causes a field current that increases the flux and in turn the generated voltage. The voltage builds up until saturation in the iron limits the voltage produced. The stable value of generated voltage can be adjusted over a limited range by adjusting the value of a resistor placed in series with the field coil.

Direct-current generators were widely used prior to the availability of economical rectifier systems supplied by alternators. For example, they were commonly employed for charging batteries and for electrolytic systems. In some applications, the direct-current generator retains an advantage over the alternator-rectifier in that it can operate as a motor as well, reversing the direction of power flow. An alternator, by contrast, must be fitted with a more complex rectifier-inverter system to accomplish power reversal.