Electrical Energy Calculator
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open toolInteractive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.
Convert encoder pulses per revolution into quadrature counts per revolution, counts into shaft revolutions and angle, and shaft speed into count rate.
Enter the pulses per revolution on one channel (PPR) from the encoder data sheet.
Choose the decoding mode: x1 counts rising edges of A, x2 both edges of A, x4 every edge of A and B.
Choose what to calculate: counts to revolutions, revolutions to counts, or shaft speed to count rate.
Enter the count, revolutions or speed, or drag the slider. Results update as you type.
Use Copy result for labeled values. Reset restores the starting example.
An incremental quadrature encoder has two outputs, A and B, each a square wave with PPR cycles per shaft turn. B is shifted 90 electrical degrees from A, so the pair passes through four states per cycle and the order of the states gives the direction.
A decoder can count one edge per cycle (x1), both edges of A (x2) or every edge of both channels (x4). Counts per revolution is the PPR times 1, 2 or 4. x4 gives four times as many counts from the same encoder.
Data sheets are not consistent: "CPR" means cycles per revolution in some and counts per revolution in others. Check whether a stated figure already includes x4 decoding before multiplying. Which direction counts up depends on the wiring and the decoder setup, so the tool takes the sign of a count as given.
Limitations: the speed results assume an ideal 90 degree phase and 50% duty. Real encoders have phase and duty errors that make some edge spacings shorter than the ideal time between counts; check the counter's minimum pulse width with margin. The tool does not model gearboxes, index pulses, absolute encoders, position resolution or accuracy.
Counts per revolution: CPR = k × PPR. k is 1, 2 or 4 for x1, x2 or x4 decoding.
Revolutions: r = n / CPR. n is the signed count.
Shaft angle: θ = 360 × n / CPR degrees.
Counts: n = r × CPR. A fractional result lies between two counts.
Count rate: f_c = CPR × N / 60 counts per second. N is shaft speed in rpm.
Channel frequency: f_A = PPR × N / 60 Hz. Time between counts = 1 / f_c.
500 PPR, x4 decoding, count 1000: 2000 counts per revolution; 0.5 revolutions, 180 degrees. 4 × 500 = 2000, and 1000 / 2000 = 0.5 of a turn.
1024 PPR, x4, count 10240: 2.5 revolutions, 900 degrees. 10240 / 4096 = 2.5 and 360 × 2.5 = 900.
600 PPR, x4, count -600: -0.25 revolutions, 270 degrees within one turn. -600 / 2400 = -0.25; -90 degrees is 270 degrees within one turn.
2048 PPR, x4, 3000 rpm: 409600 counts/s, 2.44140625 μs between counts. 8192 × 3000 / 60 = 409600; channel A runs at 102.4 kHz.
100 PPR, x4, 0.333 revolutions: 133.2 counts (nearest whole count 133). Common mistake: a non-whole count means the shaft is between counts.
Available now
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open tool →Available now
Add up to 20 resistors in series using Ω, kΩ or MΩ for circuit analysis and electricity calculations, with a diagram and running total.
Open tool →Available now
Convert absolute temperatures between Celsius, Fahrenheit and kelvin.
Open tool →Nice audio board working as expected.
Given the fact that this was my first purchase and I made it thinking I was buying genuine Yihua products, this has been a setback. I received a lesser known OEM brand called MYTO and while both the products seem to be similar from appearance, my real contention is the quality and quantity of the brass wool. On top of that not informing the customer about the unavailability of the Yihua product and instead sending a product from a different brand is also antagonising. Henceforth, I might just have to think twice before ordering from ThinkRobotics.
TOF MINIF Range Sensor - UART TOF Time-of-Flight Laser Range Sensor
We are disappointed with our recent order experience. We clearly communicated our requirement for 433 MHz antennas on WhatsApp, but the issue remains unresolved. We have been following up for more than 10 days and are still waiting for a proper refund resolution.
As a regular B2B customer, we expected better support. This experience has affected our trust in ThinkRobotics, and we may have to consider other suppliers for future purchases. We request a fair and prompt refund.
Anodised Aluminium Cup Head Washers (Pack of 10)