Why are voltage and current control needed in switch-mode power supplies? Generally, voltage regulation is needed for most loads and the loop needs to be closed with the primary side controller so the output voltage can be regulated in an accurate way. Also, in many situations it would be advantageous to regulate output current as well, not just for overcurrent protection or power limiting, but in situations where the load current is the primary form of regulation. In cases where it is not necessary to regulate output current tightly and there is an over-current situation and the user wants to be able to control that, it can be done by sensing the current on the primary side, but that is not the most accurate method. It is better to control it on the secondary side for higher accuracy purposes. Also, regulating the current can be the main regulation loop in battery charging and LED driving power supply designs where voltage is regulated as well. In terms of constant voltage output power supplies that are normally used to power most types of electronics, it is possible to have the constant voltage loop be the dominant loop and then limit the current beyond the maximum load, not allowing the current to exceed a certain level. The reverse is true in battery chargers and LED power supplies that maintain a constant current for those loads in which case the goal is to not allow the voltage to go above a certain threshold. For example, in the case of an LED lamp load, normally one would regulate the current. However, if for any reason the circuit has an open circuit, the output voltage can not be allowed to exceed a specific high level. Additionally, in the case of a battery charger, once a certain voltage is reached, it is necessary to terminate the charging process and cut back on the current being driven into the battery. Control for both the precise voltage and current limits can be provided on the secondary side in the power supply. The user must decide whether it is current or voltage that is the primary or main regulation loop and then limit the other to a maximum level.