Parsing the Long Name: “Microchip MPLAB Xpress PIC16F18345 Evaluation Board”

highres_464164287
Giveaway winner holding the prize in front of his Luggable PC, photo by [Shulie]
There was a giveaway at the Hackaday LA August meetup and I came home with a little box labelled “Microchip MPLAB Xpress PIC16F18345 Evaluation Board“. (Retail value: $12) While I had some vague ideas about PIC chips, I’ve never had the chance to sit down and play with one. Thanks to Hackaday LA, I now have my chance.

In my exploration of hardware projects, there have been occasional times when I thought: “Hmm, I wonder if this is the kind of problem I could solve with a PIC.” Now that I have one to learn with, I hope to reach a point where I can definitively recognize problems that I can (or can’t) solve with a PIC.

The first thing to figure out is what I actually have in my possession. The long name was more than a little intimidating but a little research parsed the name into the following components:

  • Microchip in this context is not the generic meaning but the proper name of the company Microchip Technology.
  • MPLAB is a product line of software tools they produce. Offered to engineers for developing products around their hardware such as the PIC chips.
    • MPLAB Xpress is a specific product in this line. It is a cloud-based variant of the full MPLAB software suite, scaled down to lower the barrier of entry into the world of PIC programming.
  • PIC16F18345 is a cryptic alphanumeric string but that also makes it the least ambiguous one to understand. It designates a specific chip from the extensive PIC product line.
  • Evaluation means this is for prototyping and not for companies to put into large volume products. I won’t understand why until later.
  • Board means all of the above are mounted on a single circuit board.

After decoding the individual words, my question was “Why is the name of their MPLAB Xpress software on this hardware device?”

The short answer: this evaluation board’s on-board programmer has been tailored to support MPLAB Xpress’ cloud-based microcontroller development model.

The longer answer is coming up as tomorrow’s post.

 

Tired PCI-Express Extension Cable Caused System Instability

I was ready for a break from working on the Luggable PC Mark II project and wanted to enjoy the results of my labor for a while. I started learning PIC programming but was frustrated by an unstable computer.

Revision A proved that the system works, and all components can happily run together reliably for a few weeks. But revision B was a problem child. It started off with occasional temporary recoverable system freezes. Then the system freezes would not recover and I had to power cycle the computer. Degrading further, the unpredictable failures would spontaneously reboot the computer.

The unpredictable nature of these events makes diagnosis difficult. Sometimes many hours would pass before an event, sometimes they would happen twice within the same minute. When one variable is changed, the system has to be left running to test if the change helped. Sometimes this meant running a system for hours before another reset occurred.

My initial suspicion was on overheating because a tremendous heat wave hit Los Angeles this week. But there was little correlation between temperature and stability. One of the “reboot itself multiple times within a minute” events occurred during the cool night.

The next suspicion was on power, as an under-voltage could cause these symptoms and the heat wave means a lot of air conditioners running in the neighborhood. But reboots continued after swapping in a different power supply and putting the system on an UPS.

The key insight was a system freeze during a work session where I had music playing in the background. The music continued but the screen is frozen, implying the video subsystem.

The PCI-Express extension cable was an unknown. I explicitly excluded one from Luggable Mark I just to eliminate that variable. As a test, the video card is inserted directly into the motherboard. The system is not luggable at all in this state but it proved informative because the system stayed stable for 24 hours.

Looking at the cable I removed from the system, I can see a lot of wrinkles from all the times I experimented with the layout and changed relative dimension of the components. Hypothesis: metal fatigue has started cracking some of the wires in this ribbon cable causing intermittent connections and general system chaos.

 

Wrinkly Cable

Normally a system installer would bend the ribbon cable into place once and leave it. I consider my usage pattern of performing many different bends over many weeks beyond normal expectation. Like bending a paperclip back and forth until it breaks.

In short: “My bad”.

I ordered another cable from the same vendor off Amazon (*), installed the replacement, and that restored system reliability. I plan to leave this second cable alone as much as possible. When I start working on revision C, I will use the old cable (now labelled “TEST”) to try out different layout ideas. Bend and flex and twist as I experiment. I won’t change the bends on the new cable until I settle on a layout.


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

