element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Review and test a 0 - 1mA constant current source
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 9 Mar 2024 11:05 AM Date Created
  • Views 5588 views
  • Likes 10 likes
  • Comments 19 comments
  • pico
  • labview
Related
Recommended

Review and test a 0 - 1mA constant current source

Jan Cumps
Jan Cumps
9 Mar 2024
Review and test a 0 - 1mA constant current source

 shabaz designed an OpAmp based constant current source. It can deliver up to 1 mA. The current is controlled by a voltage. It's intended to be used with a DAC board for the Raspberry Pico. A constant current is a useful lab instrument. It can be used for testing semiconductors, and in sorts of circuits where components are driven by a current.

image

Specification:

  • constant current between 0 and 1 mA
  • control voltage: 0 - 1 V
  • compliance: 3 V (4.5 V with a LM324)
  • power rails: - 1.5 V and + 3.3 V (+5 V with LM324

How does it work?

High level: the circuit is built around a differential amplifier design (UA1). See also the internals of an INA106 differential amplifier a bit further down this post, and try to find similarities to this circuit. 

image
image source: shabaz' schematic

I removed the two extra current drivers U1C and U1D for the time being, to make the likeness more striking. We 'll add them back later and tell how they impact the output current.

I also made reorganising changes, that don't alter the circuit: I 've drawn U1B pointing back, and moved a few resistors up-down, to make the next step in the analysis easier.

image
image source: shabaz' schematic, edited

The exact same circuit is discussed in The Art Of Electronics. They draw it a little different, with the feedback x1 gain buffer pointing back. My edits of the original circuit (above, with Microsoft Paint) were done to show the concept similarity.

image
image source: my copy of The Art Of Electronics (TAOE), 2nd edition

In the drawing of shabaz, and in the TAOE schematic, you should now clearly see that it's identical to what's inside a differential amplifier:

image
image source: TI (BB) INA106 differential amplifier data sheet, edited. I flipped the original drawing vertically, to show the same orientation as the circuits above

Note that if you 'd use Reference and Sense as +In and -In, and vice-versa: use +In and -In as Reference and Sense, it would be an almost perfect (better, because R1 -> R4 are factory-matched in the INA106 !) drop-in replacement for U1A.

So we can summaries that the circuit works like one, and measures the voltage over the sense resistor (R5 in shabas' design). It measures the voltage over the sense resister (that also means: the current through it), and tries to keep the design stable. If you add voltage to the reference input (U1A in +) , it will increase the voltage over R5 to get back into balance. Thus, more current will flow through R5, and we increase the constant current output. The differential amp keeps this in balance.

The buffer at the output (U1B) takes care that there's no current error. It feeds back the output voltage without loading that output.

In TAOE, we can see that the formula for output current is:

image

If we plug shabaz' values in that formula:

image

the outcome = (3300 ohm / 99000 ohm) x (1 volt / 100 ohm) = 0.333 mA.

But the specs say it's 1 mA. Why the difference? That's where the two current drivers U1C and U1D and their output resistor come into place. They have a gain of 1, take care that the same current is sent additionally to the exit node. 3 x 0.333 mA = 1 mA.

Another way of seeing it, is that the combination of Rs (R5, R6, R7) is an "active 33 ohm resistor". If we plug that value in the formula: (3300 / 99000) x (1 / 33) = 1 mA.

Characterising the circuit

I've created a LabVIEW flow to characterise the behaviour. As RLOAD, I used a DMM in DC current mode.

Here's what the flow does:

  • set up V- and V+, as channel 1 and 2 of a Rigol DP832A PSU
  • set up Vcontrol as channel 3 of that PSU
  • enable the PSU outputs
  • set DMM6500 to current measure mode, range 1 mA (range, and measurement noise handling parameters, can be changed)
  • step through Vcontrol from 0 V to 1V in definable steps.
  • allow the Vcontrol to optionally settle between steps (settle time can be changed)
  • show the results on screen, and log to a spreadsheet

image

image
image sources: my LabVIEW design

Here is the output current, when I take 100 little 1mV steps from 0 to 1V

image
image source: the spreadsheet samples on a graph. X = steps (1 mV increments), Y = output current.

Based on how long I let the PSU settle each step before measuring, and the precision options that I set on the DMM, sampling a 100 step sweep can run from 50 seconds to hours. If I'd custimise / optimise the Rigol blocks, I'm sure I'd be able to get this below 10 seconds.

For reference, I attached a file with:

  • 100 samples, sweep Vcontrol between 0 and 100 mV
  • settle the PSU after each step for 5 seconds
  • DMM in 1mA rande
  • integrate each measurement over 10 mains power cycles
  • average 10 measurements over each sample
  • ignore column B, control voltage. It comes from the PSU but is not reliable. For the set voltage, take the steps value in column A (in mV).

characterize_100steps_5sec_10nlpc_10avg_autozero.xlsx

Thank you for reading.

  • Sign in to reply

Top Comments

  • michaelkellett
    michaelkellett over 1 year ago in reply to shabaz +2
    You could try OPA4192 (available in SOIC, same pinout as MCP6024) OPA4192 approx £6 each offset 25uV, max output current approx 20mA (1V drop), max supply (working) +/-18V MCP6024 approx £2 each…
  • jc2048
    jc2048 over 1 year ago +1
    Good blog! Few random thoughts and ideas 1. Output compliance with an old LM324 won't be 4.5V on a 5V supply (the top driver is a darlington pair, so there's at least 2 Vbe drops down from the rail…
  • jc2048
    jc2048 over 1 year ago in reply to Jan Cumps +1
    This is what Tina-TI shows for sweeping the compliance voltage slowly over a second. That's using Microchip's model for the opamp as it comes. It won't match reality for several reasons, but it's…
Parents
  • jc2048
    jc2048 over 1 year ago

    Good blog!

    Few random thoughts and ideas

    1. Output compliance with an old LM324 won't be 4.5V on a 5V supply (the top driver is a darlington pair, so there's at least 2 Vbe drops down from the rail for it to operate).

    2. I don't think the LM324 version will be very accurate. May not matter - depends what you want to use it for.

    3. The spread of offset voltage for the MCP6024 is -0.5mV to 0.5mV. It looks from the datasheet to be 'normal' (bell shaped curve), so, if you have a few of the devices, it might be worth testing them to see if you happen to have struck lucky and got a particularly good one in amongst them.

    4. If you put some resistance in series with pin 5 of U1B, the MCP6024 version might survive the output being connected to 5V.

    5. At high frequency, the PSRR of opamps isn't that wonderful, so you may want to examine the supply side of things in more detail. At its simplest, that might be a 10R resistor before the decoupling cap, or something like that for a bit of filtering.

    6. How much variation are you seeing in the current as you sweep the output across the compliance range?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to jc2048

    (can't edit) Regarding offset, one idea could be to have a little EEPROM on that board for storing the value.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 1 year ago in reply to shabaz

    You could try OPA4192 (available in SOIC, same pinout as MCP6024)

    OPA4192 approx £6 each

    offset 25uV, max output current approx 20mA (1V drop), max supply (working) +/-18V

    MCP6024 approx £2 each

    offset 500uV, max output current 10mA ??, max supply working +/- 3V

    The OPA4192 has a higher GBWP which may or may not be helpful.

    You might have stability issues with this circuit - because there are op amps in each others' feedback path. Making provision for adding compensation caps might be a good idea in a future pcb design.

    Looking at the pulse response in simulation (with non resistive loads) will give you some clues.

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • michaelkellett
    michaelkellett over 1 year ago in reply to shabaz

    You could try OPA4192 (available in SOIC, same pinout as MCP6024)

    OPA4192 approx £6 each

    offset 25uV, max output current approx 20mA (1V drop), max supply (working) +/-18V

    MCP6024 approx £2 each

    offset 500uV, max output current 10mA ??, max supply working +/- 3V

    The OPA4192 has a higher GBWP which may or may not be helpful.

    You might have stability issues with this circuit - because there are op amps in each others' feedback path. Making provision for adding compensation caps might be a good idea in a future pcb design.

    Looking at the pulse response in simulation (with non resistive loads) will give you some clues.

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • shabaz
    shabaz over 1 year ago in reply to michaelkellett

    Ah awesome, that op-amp looks ideal for the higher current scenario.

    Thanks for the compensation cap tip, I'll get space for those added in the next revision. I was hoping the series 100 ohm resistors would support a small amount of capacitive load, but it will be worse especially for the higher current output.

    I've downloaded the OPAx192 spice model, and confirmed it works in the KiCad 8 simulator incidentally, so I'm going to add that to the project files, so anyone who ever uses the CAD files, will also have access to the simulation.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube