I'm looking to design a current source (probably) based around an operational amplifier and transistor(s), which can source 0-500mA at 0-12v. This output current should be "set" by an input voltage of between 0 and 5v and remain constant. I presumed that you would have the load connected to the transistor, and between the load and ground is a resistor, which is used to get a voltage that relates to the current through the load. From here, I was thinking that it would be best to use a voltage divider with the input voltage (10:1) and feed this into the op-amp somehow, but I'm not sure as to how this would be set up.
I've tried a few simulations of "negative feedback" setups, but I can't seem to get the results I'm after. Can anyone offer any tips or suggestions? I found the following article to be useful, but can the example circuit be modified to cope with much higher currents?: Adjustable Current Sink | uC Hobby
The Wikipedia page for "Current source" also has another simple example, but again I tried it out in a simulator and it didn't seem to work. Am I doing something wrong?