Documentation sections
Current Shunt Resistor
POSThttps://rftools.io/ api/ py/ v1/ calculate
Slug current-shunt. Calculate shunt resistor voltage drop, power dissipation, amplifier output, and ADC resolution for current sensing circuits. Free, instant results.
Inputs
Send every one of these in inputs, in the units shown. Most are required: a call without one is refused (400) and costs nothing; one the calculator can do without takes the default shown. An input outside its range is still computed and flagged in the provenance.
| Name | Unit | Range | Default | Description |
|---|---|---|---|---|
| currentnumber | A | at least 0 | 10 | Measured Current |
| shuntResistancenumber | mΩ | at least 0.001 | 10 | Shunt Resistance |
| amplifierGainnumber | V/V | at least 1 | 20 | INA219: 1–128×, INA240: 20–200× |
| adcVoltagenumber | V | at least 0.1 | 3.3 | ADC Reference Voltage |
| adcBitsnumber | bit | 1 … 24 | 12 | ADC resolution in bits; the ADC code and the resolution output use this many bits |
Outputs
Returned in values, by key. A value that is unbounded or undefined is null.
| Field | Unit | Description |
|---|---|---|
| shuntVoltageheadline | mV | Shunt Voltage Drop |
| amplifiedVoltage | V | Amplified Voltage |
| powerDissipation | mW | Shunt Power Dissipation |
| adcResolutionCurrent | mA/LSB | ADC Resolution (12-bit) |
| adcCode | none | The code an ideal ADC reads: floor(V_amp / V_ref × 2^N) |
| resolution | A/LSB | The current one ADC step spans at the ADC resolution above |
Calling it
- Calculate: one call, the request and response in full, and its errors.
- Batch: this calculator with others, or a sweep, in one request.
- Solve for a target: the value of one input that brings an output to a target.