Rev. B @ Hackaday LA August Meetup

There’s nothing like a deadline to drive progress, so I’ve imposed deadlines on myself to keep things moving. For Luggable PC Mark II Revision B, the self-imposed deadline was to get it finished (enough) to show at the Hackaday LA August Meetup. It was a mad scramble towards the end, cutting fancy feature ideas in favor of simple ones that can be done quickly within the deadline. But I made it! I took it on the Metro Gold Line train to the meetup venue SupplyFrame DesignLab. Here’s a picture somebody took of rev B sitting on the projects show-and-tell table.

highres_464139891

Luggable PC Mark II Revision B sitting on the projects show-and-tell table along with project from other people. I’m not visible in this picture by [SpencerSkelly]

I always forget to take pictures of my own project while at a Hackaday meetup… I’m too excited talking about my project. I’m not visible in this picture. The location I spent most of my chatting time is blocked by the person with white polo shirt on the right.

Many Hackaday LA regulars are familiar with my Luggable PC Mark I, and might even be getting tired of it. Mark II was a fresh take and attracted a new wave of attention. It is always fun to share my projects with like-minded people.

RevB_Backjpg

RevB_Front

A downside of mad scrambles to meet deadlines is overdose. I’m enthusiastic about Mark II and there’s still lots to problems I need to fix with rev B…. but after the deadline scramble I’m ready for a break before I start working on rev C.

I was planning to go back to learning Python, but they had a giveaway at this meetup and I was granted a Microchip MPLAB Xpress PIC16F18345 Evaluation Board. Getting some basic familiarity with these low-power (in both computation power and electrical power) microcontrollers had been on my to-do list for some time. Now that a PIC microcontroller board has dropped in my lap, I might as well run with it!

Make a Flexible Bracket With 3D Printing Vase Mode

Due to real-world inconveniences like gravity and manufacturing tolerance, the monitor sags relative to the aluminum extrusion frame of Luggable PC Mark II Revision B. We’ll have to compensate for this by adding something to help hold the monitor in the frame.

This Lenovo L24q-20 has barely any bezel around the screen, which was a tremendous plus when I was shopping around monitors. The tiny bezel makes for compact dimensions which makes it easy to package, and the lack of excess material contributes to weight. But now the lack of bezel means I need to be careful with the bracket that we’ll need.

When there’s physical stress on a LCD screen, it distorts the layers inside and show up as visible color distortions on-screen. It isn’t good for the screen and doesn’t look good, either. We want something that can spread this stress evenly over a large area. Ideally something flexible so high-stress areas can give way to balance the load.

 

I started designing rigid 3D printed brackets with stick-on foam strips for flexibility, but then remembered “vase mode”. This is an option in 3D printing where, instead of printing a solid object, the plastic is only extruded on the perimeter. This results in a thin shell of the shape, the thickness of the wall is the 3D printer extruder nozzle diameter, and the center is empty.

Thingiverse had a few objects to be printed in “vase mode”. It was good for showing off something 3D printers can do easily that is difficult for other manufacturing methods. But while it was good for these Thingiverse trinkets, I didn’t see a functional use for this technique… until today!

I designed the shape I wanted in Fusion 360 (as a solid) and printed a short segment using vase mode to prove the idea is sound.

Monitor top test clip
Short test piece of clip printed with vase mode

Once the short test piece proved successful, I proceeded to print enough segments to cover all available space on the extrusion bar. (Everything not taken up by the handle or the corner pieces.) They hold the monitor in place while distributing that pressure across almost the full width of the monitor.

Clip full width
Four segments of flexible clip (two on each side of handle) printed with vase mode

CAD World vs. Real World: Chassis Flex

On today’s episode of “why we build prototypes”: chassis flex.

In the digital CAD world, all features are exactly as drawn. Their dimensions always perfectly match the specified value. All surfaces mate perfectly. All fasteners are aligned to their holes. All dimensional values are static and never change, regardless of the physical stresses applied on them. Multiple objects are allowed to occupy the same space.

None of these things are true in the real world.

