LED Curve Tracer: Hardware

Based on that comment and faced with two sacks of LEDs, I thought an LED curve tracer might come in handy at some point. While I could modify the MOSFET tester to work with LEDs, they have a higher forward voltage and a much lower current than that hardware can handle without some serious chopping & slicing.

At least for the cheap 5 mm LEDs I’m considering, a forward drop well under 4 V and current under 75 mA should suffice. That suggests a +5 V supply for the LED, a fairly high current-sense resistor, and an Arduino for a quick-and-dirty controller.

The overall idea:

  • Run the LED between a regulated supply and the MOSFET drain
  • MOSFET source to current-sense resistor to ground
  • Measure all three MOSFET terminal voltages
  • Set the gate voltage with a PWM-to-DC filtered voltage

The MOSFET current depends on the gate-to-source voltage, which varies with the current through the sense resistor, so the firmware must measure the actual current and adjust the gate voltage to make the answer come out right. This being a DC application, it can probably monotonically increase VGS and stop when it sees the right current. The MOSFET must have a logic-level gate, so that voltages around +4 V will produce sufficient drain current.

The PWM must run at 32 kHz to minimize the size of the filter cap.

If the LED supply is slightly lower than the Arduino’s VCC supply, then the analog input can report the actual voltage and the forward drop is VCCLED - VDrain. Given a regulated supply, that’s as good measuring the voltage against the ground reference.

The current is VSource / RSense. For a current under, say, 100 mA, a 10 Ω sense resistor will drop 1 V, leaving about 4 V of headroom for VGS. The default 5 V reference means the ADC steps are 5 mV, so the current steps will be 0.5 mA. One could use the Arduino’s internal 1.1 V band-gap reference for higher resolution: 0.11 mA. Changing that is a simple matter of software.

So, after a bit of doodling and a pair of afternoon thunderstorms that forced a complete computer shutdown (and forced me into the Basement Laboratory), here it is:

LED Curve Tracer - overview
LED Curve Tracer – overview

The Arduino Pro Mini board (it’s actually a cheap knockoff) has female headers for all the usual signals and a male header to match the sockets on the FTDI Basic programmer board, all from my heap. The connections use flying leads stripped from a length of ribbon cable, soldered to male header pins snipped from a stick, and reinforced with heatstink tubing. The Pro Mini isn’t anchored in place and probably never will be.

Another view, minus cables and FTDI:

LED Curve Tracer - top
LED Curve Tracer – top

The LED leads just jam into an old IC socket. The top pushbutton triggers the test, the bottom one doesn’t do anything yet.

Nothing fancy at all; I hand-wired it to avoid all the usual DIY PCB hassles.The bottom view shows all the wiring:

LED Curve Tracer - bottom
LED Curve Tracer – bottom

The schematic, such as it is:

LED Curve Tracer Schematic
LED Curve Tracer Schematic

The regulator is a random Fairchild KA278RA05C +5 V LDO, obtained surplus. The 68 kΩ resistor trims the internal divider to pull the output to 4.87 V, just a touch under the Arduino’s 4.93 V regulator. The power supply is a 7.5 V 2 A surplus lump with no pedigree.

The MOSFET is an IRLZ14 logic-level FET with grossly excessive qualifications.

The sense resistor is a pair of 21.0 Ω 1% resistors in parallel = 10.5 Ω. That’s just a firmware constant, so I don’t care what the actual value works out to be.

Next, a dab of firmware…

10 thoughts on “LED Curve Tracer: Hardware

    1. I grovel, I abase myself, I kiss your feet: you have stuff!

      Eks almost forced me to take an old Tek curve tracer off his hands a while ago, but those things are really big hulks and the duty cycle around here would be so small…

  1. Gotta have stuff. However, the curve tracer in that pile is analog, whereas yours can log data which you can then later plot and compare, which will be much more useful for this project.

  2. I’m just trying to figure out how close your current measurements will be. Do you have an o-scope showing Vgate vs Vsource? (I’m basically wondering about your PWM usage model instead of a variable current sink using the FET and an OP-AMP or something )

    1. a variable current sink using the FET and an OP-AMP

      The current feedback loop closes through the Arduino, so it produces about the same net result as the op-amp current loop I used in the MOSFET tester. The whole thing runs at DC, pretty much, so feedback and PWM bandwidth wasn’t really an issue.

      The op amp provided high-side IDS sensing, which meant I could measure the MOSFET VD against ground without correcting for a sense resistor below the source and could drive VGS directly. The much lower LED currents & voltages let me get away with a simpler circuit; I could get the LED drop from the regulator voltage and didn’t care about the actual VGS.

      The IRLZ14 gate doesn’t run out of VGS headroom at 100 mA, because the MOSFET hits IDS = 5 A with VGS = 4 V and has a 1-2 V threshold. Here are the curves for VGS from 2 to 10 V in 500 mV steps:
      IRLZ14 Logic-level MOSFET characteristics

      Works like a champ!

Comments are closed.