Browsed by
Author: Joe

Bluetooth Low Energy STM32WB55 Eval Kit Unboxing

Bluetooth Low Energy STM32WB55 Eval Kit Unboxing

I’ve been working on a Bluetooth Low Energy (BLE) based project for the past year, using the Nordic nRF52 integrated SoC. Its powered by a 64MHz ARM Cortex M4 core and Nordic provides good software stack and SDK support.

In keeping up with current industry developments, I was excited to hear about a month ago that STMicroelectronics announced their BLE SoC kit: the STM32WB.

I’ve also worked with ST microcontrollers for the past several years, and they also provide good chip level driver library support. The eye-catcher on their BLE chip is that it’s a dual-core design: A 64MHz ARM Cortex M4 to run the application, paired with a 32MHz Cortex M0+ core to run the wireless stack.

After a few weeks of scoping limited inventory, I was able to score an Eval kit:

One of the nice options in working with ARM microcontrollers is that we’re spoiled for choice on IDE options. The Free option is the one I featured today: GNU MCU Eclipse. It is a bit of a setup/install process, but the guide is pretty straightforward and it gets you a $0 development environment that is not feature or code-size limited.

Professional lessons we can learn from Plushies

Professional lessons we can learn from Plushies

In the toy chest realm, there are many job roles and responsibilities that are assigned to different toys, or kinds of toys. The levels of “skills” and “how equipped” each toy has to perform its duties varies. All not too dissimilar to career professionals.

Take LEGO building blocks for example. They are tasked to encourage imagination, problem solving, and physical dexterity. The molded plastic structures are well designed for reliable and repeatable inter-connectivity. By nature of mechanical design, LEGO blocks are well suited for harsh environments that subject heat (hot car), water (bath tubs, sinks), and physical stress (don’t try stepping on one!).

Many other kinds of toys follow the same job roles and in-built traits that help fulfull those responsibilities: die cast cars, Lincoln Logs, Mr. Potato Head, etc.

Then we come to the stuffed toys, or plushies. Honestly the world of plushies could be discussed as one of their own, but for now let’s just simplify the genre as a general group.

When a kid is given (or finds) a plushie, a job assigned to that plushie is to encourage imagination. But it’s also assigned a role of emotional and morale support. Or maybe its assigned a static decorative item to spend most of its days safe on a shelf. A lot of it comes down to the client (the child).

That plushie might have to “work” long hours and be on-call at nights. Or defend as night watch and doze during the day. It may be carried along everywhere and possibly left anywhere.

The design and equipping of plushies somewhat contractracts itself. Most are fabricated with soft materials to appeal to senses, but the porous, absorbent fabrics don’t stand a chance against unwanted interactions with liquid substances. Soft feely materials don’t hold up well against rigorous cleaning cycles, so wear and tear is very present and observable.

Despite those head winds, plushes fulfill their duties very well. They are loved well by their owners. And they become “well loved”. Like “Pur-See” in my own home:

My daughter’s unicorn plush. It came with its own carrying purse, hence the name “Pur-See”

Which brings up one other important design and equipping detail on plushes: they are very prone to damage. A loved but soiled plush requires a gentle cleaning approach because while a plush can be physically replaced, its “not the same”.

What can we learn from plushes:

  • Core competencies do not fully detail someone’s ability to deliver.
  • A person’s capability to fulfill responsibilities are not limited to the equipping and skill-set present when they start the job.
  • Unexpected challenges on project objectives are best met with systematic strategies and due diligence to arrive to most appropriate corrective actions provided the circumstances and risk assessment/mitigation.
  • While you can always look for another (developer, engineer, analyst, assistant, <job role> ) to fill a vacant position, you know it won’t be the same as working with Jeff, Jennifer, or Justin.
    • On the flip side, you can build in redundancy by cross-training your team members, keeping contact with dependable people in your network, and being ready to bring in additional help. After recently surviving an uhm… incident, “Pur-see” will soon have a twin sister and cousin.
A robot car kit to satisfy curiosity

A robot car kit to satisfy curiosity

Ever since our little ones got hooked on watching NASA/JPL Curiosity landing videos, they’ve developed a strong interest in robotics (yay!!!).

