Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help:Digitally controlled current source

Status
Not open for further replies.

abicash

Member
Hello

I am in the thought process for a new project where one of the modules is to design a Digitally controlled constant current source (50mA-1A in steps of 10mA).
I am thinking about using the Silab's C8051F021 with a 100ksps sampling rate 12-bit-ADC and 12-bit-DAC.

I am looking for some starters/pointers on designing the CC Digital control.

Please help as usual.

Thanks and regards
 
Hello again Sceadwian

Thank you so much.I will take a look

Thanks and regards

EDIT:

After taking a look at the ckt I have a few questions (if you may :))

1)If the Load is a short ckt,what is the profile of the current.(i mean whats the response time)..I see you raised a question of frying the LED's

2)Is it linear over 8bit?
3) Whats the resolution of o/p current..

All these q's based on presumption that you built this one...

Thanks and regards
 
Last edited:
It's linearity is that of the opamps+DAC (should be nearly perfect)

The frying the LED was only a theoretical question, I have built the analog version of this (No DAC it uses a POT instead) and it works fine.

The resolution from a 12 bit DAC at 1amp max current is going to be 240µ amps. At 8 bits it'll be 3ma
 
Last edited:
I asked about the frying thing since I am going to use this as a switched (not SMPS) current of set currents for a set time (50msec to 500msec) ...one time only..

So i was thinking about the response...Will it settle in that time?
 
The settling speed will be determined by the opamp you use and any delay in the feedback loop, though I'm not sure how it'll react to highly reactive loads. What will you be feeding the current into? Actually, as was pointed out to me technically this is a current sink, so what will you be pulling it out of?
 
Yes thats the idea ..i mean current sink

And the load would be a low ohms nichrome wire (1-5ohms)

I want to give a preset current for a preset time impulse.

Say if i set it at 50msec for 50mA...the load should get just that.
 
...
After taking a look at the ckt I have a few questions (if you may :))

1)If the Load is a short ckt,what is the profile of the current.(i mean whats the response time)..I see you raised a question of frying the LED's

2)Is it linear over 8bit?
3) Whats the resolution of o/p current..

All these q's based on presumption that you built this one...

Thanks and regards

I reran the sim with a "short" (1mΩ) as a load.

Note the dissipation in the FET.

Note that V(s) follows V(c).

I(R1) {your load} is equal to I(R2) {because FET's gate current is ≈ 0}.

The voltage divider R4-R3 scales the DAC's voltage to 1V at V(c).

The linearity is as good as the linearity of the DAC itself.
With an 8 bit DAC, you would be able to produce 2^8=256 steps. If you need higher resolution, get a 10bit or 12bit DAC.
 

Attachments

  • CurrentReg.jpg
    CurrentReg.jpg
    224.9 KB · Views: 508
Why do you want variable current and pulse width?
You're better off simply PWM'ing the nichrome at the maximum voltage/current you can provide and changing the duty cycle to adjust heating. Losses in the fet are less then, and it's FAR more effcient.
 
Why do you want variable current and pulse width?
You're better off simply PWM'ing the nichrome at the maximum voltage/current you can provide and changing the duty cycle to adjust heating. Losses in the fet are less then, and it's FAR more effcient.

He will still want something like my circuit unless his primary power supply provides the current limiting. He can do the PWM by loading the DAC with a finite current value followed by a "zero" value at a rate determined by the controlling processor. Reducing the duty-cycle using processor-controlled PWM would proportionally reduce the dissipation in the NFET.
 
I don't get it, the only thing using a variable current source (like the one posted so far) is to limit current, but it DOES NOT limit current, it bypasses it to the FET, it's still used. Straight PWM to a heating element actually reduces power consumption. If it's nichrome wire, it's a heater, the thermal constant of the element will act as a 'low pass' So there's no reason to adjust the current at all, you just adjust the PWM width.
 
Ok, lets make up some numbers. Suppose the resistance of his nichrome wire is 0.01Ω. Suppose his primary power supply is 12V. Based on Ohm's law (other thread :D), the peak current would be 12/0.01 = 1200A. If you consider the on-resistance of a large NFet, it might add 50mΩ so that would reduce the current to 12/0.06 = 200A.

Seems to me, you want some current limiting somewhere :)
 
No. Just pulse the led VERY shortly.
The power supply itself will limit the current. You're assuming wrongly that a power supply will supply infinite current.
 
Last edited:
Ok, lets make up some numbers. Suppose the resistance of his nichrome wire is 0.01Ω. Suppose his primary power supply is 12V. Based on Ohm's law (other thread :D), the peak current would be 12/0.01 = 1200A. If you consider the on-resistance of a large NFet, it might add 50mΩ so that would reduce the current to 12/0.06 = 200A.

Seems to me, you want some current limiting somewhere :)
Our OP said:
And the load would be a low ohms nichrome wire (1-5ohms)
 
Which isn't bad at all, even worst case (1ohm) that's only 12 watts. Might not even need to heatsink the fet.
 
Last edited:
Oh man my brain must be off today. Your numbers are right roff mine are completely wrong =O
 
Hello all

Thank you for all the useful responses.

Yesterday my 7 month son was down with fever so couldn't reply.He is still cranky..so I am just giving you some details of what I need.

I would not worry with the dissipation since as I said earlier that this is going to be on for a max of up to 500ms.
This is NOT a heater as you have misinterpreted.This is a test instrument for a wire that has the profile of a nichrome wire.

For this i set up a current from 50mA to 1000mA and the time period for which this flows and then press fire.
I get some data through an ADC to the computer terminal where some graphs are plotted and some calculations are done and a result a printed or stored.

Thanks and regards
 
Depending on the total wire loop resistance, you could reduce the 12V battery in the circuit I posted to something like 5V, thereby reducing the dissipation in the NFET.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top