Digitally simulating all the messiness of the real world are hard. There exists software tools for engineers to simulate specific aspects. Interference checking can try to find objects occupying the same space, but it can be deceptive because they rarely take into account all the other factors such as manufacturing tolerance and physical stresses.

Finite element analysis can help understand how objects move in response to physical loads in the real world. It takes some level of expertise to properly set up an analysis, beefy computing resources to run the simulation, and then human expertise again to interpret the results. A badly set up simulation will tell the wrong story, a bad interpretation can do the same, and manufacturing tolerances can throw everything off in unexpected ways.

For a hobbyist project that is quick to build and failure is cheap, it is faster and easier to find out how things act in the real world by just building it in the real world. Hence the construction of Luggable PC Mark II Revision B. Seeing everything in the physical world highlighted some problems. Most of them are trivial, but one stood out.

The Lenovo monitor is attached in the lower back, using a metal plate I pulled from the original display stand. The plate goes to a 3D-printed spacer, which attached to aluminum extrusion bars, which attach to another 3D printed part, before it is attached to the bottom of the aluminum frame. All those less-than-perfect joints add up to a clearly visible problem. The monitor is supposed to sit within the aluminum extrusion frame, but when all the little errors accumulated, the top edge of the monitor does not sit in the frame like it did in CAD, it actually juts out over 20 mm from the frame.

Next: how to help the top of the frame and the top of the monitor stay together.

 

Screen frame separation

 

Maintain Relative Spacing Between M3 Nuts in Misumi HFS3 Aluminum Extrusions

In the previous post I described how to keep individual M3 nuts in place on a Misumi HFS3 Aluminum Extrusion. After I started using those little 3D-printed holders to keep the nuts in place, I ran into a related but different problem.

Some large parts require more than one fastener to hold them to the extrusion. And some of these parts get moved around as I revise the details of my design. A specific large bracket required four nuts and, after pushing the M3 nuts around (all four every time I moved the bracket) I started thinking about how to improve this process.

The first answer was to scale my existing design upwards. Instead of a tiny object that holds a single M3 nut, create a longer strip that holds multiple nuts in place. In practice, the friction of a longer strip causes many problems. When pushed, the strip will want to bend instead of move, which increases the pressure on the sides of the rail, which made it even more resistant to moving. And when pulled, the strip is not strong enough to stand up to the strain and would break apart.

The second answer is to reduce the size so there’s less frictional stress to bend or stretch and generally break the strip. But then the old problem came back: with less friction, the nuts would move around if the frame is jostled or tilted. It’s nice that they all move together, maintain proper spacing, but that’s not terribly useful.

The third answer is to combine elements from the previous two: the strip inside the rail is still loose and free to move, but I added a tab that sticks above the rail. This tab is large enough to provide friction against the rail edge. As the friction is at tab, friction would not cause the rest of the strip to bend or stretch. Since such a strip is customized for a particular part, the tab is also specialized to the mating part. When the tab is pushed up against the side of the mating part, all the nuts on the strip are at the appropriate places.

With the help of this strip, it is now much easier to move the brackets around to try out different ideas.

Nut locator strip

 

Make M3 Nuts Stay Put in Misumi HFS3 Aluminum Extrusions.

While putting together the exterior extrusion frame for Luggable PC Mark II Revision B, I got frustrated with another recurring headache. Aluminum extrusions (like the 15mm Misumi HFS3 I’m using) are shaped so I could put fasteners (in this case, standard M3 nuts) in a rail to fasten things at arbitrary locations along the extrusion. The fact the nuts can slide anywhere along the rail also meant they don’t stay still. If I place the nuts at the desired locations, I have to be careful not to bump or tilt the assembly or the nuts will go sliding out of position.

After too many episodes of nuts moving out of place, I decided to put some thought into the problem. I ended up with a small 3D printed part I can insert into the extrusion along with the M3 nut. It is large enough to rub against the edge of the rail and thereby holding the M3 nut in place, but small enough that it can still be moved with a little push.

Nut hold insert

