Angular “Tour of Heroes” Tutorial Round 2

I’m glad I skimmed through “Understanding Angular” documentation section before going through “Tour of Heroes” tutorial for the second time. Combined with my improved understanding of web development, this time I actually understood everything covered in the tutorial. The best example are Angular directives, which were mysterious black boxes the first time around. I copied them straight from tutorial text without much comprehension of what they did. This time around, I mostly understood how they dictated Angular behavior. I also understood that some of what I see are shorthand versions and, if I get too lost, I can go look for their expanded-out full versions which are more explicit in their actions.

I Know Where Things Go Now

One memory I had of my first run of “Tour of Heroes” were a few steps where the instruction was to copy a snippet of code into a specific file. However, they didn’t say where in the file. The first time as a beginner, I didn’t even understand enough to know where a code snippet should fit. This time around, I never felt that way. When a code snippet is presented, I understood the context where it should be inserted. This was a very satisfying feeling! Once I completed “Tour of Heroes” for the second time (which also went much faster) I had a selection of topics to explore outside the scope of the tutorial.

Need to Revisit Angular Tests

One candidate is testing. At the moment I’m completely ignorant about automated testing of web apps. I know such tools exist, but so far, my web app projects were tested manually when I played around with what I wrote. As my project size grows (and I have ambitions of bigger projects) this approach would not scale well. Angular has provisions for testing frameworks, which we can kick off with “ng test”. Angular boilerplate includes a bare-bones test (filename ending with spec.ts) that went with the corresponding code (filename ending with just .ts.) Since the tutorial only changed code file without updating its corresponding test file, I ran “ng test” expecting to see test failures. But it appears I have some work to do before I even get that far, because I’m running Angular inside a VSCode dev container, and it doesn’t have Chrome installed.

node ➜ /workspaces/angular-tour-of-heroes (main) $ ng test
✔ Browser application bundle generation complete.
11 02 2023 09:44:34.255:WARN [karma]: No captured browser, open http://localhost:9876/
11 02 2023 09:44:34.268:INFO [karma-server]: Karma v6.4.1 server started at http://localhost:9876/
11 02 2023 09:44:34.268:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
11 02 2023 09:44:34.272:INFO [launcher]: Starting browser Chrome
11 02 2023 09:44:34.273:ERROR [launcher]: No binary for Chrome browser on your platform.
  Please, set "CHROME_BIN" env variable.

I know it is possible to run Chrome in an automated test where it runs without any user interaction or even a visible interface. I’ll need to figure out this “headless mode” before I can run “ng test”.

After a few minutes of looking around online, it appears running headless Chrome inside a container requires more knowledge than I have at the moment. Instead of tackling another new thing, I decided to practice what I’ve already learned. I will resume my tentative learning plan, which calls for me to turn my Tour of Heroes into a CSS exercise.

Notes on “Understanding Angular”

My first time through Angular framework’s documentation section had focused on “Getting started” and “Tutorial” sections, just to get a toehold on things. Due to a firehose of information about this large framework, I didn’t retain very much. Now I’m taking a second pass through documentation, armed with more knowledge and experience to understand more of it. I drew up a tentative plan earlier, but I’ve already decided to deviate from that plan. After I read through the StackBlitz tutorial, but before I started hands-on with “Tour of Heroes” tutorial again, I decided to read the documentation section “Understanding Angular” whose overview page started with this:

To understand the capabilities of the Angular framework, you need to learn about the following:

  • Components
  • Templates
  • Directives
  • Dependency injection
    The topics in this section explain these features and concepts, and how you can use them.

I admire this goal, but the reality was I lacked prerequisite knowledge to understand all of it. This is fine! Every time I understand a little more. At a rough guess, I would say I understood and retained about 5% of this information after my first effort, and this second effort had roughly 30% retention.

Live Code Everywhere

The length and quality of documents in this section vary greatly, probably reflecting different authors contributing from their own perspectives. But at the end of the day, developers want to see code and we have them. Most (all?) of the topics included links to sample code in both live-running form (running on StackBlitz) as well as downloadable source code example. Some go much further, for example “component interaction” goes as far as including test code. And in several cases, sample code covered concepts that were not covered on written pages, so it’s always worth checking out that link.

Nonlinear Organization

Sometimes my confusion is not from missing prerequisite knowledge, but counterintuitive organization of information. For example: Under the binding section, Property binding is the next-to-last item on the list yet it is listed as prerequisite by the second (attribute binding) and third (class and style binding) documents. To make sense of everything I have to jump around this page.

Attributes vs. Properties

Several documents in the binding section emphasized that we bind to properties and not attributes. But they didn’t explain what that difference meant! Looking outside this site, I found this StackOverflow thread which included a gem of an explanation: “When writing HTML source code, you can define attributes on your HTML elements. Then, once the browser parses your code, a corresponding DOM node will be created. This node is an object, and therefore it has properties.

Angular Directive Long Form

As an Angular beginner I can see Angular directives as a very powerful mechanism, but the syntax can be tough for me to decipher. Eventually I learned this was because we frequently see shorthands for using directives, and the structure is easier to comprehend when we see the “long form”. This snippet was shown as a *ngFor “long form”, and it was quite illuminating!

<div *ngFor="let product of products">
    <a [title]=" + ' details'">
      {{ }}

It was not as concise as the shorthand, but much easier for me to decipher what’s going on. Compare the above to another example of ngFor directive:

  <ng-template ngFor let-hero [ngForOf]="heroes">

(Note that these are two different examples of ngFor and they do different things, because I copy/pasted them from different sections of Angular documentation. I’m only using them to compare syntax.)

Ready for Round 2

After reading through “Understanding Angular” I can’t say I totally understand Angular yet, but I have a much better understand of how it goes about its business. I expect some of this information to be reinforced as I go through their “Tour of Heroes” tutorial again, because I think I’ll recognize them the next time around and have a better idea of their usage context.

Notes on Codecademy “Learn Intermediate TypeScript” (And npm “–“)

A TypeScript project incurs some overhead versus a plain JavaScript project. This is an unavoidable fact of TypeScript’s nature compiling to JavaScript. Investing in this overhead can pay off for larger projects, but how large is large enough to benefit? I expect I won’t have a good grasp of that payoff point until I get more experience, but I think I have a better idea after going through Codecademy’s “Learn Intermediate TypeScript” course.

Codecademy is very proud of their browser-based integrated learning environment where students can learn and put what they’ve learned into practice immediately. But this particular course is focused on how we can put TypeScript to use in our own projects outside of Codecademy’s environment. The hands-on portion of course consists of downloading ZIP files of partially complete TypeScript projects to our own computers, then following instructions to see what happens.

Under this system, we get experience running the TypeScript compiler tsc at the command line directly, and inside the context of a project managed via npm and its associated package.json file. This is also where we can keep our TypeScript configuration in a tsconfig.json file. This feels like a good way to use TypeScript. If we’re already incurring the overhead of setting up such a project, it doesn’t take that much additional effort to fold TypeScript into the works.

