Dilshan Jayakody wrote a post on his blog about his 3W constant current LED driver:
This is quick post about 3W constant current LED driver which I was design to combine with some homemade furniture piece. The main components of this system is LM311 voltage comparator and IRF9640 P-Channel MOSFET.
This module is design to drive maximum of two 3W high power LEDs and it requires 8V – 10V DC (500mA) power source. In this given configuration this module may not need any heat-sink (for IRF9640) and consume maximum of 500mA of power.