It was a challenge to dial in the exact dimensions. The acceptable range is very narrow – in fact almost too narrow for a consumer-level 3D printer like mine to handle. Within the same batch I printed, some are extremely tight and some are too loose. If I print at a different time of day, some are entirely unusable. I also ran out of one spool of filament during a print, and the new spool (even though it is the same type from the same vendor, probably even the same manufacturing batch) returned different results.

So I have to keep adjusting dimensions and generate different files between batches. Fortunately, since they are small, it is not a huge loss of material to just throw away the unusable pieces. It solves my headache and that’s all I really ask of them.

Extrusion Frame for Luggable PC Mark II Revision B

Revision A of Luggable PC Mark II is a bare-bones skeleton that proved that all the components can more-or-less play nice together. It did not try to do anything beyond that, such as actually being a luggable chassis. That’s the job of future revisions starting with revision B.

Up front and center is to find a way to attach a carrying handle. Rev A had two load-carrying extrusion beams sticking up straight through everything, which was easy to build but got in the way of packaging components around it. For rev. B I wanted to try routing all the structural extrusions around the outside of the enclosure.

When building Luggable PC Mark I I had designed the frame with all the extrusions precisely seated against each other. This turned out to be a mistake because it was very difficult to cut beams to exact lengths and also to have exactly squared-off ends. The edges of the extrusions are dependably precise: the same could not be said of the ends.

Applying that valuable lesson to Mark II meant that all the extrusion-to-extrusion contacts are edge-to-edge. The ends of the extrusions will either go into 3D printed plastic  or just dangle into space. This way, minor error in length and squareness will not affect the overall design.

Misumi does not sell ready-made brackets to bolt 15mm HFS3 extrusions together, so I designed and 3D-printed my own. Since I’m making my own custom designs anyway, it was easy to incorporate features I wanted in my own design. In the case of the exterior frame of rev. B, it meant shock-absorption bumpers for the corners of the frame.

PLA is not very flexible so the impact absorption will be minimal, but it was fun to build.

LugPCM2RB Frame

Installing and Updating Plex Media Server in a FreeBSD Jail (FreeNAS) via ‘pkg’

plex-logo-e1446990678679One problem I had with the FreeNAS plug-in architecture is the lack of a user-friendly update system. (Either it is hard to find, or that it doesn’t exist, it’s not user-friendly either way.) The version of Plex media server I received using the default plug-in installation process was several versions out of date and it looked like I was pretty stuck. In order to update, Google found manual instructions that were… well, let’s just call them ‘nontrivial’.

When I found out Plex media server is also offered as part of the FreeBSD Ports and Packages Collection (tracked via “FreshPorts“) I hoped that might be a much better way to go. I had to manually create the FreeBSD Jail running on my FreeNAS box, which was harder than the built-in plug-in version but was not horrible. Plus, if this goes well, it would be a one-time cost.

After the FreeBSD jail was set up, I opened a shell window into it and typed pkg install plexmediaserver which thankfully took care of downloading and installing all the binaries. The install process also ended with a few paragraphs of instructions on how to configure Plex to automatically start every time that instance of FreeBSD (in my case, the FreeBSD Jail) boots up. Copy-pasting the commands worked as advertised and everything was fairly painless.

I was then able to enjoy my home Plex media server for a few weeks. But there was one unknown: upgrades. I didn’t know how upgrades would work until I needed to perform one, so it’s just a waiting game for a new version of Plex to be released and see how things propagate. This week, the wait was over!

The first notification was from my home Plex media server. Apparently it checks for updates periodically and notifies me when one is available. After waiting a day or two, the update propagated to FreshPorts. Once that occurred, I opened a shell window into the FreeBSD jail running Plex and issued the following commands:

  • service plexmediaserver stop to halt the old running Plex.
  • pkg update to download the latest database of available packages.
  • pkg upgrade to perform updates of any new packages, including Plex.
  • service plexmediaserver start to start the new version of Plex.

I reconnect to the web interface of Plex running on my FreeNAS box, and I see the latest version up and running. Success!

Simplify3D Custom Supports for Lenovo L24q-20 Power Adapter Bracket

The Luggable PC Mark II project is built around the Lenovo L24q-20 QHD (2560×1440) monitor. One of the reasons I chose this screen was because its AC power adapter is relatively small and I thought I could package it within the enclosure. For Revision A, I didn’t do anything fancy: the power adapter is zip-tied to one of the aluminum extrusions. I should do better for Revision B.

