# Constant current source using digital potentiometer

1. Oct 29, 2014

### Ramana

Hello Everyone,
Best wishes

Am new to this forum.

Please need a brand new suggestion for digitally controlled constant current source.
I am designing this circuit for Plating thickness measurement.
I have tried a several circuits based on Analog pot but would be helpful if i get with Digital potentiometer.

Precise current range= 1mA difference
Current output= 1mA to 500mA
Resistance range= 10k ohms (Digital potentiometer)

All the suggestions will be welcome.
Thanks

2. Oct 29, 2014

### Baluncore

So you want 1 mA to 500 mA in 1 mA steps? That will require a 9 bit digital pot for 29 = 512 steps.
A digital pot has variation in resistance so it must be used as a 3 terminal divider, not as a 2 terminal variable resistor.
You will also need to provide a voltage reference.
You may be better using a D to A converter than a digital pot.

3. Oct 30, 2014

### Ramana

yes, difference with 1mA steps.

here am using the circuit to build in range of 1mA to 500mA.
The circuit i found somewhere in the forums as a car battery charging.

The problem with the circuit is instead of CURRENT ADJUST USING POT am using DIGITAL POTENTIOMETER.
How can i replace the current adjust pot with 9 bit digital pot?

Sorry if any problem with communication. Am really new to electronics, but am passionate to do.

#### Attached Files:

• ###### Capture.PNG
File size:
9.1 KB
Views:
494
4. Oct 30, 2014

### Baluncore

There is a problem with using the battery charger circuit. The battery charger circuit is a voltage regulator with a crude current limiter. Current flows to the output through two paths. Firstly; through the adjustable voltage regulator LM317, and secondly; through the series pass transistor MJ4502. The 33 ohm resistor limits the current through the LM317 to about 20 mA, with about 10 mA base current from the MJ4502. That 30 mA is temperature dependent. The LM317 current is not monitored by the current sensing resistor, R8.

It will therefore be necessary to design a new circuit that measures the total output current. That circuit will source a specified current, by adjusting the output voltage across the load. The question comes as to what maximum voltage output you will require across the load?

5. Oct 30, 2014

### sophiecentaur

I agree. There are devices that are designed to do precisely what you require. I Googled Digital Current Source and there are many hits, describing and offering suitable current sourcing DACs. This is not trivial circuitry and it may be a problem for you if you know very little electronics. Do you have available help with design and construction?

6. Oct 31, 2014

### Ramana

Hi Baluncore,
wishes for the day.

The required output voltage at load is 12V.
Output current= 1mA to 500mA
precise= 1mA

Suggest any other circuits for required output using LM317 or Op-Amp with digital pot.

7. Oct 31, 2014

### Ramana

Hello Sophiecentaur,

No, i don't have available help with design and construction.

I have googled regarding DIGITAL CURRENT SOURCE.
My simple question is
1) I need to adjust current through digital pot in the precise of 1mA difference
2) Is any IC available to adjust in the range of 1mA to 500mA?
3) The output voltage should be 12V.

I stay in local area where i don't have electronic markets.
So it will helpful for me to develop schematic with theoretical information or calculation until i get the components.

Best Regards.

8. Oct 31, 2014

### Ramana

How can i replace 500 ohms variable pot with 10K ohms Digital pot in the circuit??
Problem is when i replace the digital pot 10k, i need to adjust current in the range of 1mA to 500mA acccording to change in the 10K digital pot.

How the circuit can be modified with 10k DIGITAL POT and the output must in precise current with 1mA difference.

#### Attached Files:

• ###### 500mA.PNG
File size:
4.1 KB
Views:
397
9. Oct 31, 2014

### sophiecentaur

I am sorry but your "Simple" question is not "simple". The requirement for 1mA accuracy is one problem unless the load is purely resistive. The 500 Ohm Pot you use at the moment (?) will be giving a very non linear law.
If you have no experience of Electronics, I would suggest that this project could be a non-starter; it could be too complex. Local markets are not necessary now the Internet exists . What you need is a source of specialist knowledge, which will cost you money, I think.
Naturally , you cannot expect to buy a box that does exactly what you want. You can buy one of the devices that you will have seen in your Google search but you will need to interface with it from your PC(?) - you don't specify where the "digital" control will come from and in what form. The bit in between will need special design- or at least you will need to specify exactly what you want from the interface.
I may have read this all wrong but your initial spec cannot be met with a simple digital replacement for a 'pot'. Can you be more specific about what you want?