Amusingly, the most important lesson I learned from this course had nothing to do with TypeScript but was about setting up JavaScript projects with npm. Early on, we were instructed to run “npm run tsc -- --watch” and “npm start -- --watch” but without explaination what those two commands meant. I took a detour to try to figure out exactly what went on with those two lines.

The first part is easy: we’re running something via npm command line tool. That something is listed inside the “scripts” section of package.json. It can be a direct mapping: “tsc” mapped to the TypeScript compiler executable. Or it can be something more complex, as “start” mapped to “nodemon build/index.js” I’m still uncertain about the “run”, as it seems to be optional and/or the default action. Inferred from the fact it was present in one but not the other.

The next item was challenging: “–” What does the double-dash mean? Unfortunately, I found it impossible to perform a web search on “–” and get relevant results. A combination of the fact “–” isn’t a word we can search for and that it is used in many different contexts (C programmers know it as a value decrement) but I didn’t wasn’t sure what context to search within. It wasn’t until another page later on in this course that I learned “–” tells npm to stop interpreting command-line parameters and pass along everything afterwards to the script. So for example, “npm tsc — –init” means: Use “npm” to launch command “tsc” described in package.json. Then “–” meant there are no more parameters for npm, and “–init” should be given to “tsc”. Result: use the current Node.js environment to run command “tsc –init”

This all made sense once I figured it out, but I certainly couldn’t have guessed it from just looking at “–“. There will be more unknowns as I dive back into Angular framework documentation with “Understanding Angular”

Intel SSD 320 Series Teardown

After taking apart a hard drive that went to great lengths to be just 5mm thick, I moved on to an SSD whose circuit board of surface-mounted chips were even thinner without even trying. This Intel 320 Series SSD should still be usable today, but it isn’t because of an overzealous security feature.

My Dell Inspiron 15 7577 came with a secure data wipe feature in BIOS and I decided to use it to securely wipe data from this SSD. What was critically missing from its description was that, as part of securing my data, this feature would lock the drive with a password that is never displayed. (“Lock it up and throw away the key.”) This fulfilled the task of securing any data on the SSD, but it made it impossible to reuse the SSD elsewhere. This 300GB capacity SSD cost over $500 in 2012, so I was NOT HAPPY it was rendered unusable. At the time Dell claimed the security feature was Working By Design. Later on, it admitted the behavior was a bug after all and offered BIOS updates to some other computers (not mine) to remove this behavior. Doesn’t matter, I’ve learned my lesson and never used the feature again.

I hung on to this unusable SSD for years, hoping to find a utility that could somehow reset the device and unlock the capacity that Dell overzealously locked away. But now, with new 500GB SSDs available for less than $50, I finally conceded there’s no point.

The thick black plastic shim brought it to 9mm height typical of laptop HDDs but can be removed to fit in spaces designed for thinner 7mm HDDs. It looks bulky next to the 5mm thick WD5000M21K hybrid drive, but that was merely a metal enclosure.

Once removed from its enclosure, we can see an internal circuit board who is barely 3mm thick not counting the SATA connector.

The brain in charge of this operation is Intel’s own PC29AS21BA0 controller.

Data is stored across 20 Intel 29F16B08CCMEI flash memory chips, 10 on the front side and 10 on the back. I hypothesize they are each good for 16GB of raw storage. 20 of them together would give 320GB of raw storage, 300 of which is accessible to user and 20 reserved for SSD housekeeping.

Hynix H55S5162EFA is probably a bit of dynamic memory used by the controller chip to do its job. Intel sold its flash memory division to Hynix, so technically speaking this entire device is now Hynix.

The whole point of secure data wipe (and lock) is to render all data safely inaccessible, so I should be good to stop. But why pass up a chance to play? Just like my previous decommissioned SSD, I’m going to remove those flash chips with my paint-stripping hot air gun. This blunt tool is unsuitable for electronics work if we want delicate devices to work again. But in this case, if the heat should damage a chip beyond repair, that would be a feature and not a bug.

A few minutes later, I had a loose jumble of flash memory and other chips. Even if the heat gun hasn’t destroyed the chips completely, anyone who wants to steal my data will need to figure out which chip went in which location. (I recommend they find a different hobby.)

Western Digital SFF-8784 Hybrid HDD/SSD Teardown (WD5000M21K)

For contrast with the old Toshiba laptop hard drive I just took apart, I decided to follow up with this Western Digital WD5000M21K. This is a hybrid device with both a spinning magnetic platter and flash memory solid-state storage. In theory it is the best of both worlds offering large-capacity (500GB) storage and solid-state drive performance for cached data, all packed in an impressively compact SFF-8784 form factor. It is only 5mm thick! The mechanical engineers must have been fighting for fractions of millimeters designing its innards.

In practice, its performance was abysmal. It was nowhere near SSD level and felt even worse than contemporary HDDs. Its performance was utterly blown away by a M.2 SATA SSD (in an SFF-8784 adapter card) which, because they were just small circuit boards, were effortlessly more compact on top of better performance. Dropping SSD prices have eliminated the niche of compact mechanical hybrid drives. Ending this line of evolution to sit alongside VHS+DVD players in history as transitionary products with a limited shelf life.

One thing that caught my attention was a sticker covering the entire top surface of this device, and it wasn’t even very densely printed with information. As I would learn later, this sticker is not merely cosmetic.

Most product information was actually printed on a sticker on the other side of the device, surrounding the motor where we can see three wires implying a delta style winding. This drive’s control board is much smaller than the older Toshiba drive, even though it had to include a SanDisk-branded chip providing its 8GB of flash memory (“SSD”) cache. Its size was helped by the compact SFF-8784 style connector. A standard SATA connector would have required almost half of the volume of this entire control board.

Returning to the top side, I removed the sticker and saw why it covered everything: it’s a part of this drive’s airtight seal. WIth top sticker gone, an ~1mm gap surrounding the voice coil magnet assembly is now open to outside air.

Most of the Torx fasteners were T2, except for the one at the center of the platter which is even smaller. I assume it is a T1, but I don’t know for sure as I don’t have a driver. I’m using iFixit’s Mako Driver Kit and the smallest Torx bit is a T2. Not even their larger Manta kit has a T1.

Of course, that’s not going to stop me. As I’m not worried about putting it back together, or metal particle contamination, I have the option of drilling off the tiny screw head today. I might not always have that option, though, so to be prepared I found and ordered a driver set (*) because it claimed to include T1.

Once drilled out, I could remove the thin metal top lid and saw a single platter within. (I would have been astounded if they could pack multiple platters in here.) It has a an off-platter parking spot very similar to the Toshiba laptop drive, but it doesn’t have the mystery latch mechanism. After that point I was pretty stuck. I could not figure out how to free the bearing from the voice coil arm. I could not find a way to disassemble that stack. And I could not figure out how to free the platters. For the platters, it appears I need a special wrench that engages with the eight dimples on the spindle and use it as leverage to turn against the four surrounding slots.

