Arduino & Circuit Calculator

Calculate resistor values, LED current limiting resistors, voltage dividers, capacitor charging times, and PWM settings for Arduino projects.

Resistor Color
LED Resistor
Voltage Divider
Capacitor
PWM
Parallel Resistors
Ohm's Law
Power

4-Band Resistor Color Code: Band 1 (First digit), Band 2 (Second digit), Band 3 (Multiplier), Band 4 (Tolerance)

5-Band Resistor Color Code: Band 1 (First digit), Band 2 (Second digit), Band 3 (Third digit), Band 4 (Multiplier), Band 5 (Tolerance)

10Ω
100Ω
220Ω
1kΩ
10kΩ
100kΩ
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
×1
×10
×100
×1k
×10k
×100k
×1M
×10M
×0.01
×0.1
×0.1
×0.01
±1%
±2%
±0.5%
±0.25%
±0.1%
±0.05%
±5%
±10%
±20%

LED Resistor Formula: R = (Vs - Vf) / If

Where: R = Resistor value (Ω), Vs = Supply voltage (V), Vf = LED forward voltage (V), If = LED forward current (A)

V
Typically 3.3V, 5V, or 12V for Arduino projects
3.3V
5V
9V
12V
V
Typically 1.8V-3.3V depending on LED color
Red (1.8V)
Green/Yellow (2.2V)
Blue/White (3.2V)
IR (1.3V)
Typically 10-30mA for standard LEDs
10mA
20mA
30mA
If connecting LEDs in series
1 LED
2 LEDs
3 LEDs
LED Circuit Diagram
Vs R LED GND

Voltage Divider Formula: Vout = Vin × (R2 / (R1 + R2))

Where: Vout = Output voltage (V), Vin = Input voltage (V), R1 = Top resistor (Ω), R2 = Bottom resistor (Ω)

V
Voltage source applied to the divider
Top resistor (connected to Vin)
V
Desired output voltage
Bottom resistor (connected to GND)
Voltage Divider Circuit
Vin R1 Vout R2 GND

RC Time Constant: τ = R × C

Where: τ = Time constant (seconds), R = Resistance (Ω), C = Capacitance (F)

Resistor value in the RC circuit
Capacitor value
10pF
100nF
100μF
1000μF
%
Percentage of full charge (63.2% for 1τ, 95% for 3τ, 99.3% for 5τ)
V
Charging voltage (for voltage calculation)

PWM Parameters: Arduino PWM frequency can be modified by changing timer registers.

Default Arduino PWM frequency is 490Hz (pins 5,6: 980Hz). Duty cycle controls output voltage.

Frequency of PWM signal
60Hz
490Hz
980Hz
31.25kHz
%
Percentage of time signal is HIGH (0-100%)
0%
25%
50%
75%
100%
V
Arduino output voltage (typically 5V or 3.3V)
3.3V
5V
Number of bits for PWM control (Arduino default: 8-bit)

Parallel Resistor Formula: Rtotal = 1 / (1/R1 + 1/R2 + 1/R3 + ...)

For two resistors: Rtotal = (R1 × R2) / (R1 + R2)

Enter resistor values in ohms (Ω). You can add up to 10 resistors.
Two 1kΩ
Three values
Four 1kΩ

Ohm's Law: V = I × R

Where: V = Voltage (V), I = Current (A), R = Resistance (Ω)

V I R
V
Voltage across the component
Current through the component
Resistance of the component
Select which value to calculate from the other two

Power Formulas: P = V × I = V² / R = I² × R

Where: P = Power (W), V = Voltage (V), I = Current (A), R = Resistance (Ω)

V
Select which value to calculate from the other two
Calculating...

Arduino & Electronics Basics

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's intended for anyone making interactive projects.

Key Arduino Concepts:

  • Digital vs Analog: Digital pins read/write HIGH/LOW (5V/0V), analog pins read voltage levels (0-5V)
  • PWM (Pulse Width Modulation): Technique to simulate analog output using digital signals
  • Current Limiting: Protecting components from excessive current with resistors
  • Voltage Divider: Reducing voltage for safe sensor reading

Resistor Color Code System

Color Digit Multiplier Tolerance
Black 0 ×1
Brown 1 ×10 ±1%
Red 2 ×100 ±2%
Orange 3 ×1k
Yellow 4 ×10k
Green 5 ×100k ±0.5%
Blue 6 ×1M ±0.25%
Violet 7 ×10M ±0.1%
Gray 8 ×0.01 ±0.05%
White 9 ×0.1
Gold ×0.1 ±5%
Silver ×0.01 ±10%

LED Forward Voltage by Color

The forward voltage (Vf) of an LED depends on its color and semiconductor material. This is important for calculating the correct current limiting resistor.

1

Red LED: 1.8V - 2.2V forward voltage

2

Green/Yellow LED: 2.0V - 2.4V forward voltage

3

Blue/White LED: 3.0V - 3.6V forward voltage

4

Infrared LED: 1.2V - 1.6V forward voltage

Common Arduino Pin Specifications

  • Digital I/O Pins: 14 (of which 6 provide PWM output)
  • Analog Input Pins: 6 (10-bit resolution, 0-1023)
  • DC Current per I/O Pin: 20mA (40mA max)
  • DC Current for 3.3V Pin: 50mA
  • Flash Memory: 32KB (0.5KB used by bootloader)
  • SRAM: 2KB
  • EEPROM: 1KB
  • Clock Speed: 16MHz

Safety Note: Always double-check calculations before building circuits. Start with higher resistor values and test current with a multimeter. Never exceed maximum ratings for components.

Frequently Asked Questions

Use Ohm's Law: R = (Vs - Vf) / If, where Vs is supply voltage, Vf is LED forward voltage, and If is LED forward current. Standard LEDs typically need 10-30mA. For a 5V supply with a 2.2V LED at 20mA: R = (5 - 2.2) / 0.02 = 140Ω. Use the next standard value (150Ω or 220Ω).

4-band resistors have 2 digits, a multiplier, and a tolerance band. 5-band resistors have 3 digits, a multiplier, and a tolerance band, providing higher precision. 5-band resistors are typically used in precision applications where tolerance is 1% or better.

Arduino PWM frequency is controlled by timers. You can modify timer registers to change frequency. For example, for Timer1 (pins 9,10): TCCR1B = TCCR1B & 0b11111000 | 0x01; sets frequency to 31.25kHz. Different timers control different pins (Timer0: pins 5,6; Timer1: pins 9,10; Timer2: pins 3,11).

Arduino analog inputs can only read 0-5V (0-3.3V on 3.3V boards). Voltage dividers reduce higher voltages to safe levels for reading. For example, to read a 12V sensor with Arduino, use a voltage divider to reduce 12V to 5V. Always ensure the divider doesn't draw too much current from the source.

Use the RC time constant formula: τ = R × C. After 1 time constant (τ), capacitor charges to 63.2% of supply voltage. After 3τ, it's 95% charged; after 5τ, 99.3% charged. For example, with R=10kΩ and C=100μF: τ = 10,000 × 0.0001 = 1 second. 95% charge ≈ 3 seconds.