Round Round Get Around: Why Fixed-Point Right-Shifts Are Just Fine
Jason Sachs explains why, in most embedded systems, simple bitwise right-shifts are an acceptable way to do fixed-point division rather than paying the runtime cost to round. He shows the cheap trick of adding 2^(N-1) to implement round-to-nearest, explains unbiased "round-to-even" issues, and compares arithmetic error to much larger ADC and sensor errors. The takeaway: save cycles unless your algorithm or inputs require extra precision.
Scorchers, Part 1: Tools and Burn Rate
Small purchases often pay for themselves faster than you expect, and Jason Sachs walks through the math to prove it. He shows how to compute a fully burdened labor rate, including taxes, benefits, overhead, holidays, and productive hours, then compares that rate to the price of common tools. The practical conclusion is simple: if a sub-$100 utility saves about an hour of productive work, just buy it.
Padé Delay is Okay Today
High-order Padé approximations for time delays break in surprising ways, but the failure is not magic. Jason Sachs walks through why coefficient-based transfer functions and companion-form state-space are numerically fragile, shows how to compute poles and zeros directly from the hypergeometric form with Newton iteration, and demonstrates building modal or block-diagonal state-space realizations to make high-order Padé delays practical while noting remaining limits.
Margin Call: Fermi Problems, Highway Horrors, Black Swans, and Why You Should Worry About When You Should Worry
Jason Sachs walks through practical strategies for choosing engineering margin, from split-second Fermi estimates to industry-grade safety factors. He blends highway and boiler anecdotes with a MOSFET thermal example to show why probabilistic thinking, experiments, and documentation matter when you must decide fast or later justify your choices. Read this to learn how to balance conservatism, cost, and risk in real projects.
Ten Little Algorithms, Part 5: Quadratic Extremum Interpolation and Chandrupatla's Method
Today we will be drifting back into the topic of numerical methods, and look at an algorithm that takes in a series of discretely-sampled data points, and estimates the maximum value of the waveform they were sampled from.
The Dilemma of Unwritten Requirements
Unwritten requirements quietly wreck projects, and Jason Sachs uses a humble wooden spool to illustrate how small mechanical and manufacturing choices become visible system behaviors. He contrasts craft-store spools with industrial ones to show where hidden assumptions like concentricity get dropped in the name of cost. The post urges engineers to surface externally visible trade-offs to customers or contractors and to iteratively capture discovered requirements.
Trust, but Verify: Examining the Output of an Embedded Compiler
Jason Sachs argues embedded engineers should read their compiler's assembly even if they rarely write assembly. He walks through Microchip XC16 output for dsPIC33 devices, showing how simple C variants and optimization flags produce very different code. The article demonstrates practical verification techniques and a tiny Python helper, pyxc16, to quickly inspect assembly for timing-sensitive firmware without rewriting everything in assembly.
How to Read a Power MOSFET Datasheet
Jason Sachs takes a soapbox to stop a recurring mistake: misreading power MOSFET datasheets. This practical guide separates marketing blurbs and typical graphs from the specifications you can actually rely on, and explains how to use RDS(on), VGS, gate charge, SOA and thermal data in real designs. Read this before you pick a MOSFET or size a gate driver.
Lessons Learned from Embedded Code Reviews (Including Some Surprises)
Jason Sachs recounts a round of motor-controller code reviews and the practical lessons his team learned about quality and tooling. He explains how a simple "ready for review" checklist and automated style checks kept meetings focused on substantive issues, and why choosing the right review tool matters after discovering lost comments in Stash. Read for concrete tips on process, subgit mirroring, vera++, and Upsource.
Ten Little Algorithms, Part 4: Topological Sort
Jason Sachs detours from signal processing to make topological sort feel practical and even a little funny, using a Martian Stew recipe to illustrate dependencies and cycles. He walks through two canonical algorithms, Kahn’s method and the depth-first-search variant, compares adjacency-list and matrix graph representations, and provides complete Python implementations so you can run and inspect cycle detection and ordering yourself.
Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons
Singletons are convenient but often a modularity killer, especially in embedded firmware. Jason Sachs walks through the many faces of singletons, from static members and globals to hardware registers and user-visible application singletons, and shows practical ways to avoid tight coupling. Read this for concrete embedded examples and pragmatic fixes like passing state explicitly, using interfaces or factories, and isolating unavoidable globals in a HAL.
Optimizing Optoisolators, and Other Stories of Making Do With Less
Jason Sachs digs into how to squeeze speed and reliability from low-cost optoisolators, showing practical tweaks that often outperform default datasheet usage. He mixes hands-on circuits — using 4N35 base-emitter resistors, Schottky clamps, input speedup caps, and output buffering — with transistor-switching theory and a cautionary production story to show when to optimize and when to splurge on pricier isolators.
Linear Feedback Shift Registers for the Uninitiated, Part VI: Sing Along with the Berlekamp-Massey Algorithm
Jason Sachs breaks down the Berlekamp-Massey algorithm and shows how to recover an LFSR's minimal connection polynomial from a stream of output bits. The article mixes intuition, worked examples, and Python code to demonstrate the update rule, visual debugging tables, and when the solution is unique. Expect practical implementation notes, a complexity discussion, and a libgf2 example you can run in an IPython notebook.
Slew Rate Limiters: Nonlinear and Proud of It!
Slew-rate limits are a small nonlinear detail that often decides whether a controller behaves nicely or wrecks hardware. Jason Sachs walks through why slew limits appear in electronics and actuators, then shows two practical digital ways to impose limits: constraining input increments and constraining input around the output. He compares performance on underdamped second-order systems, gives closed-form intuition for overshoot, and demonstrates simulations with scipy and ODE solvers.
Lost Secrets of the H-Bridge, Part I: Ripple Current in Inductive Loads
Jason Sachs digs into what PWM switching actually does to current in an H-bridge with an inductive load, and why that ripple matters for motors and power converters. He derives closed-form ripple formulas, shows how to compute a reference current I_R0 = VDC·T/L, and uses Python and sympy to plot and verify results. Read it for practical rules to halve ripple and raise its frequency.
Important Programming Concepts (Even on Embedded Systems) Part V: State Machines
State machines are not glamorous, but they solve a lot of real embedded problems. Jason Sachs uses a motorized couch example to show how FSMs and Harel statecharts expose corner cases, simplify timing constraints, and make behavior easier to specify and review. The article walks through hand-rolled switches, tabular implementations, the state pattern, libraries like QP and Boost, and tool tradeoffs.
Linear Feedback Shift Registers for the Uninitiated, Part XIV: Gold Codes
Gold codes solve a practical spread-spectrum problem, sharing one PRBS across many transmitters eventually runs into ugly synchronization and correlation issues. Jason Sachs walks through why shifted copies of a single LFSR sequence are not enough, then shows how preferred pairs of m-sequences create a family of Gold codes with bounded cross-correlation. The post wraps with Python experiments and a UART DSSS demo that decodes multiple overlapping messages cleanly.
Linear Feedback Shift Registers for the Uninitiated, Part XV: Error Detection and Correction
CRCs and Hamming codes look a lot less magical when you view them as redundancy with a purpose. Jason Sachs walks from parity bits and checksums into finite-field polynomial arithmetic, then shows how CRCs map cleanly onto LFSRs and how Hamming codes use syndromes to locate single-bit errors. It is a practical tour of error detection and correction, with enough worked examples to make the theory feel usable.
Linear Feedback Shift Registers for the Uninitiated, Part XIII: System Identification
Jason Sachs shows how the output of a linear feedback shift register can be used for active system identification, not just spread-spectrum testing. The article compares traditional sine-wave probing with LFSR-based PRBS methods, demonstrates a worked Ra-Rb-C example, and unpacks practical issues such as reflected pseudonoise, ADC quantization, sample counts, and noise-shaping tricks to improve estimates.
The Least Interesting Circuit in the World
Jason Sachs pulls apart the humble power-on reset and shows why the common RC-and-Schmitt trick is the least interesting but most dangerous circuit in your design. He walks through voltage thresholds, brown-out reset behavior, and how slow or noisy Vdd ramps can let parts start in indeterminate states. Read this for practical rules on choosing supervisors, comparators, and reset pulse timing to ensure reliable embedded startup.
Important Programming Concepts (Even on Embedded Systems) Part III: Volatility
Jason Sachs takes volatility out of the basement and into practical embedded programming. He shows why data that can change outside your thread of control breaks assumptions, how the volatile qualifier in C/C++ and Java affects compiler and CPU behavior, and when to prefer shadow registers, locks, or proper concurrency libraries instead of ad hoc volatile usage.
Fluxions for Fun and Profit: Euler, Trapezoidal, Verlet, or Runge-Kutta?
Which ODE solver should you pick for resource‑constrained embedded simulations? Jason Sachs walks through practical numerical methods — Euler, trapezoidal, midpoint, 4th‑order Runge‑Kutta, semi‑implicit Euler, Verlet and the Forest–Ruth symplectic scheme — using hands‑on examples (damped bead, Kepler orbit, pendulum). He highlights accuracy vs. function‑evaluation cost, timestep guidance, and why symplectic methods beat general solvers for long‑term energy conservation.
Lost Secrets of the H-Bridge, Part II: Ripple Current in the DC Link Capacitor
DC link capacitor ripple often determines capacitor life, yet the H-bridge waveform has a lot more structure than you might expect. Jason Sachs separates capacitor current into ramp and pulse components, derives closed-form peak and RMS expressions for edge and center PWM, and shows harmonic amplitudes. The post includes Python simulation so you can visualize the waveforms and apply the formulas to capacitor selection and EMI analysis.
Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 5)
Most of the time a wafer spends in a fab is spent waiting in queues, not being processed. Jason Sachs peels back why cycle times stretch weeks to months, covering WIP accounting, die and wafer banks, the days per mask layer metric, and how variability and utilization tradeoffs turned fab behavior into a major factor in the 2021 chip shortage.
Linear Feedback Shift Registers for the Uninitiated, Part VII: LFSR Implementations, Idiomatic C, and Compiler Explorer
Jason Sachs takes LFSR theory back to real hardware, showing multiple C implementations and dsPIC33E assembly to squeeze cycles out of Galois LFSR updates. He digs into idiomatic C pitfalls like rotate idioms, demonstrates tricks using unions and 16/32-bit views, and shows when inline assembly with SL/RLC and conditional-skip instructions pays off. The article also uses Compiler Explorer and supplies an MPLAB X test harness for verification.
10 Items of Test Equipment You Should Know
Jason Sachs walks through ten often-overlooked pieces of test gear that make debugging embedded hardware faster, safer, and more precise. From clamp-on and Rogowski current probes to spring-tip probes, IC test clips, and compact DAQ systems, each tool targets a common bench frustration. Practical buying notes and use cases help you choose tools that save time and reduce guesswork.
Linear Feedback Shift Registers for the Uninitiated, Part II: libgf2 and Primitive Polynomials
Jason Sachs digs into practical finite-field arithmetic for LFSRs, using his libgf2 Python library as the hands-on guide. He shows how to test whether a polynomial is primitive, why that matters for maximal-length sequences, and how the library implements addition, multiplication, exponentiation, and shifts over GF(2). The post is both a math refresher and a code walkthrough for engineers who want to compute with LFSRs instead of just talk about them.
Stairway to Thévenin
Jason Sachs strips away classroom mystique to show how Thevenin and Norton equivalents are practical tools for real embedded work. Using a simple two-terminal black-box example he shows how two measurements give Vth and Rth, then applies that model to voltage-divider references, potentiometer RC filters, and combining multiple sources with Millman's theorem. Read it for fast, practical ways to predict output impedance, droop, and filter time constants.
Optimizing Optoisolators, and Other Stories of Making Do With Less
Jason Sachs digs into how to squeeze speed and reliability from low-cost optoisolators, showing practical tweaks that often outperform default datasheet usage. He mixes hands-on circuits — using 4N35 base-emitter resistors, Schottky clamps, input speedup caps, and output buffering — with transistor-switching theory and a cautionary production story to show when to optimize and when to splurge on pricier isolators.
How to Analyze a Differential Amplifier
Jason Sachs walks through the algebra and intuition behind the classic four-resistor differential amplifier. He derives the exact output equation, isolates error terms from resistor mismatch and op-amp imperfections, and explains why common-mode gain depends on mismatch not on the differential gain. Read this for clear formulas, modal insight into common-mode versus differential-mode, and practical steps to reduce offsets in real designs.