And as luck would have it, our kids would often ask me (the dad) to “build a robot”.  When the kids were younger, building models with LEGO would suffice.  But it soon became apparent they wanted a “real” machine.  I had given a design try a while back.  I spent a few evenings looking up design ideas, drafting up sketches of mechanical pieces that we could fab from hobby plywood… but never got further from the computer screen.

Historically, I haven’t been a huge fan of turnkey kits.  I had saw them to be either of low quality or charged a significant premium for the convenience of all pre-selected parts in one box.

But then I found this Elegoo Smart Robot Car Kit on Amazon:

The kit comes with an Arduino control board, an I/O board, a ultrasonic module, a bluetooth module, line following module, motors, wheels, chassis, and all hardware needed for assembling the kit.


My Value Justification:

At time of writing, this off-the-shelf kit will get to your door for $69.99 USD.  You can easily spend half that cost just on machining the chassis plates yourself.  You could alternatively individually purchase a standard Arduino board, and other modules, but you’d still have to figure how to mechanically and electrically link them together.  The board designs may be open source and be a good EDA design exercise, but good luck getting the PCBs made for < $100 before you even add in the parts BOM.

The Build:

It went really well.  The kit came with clear illustrated instructions which our 2nd grader and Kindergartner were able to follow along with just a little hand dexterity help from me for some of the tighter screw assemblies and finer connections.

Parts quality is good.  The pieces appear to be machined well.  The components and hardware aligned up very easily with little fuss.

The kids now have a robot:

The kit includes demo and learning firmware projects to load via the Arduino IDE.  We are able to upload the “auto_go” firmware to the kit and watch the car drive around on the floor.

I’m quite impressed at this kit, what it comes with, and what it enables.  The car robot as-kitted presents many learning applications, but it also lends itself to expansion and modding.

In terms of inspiring learning pursuits, robotics engages the young hungry minds in mechanical engineering, electronics design, embedded firmware development, and applications development.



Introducing Computer Science with micro:bIt

Introducing Computer Science with micro:bIt

Throughout the school year we introduce computer science concepts as appropriate for age and skill level.  Towards the end of last school year we started using the micro:bit platform as a fun learning tool with much success and plan to continue in the following weeks.

