Adjustable Current Source

Thread Starter

vilson_garciaa

Joined May 6, 2018
8
I need to make an adjustable current source (4 to 20mA), but with electronic adjustment.

- One way is to use a programmable current source, but I do not know how to adjust the resistor electronically.

- The second form would be with PWM, and the signal generated would be through an Arduino. Using PWM, how would it be? I found some circuits Buck converter with MOSFET, however it does not work. Maybe I'm pretending wrong.


Could someone help me by telling me the best way to do it?
 

dl324

Joined Mar 30, 2015
16,943
Welcome to AAC!

They make digitally controlled pots, but I'd be inclined to go with a voltage controlled current source.

If you describe what you mean by electronic adjustment, we can offer better suggestions.
 

danadak

Joined Mar 10, 2018
4,057
Something like this -



Vin could be replaced by a PWM generated V source (with RC LPF),
or a R divider switched by UP open drain outputs or a DAC. Note this
is a floating load. A similar one for grounded load -

upload_2018-5-6_21-16-35.png

You have a UP in mind ?

Regards, Dana.
 

-live wire-

Joined Dec 22, 2017
959
Hi Vilson Garcia,

Here is what you can do if you need something quick and do not care about it being too efficient. Just create a PWM and filter it. This gives you a variable buck converter, essentially. Add feedback resistors to the output to make sure that the voltage is what you want. You can use a common, cheap IC that integrates the switch and control stuff. Or use whatever your signal is. Then this stable, variable voltage, goes to the base of a BJT through a certain resistor.

For BJTs, Ie=Ib*B. That means the current through your load is the current through the base times a constant that can be found in the datasheet (beta). And the base will behave almost like a short, meaning it is just your resistor and voltage that controls the current. And V=IR, so if you increase the voltage, you increase the base current, increasing the emitter current. But it is obviously limited to the supply voltage.

Now you may wonder how it limits the current. Well, it drops the voltage across itself. So if you want an output of 20mA, even if it's shorted, you only get V*.02 power disapated, where V is your supply voltage. Unless it is HV, almost no power will be disapated. But if you want higher currents with more of a voltage range, consider alternatives. It is not really practical if you need to disapate more than 100W. But most semi-powerful BJTs can handle at least 20 or 30 watts. The max pow dis can be found in the datasheet.

If you do not want it to be digitally controlled, just have a potentiometer and resistor that control the base current, thus limiting the output current. It is a much simpler way to get a varying voltage/current, but obviously will be controlled manually.

If you want more power, there are plenty of ways to get high power CC. If you are confused by anything I said, feel free to ask. Best,
live wire
 

Thread Starter

vilson_garciaa

Joined May 6, 2018
8
Welcome to AAC!

They make digitally controlled pots, but I'd be inclined to go with a voltage controlled current source.

If you describe what you mean by electronic adjustment, we can offer better suggestions.


I need to make an adjustable current source (4 to 20mA),

Like this:

The simplest way would be to use a potentiometer, but you would have to adjust it manually. electronic potentiometer, for example AD8400.

Datasheet AD8400: http://www.analog.com/media/en/technical-documentation/data-sheets/AD8400_8402_8403.pdf


Another way would be to use PWM, so I would only change the proportion of the time "on" and "off."


I can not figure out how to use this electronic potentiometer, so I wanted to try doing with PWM, but I'm also not able to implement the second way.
 

-live wire-

Joined Dec 22, 2017
959
Here is how you create a variable voltage with a PWM, from a microcontroller or whatever. Add feedback because the voltage will otherwise drop under larger loads.
 

Thread Starter

vilson_garciaa

Joined May 6, 2018
8
Something like this -



Vin could be replaced by a PWM generated V source (with RC LPF),
or a R divider switched by UP open drain outputs or a DAC. Note this
is a floating load. A similar one for grounded load -

View attachment 152014

You have a UP in mind ?

Regards, Dana.
That's it!

So, powering with a voltage between 0 and 5V with PWM would like to generate 4 to 20mA.

How would the part of the PWM? The best microcontroller to use would be an Arduino, correct?
 

Thread Starter

vilson_garciaa

Joined May 6, 2018
8
What is the goal for the entire project? Knowing this would help a lot.

This adjustable current source would have to be very accurate. Because it would be used to calibrate sensors.

I do not understand much about the sensor calibration process, but my teacher said that this source would be for that.
 

danadak

Joined Mar 10, 2018
4,057
Are you sending data over 4/20 ma loop or an analog signal that
has to vary continuously from 4 to 20 ma ?

In the last current source in your last post I = Vin / 250 ohms

Scale the R for the Vin Iout range you want.

Regards, Dana.
 

-live wire-

Joined Dec 22, 2017
959
A potentiometer is a resistor that slows you to control its resistance. It does not have a fixed value. It can also create a variable voltage by creating a voltage divider. But that divider will not allow much of a load so it is generally used as a signal.
 

Thread Starter

vilson_garciaa

Joined May 6, 2018
8
A bjt with potentiometer or analog voltage and with resistor will be pretty accurate. But what kind of light sensor needs CC?

Honestly, I think my teacher would use that adjustable current source for various applications in the lab. I know he mentioned that it would need to be adjustable from 4 to 20mA and the resistance associated with the load (sensor) would be between 100 and 200ohms.

He started by suggesting to use the Arduino to generate the PWM and then I found something about using the buck, but I do not know if it would be accurate.
Then I suggested using some CI, for example LT3092, and a pot like the AD8400. The problem is that I do not know how I would do it. From the previous answers I have already idea of how to do using PWM, but will have good precision? If it has good accuracy, then now I just need to understand how to generate a PWM in Arduino. Otherwise I will have to use the electronic potentiometer
 

danadak

Joined Mar 10, 2018
4,057
Accuracy of PWM is controlled by Vdd on Arduino and bit depth of PWM.

So if you do a 16 bit PWM, use a reference to power Arduino at 5V, then
1LSB = 153 uV.

Attached is info on PWM filter design.

The resistance of the load is significant in that you use it in compliance
calculations for the current source. Note wire/lead resistence adds to this.

https://www.quora.com/What-is-the-c...-and-the-compliance-current-of-voltage-source

Regards, Dana.
 

Attachments

ebp

Joined Feb 8, 2018
2,332
Forget the buck converter, it is completely unsuitable.

A current source or sink based on an operational amplifier with a high-gain bipolar transistor or darlington transistor or FET, controlled by a voltage is likely what you require. The FET circuit is the only thing suitable for high precision.

If you use a filtered PWM output from a microcontroller, you will get better results if the PWM controls a separate switch that operates from a precision voltage reference. 16 bits of accuracy is a complete illusion unless great care is taken throughout the circuit, including how it is constructed physically. 10 bits is probably a reasonable target, but even that requires careful attention to detail. The actual current source would require a precision, low-offset, low-drift op amp, 0.1% tolerance or better temperature-stable resistors and a darlington transistor or FET (error due to base current is too great with single BJT).

Crutschow's suggestion at #17 is probably going to yield much better results than any circuit not designed by someone who is expert in precision analog design.
 
Top