← All tool references

Engineering · not_available

LED Resistor Calculator

Size a series resistor and power rating for one or more LEDs.

Open public tool

Overview

Category
Engineering
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/led-resistor-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/led-resistor-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

supply_voltage · number · required
Enter the supply voltage used by this tool.
led_forward_voltage · number · required
Enter the led forward voltage used by this tool.
leds_in_series · number · required
Enter the leds in series used by this tool.
led_current_ma · number · required
Enter the target led current used by this tool.
preferred_series · string · required
Enter the preferred resistor series used by this tool. Accepted values: none, E12, E24.
{
    "type": "object",
    "properties": {
        "supply_voltage": {
            "type": "number",
            "description": "Enter the supply voltage used by this tool.",
            "minimum": 0
        },
        "led_forward_voltage": {
            "type": "number",
            "description": "Enter the led forward voltage used by this tool.",
            "minimum": 0
        },
        "leds_in_series": {
            "type": "number",
            "description": "Enter the leds in series used by this tool.",
            "minimum": 1
        },
        "led_current_ma": {
            "type": "number",
            "description": "Enter the target led current used by this tool.",
            "minimum": 0.01000000000000000020816681711721685132943093776702880859375
        },
        "preferred_series": {
            "type": "string",
            "description": "Enter the preferred resistor series used by this tool.",
            "enum": [
                "none",
                "E12",
                "E24"
            ]
        }
    },
    "required": [
        "supply_voltage",
        "led_forward_voltage",
        "leds_in_series",
        "led_current_ma",
        "preferred_series"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

exact_resistance · number
Exact resistance produced by the tool.
recommended_resistance · number
Recommended resistance produced by the tool.
resistor_power · number
Resistor power produced by the tool.
recommended_wattage · number
Recommended resistor wattage produced by the tool.
actual_current_ma · number
Actual LED current produced by the tool.
{
    "type": "object",
    "properties": {
        "exact_resistance": {
            "type": "number",
            "description": "Exact resistance produced by the tool."
        },
        "recommended_resistance": {
            "type": "number",
            "description": "Recommended resistance produced by the tool."
        },
        "resistor_power": {
            "type": "number",
            "description": "Resistor power produced by the tool."
        },
        "recommended_wattage": {
            "type": "number",
            "description": "Recommended resistor wattage produced by the tool."
        },
        "actual_current_ma": {
            "type": "number",
            "description": "Actual LED current produced by the tool."
        }
    },
    "additionalProperties": false
}

LED Resistor Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/led-resistor-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "supply_voltage": 12,
    "led_forward_voltage": 2.100000000000000088817841970012523233890533447265625,
    "leds_in_series": 3,
    "led_current_ma": 20,
    "preferred_series": "E12"
}'
{
    "ok": true,
    "data": {
        "slug": "led-resistor-calculator",
        "result": {
            "values": {
                "exact_resistance": 285,
                "recommended_resistance": 330,
                "resistor_power": 0.0984545500000000017859491663330118171870708465576171875,
                "recommended_wattage": 0.25,
                "actual_current_ma": 17.272726999999999719648258178494870662689208984375
            },
            "display": {
                "display": "285"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.