As an amusing size comparison, here’s the compact WD5000M21K next to the spindle motor assembly from a 3.5″ sized WD800 hard drive. It’s an impressive feat of engineering, packing all these mechanical components within 5mm of thickness. But technology moves on, and SSDs are far thinner by nature.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Toshiba 2.5″ 250GB SATA HDD Mechanicals (HDD2D90)

A few days ago, I thought I’ve learned enough electronics to get something out of examining circuit boards in consumer electronics. Striking out on this Toshiba 2.5″ hard drive control board immediately after coming up empty on a Western Digital 3.5″ hard drive control board makes me think I’ve overreached too far beyond my skills. No matter, I’m still skilled with a screwdriver and can handle taking apart mechanical components.

Removing a rather large sticker label unveiled just one hidden screw.

After removing those screws, the lid came off easily.

I was surprised to find two platters was packed in this drive less than a centimeter thick representative impressive miniaturization at work. One difference between a desktop drive and this laptop drive is the read-write heads are physically pulled off the platter in parked position. I was under the impression HDD read-write heads are far too fragile for transition a gap between mechanical pieces or rubbing against anything other than a cushion of air. Seeing this tells me they’re not as fragile as I had thought, but I don’t know what the actual engineering constraints involved.

On the opposite end of the pivot, beyond the voice coil actuator, is this mechanism whose purpose I don’t fully understand. The pivoting metal arm could slot into a sharp hook next to the voice coil, keeping the read-write head away from the platter. But how does it know when to engage or not? It works in conjunction with the white plastic part, but I couldn’t figure out how the whole mechanism works together. My best guess is that we have a clever mechanism that would lock the pivot safely in place until the voice coil actuated pivot performs effectively a “secret knock.” Taking advantage of inertia and momentum, the right sequence of motion would release the lock. To verify this hypothesis, I would need to reassemble the drive and see if I can power it up, but by the time I thought of doing so, I had already passed the point of no return.

Because with the mystery latch removed, it was easy to remove the read-write head assembly and once I did, I could not put it back into place.

Flipping it over, I see a hex nut holding the entire stack together.

Loosening and removing the nut allowed disassembly of the entire stack.

I was surprised to find both platters were held by a single screw. Platters for large desktop drives always had multiple fasteners to ensure their platters could not rotate out of place. With a single screw, we don’t have that mechanical guarantee. I guess it’s just friction preventing these platters from rotating relative to each other or the spindle.

I was pretty impressed at how thin and compact this laptop hard drive was, but hard drive engineers have done even better than this.

Toshiba 2.5″ 250GB SATA HDD Control Board (HDD2D90)

I’ve taken apart countless numbers of 3.5″ desktop hard drives like a Western Digital WD800, but I haven’t taken apart many (any?) 2.5″ laptop drives. There used to be a significant price premium for laptop components, an extra cost that I didn’t need to pay for my own needs. This started changing a few years ago: increasing power efficiency requirements and benefits of miniaturization meant small and power efficient components no longer demand a huge price increase, and nowadays laptops outsell desktops. Also, dropping prices of flash memory solid-state drives meant a lot of laptop-sized 2.5″ hard drives got replaced. With terabyte SSDs available for well under a hundred bucks, I can’t think of any reason why I’d ever want to use a 250GB laptop sized hard drive again, so I’m taking apart this Toshiba HDD2D90.

On the bottom I see four wires going into the spindle motor, which I now know to be a brushless motor with “Wye” style winding.

I don’t see an easy way to tap into motor wires while running, so I’m going to skip the oscilloscope examination for this drive.

Closest to the motor control contacts is a chip with Texas Instruments logo and text 7CCN5NTA G4 TLS2502.

Chip with largest surface area was set at an angle relative to everything else. I don’t recognize the logo offhand, but a brief search with PSC acronym found Taiwan-based Powerchip Semiconductor Corp and a matching logo. I didn’t find an exact match for text A2V64S40CTP 747AFD1N but similar model numbers designated memory chips.

Spansion was acquired by Cypress Semiconductor which was itself acquired by Infineon Technologies. After multiple mergers, it was pretty hopeless trying to find details on a FL040A005 74699043. But Spansion’s main product line were flash memory, so this is probably a chunk of flash holding configuration, calibration, and drive-specific information such as remapping of bad blocks.

In between the DRAM candidate and flash memory candidate is a large chip with an old Marvell logo and text 8816717-TFJ1 FT15241.2 0747 C0P TW

My failure to find much of any information on the above chips were disappointing, but at this point no longer surprising. I continued onward to mechanical disassembly.

Western Digital WD800 Mechanical Bits

I looked over the control circuit board for a Western Digital WD800 hard drive and failed to find any documentation relating to chips I found onboard. Oh well. Maybe I’ll have better luck with another drive. For this drive, I continue on to familiar territory: take it apart to marvel at all those mechanical wonders within. As a side effect, this will also make all data stored on this drive functionally inaccessible.

The only tricky part with disassembly is that two of the Torx screws holding lid in place were hidden under the label sticker.

Inside we see a single platter. I’m pretty sure 2002 was recent enough for multi-platter drives, which would mean 80GB was not the highest capacity model in this product line even when it was new.

A translucent yellow bracket limits possible range of motion with read-write head. A small magnet is embedded on one end, but I don’t know its design intent. Perhaps it held the head in place when there’s no power? This bracket is held by a single screw and had to be removed before the read-write head can pivot far enough to clear the platter.

Visible in this picture under the read-write head voice coil is one of two very powerful magnets buried inside this hard drive, the other one is mirror-image on top and already removed in this picture. I have yet to figure out how to nicely separate the magnets from the thick steel cage they are glued(?) to.

Once cleared I could remove the read-write head and platter. There was a pleasant surprise when the platters were removed: I saw three more screws holding the motor in place. Previous HDD teardowns found motors press-fit into the aluminum and impractical to remove. This was the first brushless hard drive motor spindle I could easily remove and store away for potential future projects. Learning more about brushless DC motors is on my to-do list, and I will need motors to experiment with.

This is just the latest in a series of desktop-sized 3.5″ HDD I’ve taken apart. What I haven’t done much of is taking apart their laptop-sized counterpart 2.5″ HDD.

Hard Drive (WD800) Control Board

Putting a hard drive spindle motor’s control signals under an oscilloscope was instructive, even if I don’t yet understand everything that’s going on. Perhaps I could find some documentation to demystify the magic? I looked for hints on the hard drive control circuit board, which told us this 80GB drive dated from 2002 via “WDC (C) 2002” printed in the lower-left corner.

Motor control wires led to this chip, which has a ST Microelectronics logo. Unfortunately, putting these visible identifiers “L6278 17E H99SF0335” into site search came up empty. Either my search skills are pathetic, ST website database doesn’t go back that far, or this chip is something ST made exclusively for Western Digital under a proprietary contract. What’s certain is that I’m not going to learn more about this particular brushless motor controller. Oh well, I’ll continue my sightseeing tour.

