NE.SYS

The Beauty of the Low Level Engineering

Table of contents

A Clock That Ticks...

Imagine a wrist watch. Beneath its panel, there are tons of gears meticulously placed in a special sequence. And under those gears, there is a motor with a battery as tiny as itself. Despite its size and complexity, this little contraption that hugs your wrist may last through your entire life.

You may wonder why and how — the answer lies in the solid, reliable engineering behind it.

So How Is It Correlated to Low Level Engineering?

Think of your smart lamp, smart button, washing machine with Wi-Fi, and other appliances. They work tirelessly on very small amounts of electricity —obviously not the smart white appliances— and leave you with the peace of mind that you can control them anytime, everywhere, without any major crashes or faults.

If we ask the same question above, the answer is still the same.

Three Words: Fault Tolerance, Constraints, and Modularity.

Let's assume a small prototype board lies in front of you. It's green, with small and big chips, lights, pins, ports, etc.

Your goal is to detect what a flower needs through humidity and temperature sensors and send the report to your phone.

Despite the simplicity of the idea, it may not be as easy as you think, because you have to consider:

All of this can be overwhelming to a developer. But sit tight — this is actually where the fun begins.

Reason in Mind, Prove in Math, Apply in Code, Test in Real Life

First of all, do not try to take the problem as a whole and solve everything simultaneously. Instead:

  1. Divide the problem into chunks/steps.
  2. Reason about the problem — try to handle it manually in your mind and find a pattern you can exploit.
  3. Do the math for the solution you've proposed and see if it holds up.
  4. Solve the step with dirty code — code written very fast, without a full implementation, that works under tight assumptions.
  5. Keep track of the side effects of your dirty code.
  6. Go to the next step.
  7. Repeat until all steps are done.
  8. Measure the cons/constraints and advantages of the solution. Perhaps it has the right tradeoffs to be accepted in its context — otherwise, think of another way to approach the problem.
  9. Now tighten your code by refactoring what you've written to mitigate the constraints and side effects it imposed.

Ready, Set, Go!

Initial Phase (Steps 2-7)

Build the hardware, put it in its case, write the software, flash it, observe the results, grab a coffee, and congratulate yourself regardless of whether it works or not.

Final Phase (Steps 8-9)

Finish!

Now we have built a smart flower-monitoring system that detects the state of the flowers while you lean back on your cozy couch.

Of course, there are more questions that could be added, or different answers that handle the problems better, but don't forget that we're working with an example scenario here to show how astonishing a working, finished embedded ecosystem looks on the inside.

You have built a system that:

Finale

Each step was a cog, placed with the precision of a hawk's eye; the motor and battery you assembled, the lid you placed like a veil over the crowded mechanics beneath. Now you have a wrist watch you can rely on for many years without worrying it'll break in a foreseeable future.

And this is why I am an embedded systems engineer, and you should be too!