Help With Design of 48-Channel Constant Current Sink, and Fault Detection - Page 1
Forum section: electronics / projects

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 12:02:09 am
content: Hi All,This is my first post so if this is the wrong place forgive me and please give guidance to the proper location to ask this question.Background (TLDR Warning!): I have a project (device test jig) that requires 48 channels of constant current sink with a current of 2-3mA, and a voltage of 28-30 volts, and requires open and short fault detection. I need to be able to turn the current sources on and off independently.My first thought was a high-voltage shift register. However, these do not have fault detection. My next thought was an LED driver, Many of them come in 8, 16, 24, and 32 channels, have a fault detection system, and provide constant current. However, Most of them only accept 17 volts max on their outputs. I need 28 min and would prefer 30 volts.Another idea I had was to use a low-voltage LED driver and insert another constant current source or zener into the output to drop the voltage to acceptable levels.Queries 1: Does anyone know of a device that could meet my needs. If not, what ideas do you have for tackling this project?PS. This is a hobby project.Thanks for the info, ideas, and guidance.

author: MasterT
author_rank: Frequent Contributor
timestamp: November 02, 2024, 12:45:47 am
content: Timing? How fast current settling needs to be, channel operational bandwidth?

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 01:02:04 am
content: I'm looking at about 100Khz here. The settling time should be around <=1% of that. Almost any LED driver or shift register should handle the switching. Most small signal transistors should as well. But I really don't want to build it from discrete components if I can find a more compact solution. The whole thing will be driven by STM32F411, which will spend most of its time on other tasks.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 02, 2024, 01:15:45 am
content: So max 1% of 10 µs, thus 100 ns settling time. That's pretty short.What about the accuracy for the current sinks?

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 01:29:39 am
content: The current should be within 5% and stable over time.

author: MasterT
author_rank: Frequent Contributor
timestamp: November 02, 2024, 01:44:24 am
content: 100 nsec is very tough, even internal DAC of F4 has 1 usec or so.First thing comes to mind is mux-ed or pwm-ed, likely be too slow. 48 channels 10 MHz DAC is gonna be expensive and complex.Low cost digital potentiometer with TBD62781APG may work, still 6 x 8 and fault detection is another mux 6 x 8 monster

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 02, 2024, 01:58:37 am
content: Quote from: Monotoba on November 02, 2024, 12:02:09 amTI and Analog Devices have > 30V LED drivers, tho you may not like the prices or packages.eg TLC69651-Q1 is 16Ch 30mA / 50V and claimsDiagnostics: – LED open / short detection for each zoneOr, an alternative would be to pick a simpler serial ISET LED driver like TM3100 and add ADC checks on the LOAD side for SC/OC

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 02:04:30 am
content: That is why I was hoping there might be a solution that could be repurposed for this application...

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 02, 2024, 02:15:05 am
content: Quote from: Monotoba on November 02, 2024, 02:04:30 amDid you look at the TI and Analog devices parts to see if they could be repurposed ?There is also ROHM BD18332EUV BD18333EUV etc ?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 02, 2024, 02:22:00 pm
content: What about a humble BJT on a microcontroller output?Let's say you have an uC that switches between 0V and 3V3. Then output this directly into the base of a BJT, and then connect the emitter with a resistor to GND.The emitter will be around 600mV lower then the uC output and the base, so 2V7, and thus for a 2mA current sink you set the emitter resistor to 2.7/0.002 = 1350 OhmMain inaccuracy will be the change of the Base-Emitter voltage with temperature, Mounting them all on a block of aluminum, and then either heating it to a specific temperature, or compensating the power supply voltage of the uC can improve this.For feedback, you can split the resistor into two series resistors, and read the center tap voltage back with a digital I/O pin.Or do these current sinks have to be individually adjustable?In that case something like this can work:* DAC.* 4051 with a capacitor on each output.* Opamp with FET inputs to buffer the capacitor voltage.* 4066 On/Off switches.* BJT & resistor to GND.

author: mariush
author_rank: Super Contributor
timestamp: November 02, 2024, 04:36:38 pm
content: That EdgeWedge thing ... not sure how that's using LESS space for the header.If you panelize boards.. you can't use that tool without depanelizing, you need corner access to slide the pcb on those long pins of the edgewedge.You could have 3 surface mount pads on top, 3 on the other side, right at the edge of the board, and optionally two through holes (to center the tool over the pads).The tool could simply be an inverted F shape with 3 needles on bottom and 3 on the top bit, and have a spring push down on the top -- of the F shape and the optional through hole pins used for centering.You could have a whole panel of boards and you'd only need a cutout (a rectangle) or square just big enough to slide the width of the F shape and then press it to the edge and release the spring to push onto the board.

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 05:21:35 pm
content: PCBWIz, I did look at these and more. None of them actually meet all my requirements.MasterT, Some of the high speed constant current LED drivers have settling times of 40nS and even 30nS. So 100nS is doable. But doing it with discretes may be a challenge.If either of you have any other ideas, suggestions, or think you have seen an IC that can help. Please let me know.Thank you both!