Next chip over has a Marvell logo. And just like the ST chip, searching for “88C5540-LFE G472261.2 0339 B2S” came up empty.

Infineon TLE4417 is not listed on their own web site, but other sites (mostly trying to sell me some chips) say it is a voltage regulator.

If true, it makes sense to have voltage regulation close to the main controller: a WDC WD70C22.

A controller needs some working memory, which is where this Samsung K4S161622E-TC60 DRAM chip comes in.

I didn’t learn very much on this pass, but as I learn more about electronics, I hope future examinations will be more instructive and less of a just-for-fun sightseeing tour like this one. That is yet to be seen, in the meantime I retread familiar ground to take apart this hard drive’s mechanical components.

[UPDATE: Sprite took a stab at hard drive controller hacking some time back. Lack of datasheet documentation was a deal-breaking barrier for me, but not for the experienced hardware hacker.]

Hard Drive (WD800) Motor Control on Oscilloscope

I took apart a Fantom Drives FDU80 and found within a Western Digital WD800 3.5″ hard disk drive with 80GB capacity. I’m sure that was a lot of space in its day, but it’s quite small by current standards. Combined with the fact that it used now-outdated PATA interface, there’s no point trying to put this drive back into service storing data. However, it is still a marvel of engineering and manufacturing and I want to poke around to learn what I can.

One thing that caught my attention was the motor power interface, showing four contact points. My past hard drive adventures always found three contact points on the brushless motor, why is this different? My experience with four-conductor motors are stepper motors used in 3D printers. Is this an electrical cousin?

Removing four Torx screws allowed circuit board removal, which was easy because electrical connection between the board and mechanical drive bits are done with springy metal fingers. Now I can probe electrical resistance between these four points, named via their label on the circuit board E50 through E53.

Resistance (Ohms)E50E51E52E53

Measuring small resistance values is a little tricky, we’re getting into margins of errors. But it is clear this is not an electrical cousin of a stepper motor. A 4-wire stepper would have two pairs of wires that are electrically independent from each other, but these wires all have connections to each other. It appears E50 has the same resistance to the remaining three, and the resistance between any of those three are roughly double the resistance to E50. This is consistent with a brushless DC motor with “Wye” winding style with E50 as the center.

I wanted to see what the motor control signals look like under an oscilloscope, so I soldered wires to each motor point and connected them to my Siglent four-channel oscilloscope. I also soldered a wire to the ground wire of power input and connected all four probes’ ground reference alligator clip to that ground wire.

  • E50 center of the Wye is connected to yellow channel 1
  • E51 to magenta channel 2
  • E52 to cyan channel 3
  • E53 to green channel 4

With everything hooked up, I powered up the hard drive and the oscilloscope. Siglent has an “Auto Setup” button that can quickly configure the scope for simple tasks. If this were easy, I expect to see three sinusoidal waves 120 degrees out of phase.

The jumble told me Auto Setup couldn’t handle this task. There’s enough pattern for me to see It’s not random noise but I don’t know how to interpret what I see. Trying to make sense of this plot, I started by giving all four channels identical vertical scale. A repeating pattern emerged, and I zoomed in a little bit.

From here I can see E50 (channel 1 yellow) spends most of its time either at 0V or 6V, and when it is at 0V all the other channels are usually at 0V as well. Beyond that, this trace is still quite noisy with other channels anywhere from 0V to 12V. There’s a lot happening and, trying to decipher things one at a time, I pressed “Run/Stop” to see individual snapshots. I mostly get a trace I don’t understand, but occasionally I see a simple picture consistent with a state I do:

The motor control board energizes coils in a sequence to keep the rotor spinning. Sometimes this means peak voltage difference across two of the coils while the third is close to same voltage as center of the wye winding. (Yellow channel 1.) This could happen in one of two directions. Three coils * two directions = six possibilities, after pressing “Run/Stop” enough times I could catch examples of all six.

Most of the time, though, it doesn’t look that obvious. as we’re in some intermediate state transitioning between those six endpoints. I couldn’t see any pattern at this timescale, I had to zoom out from 5us to 500us.

Looking at which coil spends time at 12V, I can see them cycling through a repeating pattern magenta-cyan-green (or channel 2/3/4). This is a cycle, but not a sinusoidal one like I had expected. The key here is noticing what matters here is not voltage relative to power supply ground, but the voltage relative to yellow center 1: the center of the wye. It spends a lot of time near 6V but doesn’t stay at exactly 6V. Looking at how yellow voltage level varies we can see how that would approximate a sine wave relative to each of the coils. It may not be a perfect sine wave, but I guess it’s close enough to drive this brushless motor. I had expected the wye center to be connected to ground and each of the coils given positive or negative sinusoidal voltage. But this controller connects the coils to either ground or 12V and vary voltage of Wye center. I’m sure the engineering team decided on this approach for good reasons, but I don’t understand motors well enough (yet) to see them.

Where might I learn more about these oscilloscope traces? I went looking for datasheets corresponding to microchips used on the control board.

Fantom Drives USB Storage (FDU80) Teardown

After wrapping up my adventures in Xbox One SSD upgrades, I decided to stay on the theme of storage devices and dug up this old thing from my pile of hardware awaiting teardown.

This device looks ancient but Fantom Drives appears to be still around today. Or possibly a company has acquired rights to that name and logo for doing business. The website lists a few internal M.2 SSDs but most of the product line are external USB storage drives. This is likely an early product of that line.

Size of this enclosure is consistent with a single 5.25″ floppy (or CD-ROM or DVD) drive bay. However, the front faceplate is empty with no slot for a disk.

Around the back we see a plug (IEC 60320 C13/C14) for power and a USB plug (type B) for data. A power switch and cooling fan rounds out the plate. I found the fan curious, because I don’t see any grille for intake or exhaust on this enclosure. Airflow would have been limited at best.

I see four screws on this plate. Two of them holds the fan in place, and the other two probably holds the USB data translation system in place. Neither look like a way for me to open up the box.

Four screws are visible on the bottom, and again they don’t look like something that’ll let me open the enclosure. They probably hold the storage device within.

I’m sure the warranty is long gone on this device, but I’m thankful for this “Warranty Void if This Seal is Broken” sticker because they would have placed it in a location critical to disassembly. Which is where I should start.

After the sticker was removed, the dark plastic clips on either side could be removed, allowing top and bottom enclosure halves to separate. Inside the enclosure we see… a standard 3.5″ hard disk drive looking pretty small inside that enclosure. It has a capacity of 80GB, giving an idea of how old this thing is. Nowadays we can buy cheap microSD cards with more capacity.

Another hint of its age is the antiquated parallel ATA interface used by this drive. I remember working on old PCs, fighting these huge and unwieldy cables. I do not miss them. Modern SATA (serial ATA) is so much easier to work with.