Monitor PSU zip tie

The goal is to design a mounting bracket that can hold the AC adapter in place, look relatively elegant, allow easy removal of the adapter, and do it all while taking up minimal space. This is commonly solved by a bracket with flexible claws to hold the object in place, so I designed one of my own tailored to the dimensions of this adapter.

Monitor PSU CAD

My 3D printer can translate this CAD object into the real world, but it needs a little help. Deposition modeling type 3D printers like mine can’t put things in arbitrary locations in space, due to pesky things like gravity. The fastener screw hole in the middle has enough surrounding material for the 3D printer to build up the top of the hole despite gravity, but the tines at the end need to be supported while printing.

This is one of the strengths of Simplify3D as slicer – the ability to customize these printing supports. I wanted supports to help me print the fork tines on the ends, but I didn’t want any support for the fastener hole as they are unnecessary and, if present, would be very difficult to remove. In Cura 2.x (which came with the 3D printer) supports are an all-or-nothing proposition. I could not selectively choose what to support. Simplify3D allows me to do so.

Monitor PSU S3D

And thanks to this custom support, I have a clean fastener hole along with fork tines to hold the power adapter in place. I don’t use Simplify3D custom supports very frequently, but when I do, I’m very glad I have the tool at my disposal.

Less Grumpy About Python 3’s Break From Python 2.

Python LogoI spent more than a decade and a half in a software engineering job where backwards compatibility is a must, all day, every day. It’s very disorienting for me to switch to a world where such a sacred commandment would be discarded as when Python 3 was launched with severe incompatibilities from Python 2.

As a novice to Python, I was not aware of the problems that Python developers tried to leave behind in the break and I’m also ignorant of the positives Python 3 offered as a benefit to balance the cost. All I saw was the aftermath of an incredibly disruptive change that, almost a decade after it started, is still far from complete.

Part of my motivation to learn Python is ROS, which is still on Python 2. This meant I’ll have to deal with the transition costs even though I’m new to the scene. This was not a happy introduction to the world.

Fortunately the lengthy transition also meant there’s been time for people to voice similar concerns and for the people behind Python to write up their explanation. There’s a fairly lengthy explanation on Python.org titled “Should I use Python 2 or Python 3 for my development activity?” which links to an even lengthier “Python 3 Q&A” that has evolved over the past five years.

After reading it all, I see their point. Especially the parts around Unicode support. I can see how changing behavior of a fundamental concept like strings in a language can’t be done without breaking compatibility, and I can understand why it is a required transition for the language to be successful in the rest of the world beyond the English-speaking communities.

I don’t have to be happy about it, but I can at least understand it, and that does help to make me a little less grumpy when I have to deal with the aftermath.

Scratching the Surface of Python Libraries

Python Logo
Python logo from the Python Foundation

It’s somewhat embarrassing to admit my first impressions of Python came from programmer humor. The first one I can recall is xkcd #353. Another one that made an impression was the “If programming languages were essays” series.

The common thread is the tremendous library of tools available to python programmers just a “import” command away. I think the hard part of me getting up to speed in Python won’t be the syntax or the constructs, it’ll be getting to know what libraries are available. I foresee my biggest hurdle to Python productivity would be spending three hours writing something before it occurs to me to look for a library where someone has already done the work, find it, and finish the task in 15 seconds.

It makes sense that this ecosystem of libraries is a huge strength to Python and also an equally huge liability and a hindrance in transition to Python 3. By breaking backwards compatibility, Python 3 had to rebuild this ecosystem of libraries from scratch. It’s hard for people to find motivation to use the new Python 3 – with its limited set of ported libraries – when they could stay with the comfortable group of friends they already know in the Python 2 world.

To learn the ropes, there’s nothing like diving right in. I wanted to write a simple script to handle a task I had: enumerate video files in my collection and call FFmpeg to convert them from their old formats to the modern MPEG 4 Video format (h264 + AAC). Most of what I need to do for walking the directory tree comes from “import os” and “import os.path“. Calling FFmpeg turns out to be trivial after “import subprocess“. And the final icing on the cake: a library to parse command-line parameters using “import argparse“. Argparse even has a HOWTO tutorial to walk me through using it.

