Linear Feedback Shift Registers for the Uninitiated, Part I: Ex-Pralite Monks and Finite Fields
Later there will be, I hope, some people who will find it to their advantage to decipher all this mess.
— Évariste Galois, May 29, 1832
I was going to call this short series of articles “LFSRs for Dummies”, but thought better of it. What is a linear feedback shift register? If you want the short answer, the Wikipedia article is a decent introduction. But these articles are aimed at those of you who want a little bit deeper mathematical...
How to Succeed in Motor Control: Olaus Magnus, Donald Rumsfeld, and YouTube
Almost four years ago, I had this insight — we were doing it wrong! Most of the application notes on motor control were about the core algorithms: various six-step or field-oriented control methods, with Park and Clarke transforms, sensorless estimators, and whatnot. It was kind of like a driving school would be, if they taught you how the accelerator and brake pedal worked, and how the four-stroke Otto cycle works in internal combustion engines, and handed you a written...
Scorchers, Part 1: Tools and Burn Rate
This is a short article about one aspect of purchasing, for engineers.
I had an engineering manager once — I’ll leave his real name out of it, but let’s call him Barney — who had a catchy response to the question “Can I buy XYZ?”, where XYZ was some piece of test equipment, like an oscilloscope or multimeter. Barney said, “Get what you need, need what you get.” We used purchase orders, which when I started in 1996 were these quaint forms on...
Margin Call: Fermi Problems, Highway Horrors, Black Swans, and Why You Should Worry About When You Should Worry
“Reports that say that something hasn’t happened are always interesting to me, because as we know, there are known knowns; there are things we know that we know. There are known unknowns; that is to say, there are things that we now know we don’t know. But there are also unknown unknowns — there are things we do not know we don’t know.” — Donald Rumsfeld, February 2002
Today’s topic is engineering margin.
XKCD had a what-if column involving Fermi...
Basic hand tools for electronics assembly
Though the software tools vary with different microcontrollers, many hardware tools are the same.
Oh Robot My Robot
Oh Robot! My Robot! You’ve broken off your nose! Your head is spinning round and round, your eye no longer glows, Each program after program tapped your golden memory, You used to have 12K, now there is none that I can see, Under smoldering antennae, Over long forgotten feet, My sister used your last part: The chip she tried to eat.
Oh Robot, My Robot, the remote controls—they call, The call—for...
Python Code from My Articles Now Online in IPython Notebooks
Ever since I started using IPython Notebooks to write these articles, I’ve been wanting to publish them in a form such that you can freely use my Python code. One of you (maredsous10) wanted this access as well.
Well, I finally bit the bullet and automated a script that will extract the Python code and create standalone notebooks, that are available publicly under the Apache license on my bitbucket account: https://bitbucket.org/jason_s/embedded-blog-public
This also means they...
My Love-Hate Relationship with Stack Overflow: Arthur S., Arthur T., and the Soup Nazi
Warning: In the interest of maintaining a coherent stream of consciousness, I’m lowering the setting on my profanity filter for this post. Just wanted to let you know ahead of time.
I’ve been a user of Stack Overflow since December of 2008. And I say “user” both in the software sense, and in the drug-addict sense. I’m Jason S, user #44330, and I’m a programming addict. (Hi, Jason S.) The Gravatar, in case you were wondering, is a screen...
Book Review: "Turing's Cathedral"
My library had Turing’s Cathedral: The Origins of the Digital Universe by George Dyson on its new acquisitions shelf, so I read it. I’d recommend the book to anyone interested in the history of computing.
Turing’s Cathedral primarly covers the period in early computing from 1940-1958, and bridges a gap between a few other popular books: on the historic side, between Richard Rhodes’s
Practical protection against dust and water (i.e. IP protection)
Recently, I was faced with a challenge to provide IP65 compliance in a product that had to have humidity and pressure sensors on it. The tricky part was to keep the cost of the unit under $15 while meeting this requirement.
Under normal circumstances, one can put all the electronics within an IP65 enclosure that is affordable and readily available off-the-shelf most of the time such as the ones shown in this link. However, given the humidity and the pressure sensor need to be exposed to...
How to Succeed in Motor Control: Olaus Magnus, Donald Rumsfeld, and YouTube
Almost four years ago, I had this insight — we were doing it wrong! Most of the application notes on motor control were about the core algorithms: various six-step or field-oriented control methods, with Park and Clarke transforms, sensorless estimators, and whatnot. It was kind of like a driving school would be, if they taught you how the accelerator and brake pedal worked, and how the four-stroke Otto cycle works in internal combustion engines, and handed you a written...
A Wish for Things That Work
As the end of the year approaches, I become introspective. This year I am frustrated by bad user interfaces in software.
Actually, every year, throughout the year, I am frustrated by bad user interfaces in software. And yet here it is, the end of 2017, and things aren’t getting much better! Argh!
I wrote about this sort of thing a bit back in 2011 (“Complexity in Consumer Electronics Considered Harmful”) but I think it’s time to revisit the topic. So I’m...
Garden Rakes Revisited: The Hall of Shame
A little while ago, I wrote about what I call the “garden rakes” syndrome in software, where there are little bugs or pitfalls lying around like sloppy garden rakes that no one has put away, and when you use these software programs, instead of zooming around getting things done, you’re either tripping over the garden rakes or carefully trying to avoid them. Either way, you lose focus on what you’re really trying to work on, and that causes a big hit in...
Linear Feedback Shift Registers for the Uninitiated, Part III: Multiplicative Inverse, and Blankinship's Algorithm
Last time we talked about basic arithmetic operations in the finite field \( GF(2)[x]/p(x) \) — addition, multiplication, raising to a power, shift-left and shift-right — as well as how to determine whether a polynomial \( p(x) \) is primitive. If a polynomial \( p(x) \) is primitive, it can be used to define an LFSR with coefficients that correspond to the 1 terms in \( p(x) \), that has maximal length of \( 2^N-1 \), covering all bit patterns except the all-zero...
Linear Feedback Shift Registers for the Uninitiated, Part X: Counters and Encoders
Last time we looked at LFSR output decimation and the computation of trace parity.
Today we are starting to look in detail at some applications of LFSRs, namely counters and encoders.
CountersI mentioned counters briefly in the article on easy discrete logarithms. The idea here is that the propagation delay in an LFSR is smaller than in a counter, since the logic to compute the next LFSR state is simpler than in an ordinary counter. All you need to construct an LFSR is
Linear Feedback Shift Registers for the Uninitiated, Part IX: Decimation, Trace Parity, and Cyclotomic Cosets
Last time we looked at matrix methods and how they can be used to analyze two important aspects of LFSRs:
- time shifts
- state recovery from LFSR output
In both cases we were able to use a finite field or bitwise approach to arrive at the same result as a matrix-based approach. The matrix approach is more expensive in terms of execution time and memory storage, but in some cases is conceptually simpler.
This article will be covering some concepts that are useful for studying the...
Musings on Publication — and Zero Sequence Modulation
Perhaps you don’t think about it, but in order for you to read these articles, someone has to do something.
And I don’t just mean writing them. Stephane Boucher has set up this website so that it’s automatic, for the most part — at least from my end of things, as an author. When I get an idea for an article, I open up a new IPython Notebook, write my article, save it in a Mercurial repository, run a Python script to convert from IPython Notebook format to HTML, open...
Python Code from My Articles Now Online in IPython Notebooks
Ever since I started using IPython Notebooks to write these articles, I’ve been wanting to publish them in a form such that you can freely use my Python code. One of you (maredsous10) wanted this access as well.
Well, I finally bit the bullet and automated a script that will extract the Python code and create standalone notebooks, that are available publicly under the Apache license on my bitbucket account: https://bitbucket.org/jason_s/embedded-blog-public
This also means they...
Nokia in Soup Again?
After suffering a big blow its image due to faulty "BL-5C Batteries", Nokia seems to have landed in another trouble. Company's decision to shutdown its manufacturing plant in Germany, has sparked strong public ire towards Nokia in the country. The strong political and government support to the Anti-Nokia movement, might mean a further Erosion of Company's Image and loss of revenue in Germany (and some other...Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Python Code from My Articles Now Online in IPython Notebooks
Ever since I started using IPython Notebooks to write these articles, I’ve been wanting to publish them in a form such that you can freely use my Python code. One of you (maredsous10) wanted this access as well.
Well, I finally bit the bullet and automated a script that will extract the Python code and create standalone notebooks, that are available publicly under the Apache license on my bitbucket account: https://bitbucket.org/jason_s/embedded-blog-public
This also means they...
Linear Feedback Shift Registers for the Uninitiated, Part IX: Decimation, Trace Parity, and Cyclotomic Cosets
Last time we looked at matrix methods and how they can be used to analyze two important aspects of LFSRs:
- time shifts
- state recovery from LFSR output
In both cases we were able to use a finite field or bitwise approach to arrive at the same result as a matrix-based approach. The matrix approach is more expensive in terms of execution time and memory storage, but in some cases is conceptually simpler.
This article will be covering some concepts that are useful for studying the...
Book Review: "Turing's Cathedral"
My library had Turing’s Cathedral: The Origins of the Digital Universe by George Dyson on its new acquisitions shelf, so I read it. I’d recommend the book to anyone interested in the history of computing.
Turing’s Cathedral primarly covers the period in early computing from 1940-1958, and bridges a gap between a few other popular books: on the historic side, between Richard Rhodes’s
Massive Open Online Courses ( Transforming education )
Emerging trends in online education have opened up unforeseen learning opportunities for aspiring students. Eminent instructors from the best names in the industry such as Stanford, MIT and Harvard provide several courses with video lectures online.
Named MOOCs, Massive Open Online courses are accelerating the learning process in a radical manner. Online universities like Coursera, edX, Udacity, Khan Academy and Udemy offer courses which are professionally relevant.
Musings on Publication — and Zero Sequence Modulation
Perhaps you don’t think about it, but in order for you to read these articles, someone has to do something.
And I don’t just mean writing them. Stephane Boucher has set up this website so that it’s automatic, for the most part — at least from my end of things, as an author. When I get an idea for an article, I open up a new IPython Notebook, write my article, save it in a Mercurial repository, run a Python script to convert from IPython Notebook format to HTML, open...
Painting with Light to Measure Time
Recently I was faced with a dilemma while working from home. I needed to verify an implementation of first-order sigma-delta modulation used to adjust LED brightness. (I have described this in more detail in Modulation Alternatives for the Software Engineer.) I did not, however, have an oscilloscope.
And then I remembered something, about a technique called “light painting”: basically a long-exposure photograph where a...
Garden Rakes Revisited: The Hall of Shame
A little while ago, I wrote about what I call the “garden rakes” syndrome in software, where there are little bugs or pitfalls lying around like sloppy garden rakes that no one has put away, and when you use these software programs, instead of zooming around getting things done, you’re either tripping over the garden rakes or carefully trying to avoid them. Either way, you lose focus on what you’re really trying to work on, and that causes a big hit in...
Reading and Understanding Profitability Metrics from Financial Statements
Whoa! That has got to be the most serious-minded title I’ve ever written. Profitability Metrics from Financial Statements, indeed. I’m still writing Part 2 of my Supply Chain Games article, and I was about to mention something about whether a company is profitable, when I realized something that didn’t quite fit into the flow of things, so I thought I’d handle it separately: how are you supposed to know what I mean, when I say a company is profitable? And how am I...
nRF5 to nRF Connect SDK migration via DFU over BLE
This writeup contains some notes on how I was able to migrate one of my clients projects based on the nRF5 SDK, to nRF Connect SDK (NCS) based firmware, via a DFU to devices in the field over BLE.
Definite Article: Notes on Traceability
Electronic component distibutor Digi-Key recently announced part tracing for surface-mount components purchased in cut-tape form. This is a big deal, and it’s a feature that is a good example of traceability. Some thing or process that has traceability basically just means that it’s possible to determine an object’s history or provenance: where it came from and what has happened to it since its creation. There are a...