The spindle motor on this hard drive caught my attention: it is connected with four wires and not three like the hard drive motor I tried to turn into a generator. Could this be a pair of windings for two independent sets of coils? If so, I might try to run this thing using a stepper motor driver just to see what happens.

As for the electronics, I don’t know if I will ever find use for a board that translates between USB2 and PATA, two old and slow interfaces. The power supply is more likely to find reuse. I have a sizable stockpile of wall warts including several units with 12V DC output and several with 5V DC output. However, this particular power supply might come in handy if I ever need 12V and 5V together.

But back to that four-wire motor: what’s going on over those wires?

Notes After Xbox One X SSD Upgrade

The major reason I upgraded from Xbox One to Xbox One X was for 4K UHD resolution. And the main reason I upgraded from Xbox One X to Xbox Series X was for its SSD. Now that I’ve retrofitted an SSD to my Xbox One X, is it just as good as a Series X? The answer is no. Xbox Series X still vastly outperforms the Xbox One X even with SSD.

Even Faster Loads

As a representative data-intensive task, I loaded up Forza Horizon 4 and traveled between the main content area (UK mainland) and one of the expansions (LEGO island.) Xbox One X on its original HDD required about 44 seconds to switch maps. Now that it has an SSD, load time has been cut by more than half to 21 seconds. A great improvement but pales in comparison to Xbox Series X which takes only 14 seconds to make the same transition. I’m not sure how much of that is the faster NVMe-based data bus for Series X SSD and how much is its faster processor, but it’s clearly and measurably faster. 44 seconds is long enough to get up from the couch and get a beverage, 14 seconds is barely long enough to pick up my phone to check messages. As this was one of the lengthier transitions in the game, in practice it means I’m rarely left waiting on a Series X while playing.

Quick Resume

Xbox Series X is superior to One X in many other ways, I’m enamored with its higher framerate which arrived simultaneous with HDMI spec to take advantage of it. I even bought a TV to go with Series X, a LG OLED with beautiful picture and terrible software. But back to the subject of load times: “Quick Resume” is a new feature. It suspends a game when the user switches away and, when the user is ready to pick up that game again, reloads the suspended data. Xbox One X required about a minute to start Forza Horizon 4 from stock HDD. With my SSD upgrade, FH4 loads in about half the time: 31 seconds. And that’s only up to the introduction screen, it takes another ~60 seconds (HDD) / ~30 seconds (SSD) before I’m driving. In contrast a Series X with Quick Resume can take me from home screen and into the driver’s seat in about 8 seconds. I find this absolutely astonishing and I’m a huge fan of this new feature.


A final note on storage: I don’t know if Xbox One X issues TRIM commands to the SSD as data come and go. This was important for SSD longevity (Wikipedia has more details) and requires operating system support. Since it never came with a SSD, there’s no reason for Xbox One X to issue TRIM commands. On the other hand, low level disk code is probably shared between all Xbox variants, including the SSD-equipped Series S and Series X that would benefit from TRIM. And since TRIM is ignored by older drives that don’t understand it, there’s no reason for them to put in extra effort to disable TRIM on older consoles. And finally, various manufacturers (including Crucial who made the drive now living in my One X) claim that their SSD firmware is now advanced enough they don’t need TRIM to obtain optimal performance. I’m not sure I believe that, and I don’t know of any way to tell if TRIM is happening, but SSDs are now cheap enough I’m willing to continue this experiment.

Xbox One X SSD Upgrade

Using Linux disk tool “dd” I successfully migrated data on my Xbox One HDD to an SSD with identical capacity. The SSD upgrade made the nine-year old console much more responsive to game loading and in-game navigation, incurring less waits before the action starts. (It didn’t do anything once the game is up and running, obviously.) With this success, I eyed its successor: my Xbox One X which is also gathering dust since the time I upgraded to the latest Xbox Series X.

The SSD-upgraded Xbox One was mostly just for fun, as it is still likely to sit on a shelf collecting dust after its SSD upgrade. In contrast, an SSD-upgraded Xbox One X may actually see some use. Or at least this was the justification I used to spend money on a 1TB Crucial MX500 SSD (*) for this project. I also skipped the system reset this time around, curious to see if it makes a difference. As for a quick-and-dirty performance benchmark, I timed the duration between selecting “Restart Console” to the time I’m back at the Xbox home menu. On the factory hard drive, that took 90 seconds.

iFixit doesn’t have an explicit guide for HDD replacement on an Xbox One X (referred to by its codename Project Scorpio) but it does have a guide for BD-ROM drive replacement. Looking at pictures, I judged that was close enough as the HDD is right next to the BD-ROM drive. Once I followed instructions to reach the BD-ROM drive, I could indeed lift the hard drive cage to access four screws necessary to remove the original drive.

Disk capacity details as shown by command “fdisk -l”:

Disk /dev/sdb: 903.57 GiB, 970199064576 bytes, 1894920048 sectors
Disk model: ST1000LM035-1RK1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

The Crucial MX500 SSD is slightly larger, allowing me to copy all the bytes and leave almost 30GB available for wear levelling and other SSD housekeeping.

Disk /dev/sdc: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

This time I’m going to use a 512KB block size for dd. That may have been the key to faster copy, as the drives are double the size yet copied in less time than for Xbox One’s 500GB drive.

~$ sudo dd if=/dev/sdb of=/dev/sdc bs=512K status=progress
970164011008 bytes (970 GB, 904 GiB) copied, 9115 s, 106 MB/s
1850507+1 records in
1850507+1 records out
970199064576 bytes (970 GB, 904 GiB) copied, 9120.85 s, 106 MB/s

Reassembling the console, I retested the “Restart Console” scenario. It took just 49 seconds with the new SSD compared to 90 seconds with the HDD. Almost half the wait or in other words, almost doubled the speed! This is awesome, and I didn’t have to reset the console, but there may be an asterisk or two quantifying this success.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Xbox One SSD Upgrade Successful

Following directions published by iFixit, I successfully pulled the original factory hard drive from my Xbox One (2013) game console. This is an attempt to increase game load performance with an SSD upgrade, migrating Xbox operating system files via Linux “dd” tool. I installed both original Xbox 500GB hard drive and candidate replacement 500GB SSD in my Ubuntu tower case with drive cage that makes drive install/uninstall much easier. Now I can see how they compare.

I expected both of their “500GB” to be rounded-off values approximating actual drive capacity, which are dictated by implementation details of each drive. Since they are built within constraints of completely different technologies, I expected the two drives to be somewhat different in capacity. Most of the time, a few megabytes bigger or smaller wouldn’t make a big difference. But for a blind copy to succeed, my SSD must be at least as large as the HDD. If the SSD is even one byte smaller, the blind copy would fail.

Here’s the drive removed from Xbox and installed in my Ubuntu tower, as per “fdisk -l” command.

Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000LPVX-2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

And here is my candidate for replacement SSD. It was bought a few years ago, from Western Digital’s economy class “Blue” line. This model number WDBNCE5000P is no longer available, its current-day successor to the title of “WD Blue 500GB SATA” appears to be model WDS500G3B0A (*)

