Here are two very easy current sources (well, one current sink, one current source) which can be realized with very few components. As example I used a transistor, two diodes, two resistors and a switch each:

left: High-Side current sink
right: Low-Side current source

Both current sources (i know, one is a current sink, but nevermind…) also have pins at which you can connect other components such as diodes, LEDs, etc.. This is useful if you are building a diode tester. Pass a fixed current through the diode and measure the voltage e.g. with an ADC.

These current sources are working with the exact same principle and can be programmed to either 3mA or 15mA (more or less). Both are just obeying Kirchhoffs Law:

2* Ud = Ube + Ur

The Diodes with 0,7V forward voltage each produce a voltage drop of 1,4V. The base-emitter-diode uses 0,7V of it wich leaves 0,7V left for the resitor. A constant voltage with a constant resistor value equals a constant current flowing. If we apply Ohms Law to the resistor values of the example (47 Ohms and 240 Ohms), we get this:

0.7V / 47Ohm = 14.894mA
0.7V / 240Ohm = 2.917mA

But please keep in mind that these current sources are having a bad temperature characteristik, so check the datasheet of the transistor you use (Ube is not stable at temperature changes). You can sort of counter this effect by using heatsinks and copper planes on the pcb. For each current source, the transistor is dissipating the most power (typically). For example:

Current: 15mA
Supply voltage: 12V
Voltage drop at test leads: 2,3V
Voltage drop at transistor (Uce) = 12V – 2.3V – 0.7V = 9V
Power dissipation of transistor = 9V * 15mA = 135mW

Yes, it doesn’t sound much, but for SMD parts (e.g. SOT-23) this could already be too much. The TO-92-packages can bear it, but they will get warm or hot and thus change the current according to their temperature characteristik.