What each calculator does
These four calculators cover the arithmetic that comes up again and again when you wire a robot: sizing a resistor, dropping a voltage for an ADC, identifying a part from the parts bin, and checking how much power something will burn.
- Ohm's law. Enter any two of voltage, current and resistance. You get the third, plus the power, with sensible units (mA, kΩ, mW).
- Voltage divider. Solve for the output voltage of two resistors, or for the bottom resistor that gives the output you want. It also shows the current the divider wastes.
- Resistor colour code. Decode 4-, 5- and 6-band resistors, or type a value such as 4.7k to see which bands to look for.
- Capacitor code. Decode three-digit codes such as 104, two-digit codes such as 47, R-codes such as 4R7, tolerance letters, and voltage prefixes such as 2A on film capacitors.
The formulas behind them
Three quick examples
A current-limiting resistor for an LED
A red LED drops about 2.0 V and you want 10 mA from a 5 V pin. The resistor sees 5 − 2 = 3 V, so R = 3 V ÷ 0.010 A = 300 Ω. The nearest common value is 330 Ω, which gives about 9 mA. It dissipates 3 V × 0.009 A ≈ 27 mW, so any 1/4 W resistor is fine.
Reading a 3S LiPo on a 3.3 V ADC
A full 3S pack is 12.6 V. With R1 = 27 kΩ and R2 = 10 kΩ, Vout = 12.6 × 10 ÷ 37 = 3.41 V, which is too high for a 3.3 V pin. Swap to R1 = 33 kΩ: Vout = 12.6 × 10 ÷ 43 = 2.93 V, leaving headroom. The divider draws 12.6 ÷ 43,000 ≈ 0.29 mA, small enough to leave connected.
Identifying parts from the bin
A resistor marked yellow, violet, red, gold is 47 × 100 = 4.7 kΩ at ±5 %. A ceramic capacitor marked 104 is 10 × 104 pF = 100 nF, the classic decoupling capacitor, and 2A222J on a film capacitor means 2.2 nF, ±5 %, rated 100 V.
Practical tips
- Check the power rating, not just the value. A resistor that dissipates more than about half its rating runs hot. Use P = I² × R to check.
- Dividers are not power supplies. The output sags as soon as a load draws current from it. Use a divider to feed an ADC or logic input, and a regulator to power anything.
- Colour bands can be ambiguous. If you are unsure which end is band 1, look for the wider gap before the tolerance band, or simply measure the resistor with a multimeter.
- Mind ceramic capacitor voltage. Small ceramic capacitors lose a large part of their capacitance near their rated voltage, so choose a rating well above the working voltage.