author: MasterT
author_rank: Frequent Contributor
timestamp: November 02, 2024, 05:50:05 pm
content: Quote from: Monotoba on November 02, 2024, 05:21:35 pmDepends on how to do a math. I haven't ever seen LED driver specified current settling. Some(tlc5940) says"12 bit (4096 Steps) Grayscale PWM Control", another(tlc69651)"PWM / Hybrid control mode"- I even have no idea what does it mean.Common way to calculate sampling rate (channel bandwidth here):20 MHz spi-clock / (15-bits x 16-channels x 3-to get-48) = 36 microseconds at max.BTW, pwm control w/o good LPF filtering is misleading to call "constant current". But nobody seems to care for led driver, since visual perception is very slow

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 06:26:37 pm
content: Thank you for your input.Yes, each of the 48 current sinks needs to be individually controlled, as they will be toggled on and off individually or in pseudo-random groups. Given that there are 48 lines, the ADC must be multiplexed to handle all 48, potentially through three 16-channel multiplexers. This approach may ultimately be the direction I pursue. I’ll take a couple of days to consider it further.The appeal of using an LED driver lies in the fast settling times—often in the range of 30-40ns—and the built-in features such as open-circuit, short-circuit, and over-temperature sensing and protection. Some LED drivers can manage up to 36 outputs in a single chip, so using two 24-output or three 16-output devices (both of which are common) would meet my requirements. I am unsure if a simple transistor-based approach would achieve the required settling times. An integrated solution, though potentially more costly, is attractive due to the board space savings.The main drawback of some of these devices is the PWM functionality for dimming, which often cannot be completely disabled, or if turned off, may still produce a pulse during counter reloading. PCBWIz suggested some alternative devices, including SIPO shift registers with constant current sinks. Using these with a sense resistor and three 16-channel ADCs might be the right solution.Thank you again for your input; all ideas are welcome as I continue to review datasheets and sketch out designs. The final result will likely incorporate a combination of the ideas I've received.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 02, 2024, 06:49:15 pm
content: Quote from: Monotoba on November 02, 2024, 05:21:35 pmMost commercial LED drivers worry about RFI & EMC, so they will slow down their edges.What load does this have, and what voltage range is needed ?What is the point of open and short sense, as a 2-3mA sink is inherently self protecting?Does that also need to be 100ns ?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 02, 2024, 06:56:32 pm
content: Quote from: Monotoba on November 02, 2024, 06:26:37 pmDoes that mean set the mA, for each one having different current, or just individual on/off of a common 2.50mA setting on all channels ?

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 07:16:31 pm
content: Devices with PWM that cannot be fully disabled will not meet my requirements. Most of these produce a brief pulse when the counter reloads, with a maximum pulse width typically around 99.98. This results in an unwanted pulse, and, given that the clock in most of these devices is internal, there is no way to control when that pulse occurs.At this point, I’ve lost track of the specific devices that specify settling time, though I believe one might have been from ROHM or a similar manufacturer. After reviewing approximately 150 datasheets, I’ve even considered single-channel devices.Currently, I’m inclined to use a simpler LED driver functioning as a shift register with fault detection, provided I can find one that meets my timing requirements. My plan involves placing a current sense resistor in series with the output and using three 16-channel ADCs for fault detection. Fault detection would be performed only at startup, shutdown, and after each test—primarily to check for output failures and confirm device contact with the test jig. Consequently, fault scanning times are not critical.There is additional complexity in the overall circuit that I haven’t detailed here. However, the other sections can be isolated similarly, and I am focused solely on this isolated portion for now. While other voltages and currents will be applied to the outputs, this solution will be isolated during those test phases. A full explanation would require more detail.

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 07:19:10 pm
content: 2.5 mA on/off.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 02, 2024, 08:35:14 pm
content: I'm afraid you'd have to use a more "discrete design" to meet your requirements.Are all 48 channels required to work simultaneously, or can you multiplex them?I'm also curious about the application.

author: Andy Chee
author_rank: Super Contributor
timestamp: November 02, 2024, 08:47:49 pm
content: Quote from: Monotoba on November 02, 2024, 12:02:09 amWhat is the load?If you are just switching 48 LEDs, why not just use plain old simple current limiting resistor in series with each of the 48 LEDs?

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 09:57:40 pm
content: As mentioned in my original post, the load is a Device Under Test (DUT), which is another electronic circuit with critical environmental and functional requirements. Additionally, it is essential that all outputs are independently switchable and can be activated in pseudo-random groups, potentially including the option to switch all outputs simultaneously. This application is not merely for switching LEDs. However, given the number of outputs and the current requirements, utilizing a constant current LED driver may be beneficial to reduce parts count, board space, and complexity, provided that this approach is feasible.

author: Monotoba
author_rank: Contributor
timestamp: November 02, 2024, 09:59:11 pm
content: As stated in my OP, the application is for a test jig.