The micro:bit (available at is a plug-and-go easy to use introductory electronics and programming platform with a 5×5 LED “display” matrix, a couple buttons, and a 3-axis accelerometer.

The kit comes with a battery pack and a short micro-USB cable for power/programming.  The longer hi-visibility red cable that I used is this one:

The programming environment is web based, so any computer with a modern browser and an available USB port should work.  Our kids were able to do the labs with our relatively low-power, long battery life Samsung Chromebook 3:



Time-Lapse capture with webcam and Linux scripting.

Time-Lapse capture with webcam and Linux scripting.

Time-lapse photography is a concept of taking snapshots at a particular interval over time to record events in a low resource manner, compared to capturing a video stream.  Here, we discuss how to use a relatively inexpensive web camera and a computer to build a low-budget time-lapse platform.

Action Summary

Video capture of a video capture

Pretty much any relatively modern PC with decent storage and functional USB 2.0 ports should suffice.  I had an old big-box special on hand.

Logitech webcams tend to plug-and-play easily with Linux distros:

The Logitech C615 is the model featured.  It does 1080p capture, with some nudging.

*Even though I held up an external HDD in the footage, I didn’t get to show setting that up yet and instead relying on internal storage for now.

The “cheese” program is a quick way to test a webcam. (  To install on a Ubuntu/Mint system, use apt-get in a terminal window:

sudo apt-get install cheese

Multi-adjustable Gorilla Pod Tripod makes for camera positioning in tight corners.  Mine came as a kit with a flashlight, but here’s a standalone model:

We looked at how to use the fswebcam Command Line utility to capture images via the terminal.  You may either git clone from the project page, or on an Ubuntu/Mint system, enter in a terminal window:

sudo apt-get install fswebcam

It is a bit of trial-and-error figuring the optimal parameters for the fswebcam utility with a camera.

Then we watched how bad I am at live shell scripting, though I freely admit its not my everyday gig and that I make liberal use of internet search the few times I write shell scripts.  Can’t go wrong with an O’Reilly book on Shell Scripting if you want an at arms reach reference to thumb through:


Hope you found this useful and informative.  Having a setup like this opens up a lot of other potential applications to build upon.


Disclaimer: from a technical and functional perspective, this post is about using extending usage of commodity hardware using computer scripting.  There are some potential premise security applications for such a setup.  While anyone is welcome to use the information herein, the reader is responsible for determine appropriate for use, deployment, and maintenance of such applications for their security needs.  I/We do not explicitly endorse this type of setup as a part of a security protocol.


On teaching ingenuity

On teaching ingenuity

A bit of a departure from the usual electronics/software based post, but a writing about learning nonetheless.

This week wrapped out the school year for us and our kids.  Our kindergartner had quite the gainful first year of “official” school.  Rather than trying to finish up our science study on The Brain and The Senses, we instead built solar ovens as the last lesson.  They’re always the next year to pick back up where we left off.

The “lab instructions” that I put together in <15 minutes the night before basically called out materials including a box, black construction paper, plastic food wrap, and aluminum foil and directions on assembly.  Following was a basic “what do you expect” and “what happens” fill-in when shining the sunlight into the “oven”.

It was ~77F outside in the sun.  The oven’s interior temp got up to near 100F within minutes, not bad for no consideration of insulation or other potential optimizations.  The kids were quite impressed that the cheese started melting.  They also couldn’t wait until next day to “toast” marshmallows.

The casual conversations into the evening afterwards was vindication that it was worthwhile to do this really, really basic experiment.  –The same experiment I read and followed along years ago IIRC from a Fox Kids Club magazine..yes I’m dating myself here.

AJ started scheming up other ways to make “ovens”, after understanding how the one he just built conceptually operates.  One of his ideas for another “solar” oven was using a light bulb, which I had to nudge that it wouldn’t be a direct solar design as it would need electricity.  It is interesting that he mentioned using a light bulb: it must be intuitive that bulbs generate heat, so much so that there used to be a commercially available toy built on that premise.  However, in his short years of life he’s probably only ever seen CFL and LED bulbs in use, as incandescents have fallen out of favor due to higher energy usage, working against the A/C trying to keep the rooms cool.


This kind of creativity and ingenuity isn’t necessarily a directly teachable thing, but kinda builds from within from exposure and otherwise nurturing experience.  Its such an important trait that we impart on our future leaders and innovators that we can’t lose sight of.  But I sometimes think in our (the parents and educators) quests of trying to get our kids to eventually learn the most advanced skills they can absorb in their young learning years, its quite easy for ingenuity to fall out the wayside.


STEM is a big catchy thing these days for various reasons, and if/when done correctly I believe the attention can yield great results that everyone will appreciate.  When discussions turn quickly into action plans like putting every kid starting from pre-k in front of a computer with a software IDE, maybe we should step back and consider its not all “what” they’re learning, but “how” and “why” counts as well.


And with that, SCHOOL’S OUT …FOR SUMMER!  Maybe I’ll have a few spare moments to finally build out more of the Embedded Systems 101 workshop.


Flowcharts – the beginning, end, and a decision.

Flowcharts – the beginning, end, and a decision.

In software design and documentation, flowcharts are drawn to draft out algorithmic flow.  Generally this is done sometime before writing out any code to set an initial plan, but sometimes not.  More often in practical applications, flowcharts make their way into design specifications documents that outline how the software was well, designed.

A flow chart can be summarized as an illustration of a process with decisions and activities to be performed based on those decisions.

A flow chart, typically starts with a “start” terminal.

A flow is indicated by an arrow.  Arrows connect blocks together in a flow diagram

A decision to be made is written inside a diamond:

The condition for the decision is written inside the diamond.

An arrow will go into the decision diamond from the top, and branch off to the sides depending on whether result is TRUE or FALSE.

An action is written inside a rectangle

And finally, a process or flowchart ends with an “end” terminal.

To review our mini-lesson, let’s do a LAB 1: Let’s follow a Process”.

Materials needed.

  • Counting Blocks.  –I originally wrote this for schooling where we have lots of nice manipulatives, which is just fancy multi-sensory speak for things that you can count with.  Whatever physical or mental objects you can count with will suffice.

Let’s read the following process:


  1. Follow the process with 2 counting blocks.  What action did you do?
  2. Follow the process with 3 counting blocks. What action did you do?
  3. Follow the process with 4 counting blocks. What action did you do?


Further Reading

Free Samples! Now that I’ve got your attention

Free Samples! Now that I’ve got your attention

One of the “wink and nod” policies among engineering and IC companies is the free samples of parts.  Many chip manufacturers have such policies in place for a lot of their parts.  My favorite standbys have been:

I’m sure there’s other manufacturers with comparable samples programs.  The motivation of the companies offering sample parts for you (the designer, whether professional or student) is that once you’re familiar with the part, you or your company’s purchasing department is likely to issue a PO for quantity of their parts for a build.

As a (hungry) student, this is great for sourcing parts for a project, because let’s face it: every penny counts.  It also doesn’t hurt that the samples ship free, and sometimes ship really fast (e.g. TI).

Even when working with a company who has a DigiKey account and a FedEx account, manufacturer free samples can sometimes be less of a hassle to get 1 or 2 parts, than bothering the office administrator to put in an order.

My general notes for free samples:

  1. Please don’t abuse the system.  Only sample parts you’ll actually use, and limit to evaluation or at most 1 test build.  After that, support the company and legitimately purchase parts.  Don’t ruin this for every one else.
  2. Create an account with each company you wish to sample from.
    1. Most (if not all) IC companies companies won’t sample with a general free email account, such as @gmail and @yahoo.
    2. Instead, if you have a domain, use an email address with that.  Or use your school’s student email if you have one.
    3. Failing those options, use your work’s email address if you believe it’s within your company’s acceptable use to do so.  Frankly, I can’t see why a company would be against your professional career development, but if they have a cow with you using their email to get free IC samples, maybe its time to look elsewhere for growth.
  3. Most IC companies do limit quantities and number of orders within some time, so plan judiciously.
  4. If you do get a contact from a sales rep, take it as an invitation to share what you’re learning or working on (within reason, especially if through an employer).  They can be a good resource for parts information and support.

With industry mostly standardizing on surface mount parts, finding parts, much less those available for sample, in  Dual In-Line Package (DIP) for your breadboards are getting harder to find.  But they are still there.  Just be sure you select the correct packaging for your sample orders.  Fallback is to order the surface mount parts (e.g. SOIC, TSOP…) and get a breakout board that you can solder the part onto, and the board runs the lines to more accessible headers.  –or if you’re really good just solder thin wires to the part legs.




Finding a low-cost electronics kit

Finding a low-cost electronics kit

Learning about electronics with just paper and pencil only goes so far.  Eventually it’s really nice to get your hands on actual electronic parts.

It used to be that if you were near a mall, you could walk into a Radio-Shack and come out with electronic components.  If you’re more fortunate, you can also get a good selection from a Fry’s Electronics.

I got an electronics kit, aptly named “Electronics Fun Kit”, as well as a few extra breadboards.  I’ll use this to stage workshops and other posts on this site.  As well as introducing electronics to our kids as part of Science.


Amazon is an almost-universally accessible online retailer, hence the vendor of choice today.  Other sites like DigiKey are quite good, but are also easy to get lost for a novice.

The 3-pk of Elegoo MB-102 Breadboard ( is as expected for a breadboard.  A breadboard is an easy electronics prototyping platform for through-hole components and solder-less wires.


The Elegoo EL-CK-002 Electronic Fun Kit Bundle ( comes with a sample of LEDs, caps, resistors, diodes, buttons, jump wires, header pins, pretty much anything you’d need to get started:


When I ordered it, I wasn’t sure of the included power board and thought it’d be rubbish.  But in checking it out, it looks to be a convenient USB-to-Power supply with an ON/OFF switch to boot!


Here the board is taking in +5 VDC from a USB port, and outputting ~3.3v.  The board also accepts input power from a DC barrel.

Having this board available makes it easier to power a circuit without calling out a separate regulator circuit.  I’ll have to check the specs on the on-board regulators (there’s no documentation) but conceivably 4 AA batteries(6V) could be rigged thru a DC barrel or USB plug for untethered operation.


All in all, this looks to be a promising startup kit, for about $20 for the kit and extra breadboards.


Fundamental Basics: Numerical Systems

Fundamental Basics: Numerical Systems

There’s an old joke: “There are only 10 types of people in the world: those who understand binary, and those who don’t.”  If you don’t get it now, hopefully you will after this post.

For most everyday tasks, we’ve been accustomed to using base-10, or “decimal” numerical system.  Its what we’re taught from grade school and makes the most logical sense for humans.  A quick recap on integer base-10 goes back to “ones”, “tens”, “hundreds”, and we say digits go from 0-9.

Let’s take a sample number 325.  We say 325 is comprised of (3*100) + (2*10) + (5*1):


Or, an equivalent way of notation is:

 325 case you’ve forgotten algebra, I’ve linked Google Calculator above.  For each number column, the digit represents that many 10^x.  Like, 3 in the “hundreds column” is so because 10^2 is 100, and there’s 3 of them.

It’s called base-10, because the base number is 10.

In Binary, the base number is 2, a.k.a. base-2.  In base-2, the digits go from 0-1, and each column is 2^x.  So, if we take binary “1011”:


Reading the binary digits left to right, there’s 1 of (2^3) + 0 of (2^2) +1 of (2^1) + 1 of (2^0), OR (1*8) + (0*4) + (1*2) + (1*1) = 11 decimal.

While human brains process and store numbers in base-10, computer systems store data in binary, hence our discussion as a fundamental concept for software and embedded systems.

In nomenclature, each binary digit is called a “bit”.  (binary 1011 is a 4 bit number).  Data variables and CPU architectures are often referred to as number of bits.  A 8-bit processor indicates that it natively processes data in 8-bit wide registers.  A 16 bit data variable means it can hold up to 16 bits for that variable.

||        ...
||               |--2^1
||               ||---2^0
1010 1100 0011 1011

Writing out just 16 bits already starts to look like writing out credit card numbers.  Imagine how long and tedious it gets to write out/read 32 bits, 64…

Luckily, there’s another numerical format: Hexadecimal, or “Hex”.  Hex is base-16.  There’s 16 digits.  The first ten digits are 0-9.  To avoid ambiguity, the eleventh through sixteenth digits are denoted A-F, so while binary digits go [0, 1] and decimal digits go [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], hex digits go [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F].

Perhaps a table will help:

|decimal | binary | hex |
|      0 |  0000  |   0 |
|      1 |  0001  |   1 |
|      2 |  0010  |   2 |
|      3 |  0011  |   3 |
|      4 |  0100  |   4 |
|      5 |  0101  |   5 |
|      6 |  0110  |   6 |
|      7 |  0111  |   7 |
|      8 |  1000  |   8 |
|      9 |  1001  |   9 |
|     10 |  1010  |   A |
|     11 |  1011  |   B |
|     12 |  1100  |   C |
|     13 |  1101  |   D |
|     14 |  1110  |   E |
|     15 |  1111  |   F |

From the table, each hex digit can be represented by a 4-bit binary value.  That’s convenient in that you can group a binary representation into 4-bits and convert it to hex:

binary: 1010 1100 0011 1011
hex:       A    C    3    B

The binary value 1010110000111011 (commonly written as 0b1010110000111011 or 1010110000111011b) is equivalent to hex value AC3B (commonly written as 0xAC3B, or AC3Bh)

To convert to decimal, the value 0xAC3B can be viewed as:


where the number has

("A" *16^3) + ("C" *16^2) + (3 *16^1) + ("B" *16^0), or 
(10  *4096) + (12  * 256) + (3 *  16) + (11  *   1)  == 44091 dec.

As with base-10 math, there are calculators available that aid in converting numerical representation.

On Windows, the “calc.exe” in programmer mode (View->Programmer) is handy:


You can also try the Google:

Screenshot - 07222016 - 10:39:37 PM Screenshot - 07222016 - 10:40:06 PM Screenshot - 07222016 - 10:40:21 PM

As a building block in software and embedded systems development, having a working knowledge of these three numerical systems are a prerequisite.  There is another format, Octal, that’s base-8, that is usually also introduced in Computer Science.  I think after going through binary and hex it isn’t to hard to figure out.