In less than an hour, this complete novice was able to build a decently robust Python script for video conversion.  Color me impressed.

tumblr_lltzgnhi5f1qzib3wo1_400

Some Python Points of Interest to a C/C++/C# Programmer

Python Logo
Python logo from the Python Foundation

Zipping through the Python 3 tutorial from the Python Foundation, some things stood out more than others. Coming from a background of work in C, C++, and C#, I found the following items interesting:

Strings

String handling is something every programming language has to deal with and a good way to feel how the language designers solve problems. C approaches bare metal and has historically proven to be error prone. C++ offers the choice of going with C or taking the performance overhead of string libraries in exchange for reduced headaches. C# reflects a more recent school of thinking where the programmer is prevented from shooting themselves and all their customers in their collective feet. Python is in the last bucket and I’m happy to see it.

A different ‘for’ loop

Python’s for loops always iterate over items of a sequence, and not based on an integer index like I’m used to from C and C++. It feels like foreach from C# but hopefully without the negative performance impact.

An ‘else’ block after a loop?

The ‘else’ block of a loop was a novel idea to me. I’ve never had this tool in my toolbox and my brain isn’t used to structuring code to take advantage of this mechanism, but I am optimistic I will find it useful.

Python classes

The Python designers took a very different path to implement classes than any other object-oriented language I’ve learned. The tutorial began with some background, a big wall of text that I originally thought I’d skip thinking it’d be repeating things I already knew. Now I’m glad I put in the effort to read it. Python classes look familiar at first glance, but after reading about the nuts and bolts, I know I’ll get into trouble if I had treated them the same way as C++ classes.

I expect I’ll still get into trouble, but now I’m optimistic I will understand why and be able to dig my way out.

Learning Python 3 (not 2) from Tutorial by Python Foundation

Python Logo
Python logo from the Python Foundation

I took the Codecademy Python class several months ago when I surveyed various technologies. It appears I didn’t write a short note about it which is too bad because I now want to look over what I thought at the time. In my vague memory, they wrote it for the absolute beginner and spend a lot of time teaching basic computer programming concepts. (Variables, flow control, etc.)

Python is again as a topic of interest for me. It is one of the primary languages for working with ROS and also in a lot of machine learning/AI fields. (OpenAI gym is Python, Google’s TensorFlow is primarily focused Python, etc.) I think I should try to gain proficiency in the language but I didn’t want to go through a beginner-focused class again.

To review Python from a different starting point, I started going through the Python Foundation’s own tutorial for Python 3.6. I quickly determined the target audience are people already familiar with programming in another language and want to get up to speed in Python, which perfect for me! It was quite useful for me when the authors described Python features in terms of how it is similar to or different from C++ features.

On the flip side, I was reminded why I was down on Python: the incompatible break between Python 2 and Python 3. They’re both fundamentally the same language but in real world usage they are now effectively two different languages. Python libraries written for Python 2 could not run unmodified on Python 3, and vice versa. So they will have different install instructions, etc. Over eight years after the initial release of Python 3 the entire ecosystem is still undergoing the pain of  this transition.

OpenAI and TensorFlow appears to support both Python 2 and 3, with separate setup and usage instructions. ROS has the official  ambition to move to Python 3 but is currently still stuck on Python 2 due to the existing base of Python libraries.

Despite the temptation to stick with Python 2 for ROS, I decided to jump into the Python 3 tutorial and I’ll deal with Python 2 weirdness as they come up later.

The Tale of the Scale

With the core components and the auxiliary accessories installed, I have a usable computer. It is time to find out how much this setup weighs.

Weighing this configuration establishes a lower bound for the final contraption. Whatever a complete luggable enclosure may weigh, it must have all the parts present on this first draft, so it’d be impossible to be any lighter.

Luggable PC Mark I weighs in at 17.5 pounds and while it is no lightweight, I’ve had no problems lifting it by the handle and carrying it around. Some of the credit goes to the strong and smooth handle sold by Misumi for the HFS-5 extrusion. (HHDFL19) The strength gives confidence for carrying and the smooth surface helps make it comfortable.

