ha! i'm building a current-source for a power-LED with a max output of 1,4A and 5V supply-voltage at the moment
the idea was simple:
led on +, then a mosfet (1010N in my case) then a shunt (0,22 ohms) to ground
voltage across the shunt goes into the inverting input of an opamp (lm358) and the noninverting comes from a voltag-divider
all neatly distributed across my breadboard
boy was it a failure
when set to 0 the the led was lit
when set to max it didn't deliver the 1,4A
the values of the voltage-divider didn't fit the output
it even seemed that the opamp generated an offsetvoltage at its inputs
what were the problems:
breadboards don't like high currents!
under load ground of the opamp und ground of the shunt drifted apart (~0,1V)
so i soldered the high-current stuff on a separate board and kept the rest on the breadboard
the output of the opamp couldn't go low enough to switch the fet off
and it didn't go high enough to drive 1,4A through the fet
so i build up a voltage doubler and inverter powered by a single 555
now the opamp is sourced by -3V and +7V
finaly the damn thing does what it's supposed to do