Designing current sources for driving LEDs.

For high power LEDs, it is very inefficient to use resistors to limit current. The resistor can end up dissipating more energy as heat than the LED does. So for a lot of the power LEDs out there, there are power supplies which are AC-to-DC power supplies whcih also limit current. My question is how does one go about designing a DC-to-DC (no voltage change) current source like this rather than buying off the shelf? For example, a white power LED might have a forward current of 30V and take up to 1.5A. Let's say you already have a power supply that can provide 30V and 5A. How do you design a circuit so that it limits current to 1.5A? At that point I would assume you could control brightness with a logic level MOSFET and the PWM capability of the Arduino. Does anyone have a good reference concerning designing such a current limiting circuit? Thank you.

If you already have a 30V supply you are in trouble since a linear current source will need
voltage headroom to operate.

The typical efficient solution is a DC-DC converter operating from a standard voltage
like 12V and producing a constant current output - ie a chip designed for this specific
purpose. Such current sources will have a maximum and minimum output voltage
given in the datasheet.

If you genuinely have a 30V constant voltage supply you will need a boost (or buck-boost)
DC-DC converter with constant voltage output. For such a small voltage ratio efficiency
can be very good.

In theory if you have a 30V supply with a voltage-trim input then that could be used to
give current-control feedback.