Current mirror

A current mirror is a device used in integrated circuits to regulate a current; to keep it constant regardless of loading.
Transistor Q1 is connected such that it has a constant current flowing through it; it actually behaves like a forward-biased diode, and the current is determined by the resistance R1. It is important to have Q1 in the circuit, instead of a regular diode, because the two transistors will be matched, and thus the two branches of the circuit will have similar characteristics. The second transistor Q2 changes its own resistance so that the total resistance in the second branch of the circuit is the same as the total resistance in the first branch, regardless of the load resistor, R2. Since the total resistance in each branch is the same, and they are connected to the same supply, VS+, the amount of current in each branch is the same.
The value of R1 can be varied to change the amount of current going through R2. Since R2 can change dynamically, and the current through it will stay the same, the current mirror is not only a current regulator, but also can be thought of as a constant current source, which is the way it is used in integrated circuits.