Power Supplies
All circuits need a power supply to function. Electronic components (and therefore circuits built with them) work on Direct Current (DC) and generally have a voltage requirement of between 3 and 12 volts with a maximum current of about 2 Amperes.
You must check the voltage and current rating of each component that you use in the circuit. If you use a power supply that is lower than the component rating, then it may not function correctly. And if you use a higher supply than component rating, then it may get damaged.
DC power supplies can use AC electricity which is supplied to households as an energy source. Such power supplies will employ a transformer to convert the input voltage to a higher or lower AC voltage. A rectifier is used to convert the transformer output voltage to a varying DC voltage, which is passed through an electronic filter to convert it to an unregulated DC voltage. The filter removes most but not every AC voltage variation. The remaining AC voltage is known as ripple. The circuit load's tolerance of ripple dictates the minimum amount of filtering suspected to be provided by a power supply. In some applications, high ripple is tolerated and removes the need for filtering.
DC power supply can also be provided by batteries, but they discharge quickly for frequent replacement or recharging.
A switched-mode power supply (SMPS) is an electronic power supply that incorporates a switching regulator to convert electrical power efficiently. Like other power supplies, an SMPS transfers power from an AC source (often mains power) to DC loads, such as a personal computer, while converting voltage and current characteristics. These are expensive and not required for simple circuits but are useful unless you have expensive or sensitive circuits.