Tag
Firmware
12 sheets with this mark.
- Loop timing that matches your sensor's real bandwidthControl loops run at the speed your code permits, not the speed your sensor delivers. Measure what you're actually sampling before you tune gains that fight aliasing.
- Analog filtering when the ADC sees every bounceA small RC lowpass between sensor and converter often saves more code than it costs in parts. Here's how to size it without trial and error.
- PWM frequency you'll hear before your motor doesAudible whine from motor drivers isn't a feature. Push your PWM carrier above 20 kHz or accept the complaints.
- Debounce switches in firmware, not hopeMechanical switches bounce. Your interrupt handler doesn't care about your optimism.
- Encoder quadrature you'll decode without the phase chartIncremental encoders give you direction and distance, but only if you sample both channels correctly. Here's how to wire and poll quadrature without consulting the timing diagram every build.
- UART baud rates that match what you solderedCrystal tolerances and baud-rate math collide in real hardware. Here's how to pick speeds that won't drift into garbage frames.
- Watchdog timers before the mystery rebootYour microcontroller will lock up eventually. A properly configured watchdog catches silent failures before they become field support calls.
- State machines that survive the prototypeFinite state machines aren't academic ceremony—they're how you keep firmware predictable when inputs misbehave and timers collide.
- Interrupt-driven sensor reads you'll debug oncePolling burns cycles and misses edges. Interrupt-driven sensor reads give you precision timing and lower power draw—if you set them up correctly the first time.
- PID tuning without the spreadsheet theaterStop guessing gains from blog posts. A disciplined step-response test and three coefficients you measure yourself will outperform any magic number you found online.
- Sensor calibration you'll actually run twiceMost calibration routines gather dust in a comment block. Here's how to build the kind you'll invoke before every demo without groaning.
- Closed-loop or cosplayIf the robot cannot sense the thing it claims to control, it is performing robotics.