author: nctnico
author_rank: Super Contributor
timestamp: November 02, 2024, 11:03:15 pm
content: I think a discrete design is the way to go. But it doesn't need an extreme amount of parts. There are dual (and quad) transistors to create a simple current sink (emitter resistor). Use a low leakage FET input opamp (like TL074) + capacitor as a buffer behind a multiplexed DAC to buffer the drive voltages to the base of the transistors. If the currents are fixed, then you could set the base voltages through resistor dividers (again using multiple resistors in a single package).

author: MasterT
author_rank: Frequent Contributor
timestamp: November 02, 2024, 11:36:39 pm
content: Obviously control loop doesn't have to run at 30 nsec, LED control never needs to be >60 Hz, may be 100. And as I calculated above, SPI limits channel set time anyway.As current OC /SC requirements already demands ADC + mux to scan channels, than I think about "digital constant current", when CC module is not based on BJT+OPA "classic" solution (de-muxed DAC with voltage to current converters), but more simple 595 shift register + RC filters. Kind of 48-channels PWM dac.CC is than set in software, where ADC readings evaluated with respect to set value, over /under current threshold etc. 8-10 bits adc at 5 msps brings timing to 100 kHz or so, 10 usec. SPI may clock data at ~50 MHz, 10 filtered dacs samples per one adc reading, seems reasonable trade.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 03, 2024, 01:40:15 am
content: Quote from: nctnico on November 02, 2024, 11:03:15 pmYes, the tricky part will be the settling time. For fast switching, I've found that cascading a second FET used as a switch worked way better than controlling the current source/sink itself.And from what I got, I don't think the OP wants to be able to modulate the current, but only switch it on/off.

author: Andy Chee
author_rank: Super Contributor
timestamp: November 03, 2024, 02:49:39 am
content: Quote from: Monotoba on November 02, 2024, 09:57:40 pmIs the DUT something that already exists as a physical object? Or is it something that you are also designing on paper in conjunction with your test rig?If it is something you are still designing on paper, then it would be immensely helpful if you could also provide more information on the DUT.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 03, 2024, 04:10:10 am
content: Quote from: Monotoba on November 02, 2024, 07:19:10 pmThat's simpler, but you have still not replied to the voltage compliance ?Does this need to deliver 2.5mA from 0.5V to 30V, or from 28 to 30V, or ?? - at 2.5mA normal slew rates will limit voltage settling times.If it needs > 5V..30V, you can open up more options.Also keep in mind they often skew LED drive outputs deliberately, to reduce bounce effectseg the OnSemi CAT4016, CAV4016 (would need voltage expansion buffers), mention skews of typ 17ns and max 40ns across each LED and 250ns typ across 16.You may need to buy-and-try numerous parts, as you are heading into unusual territory.

author: Monotoba
author_rank: Contributor
timestamp: November 03, 2024, 04:50:43 am
content: Its bed time here in Montana, but I wanted to chime in and comment. Yes, I don't need to modulate the current. I just need to turn it on and off.I also wanted to say thank you to everyone commenting as the more ideas I have the better!Something like a 74HC595 might work. I have read several datasheets on similar devices that include constant current sinks for LEDs, relays, etc. Some of them are stable enough and can get down to 2mA. Most only go down to 5 mA. I only need the current to be anything from 2 to 3 mA, but whatever it is, it cannot change more than +-5%. The system just has to ensure the device has a connection to the jig, must sense open and short conditions, and must turn the current sinks on and off individually, in groups, and all at once.You all have given wonderful input!Thanks again!

author: Monotoba
author_rank: Contributor
timestamp: November 27, 2024, 06:54:44 pm
content: Dear Colleagues,I am reaching out to inquire about an 8051 ROM monitor I programmed into an 80C535 single-board computer (SBC) that I built back in 1992. The EPROM’s window cover is labeled "MONPLUS x 08-09-1992," which corresponds to the date it was programmed.After rediscovering this SBC while clearing out my late father’s home, I was pleasantly surprised to find it still operational after over 30 years. The system communicates via RS232 at 1200 baud, 8-N-1. However, I am struggling to recall the exact functionality of the monitor commands. So far, I have identified the following:D: Dumps memoryL: Loads Intel Hex filesI also know that commands I, R, and P perform specific functions, but I am unable to remember what they are.If anyone has information about this monitor or its command set, I would greatly appreciate your assistance in helping me better understand and use this system.Thank you in advance for your time and expertise.Best regards,Randall Morgan

author: Marco
author_rank: Super Contributor
timestamp: November 28, 2024, 04:34:02 pm
content: The 48 window comparators for fault detection are going to dominate the partcount.

author: pardo-bsso
author_rank: Frequent Contributor
timestamp: November 29, 2024, 09:31:46 pm
content: Quote from: Monotoba on November 02, 2024, 12:02:09 amHi, you can add a common base/gate to each output to raise the voltage without using more expensive chips.