0
\$\begingroup\$

I'll start by asking what it seems to me a trivial but I don't know what is the most efficient solution. Electronics is not my main occupation, so I may need some indication to proceed:

I need to produce a voltage-controlled current source array. My problem is not making one current source by itself, but doing many independent current sources (16, 32, 64 channels) in the most compact package possible.

Essentially, it would be very similar to a LED array driver, where each LED is driven independently.

This is work-related, not for hobby use: I have access to a cleanroom facility to fabricate a PCB, and I can order any IC or discrete component I need. Specs are:

  • Current output from 0 to 30 mA (desirable, to 50 mA)
  • Min. 16 channels (desirable, up to 64)
  • No requirement on the frequency (DC is enough at the moment)
  • Current monitor is required (no requirement on accuracy at the moment, but in the hundreds of uA range)

I couldn't find anything on the web, if you could indicate me any resource I'll be very thankful!

At the moment, I have this LTC2668 16-bit 16-channel DAC. This is meant to provide the voltage (by software) to control the current source using SPI protocol.

Then I was thinking about using two of the ULN2803A, which is an array of 8 NPN Darlington transistors. Each emitter would be connected to a resistor (for sensing) and the load (which is another resistor basically).

What do you think about this implementation? Do you have better suggestions?

\$\endgroup\$
3
  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$ – Voltage Spike Nov 3 '20 at 23:14
  • \$\begingroup\$ Manuel Reza - Hi, Your latest edit asks new questions which were not asked originally. IMHO it is too late (and too big a change) to add those questions now, even though they are related to the original question. I recommend that you start a new question, briefly summarise this original topic & its answer (e.g. just 1 paragraph) and link to this question. Then explain and ask the new questions you have added here. I have "rolled-back" (i.e. reversed) your edit here. You can copy the new text from the edit history here. Thanks \$\endgroup\$ – SamGibson Nov 10 '20 at 12:23
  • \$\begingroup\$ Yeah, if you use current setting resistors with 1/square root progression and set all the DAC channels to the same value, then why use a 16 channel DAC? Just use a 1 channel DAC ;) The multichannel output is for flexibility though, cause if you want to test another pattern and all the currents are set by hardware resistors instead of DAC, then you're screwed. \$\endgroup\$ – bobflux Nov 10 '20 at 12:46
1
\$\begingroup\$
  • Load is resistor in range of 100-600 ohm
  • Max current 30mA

-> Max output voltage 3-18V, max power dissipated in load resistor is 0.5W

I'd use a schematic like this, per channel. Two variants.

enter image description here

VDAC is one output channel of a 8 or 16 channel SPI DAC, say between 0V and 3.3V.

On the left schematic, the opamp is simply wired as a voltage follower to replicate input voltage on R2. The opamp output drives the load directly. It shouldn't be a problem to pick an opamp capable of 30mA output current, but it will get hot which may cause input offset voltage drift. If that's a problem, the right variant of the schematic adds a simple BJT to drive the load and keep the opamp cool. Pretty much any BJT will drive 30mA, but it should be fast and low capacitance since it'll be in the opamp feedback loop. A cheap 2N3904 or SMD equivalent will work just fine.

Since there are many channels I went for a simple schematic so the DAC output voltage is used directly. Not scaling it down with a resistor divider also minimizes offset.

C1-R3-R4 would not be necessary if the load resistor R1 was on the circuit board next to the opamp. However there will be wires which add capacitance and inductance and could make the opamp unstable.

If both pins of the load resistor are not available, then you'll need a schematic like this:

enter image description here

In this case all resistors are referenced to the positive supply voltage. Note this is a random schematic from the internet, so all component values are wrong.

The opamp is again a follower, and the current setting resistor (1 ohm in the schematic) should be 100-150 ohms like above. Note this means the G-S capacitance of the FET, which usually adds phase lag and makes the opamp unstable, is in series with this resistor which means it probably won't upset the opamp at all. So you could get away with not populating the 100pF cap, or using a lower value cap, which means better settling time. However, if there is enough inductance in the drain of the FET due to wiring, it may oscillate all by itself. In this case you'll need to put a snubber on the PCB in parallel with the load, like a few hudreds of pF in series with a few tens of ohms. This will also slow down settling time.

You don't need a rail to rail input opamp, but its input common mode does need to include ground. Output should also go near 0V, or 0.6V if you add the transistor. Opamp selection parameters that matter here are supply voltage range, offset, offset drift, settling time, and output current if you don't use the transistor. Since settling time depends on Gain-Bandwidth product, it shouldn't be below a few MHz, but no need to pick a 100MHz opamp that will be more expensive and sensitive to layout.

With 3.3V input this gives 22mA in R2. Set R2 value for proper current range according to maximum DAC output voltage.

At 30mA, with a DAC output voltage of 3.3V, R2 will dissipate 100mW.

Dissipation in Q1 or the opamp could be a problem. If all resistors are the same value, then power supply voltage should be say, 2V above the sum of voltages on R1+R2. For example with R1=600 ohms and 30mA, that would be 23-24V. Calculating the max power dissipation in the opamp/transistor:

Vin   Load    Max Pd
24V   600R    0.3W
24V   100R    0.7W
 9V   100R    0.3W