Tux Lab’s “Luggable Frame” project with the Yamakasi Catleap 28″ monitor and the HP Z220 small form factor case sets the upper bound for weight. While it can be carried short distances (say, across the room) at over 30 pounds it is not practical to carry much farther. I expect Mark II to be lighter than that combination, but would it be lighter by a useful amount?

I didn’t need precise measurements – it’s just for a rough baseline – so I used the most convenient weight measuring device: my bathroom scale. I mentally gave myself a drum roll as the bathroom scale took measure of the Luggable PC Mark II…

Bathroom scale

And the number that came up was… 16 pounds!

That’s not a bad starting point. I expect the final enclosure to weigh more than 1.5 pounds, so the first usable luggable Mark II will weight more than Mark I. That’s not a huge surprise since the larger screen is significantly heavier than a salvaged laptop panel. The challenge would be to keep the weight as low as it is feasible.

Given a bare-bones skeleton baseline of 16 pounds, I’ve set for myself a target weight for the final product at 20 pounds.

Onward to the next iteration.

Need Low-Voltage, Low Power Wire Bundle? Use Cat 5e Data Cable!

In addition to USB ports, most PC tower cases also come with a front control panel that connects to the motherboard. This is where the power button, the power LED, and the hard drive activity LED are shown to the user. There is sometimes also a reset button, but they appear to be getting phased out. Personally I haven’t needed a reset button in years and any presses of the reset button in that time has been accidental (and usually instantly regretted.)

Part of building my own PC case is supplying these controls myself. This was part of the fun of building Luggable PC Mark I. For the power button, I wired up a big red button of the type typically used for arcade consoles.

The headers are easy to find (*), as are the LEDs and their associated current-limiting resistors. The momentary-on push button is also easily found. What gave me headache were the wires for them all. None of them need to carry a high voltage, or a lot of current, but there is a bunch of them and it was a hassle to keep them the same length and not tangled up. Given the hassle and the lack of need, it is obvious why I didn’t put a reset button on Mark I. Without reset, I only had to deal with 6 wires instead of 8.

Thanks to Tux-lab, I’ve learned a much better idea I can apply to Mark II: use a segment of standard networking cable. In my case, I have a spool of Cat 5e I can cut arbitrary lengths from. Cat 5e has 8 wires, enough for the purpose. Even a reset button if I wanted, which I don’t, so the fourth pair of wires were removed.

This is a neat trick, I’ll have to keep it in mind whenever I need low-power, low-voltage wiring bundles in the future.


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

FYI: Lenovo L24q-20 sale $169.99 @ Best Buy

If anybody wants to follow along and build their own Luggable PC Mark II, as of this writing Best Buy has the Lenovo L24q-20 monitor on sale again for $169.99, a $30 discount (~15%) off the regular $199.99 price. I think this is part of the weekly deals so the price should be good through Saturday 8/26, 2017.

UPDATE: Price is back up to $199 as of 8/27, 2017. But since it’s been discounted to $169.99 twice already within the past few months, I’m sure the sale will roll around again.

BestBuyL24q-20Sale

Extra USB Ports Via Motherboard Headers

My Gigabyte Z270N-WiFi motherboard packs a lot of features into a little Mini-ITX form factor. One downside of packing features into the standard motherboard back plate is that they crowd out the USB ports and I’m left with only 4.

Well, 4 of the popular rectangular types anyway. I get a fifth USB port of the new USB-C connector that I like, but don’t have many uses for yet.

The surface of the motherboard was also cramped, and instead of the usual two (or more) USB2 headers, this board had only one USB2 and one USB3 header. Which should be enough.

Typically, a modern PC tower case has a few USB ports exposed to the user, and those ports connect to these headers. Since I’m building my own case, I’ll have to come up with something on my own.

I could buy the pieces and solder up my own, but it’s hardly worth the effort when Amazon marketplace has many vendors selling them ready-made. Since USB2 is not a very demanding specification by today’s standards, I decided I might as well try the lowest bidder first. At the time of my window shopping, that meant this particular two-pack. (*)

