Arduino Based LED Tester
Please see the attached Arduino-Based-LED-Tester.zip for code files.
A handy little tool that can help you out if you work with LEDs a lot, especially if you are always trying to work out the right resistor to make them work. The idea has been shamelessly borrowed from Dave Cook's model at http://robotroom.com/LED-Tester-Pro-1.html. I've written the code from scratch to suit the parts we have available in the Duinotech range.
The display shows target current, LED forward voltage, actual test current on the first line and target supply voltage, suggested resistance and suggested Jaycar part number from the ½W range. If the resistor would dissipate more than half a watt, a P flashes on the top line to let you know you might need to choose a more powerful resistor.
The other good thing about this project is that apart from the custom shield we're going to build out of the prototyping shield, all the boards can just be pulled apart and reused.
Bill of Materials
|1||RR0538||39R 1/2W Resistor|
|1||RR0524||10R 1/2W Resistor|
|1||RE6194||470u 16V Electrolytic Capacitor|
I've used a couple of jumper wires as test leads, but any old wire should do. You could even use test leads with sockets in the end (like WC6028) and push the legs of the LEDs in.
|Positive Test Lead||D3|
|Negative Test Lead||GND|
Here is the circuit diagram of the custom shield:
And what it looks like assembled:
Note that I've used the GND connection on the ICSP header for the test lead. There should be enough length in the component legs that extra wire isn't needed. The only other thing to watch out for is that the negative (white stripe) side of the capacitor goes to GND.
When this is assembled, connect the UNO to the bottom of the new shield and the LCD shield to the top.
If you haven't already, download and install the Arduino IDE from https://www.arduino.cc/en/Main/Software, and check that the drivers are installed for the UNO board.
Open the sketch file in the Arduino IDE and upload it to the UNO, making sure UNO is selected from Tools>Board, and that the correct serial port for the UNO is selected from Tools>Port.
After this, the Arduino LED Tester should spring into life. With no LED attached, it will not show a resistor value. Connect an LED between the test leads and the LED will light up, and the display will show its characteristics operating from a 14V supply at 10mA. The target voltage can be changed between 1V and 99V with the up and down buttons on the display, and the left and right buttons change the target current (up to 20mA).
With only software changes, the Tester could also be modified to test other 2-legged components, so it might be possible to use it as a capacitance meter. Of course, it can tell you the forward voltage of regular diodes in its current form.