## Oh Robot My Robot

June 26, 2015

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

May 1, 2015

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

July 5, 2014

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... ## Musings on Publication — and Zero Sequence Modulation May 30, 20141 comment 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... ## How to Include MathJax Equations in SVG With Less Than 100 Lines of JavaScript! May 23, 20146 comments Today’s short and tangential note is an account of how I dug myself out of Documentation Despair. I’ve been working on some block diagrams. You know, this sort of thing, to describe feedback control systems: And I had a problem. How do I draw diagrams like this? I don’t have Visio and I don’t like Visio. I used to like Visio. But then it got Microsofted. I can use MATLAB and Simulink, which are great for drawing block diagrams. Normally you use them to create a... ## Garden Rakes Revisited: The Hall of Shame April 12, 2014 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... ## Levitating Globe Teardown, Part 2 November 6, 20139 comments Part 1 of this article was really more of an extended (and cynical) product review. In this part of the article, I actually take things apart (sometimes a bit more suddenly than I meant to) and show you some innards.First the globe. I knew there was a magnet in there someplace, because it's obviously plastic and it also attracts metal. I had intended to gently part the globe at the glue bond along the equator. I started by trying to gently flex the thing on my work... ## Levitating Globe Teardown, Part 1 November 4, 20133 comments I've been kicking some ideas around for a long time for a simple and inexpensive platform I could use for control systems experimentation for the beginner. I want something that can be controlled easily in a basic fashion, yet that provides some depth: I want to be able to present ever-more challenging goals to the student, that can be attained by fancier control algorithms all on the same device. I'm currently looking at magnetic levitation. It's fun, it has the potential to be... ## How to Succeed in Motor Control: Olaus Magnus, Donald Rumsfeld, and YouTube December 11, 2016 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... ## Python Code from My Articles Now Online in IPython Notebooks May 1, 2015 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 VIII: Matrix Methods and State Recovery November 21, 2017 Last time we looked at a dsPIC implementation of LFSR updates. Now we’re going to go back to basics and look at some matrix methods, which is the third approach to represent LFSRs that I mentioned in Part I. And we’re going to explore the problem of converting from LFSR output to LFSR state. Matrices: Beloved Historical Dregs Elwyn Berlekamp’s 1966 paper Non-Binary BCH Encoding covers some work on ## Linear Feedback Shift Registers for the Uninitiated, Part X: Counters and Encoders December 9, 2017 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. Counters I 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 V: Difficult Discrete Logarithms and Pollard's Kangaroo Method October 1, 2017 Last time we talked about discrete logarithms which are easy when the group in question has an order which is a smooth number, namely the product of small prime factors. Just as a reminder, the goal here is to find $k$ if you are given some finite multiplicative group (or a finite field, since it has a multiplicative group) with elements $y$ and $g$, and you know you can express $y = g^k$ for some unknown integer $k$. The value $k$ is the discrete logarithm of $y$... ## Linear Feedback Shift Registers for the Uninitiated, Part IV: Easy Discrete Logarithms and the Silver-Pohlig-Hellman Algorithm September 16, 20174 comments Last time we talked about the multiplicative inverse in finite fields, which is rather boring and mundane, and has an easy solution with Blankinship’s algorithm. Discrete logarithms, on the other hand, are much more interesting, and this article covers only the tip of the iceberg. What is a Discrete Logarithm, Anyway? Regular logarithms are something that you’re probably familiar with: let’s say you have some number $y = b^x$ and you know $y$ and $b$ but... ## Book Review: "Turing's Cathedral" November 20, 20146 comments 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) July 5, 2014 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...

## Garden Rakes Revisited: The Hall of Shame

April 12, 2014

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...

## Musings on Publication — and Zero Sequence Modulation

May 30, 20141 comment

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...