Actuator Lab Electrical Calculation Audit
Actuator Lab Electrical Calculation Audit
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
Actuator Lab Electrical Calculation Audit
Lab 4 targets 300 RPM but the encoder reads 250 RPM, so at a proportional gain of 0.5 the correction adds 25 to the current PWM of 128, giving 153 — a 60.0% duty. That duty spins the motor on the 9 V rail at 0.35 A for 3.15 W, while a 1.5 A return through 0.2 Ω of shared ground bounces the reference by 0.3 V. This audit re-derives the whole chain and asks whether the tidy control math survives the bench, or whether startup current and ground bounce — not the duty — decide when the board resets.
Companion to the chapter Lab: Actuators — every number here comes from that chapter.
The whole lab is one chain of arithmetic: the control gain sets the duty, the duty sets a PWM byte and the average power, and the startup current through wiring resistance sets the voltage the board actually sees. Every figure below is one the labs already gave.
See the relationship before changing it
The figure reads from left to right. The blue card is measured motor speed. The middle card applies this page's rule. The green card is proportional pwm correction. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only measured motor speed, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 250 RPM.
- 2
Name the relationship. correction = 0.5 x (300 RPM - measured speed)
- 3
Substitute with units. 0.5 x (300 - 250) = 25 counts
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change measured motor speed
Try Predict the direction of correction = 0.5 x (300 RPM - measured speed). Test another measured motor speed, then compare proportional pwm correction.
Observe As measured speed approaches the target, the proportional correction becomes smaller. Reset measured motor speed to 250 and compare proportional pwm correction.
Explain At 250 RPM, the 50 RPM error produces a smaller proportional correction than a slower measurement.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
1. The proportional term sets the new duty.
Lab 4 targets 300 RPM but the encoder reads 250 RPM. With Kp = 0.5 the correction is added to the current PWM of 128:
2. Duty maps to a byte and to power.
On an 8-bit channel a duty fraction becomes duty × 255 (rounded to the nearest count), and the freely spinning motor on the 9 V rail draws 0.35 A:
3. Current through resistance moves voltage (Ohm's law).
The shared ground return, the held solenoid coil, and the measured startup sag all follow V = I × R:
| Lab quantity | Arithmetic shown | Result |
| PID proportional correction | 0.5 × (300 − 250) | 25 |
| New PWM value | 128 + 25 | 153 (60.0% duty) |
| PWM byte for 25% / 75% / 20% | 0.25×255 / 0.75×255 / 0.20×255 | 64 / 191 / 51 (rounded) |
| Running motor power (9 V rail) | 9 × 0.35 | 3.15 W |
| Ground bounce (1.5 A through 0.2 Ω) | 1.5 × 0.2 | 0.3 V |
| Solenoid coil dissipation | 12 × 0.45 | 5.4 W |
| Effective series R from 9.0→7.8 V sag | (9.0 − 7.8) / 1.4 | 0.857 Ω |
What this means for your design: the control math is exact — the gain decides the 60% duty and the 3.15 W average — but the driver and supply must survive the startup current, never the tidy running power. The 0.857 Ω hidden in the source and wiring is what turns a 1.4 A inrush into a 1.2 V sag, and the 0.3 V ground bounce is why a "clean" 3.3 V logic high goes ambiguous when a fat motor return shares thin breadboard ground. Star grounding, short thick returns, and bulk decoupling shrink those resistances so the arithmetic stays on paper instead of resetting the board.
Every number above is taken from the chapter’s own examples and re-derived step by step.
Audit result
The arithmetic gives 153/255 = 60.0% duty and 0.3 V ground bounce; bench evidence must show whether that transient is tolerated.