Learning From Engineering Failures
Contents: IntroductionI'm an informal student of engineering failures. They guide a lot of my attitude and approach towards engineering.
This is rooted in two of my favorite quotes:
- George Santayana: Those who do not remember the past are condemned to repeat it.
- Louis...
Acceptance Tests vs. TDD
Contents:Embedded Online Conference 2021 - Watch the Speakers Share their Thoughts on the Value for Attendees
Over the last few weeks, we've had a chance to chat with some of the speakers at the upcoming Embedded Online Conference. We asked them to share their thoughts on conferences and the Embedded Online Conference in particular. Here are their answers edited together in one video:
If you are not registered yet for the conference but are considering it, please make sure to use the promo code ER149 to save more than 40% on your registration...
8 Weeks - 8 Giveaways!
If for some reason, you've been putting off registering for the upcoming 2021 Embedded Online Conference, here are 8 good reasons to register today.
The idea is simple; if you are registered for the conference by the 'raffle date' for any of the following giveaways, you'll automatically be entered into the draw.
So for instance, if you are already registered for the conference or register before March the 22nd, you'll be automatically entered into the 8 draws...
My Guiding Principles As An Engineer
These are my guiding principles as an embedded systems software engineer, forged over 40 years of experience. They shape the way I work and approach problems, and maintain my attitude in the face of adversity.
You may find them useful as well, whether working as a developer, a manager, or an executive, alone or on a team, when things are going well, and when they aren't.
They're a combination of favorite quotes and my own bits of derivative wisdom I've sprinkled...
Dumb Embedded System Mistakes: Running The Wrong Code
ContentsAnnouncing the 2021 Embedded Online Conference!
Once again this year, Jacob Beningo and I are putting together the Embedded Online Conference. Last year's edition was a very rewarding experience, with over 6,000 registrants, fantastic & insightful talks, and lots of positive feedback. For this year's edition, we are delighted to announce that none other than Jack Ganssle will be giving a Keynote presentation about the 50th anniversary of the Microprocessor.
The 2021 Embedded Online Conference will...
Advice For High School Students
ContentsYour Career Archive
Clive Maxfield and Adam Taylor recently published a series of blog posts about how to get and keep an engineering job, discussing preparation in high school through early career stages. I've just started a new job, and wanted to add some information on a particular aspect of changing jobs, the employment background check.
Over the past 10 years, I've changed jobs several times. Three of those jobs, including the most recent two, have required background checks as part of...
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...
C++ on microcontrollers 1 - introduction, and an output pin class
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
I am lazy. I am also a programmer. Luckily, being a lazy...
Finite State Machines (FSM) in Embedded Systems (Part 3) - Unuglify C++ FSM with DSL
Domain Specific Languages (DSL) are an effective way to avoid boilerplate or repetitive code. Using DSLs lets the programmer focus on the problem domain, rather than the mechanisms used to solve it. Here I show how to design and implement a DSL using the C++ preprocessor, using the FSM library, and the examples I presented in my previous articles.
Coroutines in one page of C
A coroutine is a function that you can jump back into after returning from it - and it remembers where it was in the code, and all the variables. This is very useful at times.
One use is generating a sequence of values. Here's how you can generate all the x,y pairs in a 2D range in Python:
def iterate(max_x, max_y): for x in range(max_x): for y in range(max_y): yield x,y for x,y in iterate(2,2): print x,yThis prints:
0 0 0 1 1 0 1 1The yield keyword is like...
C to C++: 3 Proven Techniques for Embedded Systems Transformation
For 50 years, the C programming language has dominated the embedded software industry. Even today, more than 80% of embedded projects are using C; however, over the last few years, many teams have begun transitioning from C to C++. C++ offers embedded developers a robust, modern set of tools that can be used to write flexible, scalable, and reusable applications. As embedded applications become more complex and connected, teams need a more modern language to help them deal with the software...
Five Embedded Linux Topics for Newbies !
Are you an embedded systems enthusiast looking to broaden your horizons with embedded Linux? explore those 5 topics.
VolksEEG: Rust Development On Adafruit nRF52840 Feather Express
Contents:How precise is my measurement?
Some might argue that measurement is a blend of skepticism and faith. While time constraints might make you lean toward faith, some healthy engineering skepticism should bring you back to statistics. This article reviews some practical statistics that can help you satisfy one common question posed by skeptical engineers: “How precise is my measurement?” As we’ll see, by understanding how to answer it, you gain a degree of control over your measurement time.
An accurate, precise...Important Programming Concepts (Even on Embedded Systems) Part II: Immutability
Other articles in this series:
- Part I: Idempotence
- Part III: Volatility
- Part IV: Singletons
- Part V: State Machines
- Part VI: Abstraction
This article will discuss immutability, and some of its variations in the topic of functional programming.
There are a whole series of benefits to using program variables that… well, that aren’t actually variable, but instead are immutable. The impact of...
Introduction to Microcontrollers - 7-segment displays & Multiplexing
Doing the 7 Segment ShuffleThe 7 segment display is ubiquitous in the modern world. Just about every digital clock, calculator and movie bomb has one. The treadmills at my gym have 6 or 7, each one displaying 3 or 4 digits. What makes the 7-seg interesting is that it presents an opportunity to make a trade off between GPIO (output pins) for time. Every 7-seg display requires 8 outputs (the 7 segments and usually either a decimal point or a...
Fluxions for Fun and Profit: Euler, Trapezoidal, Verlet, or Runge-Kutta?
Today we're going to take another diversion from embedded systems, and into the world of differential equations, modeling, and computer simulation.
DON'T PANIC!First of all, just pretend I didn't bring up anything complicated. We're exposed to the effects of differential equations every day, whether we realize it or not. Your car speedometer and odometer are related by a differential equation, and whether you like math or not, you probably have some comprehension of what's going on: you...
Reverse engineering wireless wall outlets
IntroductionI am improving the domotics framework that I described in a previous article://www.embeddedrelated.com/showarticle/605.php
I want to support wireless wall outlets, allowing me to switch devices power from a remote location over HTTP.
To do so, I could design my own wireless wall outlets and use a hardware similar to the previous one, based on the NRF905 chipset. The problem is that such a product would not be certified, and that would be an issue regarding the home insurance,...
Code Metrics - SLOC Count
Many programmers will start having flashbacks at the title of this article because it contains the words 'metrics' and 'SLOC'. Newer programmers are probably wondering what all of the fuss is about - most probably have no negative connotations with the term 'code metrics' and some may not even know what SLOC is. While there is much baggage associated with metrics and SLOC you shouldn't be afraid to gather fundamentally useful data such as SLOC count from your programming projects...
Return of the Delta-Sigma Modulators, Part 1: Modulation
About a decade ago, I wrote two articles:
- Modulation Alternatives for the Software Engineer (November 2011)
- Isolated Sigma-Delta Modulators, Rah Rah Rah! (April 2013)
Each of these are about delta-sigma modulation, but they’re short and sweet, and not very in-depth. And the 2013 article was really more about analog-to-digital converters. So we’re going to revisit the subject, this time with a lot more technical depth — in fact, I’ve had to split this...
You Don't Need an RTOS (Part 1)
In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.
Complexity in Consumer Electronics Considered Harmful
I recently returned from a visit to my grandmother, who lives in an assisted living community, and got to observe both her and my frustration first-hand with a new TV. This was a Vizio flatscreen TV that was fairly easy to set up, and the picture quality was good. But here's what the remote control looks like:
You will note:
- the small lettering (the number buttons are just under 1/4 inch in diameter)
- a typeface chosen for marketing purposes (matching Vizio's "futuristic" corporate...
C++ on microcontrollers 4 – input pins, and decoding a rotary switch
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
So far I...
Important Programming Concepts (Even on Embedded Systems) Part VI : Abstraction
Earlier articles:
- Part I: Idempotence
- Part II: Immutability
- Part III: Volatility
- Part IV: Singletons
- Part V: State Machines
We have come to the last part of the Important Programming Concepts series, on abstraction. I thought I might also talk about why there isn’t a Part VII, but decided it would distract from this article — so if you want to know the reason, along with what’s next,
New Comments System (please help me test it)
I thought it would take me a day or two to implement, it took almost two weeks...
But here it is, the new comments systems for blogs, heavily inspired by the forum system I developed earlier this year.
Which means that:
- You can easily add images, either by drag and drop or through the 'Insert Image' button
- You can add MathML, TeX and ASCIImath equations and they will be rendered with Mathjax
- You can add code snippets and they will be highlighted with highlights.js
- You can edit...
Data Types for Control & DSP
There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.
I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code. Numerically, this should work for most control problems, but it can be an extravagant use of processor resources. There ought to be a better way to determine what precision you need...
Optimizing Optoisolators, and Other Stories of Making Do With Less
It’s been a few months since I’ve rolled up my sleeves here and dug into some good old circuit design issues. I started out with circuit design articles, and I’ve missed it.
Today’s topic will be showing you some tricks for how to get more performance out of an optoisolator. These devices — and I’m tempted to be lazy and call them “optos”, but that sounds more like a cereal with Greek yogurt-covered raisins — are essentially just an LED...