# how do i create a current source

I have a problem designing a current source. Basicalyy I need to drive this I->P converter which needs a 4-20mA input. If I understand well the datasheet the resistance inside the component is 500ohms max. Then I wanted to use this schema replacing the LED by my I->P converter:

Except that the input of the 741 would be a DAC output from my microcontroller.

In this schema the output current is I=Vin/R1 (I would choose R1 with the good value) and then I could drive the current as I want from the DAC. But I think the problem is that at 20mA the voltage around my I->P converter would be V=500*0.02=10V and so Vout would have to be 15Volt which is not possible I think.

Am i right? If yes is there another simpler way to drive my component?

I don't really see the problem. Furthermore, your question is not clear. Your schematic has a R1 value of 330Ω, while the equation you discus has a R1 value of 500Ω

Anyways, the current/voltage ratio is determined by the value of R1.

Basically, you can size R1 so that any arbitrary voltage on the op-amp input gives you any arbitrary current.

Effectively, the voltage at the negative summing node (e.g. pin 2) of the op-amp will always match the voltage at the positive summing node (e.g. pin 3). (Except when the op-amp is clipping)

As such, if you want a 5V input to result in 20 mA through your load, you simply need to do the math: $R1Ω = \frac{5V}{0.020A}$ or R1 = 250Ω.

However, the output swing of the op-amp will need to be the drop over R1, plus the drop in your I->P converter.
The I->V converter in your device uses a 250Ω resistor across the input to measure the 4-20 mA control signal. As such, at 20 mA, you will have 5V of drop in the device.

So basically, with a 0-5V control input, and the device you have, you would need an op-amp able to swing 0-10V.

However, you also need to account for the fact that there are very few op-amps that can drive a load of 20 mA anywhere near their rails (or even at all. The 741 may barely be able to drive 20 mA loads, but I doubt it'll do it anywhere close to the rails).

Basically, if you have a 12V power rail, and a good, high-current rail-rail op-amp, it should work as drawn.

You do know that the electronic pressure regulator you link to in your question seems to have a plain-old 0-10V voltage input option, rather then a 4-20 mA current input option, right? Why not just use that.

• I was thinking about the 4-20mA current input option because I will have a 30cm cable between my board and the converter. So I though it may cause some problems to drive it with voltage. But when I think of it 30cm isn't so long and the resistance of the cbale will be really small so you may be right – damien Oct 29 '12 at 10:42
• 30cm isn't long at all; people tend to worry about noise injection with cable that's tens of meters in length as a general minimum. If you have a particularly noisy environment you would become more concerned earlier on. – akohlsmith Oct 29 '12 at 11:08