You can have fun with a simulation program, of which there are many available for PC. A separate thread could get you some useful advice here - I do not use a simulation program so I am not the best source of such knowledge. But you will need an accurate characterisation of your load before you start.

10. Oct 31, 2014

### Ramana

No problem.
Let me try on the circuit with my little knowledge ;)

Best wishes.

11. Oct 31, 2014

### sophiecentaur

One thing you must do and that is to ascertain whether or not your load is purely resistive (which it probably isn't if this is a plating bath). If it isn't then your current source needs to be 'better' and a pot of any type will not work as you need.
Good luck with it. You are bound to have a good time learning about stuff.

12. Oct 31, 2014

### Baluncore

Sorry about the delay. I have a few potential circuits available, but there are still a number of indeterminate questions with this design.

Firstly; The voltages applied to the analogue terminals of the digital pot must remain within range of the pot power supply rails, those rails will most often be 0V and +5V. For this reason, the battery charger circuit will be difficult to modify because the pot is floating well outside digital supply voltages. The current “source” requirement is the problem. Placing the load above a controlled current "sink" resolves that problem.

Secondly; a digital pot will need digital control, that might be a serial data stream or a parallel interface. Providing that digital control will be critical to selecting and implementing the digital pot. I have no idea how you intend to control the digital pot or what constraints you will have doing that. Using a serial interface will reduce the hardware, but what will you be driving the digital inputs with?

13. Nov 1, 2014

### sophiecentaur

I am not sure just what the OP really needs. If he is after a true Current Source (i.e. infinite effective impedance) then a Pot of any sort will not give him reliable control of the Current. I would be happier if he could give some idea of the 'Volts in / Current in' characteristic of his load. The "12V" figure for the requirement leaves it up in the air, rather. He could be interested in is a variable voltage power supply with a max of 12V or a load which maintains approximately 12V across itself, whatever current you hit it with.

14. Nov 1, 2014

### Baluncore

sophiecentaur.
Ramana needs an infinite impedance, digitally programmable current, of between 1 and 500 mA. It needs about 12V of compliance.

It is an easy enough design problem when the outside interfaces are known. A digital pot is used to generate an adjustable voltage, like a DAC. The programmable voltage is compared with the voltage across a current sense resistor while a series MOSFET gate voltage is adjusted to regulate the current through the load and sense resistor. The characteristics of possible loads set only the maximum output voltage needed, that in turn dictates the maximum power rating required of the MOSFET should the load become a short circuit.

15. Nov 1, 2014

### sophiecentaur

Right, so where did a "potentiometer" ever come into the equation? That's what I can't explain.
What you, Baluncore, have been writing has made sense to me all along.

16. Nov 1, 2014

### Baluncore

sophiecentaur.
Capture.png attached to post #3 shows a pot being used to set a current limit. R5, 250k, highlighted in yellow.
The OP wants to replace the manual pot, R5, with a digital pot.
The battery charger circuit is an antique that does not meet the OP's current source accuracy requirements.

17. Nov 1, 2014

### sophiecentaur

I looked at that circuit and it seems to be an adjustable Voltage regulator circuit with an adjustable current limit(?) So it doesn't seem the place to start from.

18. Nov 1, 2014

### Baluncore

You are correct, but that was what the OP came up with. If the voltage is increased until it limits the current, then it presents one uncalibrated solution.

19. Nov 2, 2014

### sophiecentaur

Starting from scratch (starting with the desired specification) is usually better than grabbing something that's to hand and making the best of it. If you want a current source (any widget) then design a current source (widget) - is my motto. I guess I couldn't believe what the OP was actually saying, at first.

20. Nov 2, 2014

### Ramana

Dear Friends,

Thanking you taking care at my project. I really appreciate your suggestions.

I have built a adjustable current source from scratch and small a circuit to understand better how to optimize or modify the circuit according to the requirement.