So it's up to you if you want to use a variable power supply voltage or not. If all the load resistors are the same value, and this is a lab setting, just use a bench power supply.

Also up to you if you want to dissipate the heat in the opamps or in the transistors. At max 0.3W per channel, we're on the high side for dual SO8 opamps, and "very crispy" for quad opamps unless you use a package with a power pad soldered to a ground plane. At 0.7W per channel, no way.

Transistors are easier to cool and probably a cheaper solution than an opamp that can dissipate that power. You can either use a VCC power plane and SOT89/SOT223 or whatever transistors that have a good heat transfer through the collector tab (ie, not SOT23), or just use TO92 transistors. Since you said you want it small, and the 64 channels could dissipate up to 25 watts total, there will be a fan blowing air on it anyway, which means TO92 BJTs will have no problems with 0.3-0.7 watts. Without a fan they would overheat, but with airflow, they'll be fine. Plus that will save you the trouble of mounting a heat sink. If you use SMD transistors then your power plane will get hot and you'll need airflow on the board too.

Choosing the FET should be quite simple too. Current is low, so no need for a high capacitance, low RdsON FET. A low capacitance FET will be better suited, with RdsON of several ohms (note there is pretty much an inverse relationship between RdsON and capacitance). The drain is not connected to a copper plane though, so it will be harder to cool. You'll either have to use a package large enough to dissipate the heat, like TO92 or SO-8, or dedicate enough copper to heat sink the drain that a smaller package won't save any space anyway. In TO92 something like 2N7000 should work fine. There should be plenty of choice in SO8 too. If you have the time to do the thermal calculations then you can consider a smaller package. But a forest of TO92s with a fan blowing on it is a good approximation of heat sink fins...

Note a 24V power supply will blow the FET gates if the load is removed because the max Vgs is 20V. Adding a voltage clamping circuit to each channel would add too many parts, whereas using a lower VCC for the opamps (which don't need 24V anyway) only takes one linear regulator for the whole board. You could also use a FET with a higher max Vgs.

Note this power calculation pretty much eliminated the "current DAC" option since a that would dissipate too much power for the typical packages these chips come in. Also I couldn't find any on digikey.

I'd build a 8-16 channel board with 1-2 DACs and opamps, then stack the boards for more channels, put a fan on the end of the stack and blow air through.

DAC choice: you need to work on your requirements especially number of bits, sampling rate, and settling time.

Communication choice: I2C is out due to speed, so that leaves SPI. The DAC chip will choose for you. It'll probably be SPI.

Note you can have one micro per 16 channel board, or one micro for the whole set of boards, or a micro with several SPI ports driving several boards, etc. This all depends on how much throughput you want.

EDIT:

An important feature of a follower is you don't need precision resistors to set gain. The gain of each channel will be identical. Offset will vary of course, but that's one less calibration to make.

If you use a DAC with a 5V output span (like the LTC2668) adjust the current setting resistor and supply voltage accordingly. The current setting resistor will dissipate more power, so size it accordingly. It has one pin directly in the ground plane, so >2 thermal vias should keep it cool.

Depending on your offset requirements, you may want to calibrate out the offset or not. I don't think this will matter. In fact the 16 bit DAC is probably overkill, and there's a cheaper 12 bit version...

\$\endgroup\$
9
  • 1
    \$\begingroup\$ Many thanks for the very helpful answer. I'll definitely work on the requirements and use carefully each tip you gave me. I'll update the answer the more I proceed. For the DAC, I've already chosen the LTC2668 (link in the original answer), I have also the evaluation board for it (I'll order only the IC for the next iteration). It is a 16-bit 16 channel DAC, and it has a tri-wire SPI interface up to 50 MHz. 4 of them connected in parallel should do the job. As for the microcontroller, at the moment I just have the Arduino Uno board with the ATmega328. But I can buy a better one... \$\endgroup\$ – Manuel Reza Nov 3 '20 at 12:09
  • 1
    \$\begingroup\$ Probably I'll go for the third schematic you shown me. The resistor is on a silicon-on-insulator (SOI) chip, accessible by bondpads. For testing, these will be probed, for the package they will be wire-bonded. \$\endgroup\$ – Manuel Reza Nov 3 '20 at 12:12
  • \$\begingroup\$ Just an update, I completed the schematic (I can share if needed, the PCB is still not on the way). I decided for going through a stackable PCB version, each one having the DAC with 16 channels. The uC will be on a separate board, to be connected directly on the stack. I just need to place a multiplexer for the SPI slave CS connection, I don't know what is the best approach. I was thinking about having a manual selector (e.g., a rotary switch) between 4 pins, because it is not meant to change during operation. Is there a better approach? \$\endgroup\$ – Manuel Reza Nov 6 '20 at 15:45
  • \$\begingroup\$ Multiplexer is better, you never know if "not meant to change" isn't going to change ;) \$\endgroup\$ – bobflux Nov 6 '20 at 15:50
  • \$\begingroup\$ Ok, that makes sense. I might sound ingenuous, but how do I make the selection between 4 identical stacked boards (when I'll submit the files for printing, I'll have 4 copies of the same circuit)? \$\endgroup\$ – Manuel Reza Nov 6 '20 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.