Disk /dev/sdc: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC  WDBNCE5000P
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Oh wow, capacity of these two drives matched perfectly down to the byte. I didn’t expect that. Was this pure coincidence or is there some other factor at play? I noticed both are Western Digital drives, did that help? No matter, I took the perfect capacity match as green light to proceed and launched my blind copy with the following command:

sudo dd if=/dev/sdb of=/dev/sdc bs=4K status=progress

It took a little over three hours to copy because hard drive throughput dropped as copy progressed. It started at well over 100 megabytes per second, but towards the end it was barely copying 1-5 megabytes a second. I don’t know why. Disk fragmentation was the only hypothesis I had, and that shouldn’t be an issue in a blind copy. My best guess is that 4 kilobytes is not the optimal block size despite it listed as “optimal” I/O size above.

I connected everything together, many components loosely dangling, and pressed the power button. 38 seconds later, I saw the initial setup screen. That’s almost half of HDD boot time of 64 seconds! I connected to my Microsoft account and retrieve a few of my digital purchases, which all ran without complaint. And even better, the SSD made this a much more responsive Xbox console. It didn’t make a difference once a game was up and running, but the SSD helps us get into the game or switch levels much faster. Less waiting, more gaming! This was a win and it emboldened me to perform an SSD upgrade with my Xbox One X as well.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Xbox One Hard Drive Extracted

I’m taking apart my Xbox One (2013) for two potential projects: first is to see if I can improve its performance by upgrading its spinning platter hard drive to a flash memory solid state drive. The second is to take a look at the components within to see if I can build a slimmer “Luggable” Xbox gaming console.

On the hardware side, I referred to iFixit guide for replacing an Xbox One HDD. The guide also linked to information on how to format and partition the new drive, but I’m not going to mess with the file system. My preparation consisted of telling the Xbox to do a system reset and clear all of my personal data off the drive, just in case I make a mistake. I hope it also increases the odds of success. Some people who have tried messing with Xbox system partitions reported problems that may have been correlated to having an active account on the system. Maybe data on disk are encrypted with information related to the account? I don’t know and I’m not going to mess with it. I’m starting with a fresh slate.

After I reset the system, but before I tried opening it up, I timed the boot-up sequence. There were 64 seconds between the time I pressed power button to the initial setup screen. I will use this as my benchmark for SSD performance impact.

While following iFixit excellent directions taking the case apart, I see my biggest challenge for a “Luggable Xbox”. Its front panel controls are on a thin sheet of printed circuit board. Including eject button for the now-dead optical drive (don’t care) tactile button to pair a controller (important) and capacitive touch power button (very important). This custom piece of flexible circuit is securely encased inside the front panel, composed of multiple pieces of hard plastic held together with melted rivets. Freeing without damage would be difficult, and capacitive touch calibration is sensitive to surrounding environment. If I remove it from this panel, the power button touchpad may never work again. These are risks I have to keep in mind if I want to build an alternative enclosure.

Putting “Luggable Xbox” project idea aside for today, I finished extracted the original hard drive to see if it is compatible with my SSD upgrade candidate.

Opening Up My Xbox One

Learning how to configure automated updates in Ubuntu was just the latest adventure in open-source operating system, every adventure a chance to learn something new. And now for something completely different: the locked down black box of an Xbox One game console. This is an Xbox One, no “S” or “X” suffix, the design that launched just before 2013 holiday season bundled with a Kinect 2.0 sensor bar.

I’ve been curious about whether an SSD upgrade might transform an old Xbox One the same way SSDs could transform old Windows PCs. Unfortunately, the locked-down nature of a game console makes this more troublesome than a PC. I didn’t want to mess with Xbox disk contents which have been obfuscated in the interest of tamper-proofing the system. My best bet is to perform a low-level sector-by-sector copy to transfer bits directly from HDD to SSD. A blind copy has the highest prospect of success, but it comes with caveats:

  1. We can’t tell valid data from unused space. Absent this knowledge, every bit is equally important and must be copied. The SSD must be at least as large as the HDD to hold everything.
  2. Without knowledge of partitioning schemes, we can’t update them. Thus Xbox games would be unable to take advantage of any extra space. (It’s not wasted, technically speaking, as extra flash memory would be useful for wear leveling and similar SSD housekeeping.)

Given the space requirements, I would need a 500GB SSD to replace the 500GB HDD in my Xbox One. A few years ago, it would have been far too much money to spend just for laughs. Too expensive to just leave sitting in an old game console. I had to wait until SSDs got cheap enough for me to upgrade other machines and let the chain of hand-me-downs free up a 500GB drive for exploration. Fast forward to today, where name-brand high performance 1TB SSDs can be found for well under $100 USD. Plus, I also recently learned to perform low level copy in Linux. All the required pieces are now in place.

I also had another motivation to take apart my Xbox One and look inside. I thought it would be fun to build a “Luggable Xbox” from the guts of this machine and wanted to investigate its components. The optical drive has failed, so I wanted to remove it. Could I design and make a slimmer box to contain what’s left?

With those two goals in mind, I started taking my Xbox One apart.

Notes on Automating Ubuntu Updates

I grew up when computers were major purchases with four digits in the dollar sign. As technology advanced, perfectly capable laptops can be found for three digits. That was a major psychological barrier in my mind, and now I have another adjustment to make: today we can get a full-fledged PC (new/used) for well under a hundred bucks. Affordable enough that we can set up these general-purpose machines for a single specialized role and left alone.

I’ve had a few Raspberry Pi around the house running specialized tasks like OctoPi and TrueNAS replication target, and I’ve always known that I’ve been slacking off on keeping those systems updated. Security researchers and malicious actors are in a never-ending game to one-up each other and it’s important to keep up with security updates. The good news is that Ubuntu distributions come with an automated update mechanism called unattended-upgrades, so many security patches are automatically applied. However, its default settings only cover critical security updates, and sometimes they need a system reboot before taking effect. This is because Ubuntu chose default behavior to ensure they are least disruptive to actively used computers.

But what about task-specific machines that sees infrequent user logins? We can configure unattended-upgrades to be more aggressive. I went searching for more information and found a lot of coverage on this topic. I chose to start with this very old and frequently viewed AskUbuntu thread “How do I enable automatic updates?” The top two answer links lead to “AutomaticSecurityUpdates” page on, and to “Automatic updates” on Ubuntu Server package management documentation. Browsing beyond official Ubuntu resources, I found “How to Install & Configure Unattended-Upgrades on Ubuntu 20.04” on to be a pretty good overview.

