3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Build an LED Analyzer

Build an LED Analyzer
When building circuits with LEDs, it's nice to have good data on the characteristics of the LEDs that one is using!  Knowing the forward voltage for an LED or string of LEDs at a particular current can help a designer define the power supply requirements of the circuit, and even the lowliest "LED with a current limiting resistor" setup benefits from knowing the LED forward voltage to size  the current limiting resistor appropriately.  LEDs can also come in handy in other situations where their light output is incidental, such as constructing current sources, or using them as sources of approximately constant voltage in tube amplifier bias circuitry.  In applications such as these knowing the I-V characteristic of the LED to be used in a circuit can be particularly important.

As anyone who has bought batches of LEDs on Ebay from Chinese suppliers knows, a detailed datasheet on the characteristics of the LEDs can be pretty hard to come by! That's where this circuit comes in: with the help of an Arduino and a few external components, one can build an LED Analyzer that will analyze a LED's I-V characteristics and spit out an equation that one can use to calculate its voltage drop from its forward current and vice versa.

Here's a quick video of the analyzer in action:

 
Remove these adsRemove these ads by Signing Up
 

Step 1The Setup

The Setup
Here's the setup.  The Arduino is on the far left, and connected to its SCL and SDA lines is the very handy MCP4725 I2C DAC.  This DAC converts an increasing sequence of output voltages to a sequence of increasing currents with the help of our friend the LM358 op amp and transistor Q3  IC1A, T1, and R4 form a current sink; feedback around the op amp keeps the current through R4 equal to a value defined by Vin/R4, where Vin is equal to the output voltage from the MCP4725.  We have to be careful, however, to not let the input voltage to the non-inverting input go too high - the LM358 has a common-mode input voltage range above which it ceases to behave properly.  Therefore the output from the DAC is restricted to a maximum level of 3 volts, which implies a maximum current through R4 of 30 mA.  This is approximately the maximum current rating for most 5mm LEDs.  C1 and R3 help to prevent the LM358 from oscillating.

Of course, Q3 is a current sink and what we want is a current source, to pump current into the LED so its forward voltage can be measured.  Q1 and Q2 perform this turnaround function.  IC2A and R5 buffer the sensed voltage and protect the input to the Arduino.

The Arduino runs a sketch that ramps up the DAC voltage, and hence the current through the LED, and then reads the resulting LED forward voltage through one of its analog input pins.  It then communicates with a Python script running on a PC via its serial to USB link, and this script organizes the data and displays a graph of the LED under test's I-V characteristic.  It also runs a curve-fitting routine that generates coefficients for an exponential function similar to the Shockley diode model.  To get a smaller error in the fit function, the Python script has the option of running the analysis multiple times and the averaging the data; the data generated for the "Results" section that follows was averaged over ten runs of the analyzer.

Here's a quick parts list for the hardware:

Arduino (1x)
MCP4725 DAC  breakout board with pull up resistors and capacitor  (available at http://www.sparkfun.com )
LM358 dual op amp or similar (1x)
BC547 NPN transistor or similar (1x)
BC556 PNP transistor or similar (2x)
10 ohm resistor (2x)
220 ohm resistor (1x)
100 ohm 1% or better resistor (R4) 1x
1k ohm resistor (1x)
0.1uF bypass capacitor (1x)
0.01uF capacitor (1x)
LEDs to test!
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Jan 6, 2012. 4:07 AMlessismore4u says:
Hello, I would like very much to build this circuit. Is there a way we can see a bigger picture and more details about how to hook the parts together. The setup diagram is too small to read. Thank you
Sep 12, 2011. 12:38 AMdyntema says:
Q1 has its collector and basis connected together. (and the transistors should be thermally connected for accurate results). Nice device though!
Aug 24, 2011. 7:35 AMveggiemaster says:
this is a fantastic project and something I've needed for sometime! I've got a whole bin of LEDs from multiple different sources and have no clue as to their specs. Brilliant project!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:bitrex