by Elospeed
🇩🇪 Deutsche Anleitung: LIESMICH.md
Website: elospeed.github.io/LedPreResistor · Download: latest release
LedPreResistor calculates the series resistor for one or more LEDs. It is the new edition of the freeware tool LED Pre-Resistor (Delphi 7, 2004), rebuilt from scratch in Lazarus: a single 64-bit Windows exe, no installer, no extra packages. Since 2.2 there is also a native Linux version.
What it does
- Live calculation while you type: supply voltage, forward voltage, LED current and number of LEDs in series.
- Nearest standard value from the E12, E24 or E96 series (always the next higher value, so the LED never gets more current than planned).
- Real current and power in the resistor, in the LEDs and in total, plus a recommended resistor rating (⅛ / ¼ / ½ / 1 W) with a warning above 50 % load and an estimated temperature rise.
- Colour bands of the resistor (4 bands, 5 bands for E96) and a schematic with all values at the components.
- "How it is calculated" panel that walks through the calculation step by step with your own numbers.
- Presets for red, yellow, green, blue, white and infrared LEDs, or your own forward voltage from the datasheet.
- LED preview: a 5 mm LED in the chosen colour with anode, cathode and flat side labelled.
- Blink circuit tab (since 2.3): NE555 astable (optionally with a diode across R2) or a two-transistor multivibrator (BC547). Calculates frequency, on/off times and the LED series resistor from the parts, or the timing resistors from a desired frequency and duty cycle. The preview blinks at the calculated rate, with schematic, "How it is calculated" and checks (supply range, output current, transistor saturation, base reverse voltage).
- LED info "The LED" built in (F1, opens in your browser, also offline).
- Copy the result with Ctrl+Shift+C. Comma and dot both work as decimal separator.
- English and German: starts in German on a German Windows and in English everywhere else; View → Language switches at any time (saved in
LedPreResistor.ininext to the exe, on Linux in~/.config/LedPreResistor/).
Example: 12 V supply, one white LED (3.2 V), 20 mA → 440 Ω calculated, 470 Ω (E12, yellow-violet-brown-gold), 18.72 mA real current, 164.8 mW in the resistor → use a ½ W resistor.
LedPreResistor is a one-person hobby project. If it helps you, you can buy me a coffee on Ko-fi ☕. Entirely optional, the tool stays free either way. The program never asks; there is just a small "Buy me a coffee" button in the status bar.
- Download the ZIP from the latest release and unzip it anywhere.
- Start
LedPreResistor.exe. Nothing to install. Windows SmartScreen may warn because the exe is not signed: "More info" → "Run anyway". - Optional: compare the SHA-256 checksum with the one in the release notes (
certutil -hashfile LedPreResistor.exe SHA256).
Linux (x86_64, native GTK2 build):
- Download
LedPreResistor-<version>-linux-x86_64.tar.gzfrom the latest release and unpack it. - Run
./LedPreResistorin the unpacked folder. It needs GTK2, which most desktops already have (otherwise:sudo apt install libgtk2.0-0,sudo dnf install gtk2orsudo pacman -S gtk2). - Optional:
./install.shadds the program to your application menu (no root, into~/.local),./install.sh --uninstallremoves it.
Lazarus 3.8 (FPC 3.2.2), LCL only:
lazbuild -B --os=win64 --cpu=x86_64 --ws=win32 src/LedPreResistor.lpi # Windows
lazbuild -B --ws=gtk2 src/LedPreResistor.lpi # Linux
linux/pakete-bauen.sh <version> ausgabe # Linux tar.gz
Every pull request and every push to main is built automatically for Windows and Linux by GitHub Actions (.github/workflows/build.yml).
| Path | Content |
|---|---|
src/ |
Lazarus project and units |
src/lang/ |
Translations (German / English) |
tests/ |
Unit tests of the calculation (FPCUnit, run by every build) |
docs/ |
Project overview, development log, ideas, test builds (German) |
docs/legacy/ |
Original Delphi 7 source code from 2004, for reference only |
docs/design/ |
Approved design draft (open the HTML file in a browser) |
linux/ |
Linux packaging: menu entry, install script, readme, pakete-bauen.sh |
site/ |
Project website (GitHub Pages, English and German) |
MIT, see LICENSE.
