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 with low constant current generator

Status
Not open for further replies.

anestho1

New Member
Hi,

I am trying to design an accurate, stable constant current generator with currents 0.1 mA to 3-4mA. I am trying to do this with digital voltage control PWM. Ideally would have 8 bit to 10 bit resolution, or at least 0.1mA/per %duty cycle. Current load would be 600 ohms to 10 Kohms, so higher voltages need to be generated. Current would be selected in 0.1mA increments, then a PIC would output a corresponding PWM duty cycle. I need this current to remain the same or close despite a change in load. Voltage can vary as necessary.

This will run from battery power 9V or so. Can also run from a wall wart.

I am currently looking at the Fairchild FAN5606 Serial LED Driver with Current-Regulated, Step-Up DC/DC Converter. It has a 5mA limit using only 1 of the DAC inputs. I am not sure what the resolution is on the DAC. Seems like 100 steps?

I would like to use a PIC and a voltage drop resistor as feedback, but I can just send a PWM controlled voltage to the IC.

Any help generating such small currents with these loads is appreciated.
 

Attachments

  • datasheet1.pdf
    196.7 KB · Views: 487
Last edited:
Could you explain a little better why you need a constant current source of this nature for? There's probably a bettery way to approach this if you define better what you're trying to do.
 
I am making a nerve stimulator. To depolarize a nerve, we need constant current. I can manage the pulse width with a PIC MCU. It will be used for nerve blocks. The load will be the needle in muscle, fat, nerve sheath..etc and the skin surface electrode.
 
For 4 mA into 10k, it's 40 volts (160 mW). A PWM controlling a step-up converter is certainly practical, depending on your frequency response. Is the switching rate a problem? Might be 25 kHz. Maybe filter it....
 
If I just use a step-up converter, I'll also need to use a feedback voltage drop resistor to accurately control the current. I am not sure on the op-amp to use and the component values.
 
I would prefer to use an IC for the constant current generator. Something that accepts analog voltage or digital PWM as input, and outputs a constant current despite the load (within limits). I can then use a PIC to manage the current and display. I am a much better programmer than circuit designer.
 
How about this IC? tps61042. It can switch up to 30V. Not quiet as high, but I really only need up to 2mA as a definite. It has both analog and PWM input for brightness control (current control).

What do you think? will this work?
 

Attachments

  • tps61042.pdf
    716.3 KB · Views: 292
Last edited:
I see basically 2 possibilities, since I do not want to do the switching with the PIC.

1) Have a self-contained circuit that will do constant current based on the voltage presented. A voltage controlled current source. It has its own mechanism for responding to changing loads for any given current. The PIC only selects the required current with PWM or analog voltage.

2) Have a current source, but do the Rsense with the PIC and adjust the voltage with PWM to match the current to the load.

It must be able to be run from a battery source 3V-9V, so a DC-DC converter is necessary.

I searched google and metacrawler but could not find anything that will work in my current range with a high impedence load.
 
Here's a block diagram of one possibility.
 

Attachments

  • PWM controlled current source block diagram.PNG
    PWM controlled current source block diagram.PNG
    25 KB · Views: 619
Could you fill in some of the values please? Also the op-amp in the box. Are you saying that it is not necessary?
 
anestho1 said:
Could you fill in some of the values please? Also the op-amp in the box. Are you saying that it is not necessary?
I can fill in all fairly easily except the boost converter. That might take a while.
This circuit doesn't have any feedback to the PIC, so the PWM has to have a stable and known peak voltage, e.g. 5.0 volts. It could be modified for feedback, but your feedback loop, which would include your software, would have to compensate for the lag in the lowpass filter. I personally think that a stable supply for your PIC is a simpler solution.
You don't need the second op amp if it is OK for the 45V supply to be the return (common) lead for your load, which I presume is a human. Since you have a floating supply, that should be OK, although you might want to connect +45V to earth ground if you use a wall wart. What is your PWM frequency (you may have already said)?
 
How much of a lag are we talking about? I have not decided on the PWM frequency. Its going to be hardware run, so I can do it fairly fast.
 
The base current of the transistor is also counted towards as part of the actual constant current being metered.

The use of a P-Ch MOSFET or at least a darlington for the current control transistor might make the calibration a little easier.

Just a thought....
 
anestho1 said:
How much of a lag are we talking about? I have not decided on the PWM frequency. Its going to be hardware run, so I can do it fairly fast.
The lag is due to the lowpass filter that changes the PWM to a DC voltage. The filter lag is inversely proportional to the cutoff frequency. For example, if your PWM frequency is 1kHz, and you want 60dB ripple rejection, then the cutoff frequency of your filter would have to be about 30Hz. The lag would be about 7.5 milliseconds (this all assumes a 2 pole Butterworth filter). Raising the frequency lowers the delay proportionally.
Eblc1388 is right about the MOSFET. I'll change that on the next iteration.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top