For my specific situation, the highlights are:

  • Configuration file is at /etc/apt/apt.conf.d/50unattended-upgrades
  • Look at the Allowed-Origins entry up top. The line that ends with “-security” is active (as expected) and the line that ends with “-updates” is not. Uncomment that line to automatically pick up all updates, not just critical security fixes.
  • In order to pick up fixes that require a reboot, let unattended-upgrades reboot the machine as needed via “Unattended-Upgrade::Automatic-Reboot” to “true“.
  • (Optional) For computers that sleep most of the day, we may need to add an entry in root cron job table (sudo crontab -e) to run /usr/bin/unattended-upgrade at a specified time within the machine’s waking time window.
  • (Optional) There are several lines about automatically cleaning up unused packages and dependencies. Setting them to “true” will reduce chances of filling our disk.
  • Log files are written to directory /var/log/unattended-upgrades

Potential Small PC Explorations

I had fun playing with the GMKtec NucBox3, an interesting and capable little PC more affordable than Intel’s NUC product line, naturally with some expected tradeoffs for its lower cost. I learned about these little PCs from a Newegg advertisement and, between the time I ordered one and its arrival, I had a failed USB external drive that I transplanted into a small form factor Dell PC. Computers in these two projects represent a spectrum that I should keep in mind for future project possibilities. Which one I buy would depend on a project’s requirements.

Intel NUC

A genuine Intel NUC would be more expensive than any of the other options below, but sometimes it’s worth spending that money. For example, if I’m building a solution that needs to be reliable, I will pay more for a brand name. Or if I want to design something that can be repeated by others, it’s easier for someone to buy an identical Intel NUC than to find, say, a GMKtec. For this reason: If my Sawppy rover ever changes over to an x86-64 PC ROS brain, the official recommended hardware will be an Intel NUC. (Supplemented with suggestions on what to look for in lower-cost alternatives like the NucBox3.)

Just Below $90

But when we’re feeling adventurous and not particularly motivated to pay for quality or consistency, we can go bargain hunting. Searching for various options, I observed a price floor somewhere in the $80-$90 range. I see an interesting hint of economic factors at play preventing things from much lower than $90, but I don’t know what they might be. (As a point of comparison, Raspberry Pi 4 8GB MSRP is $75.)

Lowest Bidder du Jour

Amazon categorized these products under: “Electronics” > “Computers & Accessories” > “Computers & Tablets” > “Desktops” > “Minis”. Sorting them by price today, I see several options right around $89, roughly 40% discount from the price of a NucBox3. To get to that price point we have to give up many things. For example, this item (*) made some notable tradeoffs:

  • Memory is half the size (4GB vs. 8GB), uses older technology (DDR3 vs. DDR4), and is soldered in never to be upgraded.
  • Storage is half the size (64GB vs 128GB), uses much slower technology (eMMC vs. SATA) and is also permanently soldered. However, it does have a 2.5″ SATA bay, which the NucBox3 does not.
  • CPU is three years older and from a different product generation (Celeron J3455 vs. J4125) and it doesn’t meet hardware requirements for Windows 11.

On the upside, it still meets all my hard requirements for robot brain: 64-bit CPU running x86-64/amd64 instruction set, gigabit Ethernet port, small, lightweight, and might run on battery power. Depending on future project requirements, I may choose these tradeoffs in favor of a <$90 bargain.

Buying Refurbished

Looking at inexpensive PCs on Amazon, I saw a lot of refurbished units. Clicking around a few listings, I learned Amazon had set up an entire department. “Amazon Renewed” is dedicated to refurbished products of all kinds, not just computers. I should definitely keep this in mind as an option. Given my personal experience, I’d restrict my search to refurbished Dell products from their corporate line. Which would still leave me with very many options. Check out these guys, each offered at a few bucks under $90:

  • Optiplex 3040 Micro Desktop (*) are bigger than an Intel NUC, but tiny compared to anything else. Skimming Dell’s manual, I see a 2.5″ SATA bay inside. I also see what looks like a M.2 slot on a picture of its mainboard, but M.2 isn’t called out in the manual as a storage option. I see a gigabit Ethernet port and it accepts power from a DC barrel jack, so there’s a possibility it can be persuaded to run on battery power.
  • Optiplex 790 USFF Desktop (*) are significantly larger. Packing an optical drive on top of a 2.5″ drive bay and AC power supply. No robot battery power for this machine, but dual 2.5″ drives are possible via an optical drive caddy. This could work for TrueNAS replication target if my storage drive is a high capacity 2.5″ laptop hard drive.
  • Optiplex 3020 SFF Slim Desktop (*) is a successor to the Optiplex 960 I repurposed to a TrueNAS replication target, with at least one 3.5″ drive bay and one optical drive bay. This would be my default choice if I need to build another replication target machine.

What if I want a parallel port for LinuxCNC? Sadly, that’s an uncommon enough request I can’t filter on Amazon. But when it comes to refurbished small Dell PCs, Amazon Renewed is not the only game in town. There are plenty of other vendors like PC Liquidations, who offers filtering by parallel port. Resulting in a list of refurbished Dell Optiplex with parallel port starting at, you guessed it, a few dollars under $90. All good options if I want to dedicate a cheap PC to a task, which usually also requires me to set up automatic software updates.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Good First Impressions of GMKtec NucBox3

It was fun to poke around internal hardware of a tiny PC I wanted to investigate for use as a robot brain. This GMKtec NucBox3 I ordered off Amazon (*) is a more affordable variation on the Intel NUC formula, and its price (significantly lower than Intel’s own NUC) makes me more willing to experiment with it.

Decent PC for Windows 11 Home

But before I take any risk with nonstandard usage, I should verify it worked as advertised. The 128GB SATA SSD came installed with Windows 11 Home edition build 21H2. Upon signing in with my Microsoft account, it started the update process to build 22H2. I assumed the machine came with a license of Windows either embedded in the hardware or otherwise registered. Windows 11 control panel “Activation state” says “Windows is activated with a digital license linked to your Microsoft account” which I found to be ambiguous. I shrugged because I plan to use it as ROS brain and, if so, I’m likely to run Ubuntu instead of Windows. And if I wipe the SATA drive with a fresh installation of Windows 11, it sounds like I can log in with my Microsoft account and retrieve its license.

The more informative aspect of Windows sign-in and registration is letting me get a feel of the machine in its default configuration. All hardware drivers are in place with no question marks in device manager. Normal user interface tasks were responsive and never frustrating, which is better than certain other budget Windows computers I’ve tried. A NucBox3 is a perfectly competent little Windows box for light duty computer use.

One oddity I found with the NucBox3 was the lack of a power-up screen letting me change boot behavior with a keypress. When a PC first powers up, there’s typically a prompt telling me to press F12 to enter a menu to select a boot device, or DEL to enter system setup, etc. Not on a NucBox3, though: we always boot directly into Windows. The only way I found to enter hardware menu was from within Windows: under “Settings”/”System”/”Recovery” we can choose “Advanced startup” to boot into a special Windows menu, where I can select “Advanced Options” and choose “UEFI Firmware Settings”. This is expected to be an infrequent activity most users would never do, so I guess it’s OK for the process to be a convoluted.


Once I got into UEFI menu for NucBox3 I was surprised by how many options are listed. Far more than any branded (Dell, etc) computer I’ve seen and even more than hobbyist-focused motherboards.

