A ballast regulates the flow of power to the lamp, which provides a constant voltage and frequency to the lamp. The ballast usually includes circuitry for sensing lamp current and voltage and for turning the lamp on and off to minimize energy waste. The ballast may also include circuitry for dimming the lamp by varying the frequency or phase of the alternating current.