Hi,
Google "programmable current source". Should do what you want.