Project update
Combining HV and LV testing in one unit is overly complicated for this build considering the value of the HV capability compared against the added complexity, I have decided to separate the tools into a low-voltage LED tester and either a full capability high-voltage / series / string LED tester only tester or a more limited combined tested.
So, right now I am building out the more useful half. The box will let you flick an on switch, touch LED legs / pins / wires to a test pad, and see the LED light up if oriented in the correct polarity, with a display showing the forward voltage of the LED and the current it is using to at the brightness you are seeing as well as the value of resistor to use in 3.3V, 5V, 9V, and 12V circuits.
It will test LEDs from ~1V up to ~8.5V at 5mA up to 100mA. The current is set via an incremental rotary selector switch. The tool will attempt to drive the LED at whatever current is set on the selector by using whatever voltage (up to the box’s voltage limit) it needs. You can turn the selector until it hits the brightness you want and then read the forward voltage and the needed resistor value.
Additionally, it can be used to test unknown LEDs without worrying about damaging them by leaving at the lowest current setting and using it as a go/no-go tester.
This should be a useful tool for anyone who regularly works on electronics projects.
Low Voltage (<10V) Portable LED Tester
Feature list
I am going to try to cram in as many useful features as possible while leaving it simple to build and operate.
- Internal battery with USB-C charging
- Compact
- Cheap, available, multi-purpose components
- Relatively simple build
- Selectable current limit
- Instant visual test
- Display:
- Forward voltage
- Working current
- Required resistor for operation at the working current
- Large, front mounted test pads
- Low power
- Tolerant to reversed polarity of test part on lowest current setting
BOM
| Quant |
Name |
Est. Cost ea. |
| 1 |
3.7V LiPo Pouch Cell 1 Ah |
$8 |
| 1 |
TP4056 USB-C Charging Board |
$1 |
| 2 |
Selectable 3.7V Mini Boost Module |
$1 |
| 1 |
INA219 Current Sensor I2C Board |
$3 |
| 1 |
STM8S103F3 Dev Board |
$4 |
| 1 |
0.1uF Mono Ceramic Capacitor |
$0.10 |
| 1 |
LM317T Adjustable Linear Voltage Regulator |
$1 |
| 1 |
1 Pole 5 Position ‘Break-before-make’ Panel Mount Rotary Switch |
$ 5 |
| 1 |
Project Box 100mm x 60mm x 30mm (or 3D printed box) |
$2 |
| 1 |
Piece of blank PCB |
$0.50 |
| 1 |
128 x 32 I2C OLED Display |
$ 3.50 |
| 3 |
1/4W Resistors (240R, 120R, 52R) |
$0.25 |
| 2 |
1/2W Resistors (24R, 12R) |
$0.25 |
| 1 |
SPST Panel Mount Mini Rocker Switch |
$1 |
| 1 |
Mini Test Jacks 4mm Bannana Panel Mount |
$3 |
If you do not have an STLink V2 USB programmer, that is around $6 or you can use an arduino board or other MCU that can drive an 3.3V OLED and a INA219 on I2C. You will have to come up with the source code for that on your own. I shouldn’t be difficult if you ask a competent AI to do it, but YMMV.
For the wiring you should use tinned copper with Kynar or Silicone insulation at 30ga for solid or 24ga for stranded. It is also acceptable to cut apart an old CAT5 ethernet cable and use the wires inside of it as hookup wires.
Wiring can be done point-to-point without perfboard.
Hardware
The hardware is extremely simple. The 3.7V pouch cell is connected to the TP4056 which handles charging and has over-discharge protection. With the TP4056 it is not recommended to use the tool while charging, so if that is something you need then you should find a board based on a different chip. Note that the B- pad and the Vout- pad are not connected and the 3.7V cell’s negative lead should only be connected at the B- pad, and no where else.
The TP4056 Vout+ goes to the rocker switch so we can turn it on and off while still being able to charge it.
Two voltage booster boards, one set to output 5V and the other 12V are connected with parallel inputs on the TP4056 Vout- and the rocker switch.
5VDC powers the microcontroller board, the INA219 current sensor board, and the OLED display while 12VDC powers the LM317T.
The test portion works by setting up the LM317T as a current source by connecting a resistor from the Adjust pin to the Output pin using the equation IO = (VREF / R1) + IADJ = 1.25 V / R1. By using the rotary switch to select different resistors we change the current limit. The LM317 will increase the voltage to the LED until the current limit is met. By setting a small current limit (5mA) we can connect an LED and read the Vf at that brightness.
Use the below table to connect the resistors to the rotary switch. The first position will be the lowest current by using the highest value resistor and increasing current each step by using the next lower resistor in the table. Solder the resistor lead to the switch’s position tab, and then twist the unconnected leads of all the resistors together and connect that to the LM317T’s either the output or adjust pin with the common on the switch on the other one.
| Position |
Resistor |
Current |
| 1 |
240 Ω |
~5 mA |
| 2 |
120 Ω |
~10 mA |
| 3 |
62 Ω |
~20mA mA |
| 4 |
24 Ω |
~50 mA |
| 5 |
12 Ω |
~100mA |
Note that these resistor values are not mandatory. You can pick ones you feel are more suited to your needs, as long as you stay within the applicable circuit and component ratings.
The INA219 senses the current across the V+ and V- pads and outputs it as I2C over SDA and SCL. The V+ pad connects to the LM317T’s adjust pin.
The LED test pad and banana jack positive connects to INA219 V- while negative is circuit ground.
Once programmed, STM8S103F3 just needs the 5V, GND, SCL (B4) and SDA (B5).
Connections
LM317T pins are 1 = ADJ, 2 = OUT, 3 = IN, and the tab is OUT
IMPORTANT: Do not connect TP4056 B- or 3.7V Pouch Cell - to circuit ground!
| Section |
From |
To |
| Power |
3.7V Pouch Cell + / – |
TP4056 B+ / B- |
| Power |
TP4056 Vout+ |
SPST Rocker pin 1 |
| Power |
SPST Rocker pin 2 |
Mini Boost 5V Vin+, Mini Boost 12V Vin+ |
| Power |
TP4056 Vout- |
GND |
| Power |
Mini Boost 5V Vout+ / Vout- |
STM8 5V / GND, INA219 VCC / GND, OLED VCC / GND |
| Power |
Mini Boost 12V Vout+ |
LM317 pin 3 (IN), 0.1 µF pin 1 |
| Power |
0.1 µF pin 2, Mini Boost 5V Vin-, Mini Boost 12V Vin- |
GND |
| Test path |
LM317 pin 2 (OUT) |
Rotary Switch common |
| Test path |
Rotary Switch positions 1–5 |
240 Ω, 120 Ω, 62 Ω, 24 Ω, 12 Ω |
| Test path |
Other ends of all resistors |
LM317 pin 1 (ADJ), INA219 Vin+ |
| Test path |
INA219 Vin- |
Test Pad+, Bannana Jack+ |
| Test path |
Test Pad-, Bannana Jack- |
GND |
| Logic |
STM8 B4 |
INA219 SCL, OLED SCL |
| Logic |
STM8 B5 |
INA219 SDA, OLED SDA |
Firmware
The firmware was written by Claude Opus 5.5 and reviewed by me. I have attached led_tester.c and the ready-to-flash led_tester.ihx to this post.
To compile the firmware from source you need sdcc.
sdcc -mstm8 --std-sdcc99 --opt-code-size led_tester.c
To flash the firmware to the STM8 board you need stm8flash.
stm8flash -c stlinkv2 -p stm8s103f3 -w led_tester.ihx
Pictures!
firmware.zip (6.2 KB)