This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Current control and sensing design

Other Parts Discussed in Thread: OPA320

Hi!

I'm working on a design where we have to control the intensity of nIR LEDs by controlling the current in the 5-50mA range, in 1 mA steps. We choosed a simple current source circuit (see circuit below). We learned that the LEDs' internal resistances slightly differ thus there is no way  to have universal  voltage values to put on the opamp's non inverting input. We ended up with the idea to measure the current back via a low-ohmic shunt resistor using an inamp. This way we have the chance to find the 45 current steps by systematically changing the opamp's voltage (using a plain simple interval halving method).

Below is the circuit which performs pretty good at both SPICE and breadboard level however I'm not quite sure that it has no design flaws, so any comment would be great. Thank you.

Explanation:

R_DAC subcircuit is for simulating the control voltage coming from an mcu's dac output. The shunt resistor value is probably a bit high, we should have go down to the mOhm range. 

  • JustGreg,

    I believe your current source is not operating properly because of your choice of the op amp. The op amp should have a common-mode input range that extends to ground. An op amp with rail-to-rail input will provide this. There are a wide range of available R/R CMOS op amps that could be used in this 5V application. OPA320 would be one possible choice. Once you have a properly operating current source, the input voltage will accurately control the output current. Then it should be unnecessary to measure the current in the emitter.

    If you find it necessary to validate the current, it is not necessary to amplify a small sample voltage on a shunt resistor. It seems easier to measure directly across R1 without amplification.

    Regards, Bruce.

  • Hi Bruce,

    thank you for your reply. I talked with my colleague who told me that he changed the opamp in the breadboard prototype to another one since last time, to a new one which is a product of a competitor and actually is an RRIO one. Sorry for not providing you the appropiate information. Anyway, we'll check your recommendation.

    The reason behind the validation of the current is that the those LEDs are slightly different so one input voltage not necessarily gives the same output current. Measuring every LED is not an option here because there are plenty. The small sample voltage was chosen because we have the INA122P at hand and its has the minimum gain of 5 which would quickly saturate the output if we measure the voltage falling on that 51R resistor. Your recommendation is easier so we will try it after we dig out an INA with G=1.

    Thank you. 

     

  • JustGreg,

    If the current source is operating properly the current in the LED will not change with different LEDs. This is the whole purpose of using a current source--a current that is independent of load. This assumes that you are keeping the voltage across the load within the compliance range of the current source, approximately 2.2V at 50mA. You may be testing the current source with a load resistor that is too high. This will saturate the current source and it will not operate properly. I suggest testing the output current by replacing R-load with a current meter.

    Regards, Bruce.

  • Hi Bruce,

    thank you for pointing out our mistake, it was indeed an incorrect load resistor which we assumed that it can simulate the LEDs. With lower values the circuit works the expected way. It's likely that we need to figure out the input voltages only once and it will work for all the LEDs and it makes the counter measuring part unnecessary. However, it was fun to fiddle with it!

    Many thanks,

    Greg 

  • Greg,

    I'm glad you were able to sort it all out. Here is a link to a blog that addresses some of the issues you faced:

    http://e2e.ti.com/blogs_/b/thesignal/archive/2012/04/03/current-sources-and-sinks-understanding-compliance-range.aspx

    Best regards, Bruce.

  • Bruce,

    thank you for sharing your blog post, it sums it all up nicely! 

    Best regards,  Greg