Direct current is produced by electrochemical and photovoltaic cells and batteries. In contrast, the electricity available from utility mains in most countries is AC (alternating current). Utility AC can be converted to DC by means of a power supply consisting of a transformer, a rectifier (which prevents the flow of current from reversing), and a filter (which eliminates current pulsations in the output of the rectifier).