Simpler switched constant current source?

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need to create a constant current source (~40ma) for a load that can be switched on and off. Since this will be for a precision device, rather than just measuring the voltage drop of the load and using a current limiting/setting resistor, I'd like to have a real constant current source that doesn't depend upon the load's voltage drop (nominal load voltage drop is 2.5V, but may vary a few tenths of a volt).

I'm attaching a schematic of my current plan which uses 1 NPN transitor, 1 LM317 regulator, and 2 resistors.

I wonder if someone knows of a simpler (or better) circuit than this.

Thanks for your consideration!

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simpler than your suggestion ? Hmmm, tough one. For a precision current source: I think this is as simple as it gets. How much can you tolerate in the current, and in what voltage-range across the load should we think ?

Edit: or is that 2.5 V the approx. voltage over the load ?

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would use a PNP transistor, with the emitter connected to VCC and the collector driving the constant current source. This will mean that a LOGIC LOW will enable the constant current source.

Using an NPN transistor, you may have problems keeping the transistor on as the load resistance decreases and the voltage across the current source increases. If driving the NPN transistor base from a 5 volt source (AVR), you may find that you can't turn the NPN transistor on at lower load resistances.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Carl. Good that you're back.

If Kevin wants to control the currentsource with an AVR-pin, he'd use an NPN and a PNP. Using just a PNP causes a problem in turning the current-source off.

The LM317 can be omitted, but that depends on Kevin's answer regarding tolerances.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Hi Carl. Good that you're back.

If Kevin wants to control the currentsource with an AVR-pin, he'd use an NPN and a PNP. Using just a PNP causes a problem in turning the current-source off.

The LM317 can be omitted, but that depends on Kevin's answer regarding tolerances.

Nard

I was going to suggest the NPN driving the PNP configuration, which then enables the constant current source but...

If the OP used a 10K Ohm pull up between the base and emitter of the PNP transistor (which is also what I'd do) then the current source would be in the off state during initialization of the controller I/O ports.

Thanks for having me back. But, I'll mostely be keeping it to technical discussions.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
How much can you tolerate in the current, and in what voltage-range across the load should we think? Edit: or is that 2.5 V the approx. voltage over the load ?
Thanks for the reply. The current source is driving a transducer for a precision measurement device. Ideally, there should be less than .1% current variation, but I think 1% is perhaps a more reasonable goal.

Yes, the voltage drop across the load is nominally 2.5V. Thus, for the LM317 which requires a 3V above the output voltage, I need an input voltage of 2.5V + 3V + (40ma x 32ohms) = 6.3V or higher.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
Using an NPN transistor, you may have problems keeping the transistor on as the load resistance decreases and the voltage across the current source increases. If driving the NPN transistor base from a 5 volt source (AVR), you may find that you can't turn the NPN transistor on at lower load resistances.
Thanks for the thoughts, Carl. I planned on driving the transister with even less voltage (3.3V directly from the MCU). I see your point that the base would likely not be 0.6V higher than the emitter, so the transistor wouldn't turn on.

I'll look at this with a PNP transistor. Also, I was reviewing my "Art of Electronics" book looking at current sources using a single transistor. The voltage drop across the load at 40ma won't vary much. I'll re-read the section on transistor-based current sources. As I recall, a single transistor current source is suspectible to temperature changes, but one can use a feedback transistor to mitigate that.

Edit: Oh, I get it. You need the pull-up resistor to the base since the MCU can't raise the voltage high enough to turn off the PNP. Thanks for the tip!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Carl, I see one problem with the pull-up resistor from 9V to the base of the PNP, that'd exceed the maximum voltage for the MCU output pin. Am I thinking about that wrong?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kevin wrote:

Quote:
The current source is driving a transducer for a precision measurement device. Ideally, there should be less than .1% current variation, but I think 1% is perhaps a more reasonable goal.
Okay, that rules out the option of a (PNP-)transistor as current-source. Transistors are quite good at that job actually, but 1% (and 0.1% for sure) rules it out. So that leaves us with the LM317.
You need an NPN and a PNP-transistor. I like to standardize on used resistor-values, so I sticked here to 10k.

Note: using only a PNP : you cannot turn it off anymore with the AVR. The 3.3V (or 4V if we take the protection-diode into account) will not be enough to turn the PNP off.

Cheers

Nard

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

About the accuracy: datasheet says 1% over temp range.
Btw, I took the "324" from your schematic, but missed the point (pun intended): 31.25 ohm is what it should be.

Cheers

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Excellent diagram, Plons! Thanks very much. Yes, I thought 32.4 was the closet to the ideal 31.25, but now I see I can get 31.6ohm 1% 0805 from a number of manufacturers.
The actual value isn't as important as the stability since I'll be taking reference measurements before each data collection.

I've already updated my circuit, and I'll post a eagle schematic file of your subcircuit and a gif image for others who might want to reuse your idea.

Well, your circuit is not simpler than mine, but it falls into the "better" category. Better, as in, it actually works. Thanks again for the help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As promised, attached are a gif of Plons switched current source and the Eagle schematic file.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would get a bit fidgetty running 40mA through the 557...even though it can handle it...just my 2c..(need to ramp up my posts now that Carl is back!! :lol: )

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
(need to ramp up my posts now that Carl is back!! :lol: )

Yes! But I am going to try limiting myself to technical discussions only. I'll be staying out of the "Off-Topic" (I hope) forum. Smiley and I have a pact that should keep each of us in line...

Besides John... I can't help it that you type so slow!!! :lol:

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
I would get a bit fidgetty running 40mA through the 557...even though it can handle it
Thanks for your thoughts, John. How many mA would you feel comfortable running through a 557? I usually feel comfortable designing for 50% of max specification based on current or voltage. Of course, adequate heat sinking/dissipation can easily become a limiting factor before reaching 50% of maximum voltage or current.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I usually feel comfortable designing for 50% of max specification
That was burned into my brain many years ago, in fact it was specified as the max in some equipment. Probably 10-20mA if the transistor was just mounted on the board without heatsink (TO92 type). Of course it will be working at full saturation so may be it is not too bad. Can you think upside down (Australian style :) ) and maybe put the LM317 directly to 9V and use a small fet (2N700 can carry 200mA or something a bit better) to switch the negative of the device you are powering? Will it cause any problems?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mostly I've used 557's to switch LEDs at those currents: 10-20mA. But, since the 557 is rated at 100ma in TO92, I thought 40mA would be fine (temperature permitting).