Some of these options like “Debug Configuration” almost feel like they weren’t supposed to ship in a final product. My hypothesis is that I’m looking at the default full menu of options for a manufacturer using this AMI (American Megatrends, Inc) UEFI firmware. Maybe the manufacturer was expected to trim it down as appropriate for their product, and maybe nobody bothered to do that.

Under the “Chipset” menu we have device configuration for many peripherals absent from this device. They’re marked [Disabled] but the menu option didn’t even need to be here. The final line was also the most surprising: a selection for resistors on I2C buses. On one hand, I’ve never seen a PC’s I2C hardware exposed in any user-visible form before. On the other hand, if I can figure out where SDA/SCL lines are on this motherboard, maybe I can really have some fun. Why bother with a Raspberry Pi or even an ESP32 to bridge I2C hardware if I can attach them directly to this PC?

Ubuntu Server

But all those shiny lights in UEFI menus were just a distraction. What I really want right now is to control boot sequence so I can boot from a USB flash drive to install Ubuntu Server 22.04 LTS. I found I could do it from the “Boot” section of UEFI menu. Ubuntu Server was installed, it worked, and that was no surprise. A computer competent at a full Windows 11 GUI rarely has a problem with text-based network-centric Ubuntu Server, and indeed I had no problems here. For a ROS brain I would want gigabit networking, all four CPU cores, RAM, storage, and USB peripherals. They are all present and accounted for, even sleep mode if I want to put a robot to sleep.

Variable Input Voltage

The next experiment was to see if this computer is tolerant of variable DC supply voltage. On paper it requires 12V DC and the supplied AC adapter was measured at 12.27V DC. I could buy a boost/buck converter that takes a range of input voltages and output a steady 12V (*) but it would be more efficient to run without such conversion if I could get away with it. Since the NucBox3 used a standard 5.5mm OD barrel jack for DC power input, it was easy to wire it up to my bench power supply. I found it was willing to boot up and run from 10VDC to 12.6VDC, the operating voltage range of 3S LiPo battery packs.

Good ROS Brain Candidate

This little computer successfully ran Ubuntu Server on (simulated) battery power. It handily outperforms the Dell 11 3180 I previously bought as ROS brain candidate and is much more compact for easy integration on robot chassis. Bottom line, I have a winner on my hands here!

I’m glad that Newegg advertisement made me aware of an entire ecosystem of inexpensive small PCs. I need to keep this product category in mind as candidates for potential future projects. I have many options to consider, depending on a project’s needs.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Looking Inside GMKtec NucBox3

I thought the GMKtec NucBox3 looked interesting (at least on paper) as candidate ROS brain, so I ordered one (*) for a closer look despite some skepticism. All pictures on that Amazon listing look perfect, I suspected they were all 3D computer renders instead of photos of an actual product. There’s a chance the actual product looked very different from the listing.

The good news: the product is real and for the most part, as depicted in the listing. I find good fit and finish on its plastic enclosure. There is one downside: fingerprints show up very clearly. I had to wipe down the case pretty aggressively for these pictures and I still see greasy smudges. Well, at least you know these aren’t renders! One instance where oily fingerprint smudges are a feature, not a bug.

I see two brass heat-set inserts on the bottom of the case which will be useful for mounting this little box somewhere. They look very small but this is a small lightweight box so it would probably suffice.

Here we also see where actual product differed from product listing rendering. The company website page for NucBox3 showed an access panel to upgrade memory or storage.

But there’s no such access panel on the real thing, and it’s not clear how to get inside without one. Documents in the box consisted of a minimal warranty card in the box and no instruction manual. No matter, the lack of a convenient access panel or a manual shall not deter me from getting inside for a look.

Hiding fasteners under glued-on rubber feet is a common and effective technique. These four fasteners are not symmetrical so, even though the box is a square, we need to remember correct orientation to reinstall.

Without a convenient access door for upgrades, I wasn’t sure what else would differ from listing picture. I was afraid memory and storage would be soldered-in parts, but I was relieved to find they were standard DDR4 RAM and M.2 2280 SSD as advertised. They’re just a tiny bit harder to access without the panel.

Judging by its M.2 keys, we have the option to upgrade this factory-installed SATA M.2 SSD to a higher-performing NVMe M.2 SSD if needed.

What appears to be empty threaded holes (marked with circles) are actually used to secure the CPU heatsink from the other side. (There’s a fourth one under RAM module and not visible in this image.) Four fasteners (marked with squares) secure the motherboard and must be removed to proceed.

The headphone jack protrudes into the enclosure, so we must tilt the mainboard from the opposite side for removal. But we have to be careful because we are limited by length of WiFi antenna wires.

A block of foam keeps WiFi antenna connectors in place, peeling it back allowed the connectors to be released. The antennae themselves appear to be thin sheets glued to the top of the case, similar to what I’ve salvaged from laptops. How securely were they held? I don’t know. I didn’t try to peel them off.

Freed of WiFi wires, I could flip the mainboard over to see a big heatsink surrounded by connectors. As chock-full of connectors as this product already is, I was surprised to see that there are still several provisions for even more connectors on the circuit board. I’m also very fascinated by connectors used here for USB3, HDMI, and DisplayPort. I usually see them oriented flat against the circuit board as typical of laptop mainboards, but without design pressure to be thin, these connectors are standing upright. This is a tradeoff to fit more connectors on the edge of a circuit board, but each connector must go deeper to obtain the necessary mechanical strength to withstand use.

Looking in from the side, the heatsink appears to have a flat bottom. This is good news if I want to mount a different heatsink on this board, possibly with a fan. The flat bottom means I don’t have to worry about sticking out to make thermal contact with other chips or have to cut a hole to clear protrusions. If I want to mount to the same holes, I will have to drill four holes which unfortunately are irregularly spaced but not an insurmountable challenge. All that said, I’m more likely to just point a fan at this heatsink if heat proves to be a problem.

Using this computer as robot brain also means running it on battery power. Nominal power requirements are listed as 12V up to 3A. My voltmeter measured the factory power adapter output at 12.27V. But what can this thing tolerate? I found this chip directly behind the DC power barrel jack, but a search for DC3905 WK1MEG (or WX1MEG) didn’t turn up anything definitive. Texas Instruments has a LP3905 and Analog inherited Linear Technology’s LT3905. Both chips are designed for DC power handling, but neither footprint matches this chip. This might not even be the power management chip, I’m only guessing based on its proximity to the DC barrel jack.

As far as I know, the highest voltage requirement on this PC are USB ports at 5V. On the assumption that nothing on this machine actually needs 12V, then all power conversion are buck converters to lower voltage levels. If true, then this little box should be OK running directly on 3S LiPo power (Three lithium-polymer battery cells in series) which would range from 12.6V fully charged to 11.1V nominal to 10V low power cutoff. I’ll use the power brick that came in the box to verify everything works before testing my battery power hypothesis.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.