These plugs came mounted on metal plates suitable for installation into a standard PC case. The mounting was not a perfect fit: the plug bulged as if the distance between holes on the plate is half a millimeter narrower than the actual distance between screws on the USB plug. But that’s OK in my book, since I’m not using the metal plate anyway. For the Luggable PC Mark II I removed the plugs and zip-tied them to one of the supports. I’ll design a better home for them on the next draft.

The other problem was its wiring sheath not fitting well inside the molded plug. Showing inside wire at the junction. Since I don’t expect much movement and flex in this wire, the lack of strain relief should not be a functional issue.

Bad Strain Relief

The important part is that they function just fine as USB ports.


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

Aftermarket Antenna for Gigabyte Z270N-WiFi

One of the reasons I chose to buy my Gigabyte Z270N-WiFi motherboard is right in its name – it has built-in WiFi. Inside the box is a small antenna with two wires. The antenna is on a hinge so it can be tilted at an angle or folded down against the base, which has a magnet on the bottom.

Gigabyte Antenna

I thought this system was well designed for the typical desktop PC. The motherboard ports are usually sitting close to the ground against the wall and not a good place to have antenna stick out. Also, tower cases are typically steel, friendly for magnet attachment. So the bundled antenna and its wires allow the antenna to sit on top of the tower case where it should get a better signal.

My PC, however, is not a typical PC. Steel sheet metal is currently beyond my capabilities, so my case materials will be aluminum extrusion, laser-cut acrylic, and 3D-printed plastic. None of which are magnetic! Also, the placement of the motherboard meant the ports plate is top and center of the case, which is actually an idea location for an antenna.

Thanks to help from Tux-Lab, I learned the WiFi connector on my motherboard plate is of type RP-SMA. Given this information, it was trivial to find all the connectors for sale by Amazon vendors world-wide. I quickly noticed some of them only claimed to support the 2.4GHz band. A quick check on the spec sheet confirmed my motherboard WiFi is a dual-band unit so I need to look for dual-band antenna.

I eventually decided to try this item (*), a simple dual-band design with relatively high gain of 7 dB. After its arrival, I took a few measurements with the iwconfig tool.

  • No antenna: Link Quality=32/70
  • Original bundled antenna: Link Quality = 60/70
  • New aftermarket antenna: Link Quality = 70/70

Fewer wires, simpler design, higher link quality, I think this is a win!

And on a completely silly note, I’m amused by the fact they made my Luggable PC Mark II look like an old-fashioned TV with rabbit-ear antenna.


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

Bare Skeleton for Component Fit Test

After all the research and purchasing the parts, it’s time to put them all together to make sure they fit and work together. This first draft is only a test of component fit using a minimalist bare skeleton. It would not yet be a PC that I can lug around.

In addition to the aforementioned GPU mount, I had to design and 3D print a few other parts. The SFX12V PSU needed its own mounting bracket. As did the screen: I had the metal plate mating surface liberated from the monitor stand, but I needed to design and 3D print a part the metal bracket will attach to and in turn attach to the rest of the skeleton.

The skeleton itself is built out of Misumi HFS3 aluminum extrusions, which is 15mm by 15mm in cross section and well-suited to work with M3 screws and nuts. The nuts are the best feature of HFS3 – all I needed were standard M3 nuts. In contrast, HFS5 needed special Misumi M5 nuts that cost way more than standard M3 nuts.

The design of the skeleton is nothing special – a simple functional design that resembles the Yamakasi Catleap + HP Z220 luggable frame built several weeks ago at Tux-Lab.

I needed a laser-cut sheet of acrylic to tie everything together, so I packed up all the bits and pieces in their original enclosures for the trip to Tux-Lab.

Luggable PC Mark II parts

One laser-cut sheet of acrylic and a few hours of assembly work later, I have the first draft for Luggable PC Mark II! The components are left open and vulnerable but that’s not the point of this first draft. It’s just to make sure all the parts fit. Some minor fit issues were encountered but nothing terribly major.

I declare the fitness test a success. Onward to further refinements!

Luggable PC Mark II first draft