Perhaps I might make a good Australian :wink: I often switch ground since n-channel FET's seem to be less expensive than p-channel. In fact, as I'm designing this to be a separate sensor/motor board connected by a 2 cables (power and logic), I was planning on changing to FETs (rather than BJTs) to keep the current loop between Vdd/Vss rather than across the logic and power cables to reduce RFI.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The reason I sticked to the 547/557: the 547 was in your design, and as the max current is 40 mA and with no extra peak-current when switching on, I considered it a good choice. 40% of max rating .... not bad.

But if you're feeling uncomfortable with the BC557 you could use BC640 or BC327. John mentiones the 2N700 as a low-side switching FET. Simular FET's are: BS107 and BS170. It's always comfortable to have some alternatives :)

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the thoughts, Nard. I have a lot of BS170's and they have worked well for 5V designs (Vgs=5) for low switching. I'll have to look at their datasheet again. For the 2N7000, which seems like a quite a nice FET, having a Vgs of 3.3V and Vds of 9V and a current of 40ma puts me right on the spec line (which is not where I want to be). But, I have some more expensive logic-level n-channel fets on the shelf that I can use of the Vgs of 3.3V is not enough for the BS170s on the shelf.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kevin, how about this one: take a BS250 for the high-side switching. It's P-channel, 250 mA = Id max., 60 V Vds, and logic level Vgs.
If you keep the BC547 for the low-side, you're 3.3V-logic-compliant. And low-cost :)

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nard, the BS250 looks like a nice, logic level p-channel FET at a reasonable price. Thanks for the ideas!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just found some RFP30N06LE n-channel, 3V logic level FETs on my shelf. They're inexpensive, and can carry 20A with Vgs of 3V. So, looks like I can use just a single low switched FET rather than a cascaded BJT/BJT or BJT/FET.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're blessed :!: :)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Blessed by the good ideas and help on this thread, your assistance is very much appreciated.