# Alternating Current (AC) vs. Direct Current (DC)

## Direct Current (DC)

Direct current is a bit easier to understand than alternating current. Rather than oscillating back and forth, DC provides a constant voltage or current.

### Generating DC

DC can be generated in a number of ways:

- An AC generator equipped with a device called a “commutator” can produce direct current
- Use of a device called a “rectifier” that converts AC to DC
- Batteries provide DC, which is generated from a chemical reaction inside of the battery

Using our water analogy again, DC is similar to a tank of water with a hose at the end.

The tank can only push water one way: out the hose. Similar to our DC-producing battery, once the tank is empty, water no longer flows through the pipes.

### Describing DC

DC is defined as the “unidirectional” flow of current; current only flows in one direction. Voltage and current can vary over time so long as the direction of flow does not change. To simplify things, we will assume that voltage is a constant. For example, we assume that a AA battery provides 1.5V, which can be described in mathematical terms as:

If we plot this over time, we see a constant voltage:

What does this mean? It means that we can count on most DC sources to provide a constant voltage over time. In reality, a battery will slowly lose its charge, meaning that the voltage will drop as the battery is used. For most purposes, we can assume that the voltage is constant.

### Applications

Almost all electronics projects and parts for sale on SparkFun run on DC. Everything that runs off of a battery, plugs in to the wall with an AC adapter, or uses a USB cable for power relies on DC. Examples of DC electronics include:

- Cell phones
- The LilyPad-based D&D Dice Gauntlet
- Flat-screen TVs (AC goes into the TV, which is converted to DC)
- Flashlights
- Hybrid and electric vehicles