Improving the Neje Master 2S Max – Part 1

I have been wanting to get a laser cutter/engraver for a while now. Like, for a couple of decades. Just as with 3D printers, it’s only been within the past decade or so that laser cutters have first been affordable to build as a homebrew machine, and then affordable to purchase as a relatively inexpensive offering from China in the form of the explosively popular ‘K40’ lasers.

However, the ‘care and feeding’ of a CO2 tube laser is something that I did not want to have to deal with. Not only do they need water cooling, but the fragile glass laser tube doesn’t always endure international shipping and survive intact (leading to having to return the broken part, incur shipping costs for such, waiting weeks for a replacement, and so on). Plus, the K40 lasers have a very small working envelope around the size of a letter or A4 sheet of paper, whereas the project I had in mind needs around double that travel in each axis. Finding a CO2 laser with this sort of working envelope means an expenditure of above $3k. To be fair, this is an incredibly cheap price – my first job was working at a trophy and awards shop, and the first laser engraver we purchased in early-mid 90s was probably a $40k+ investment. However, I am also an incredibly cheap individual, and $3k is well more than what I’ve spent on any machine tool thus far (which is exactly how I view a laser cutter – just another machine tool).

Enter the laser diode. Originally finding widespread use in CD players, laser diodes were quite limited in power output, perhaps on the order of 5 milliwatts or so (but that was plenty for playing CDs). As technology improved and laser diodes found new applications (barcode scanners, laser pointers, etc.), output power steadily increased. By 2010, hobbyists were tearing apart Blu-Ray burners for laser diodes that could output perhaps 200mW, and began building machines that could cut paper (albeit quite slowly). The past few years have seen the release of ready-made hobbyist laser engravers that use laser diode modules with an output greater than 1W. Last year, ’40W’ laser engravers began appearing on various online shopping sites, though there’s a whole lot of number fudging going on – sellers have latched onto the idea of advertising the power as input electrical power, not output optical power.

The unit I purchased is the NEJE Master 2S Max, which while commonly advertised as a 40W unit, only has an output optical power of 15W according to the datasheet for the A40640 laser module. This module actually consists of two 7.5W laser diodes and a beam combiner. While many are rightly skeptical that the actual optical output power is a maximum of 15W, the laser does indeed have sufficient power to cut through 1/8″ hardboard, which is all I’m after for now. Just as importantly, it has an envelope just big enough to accommodate 18″x24″ pieces. In short, it is the largest, most powerful laser diode based cutter/engraver available on the market that I’m aware of (at the hobbyist level, that is).

That being said, it is without a doubt a no-frills machine. I would have much preferred something with the mechanics of the Ortur Laser Master 2 Pro (which has a stationary control box and drag chain for the wires), but Ortur doesn’t currently offer anything the size of the NEJE. Fortunately, the brutal simplicity of the NEJE means that it can be easily modified and adapted, and I already had modifications in mind before even clicking the buy button.

Naturally, once I had it out of the box and assembled (a remarkably quick process), I had to play a little bit before diving into hacking on it. I downloaded the most recent version of the NEJE software, fired it up, and found the interface to be… …rather spartan, to be polite. A good proof-of-concept.

I used the NEJE software to select a beetle from the included photo gallery, and successfully engraved the picture on a piece of scrap wood.

Well, the first attempt was poor due to me not setting a focus depth at all. The second attempt was much better and I was impressed that the laser was able to ablate the white paint away while leaving the wood intact. This hinted at the laser’s capabilities that I am still pondering.

I’m not sure that I was fully aware when purchasing the NEJE that there even was any supplied software available, as I had already figured on using LaserGRBL as software instead. What is interesting about the controller board on the NEJE is that it has two CPUs – one to interface with the (uh, ‘interesting’) NEJE software, and one that has the GRBL firmware. The controller board also has bluetooth capability, and even an accelerometer chip that can pause/halt a job if it determines that the unit has been bumped (though this is undoubtedly far more useful with the cantilever arm offerings – such units are much more likely to be jostled rather than a unit that encompasses a working envelope of more than four square feet).

Upgrade 1: LightBurn

Yes, I just wrote that using LaserGRBL for controlling software was my intent. And LaserGRBL is indeed superb software. I played with it for 30 minutes or so, and it looked like I could get it to do what I wanted, and much more easily than with the NEJE software. But for due diligence, I thought I’d try out a newcomer piece of paid software – though it was still in beta at my time of testing, it had a 30-day trial, so I figured I’d give it a a go.

LightBurn bills itself as “layout, editing, and control software for your laser cutter”. Unlike LaserGRBL, which would require you to build up your artwork in Inkscape or other program and then import the SVG into LaserGRBL, LightBurn is a fully-fledged content creation tool all on its own. 5 minutes into playing with the software, I exclaimed to myself “this is CorelDRAW for laser cutters!” Back at that first job at a trophy/engraving shop, I worked with Corel’s vector and raster editing programs, and absolutely loved them – their UI and commands were entirely intuitive. I spent countless hours on my own time just playing with editing photos and doing vector arrangements, so much so that I don’t understand why Adobe’s “learning curve like a brick wall” offerings became the industry standard. LightBurn’s interface and capabilities brings me right back to those halcyon days of discovery and delight.

The simple fact that I can create/edit/arrange stuff in LightBurn is phenomenal – I did this quick work entirely in LightBurn to make a stencil for spray painting the box on my sister’s Christmas present (uh, don’t tell her). After leaving beta, the cost for LightBurn jumped up a bit on August 16 to $60 from only $40 during beta. Still, this is a perpetual license [glares angrily at Autodesk, Adobe, et al.], so $60 gets you a year of free upgrades and you get to keep that version forever even if you don’t renew (and can install it onto 2 computers). No, this post has not been sponsored by LightBurn – they probably don’t know I even exist. I just absolutely love the product that they have developed, and think it is a perfect fit for hobbyist level laser engravers.

Upgrade 2: Height setting block

My very first attempt at engraving with the unit and having the module height (and thus focus depth) set incorrectly made me realize that I needed to 1) determine the optimal focus depth and 2) come up with a way to quickly set the module to that focus depth. It seemed to me that having the laser traverse across a vertically angled target would show a wide, smoky burn at one end, narrowing to a tight, narrow cut and then expanding back out to a wide, smoky burn.

As it turned out, the scrap paper I used to test with didn’t give a wide, smoky burn at each end. Instead it bleached or whitened at the ends, with a browned section between, indicating the zone of best focus. Measuring down from the transparent red plastic plate at the front of the laser module to the center of the burn length gave a distance of around 20mm. I whipped up a height setting block that allows for quick height setting from 14mm to 24mm in 2mm increments.

A copy of the STL file for the block is here. Usage is super simple: loosen the clamping screw for the laser module, slide up, insert height block on top of item to be cut/engraved, drop module, tighten screw, remove block. Easy peasy!

Upgrade 3: Mounting to a base board

Granted, it can be argued that #1 and #2 are not even proper ‘upgrades’, but this one certainly is, and was in fact the very first modification I wanted to do before even purchasing the unit. I admire the outside-of-the-box thinking for these small laser cutters as an approach of “bring the laser to the work” instead of vice versa (which opens up their capabilities greatly – you could engrave a maker’s name/logo on the corner of an entire table, for example). But for the working envelope of the Master 2S Max, it really is best suited to a traditional “bring the work to the laser” sort of tool setup. Improving the rigidity of the system was foremost in my mind, especially as the flex in the frame could certainly lead to out-of-square alignment. Since I was looking to do 18″x24″ workpieces, a tiny bit of misalignment of 0.15 degrees would result in over 1/16″ of error over 24 inches. Mounting the frame solidly to a base board was thus a no-brainer.

For the board itself, I figured on melamine shelving board from the local home improvement store as being the best option. Cheap, flat, and with a nice smooth surface. I cut the board to a size of 34-1/8″ x 22-13/16″ which was just perfect in Y to sit between the ‘feet’ endplates and small enough in X to provide just enough clearance for the mounting screws on the roller wheels to avoid scraping against the board. However, cutting the board to size was the easy part. Mounting the NEJE to the board wound up being somewhat more involved than I had initially anticipated.

My initial thought was to use T-slot nuts to secure the long bars that stretch from left to right across the top and bottom of the unit (when looking straight down at it). However, none of the T-nuts in the assortment I ordered would fit into the extrusion forming the frame of the NEJE. I quickly realized that NEJE had apparently made their own T-slot nuts for assembly out of short sections of thin metal strip. Even more concerning was that the extrusion was not at all square – 15mm on one side, 16mm on the other. This was looking jankier at every turn.

Armed with dial calipers, I made a pass at getting rough dimensions of the slot so that I could try to come up with my own T-slot nuts for this …unconventional… extrusion. There’s various designs out there for T-slot nuts that are based on standard hex nuts that are just small enough to slip into the slot, but since the ‘body’ of these are 3D printed, their strength, durability, and longevity are suspect in my mind – I’d like to have T-nuts that are strong enough to use structurally. Or whatever the ‘structural’ equivalent is when dealing with this weird 15×16 stuff…

I briefly considered trying to slip the head of a fastener into the T-slot rather than using a special nut (used on 80/20 with button head cap screws), but that’s a technique used only on blind joints, and I didn’t want to further weaken the already semi-floppy 15×16 extrusion. So, when faced with such a conundrum, I do what I always do… Flip through the pages of the McMaster-Carr catalog (pssst… McMaster… I could use a fresh hard copy, HMU). Within the great yellow tome I found 8895K363, a 3-foot length of 3/32″ x 5/16″ W1 tool steel. I certainly didn’t need tool steel for this application, but it was the only material available in that size. And even with those oddball dimensions, the material wouldn’t fit into the T-slot anyhow. I’d have to slightly bevel two edges on any homebrew T-nuts made from this metal stock. Still, it was the best option I had found thus far. I drilled holes at 1.5″ intervals along a good chunk of the steel, then tapped 10-32 threads (my go-to fastener size as a result of it being so commonly used on paintball guns) into each hole, and finally sawed the ‘nuts’ apart. A bit of deburring, and then I loaded them up in the mill with a 45 degree cutter to bevel two edges on each so that they would slide into the T-slot.

The resultant ‘nuts’ were perfect and slid easily into the 15×16 extrusion of the NEJE. All that remained was to drill holes in the melamine board for screws to secure the frame to the board. To semi-precisely locate these holes, I naturally 3D printed a guide block that I could use to easily drill the holes from the edge of the board.

Said guide block is on the left. Pictured on the right is a guide block that I attempted to use for drilling holes in the steel strip to make the T-nuts (only somewhat successful – the hardness of the W1 tool steel being drilled, the softness of the PLA guide block, and the use of a hand drill rather than a drill press led to a bit of inaccuracy). The board drilling block also allowed me to precisely drill holes into the side of the melamine board, which I then used to attach gate handles for more easily moving the whole assemblage around. I finished off the melamine board drilling with spots for some rubber feet.

This shows the culmination of these efforts – 10-32 button head machine screws securing the NEJE frame to the melamine board base with DIY T-nuts, pull handles for transport, and furniture feet for leveling and vibration absorption.

Fully assembled, it is a far more robust machine than without being attached to a base. I used a steel framing square to align the top bar with the left bar of the frame at 90 degrees, as the top left corner is what gets used during the homing process. The ‘clickiness’ of the Y-axis homing button may introduce an offset of perhaps 1/32″ between the left and right Y-axis steppers, but over that distance the angular offset is not even a concern for the sort of precision I need. Cutting out an 18×24 rectangle out of an even larger Dollar Tree piece of black posterboard results in a piece just as square as what a well-worn framing square can even indicate. More than good enough for my purposes.

Swarm con’Trap’tion

I honestly have no idea how it came about, but I’ve had a passing interest over the past few years in beekeeping, of all things. My grandfather picked up beekeeping as one of his many hobbies during his retirement, but I made sure to stay well away from the hives and bees in general in my youth. However, as a (supposed) adult, apiculture poses an intriguing yet approachable bit of urban ecology – I have no need for a source of honey, but harvesting beeswax might be interesting. Perhaps having a bee hive is just a more grownup version of an ant farm? At any rate, I was surprised to find that a number of my friends also had such an interest, but nobody was really willing to take the plunge on their own. The kick in the butt came via my sister (a PhD in bugology entomology), who gave me a nucleus hive for Christmas!

A ready-made colony of bees was perfect for a bunch of neophytes, but learning about beekeeping had also led to a lot of information on getting your bees for free. Namely, using a bait hive or swarm trap. Having several hives (so that everyone could have at least one hive of their own to tend) seemed like a good goal, since we had no idea what our success rate would be in keeping the little critters alive over the winter, to say nothing of actually attempting to harvest honey or wax from them. Plus, the mere thought of capturing wild bees was just plain appealing and intriguing.

After finding a few plans online for swarm traps, I asked my Dad if he might be able to build a trap or two for us. My father is not an engineer. No, he is an over-engineer, and his instinctive design capabilities are something that I hope to someday emulate. A favorite childhood memory was spending an afternoon in the basement with him at the table saw, as he built a wooden marble run toy for me and my sister. What struck me (and still does) is that he worked entirely without plans, only perhaps a few scribbled key dimensions, building and designing entirely on the fly. So when I know that I need something out of the ordinary with a great deal of latitude in execution, I mention it to my Dad. As I am assured that the end result will be glorious. (side note: my father is named on at least two United States patents. I have none. Just because I have a piece of paper saying I have an engineering degree doesn’t amount to squat, which is why I call my Dad whenever I have no idea what I’m doing and need an adult)

A few weeks later, Dad had constructed not one, but two luxury accommodations for Apis mellifera and a system for elevating and lowering said domicile. Not only that, but he had done his own research on ideal swarm trap locations, and selected two specific trees on his farmland as targets to place them.

The system consists of a length of steel strut channel serving as a linear track with a pulley at the top, with a carriage constructed of angle iron that slides in the strut channel. The strut channel is attached to a pair of carefully bent steel bars that act as ‘feet’ against the tree trunk over which ratchet straps can be fastened.

Plop the swarm trap onto the carriage, hoist it skyward, then insert a long steel rod into the channel to lock the carriage in place. Mom provided wood frames with wax foundation, and I sprayed a little bit of Swarm Commander into the swarm trap as well. I honestly wasn’t expecting much, figuring it would just be neat if we could capture some bees for a second hive. As it turned out, we wound up with all the bees we could handle!

By mid-May a colony had taken up residence in one of the traps, and on a cooler evening after sunset in early June I closed up the entrance and took the trap into the basement for 72 hours to let the bees ‘reset’ their home location.

Afterwards, I placed the swarm trap on top of their new hive (with a big yummy feeder full of sugar syrup next to it), opened the entrance, and a flood of bees erupted, delighted to be free once again. We let them adjust to their new location for a few days before transplanting the frames from the swarm trap into the hive. When we did so, we were absolutely amazed at how much comb the bees had built off the bottoms of the frames – they were literally dripping with nectar.

This was just the first swarm captured, and by early July we had an additional one. By late July, we had yet a third. At this point we had collectively spent over a thousand dollars on Apimaye hives (which we absolutely love and would highly recommend to any others interested in tending their own herd of flying livestock), so we decided that we had reached ‘peak bee’ for the season and took down the swarm traps to make sure we didn’t have to house any more of the little guys. At least if our hives don’t overwinter well, we know that we have a sure-fire method to get more.

This is our current bee yard, graciously hosted on my uncle’s land underneath a line of pine trees for protection, adjacent to a creek for a water source, and a wide variety of nearby farmland and wildflower areas to harvest from. These bees are utterly spoiled. Mom felt that the queens should have a name, and being Italian honeybees, we did indeed select appropriate names for them (which admittedly does make things easier when describing which hive you’re speaking of).

I’m not entirely certain of how it transpired, but the ‘killer bees’ motif of the Wu-Tang Clan entered the group chat at one point, and this lineup of the ‘Wu-Tang Hive’ (which you are advised not to mess with) was the result:

  • Method Mite
  • Ol’ Dirty Beestard
  • RZzzzA
  • Pollenface Killah
  • Hexagon
  • GZzzzA
  • Cappanecta
  • Insectah Deck
  • Mastah Stinga
  • B-God

Anyhow, as we slip into late October, it’s now time to start prepping for winter. I think I’ll take the medium super off of Francesca’s hive (as they haven’t been paying it much attention), and we’ll have to see how Bianca and Giulia’s hives are faring and if they seem strong enough to overwinter. With luck, we’ll have some strong, healthy bees come next spring and we can actually attempt to harvest some honey and wax next year!

3D printed stencils

Recently, I had a need to apply some quick identification markings to various objects. A normal person would have thought “yeah, I’ll just make a quick paper stencil and use that”. That sounds like a delightful solution, but when you have a hammer, everything looks like a nail, and I have several 3D printers, so…

One drawback of a traditional paper stencil is needing to use bridges to secure ‘islands’ in the stencil – letters like A, B, D, O, P, Q, and R. So for fun, I decided to build overhead bridges into the stencil so that they wouldn’t show up in the end result. Unnecessary and frivolous? Absolutely! Cool and interesting? Affirmative!

I first determined the ‘printable’ area and laid out 1″ high letters on it, which gave me a 0.025″ thick stencil. Then I made 0.5″ high ‘plates’ over each of the islands and made cutouts so that the stencil could be sprayed from all sides and not leave any shadows from the overhead bridges.

The finished result is not perfect – the porosity of the 3D print (being only .025″ thick) allows a few spots of paint to spray through the mask (and there’s a bit of edge bleed in a few places). Still, I’m happy with the results as a quick and dirty 3D printing application.

Ender 5 Bed Supports

I recently purchased yet another 3D printer, but this time with an eye towards a specific project/product. After having run the old Stratasys FDM thousand series machines, I realized that in the past few years cheap consumer level machines had managed to reach parity (in most respects) with these hulking monsters that were $100,000 investments a little over 20 years ago. Hooray for progress (and patents expiring).

Around four years ago I decided to take a chance on a cheap machine to do some concept work with, intending to then actually produce on the Stratasys (can’t easily move a Stratasys around the house – it’s more of a garage implement). I wound up purchasing a refurbished Monoprice Maker Select V2. Despite a few issues (remedied by running a Raspberry Pi running OctoPrint), I was quite honestly impressed with how far hobbyist machines had progressed since the days of the early Makerbot offerings (Cupcake owners, I recall your cries of anguish). Once I realized the amazing level of detail these machines offered (over double the layer resolution of a Stratasys machine running at 0.007″), I then set about printing loads of very important items. [insert cry of NERRRRRRD here]

The high quality of the output and greatly improved software since I had first looked at open source 3D printing offerings led me to really appreciate the current state of hobbyist level 3D printing, and I find myself with fewer and fewer reasons to champion Stratasys machines over other alternatives (the ostracism of hobbyist users notwithstanding – their acquisition of Makerbot to court that market while also spiting 3DS with the purchase was an utterly expensive boondoggle, and the Makerbot name has almost entirely receded from awareness as a result).

While the Monoprice machine was a great teaser of capabilities, it has been challenging to keep running (though those challenges have proven to be excellent learning experiences and have forced me to become far more capable/knowledgeable as a result). More importantly, the Z-travel wasn’t quite sufficient for my needs after all. So after another round of google searches for “what are the cool kids using for 3D printers”, it appeared that the offerings from Creality were excellent bang-for-the-buck, and the Ender 5 model ticked all the boxes for my needs. This Teaching Tech video (an excellent channel that I highly recommend) sealed the deal, and I purchased one during a sale.

The machine as it exists out-of-the-box is excellent value as far as I’m concerned. But naturally I started to upgrade things that bugged me – I switched to Capricorn PTFE for the Bowden tube, added an insulating pad to the heated bed, replaced the stock control board, power supply, hotend, etc. etc. My fellow 3D printing hobbyists understand the aggravating-yet-rewarding cycle of endless upgrades in pursuit of making our machines just a little bit better than they were before. And then cursing ourselves for not leaving well enough alone when things go awry.

I think the Ender 5 construction design is excellent – the bed only moves in the Z-axis, which means that the tall sorts of prints I intended to build on the machine aren’t in danger of being shaken loose from rapid Y-axis moves as they might be on more popular machines such as the Ender 3, Prusa i3, and similarly designed platforms (known as ‘bedflingers’). Adding a glass bed and thus significantly increasing the moving mass only exacerbates the issue.

So, I’m a big fan of the Ender 5 bed mechanics… …in theory. In practice, the bed base is a cantilevered steel plate supported only from the rear, and flexes quite a bit as a result. I am far from the first to be dissatisfied with this, as ‘bed struts’ appear to be a popular item to add to the Ender 5 in order to increase rigidity. However, such bed struts are almost always printed items, and thus limited by the process and material itself. I’ve certainly printed various mechanical upgrades for my two machines, but they have consisted of things like mounts for end stop switches, end stop screws, and other such items of minimal structural requirement. Bed supports, on the other hand, I consider a wholly structural item, and I wanted to come up with something a bit more, well, structural.

Somehow, I latched onto carbon fiber tubing as being the optimal base material for this task. Likely due to me having a bunch of carbon fiber arrow shafts purchased from Wal-Mart years ago for use in RC plane construction. I quickly found that these arrow shafts have 8-32 threads on the tip end, so sticking a cap screw into the end offered a simple means of adjusting length. Moreover, a button head 8-32 socket head cap screw has a spherical diameter of 3/8″… Without attempting to elucidate my thought process further (because I don’t really know how I concocted it in the first place), here are the salient details:

3/4″ two-piece shaft collar

8-32 steel rivet nut

1″ long 8-32 button head cap screw

Links are to the McMaster-Carr items. I added in a few other 8-32 pieces (hex nuts, etc.) when building, in addition to printing a pair of end braces that slip onto the front cutouts of the bed frame. Using a 3/8″ ball end mill, I made a small divot onto each of the shaft collars to accept the button head of an 8-32 machine screw. I turned down the shank diameter of the rivet nuts just enough on the lathe to slip into the arrow shaft tubing so they could be epoxied in place.

The divoted shaft collars get attached to the shaft bearings (left side of the picture) and the end braces (the gray right-angle looking parts on the right side of the picture) slip onto the stamped sheet metal bed frame. Unscrewing the screws from the end next to the shaft collars compresses the CF tubing and the nut can then be locked in place to set the overall length. The end result is a bed frame that is overwhelmingly stiffer than stock – the icing on the cake is using some silicone standoffs instead of the stiffer springs generally recommended as an upgrade. An STL of the end brace is here:

Meshtastic 26650 T-Beam Enclosure

If you watch a lot of electronics videos on YouTube, you’ve probably come across the guy with the Swiss accent. Andreas is a big fan of LoRa and its IoT applications, but it was this video on Meshtastic that really intrigued me. A license-free mesh network with very low power, crazy long range, and inexpensive hardware? Given that I’m still struggling a bit with The Things Indoor Gateway (and finding that TTN may not be the best LoRaWAN provider for a project I’ve had in mind), I thought Meshtastic might be a neat way to play more with LoRa. Sure enough, there’s loads of things you can do with Meshtastic, the development is continuing rapidly, and the community around the project is active and helpful.

Currently (though this may change soon) the favored hardware for Meshtastic is the TTGO T-Beam v1.1, as it offers all the bells and whistles of GPS, Bluetooth, Wi-Fi, and OLED display. However, the device’s layout and form factor is… …awkward. Thankfully, there’s a higher-end version of the board that drops the soldered-on SMA antenna connector, has an improved GPS module, and features the much more capable SX1262 transceiver chip (which can support Semtech’s upcoming FHSS modulation scheme in addition to the existing ‘chirp’ based modulation).

Despite the already excellent battery life (several days) provided by a 18650 cell, the width of the T-Beam board made me think that accommodating a 26650 cell shouldn’t bulk up the entire assembly too much. While 26650 cells aren’t nearly as common as the 18650 size, they should be able to offer double the energy capacity based on volume (in theory, that is – more on this in a moment). Even if a 26650 cell isn’t readily available, a 18650 can be sleeved to make it fit a 26650 holder (the lengths are the same). Finally, I decided to go with a better GPS antenna, as the stock one would need relocating anyhow due to the larger battery holder. My purchase list looked essentially like this:

TTGO T-Beam v1.1 with SX1262 and NEO-M8N (I used the 915MHz version for US operation – check your country’s bandplan for the appropriate ISM band to use)

BT-25A 28x28x7 ceramic GPS antenna (bigger is better, but this was about as large as practical)

26650 battery holder (make sure to get one with an ‘open’ bottom so that the cell can sit right up against the PCB for the lowest profile just like the stock 18650 holder)

0.96″ 4-pin I2C OLED display (note that I bought the one labeled as ‘new’, as it provides a slightly smaller footprint)

M2 button head stainless fastener set (I could have also just bought the fasteners individually from McMaster-Carr, but I wasn’t sure what lengths I’d need, and having an assortment on-hand always proves useful)

4-pin Dupont connector cable (I actually used a scrap cable from the parts bin instead)

4″ U.FL to SMA RG-178 coax pigtail (yes, the SX1262 T-Beam includes an antenna pigtail already, and upgrading to RG-178 coax is basically chasing nanovolts, so this is entirely frivolous and I should feel shame)

The only other component needed was a 26650 cell. Amazon doesn’t have very much, so I found these on AliExpress. The Project Farm review of 18650 cells has made me wary of whatever a battery label claims, so I bought the same type of battery tester as Todd used. Once the GTF cells finally arrived (taking longer than perhaps any other AliExpress purchase I’ve made), I dropped a pair of them into the tester, let it chug overnight with the capacity test, and found that they actually have a feeble rating of only 2600-2800 mAh. Less than the roughly 3200 mAh I’m getting on these JOUYM 18650 3500 mAh cells (my current favorite for Li-Ion cells). So the search for good 26650 cells continues.

With all of the components in hand, I started modeling an enclosure for everything. Rather than try to model the PCB on my own, I found a v1.1 update by ‘DJ’ of a v0.7 T-Beam board by Muchammad Sobrun Ibnu Atfal that only needed a little tweaking. I slapped a cylinder on the back for a 26650 cell, and then just started drawing around it. I wish I could say I had a grand vision in mind, but the design just grew organically as I figured out where to place the LoRa antenna, GPS antenna, and OLED display. Note that it was designed to print with minimal supports – print the top and OLED cover face-down, and the bottom shell bottom-down (the bottom only needs supports for the antenna hole and the GPS pack).

Assembling everything was pretty straightforward. First step was to desolder the stock 18650 battery holder, then solder the 4-pin cable for the OLED display to the T-Beam board. Note that unlike the display that is included with the lower cost SX1272/NEO-6M T-Beam, the one I sourced has the Vcc and GND pins reversed, so it can’t be soldered directly to the board anyhow. After soldering the cable, I clipped the leads poking out on the backside as close to the PCB as possible (since the new battery holder would be right up against the PCB board where the solder pads are). Securing the leads with a bit of ‘hot snot’ (hot glue gun) finished up the top side.

Then I removed the ‘ears’ on the sides of the 26650 battery holder via the judicious application of a belt sander (though a side cutters and utility knife would do as well). I also relieved a little bit of the bottom surface of the holder right where it would sit over the OLED cable solder pads. After bending the battery terminal tabs down a little and tinning them, I soldered the 26650 holder to the PCB in the same spot as where the 18650 holder had been.

Finally, I ever-so-gently smashed the pins on the OLED display 90 degrees over for clearance.

Everything plopped into the printed case quite snugly – looks like I got everything just right. I did drill out the corner holes on the top and the OLED cover with a 5/64″ drill bit, and let the 2mm screws self-tap themselves into the bosses on the bottom shell and the top plate. I also drilled out the holes on the bottom shell for the 2mm captive nuts that can be used for attaching accessories like a lanyard loop, belt clip, flamethrower, etc.

Turns out that I had plucked the yellow OLED display from the assortment that I ordered, and I have to say it looks downright proper with the black enclosure (though readability in sunlight is poorer than with the white OLED included with the 1272 T-Beams). Files for the enclosure are here:

Addendum1: I purchased these UltraFire ‘6800mAh’ 26650 cells on Ebay, hoping that the lower rating might hint at a more honest appraisal of the cell’s capacity. Nope, each cell measured at an utterly abysmal 1244mAh. If anyone knows of a 26650 cell that does not suck (or at least offers honesty in labeling), please leave a comment.

Addendum2: After reflecting on the fact that the lousy GTF and UltraFire cells have their branding pre-printed on the cell wrap, while the really good JOUYM cells have continuous inkjet coding on the cell wrap, perhaps indicating that the cells have been tested and ‘binned’, then marked afterwards. So I looked around on AliExpress for 26650 cells that were also marked in the same fashion, and found these nondescript Tewaycell 5000mAh units. Since Tewaycell looked to manufacture a variety of battery types, I guessed they’d probably be more honest about capacities, since their sales will overwhelmingly be to other manufacturers. I purchased a pack of two and tested them as soon as they arrived. I was absolutely floored – not only was the capacity as much as advertised, it was well over! One cell measured 5676mAh and the other a whopping 5775mAh! Well done, Tewaycell!

METAR Map OLED Add-on

My gift of a METAR map to my flight instructor last year resulted in said map quickly adorning the wall of the flight school hangar, followed by word spreading around the airfield of it being my handiwork, soon followed by an inquiry from another student asking if they could buy one from me. I kind of brushed it off, saying that it wasn’t difficult to build for yourself, here’s the blog post explaining how I did it, etc. Yet people continued asking if they could buy one from me, so I find myself seriously considering producing southeastern Wisconsin METAR maps for fellow flyers. Especially since the transponder in my plane has died (apologies to the KUES tower – it had been working earlier in the year, honest), and what better way to raise funds for replacing the Carter-era radio stack than by unleashing my inner craft fair booth denizen? “Please sir, spare a half shilling for an avionics upgrade?”

I had come across a new project called LiveSectional offering itself as a more turnkey approach to making a METAR map, and what really interested me was the OLED add-on. I downloaded the image as well as the source, but had no luck in getting the software to function after many hours of messing with it. So, what to do, but dive in and roll my own…

I purchased a 128×64 OLED bonnet from Adafruit and dove into testing it out with a RasPi 0 W (as that’s the board I am using for the METAR maps). After going through the learning guide, I started poking at the sample files and was tossed head-first into the world of Python. After a few hours of poking around and hacking up the code with Philip Reuker’s code, I was suitably impressed with Python as a language, especially when realizing “wait, that should not have actually worked” when passing floating point values to a function that drives a bitmapped display. I would have LOVED to have had that sort of simplicity when doing graphics programming a quarter century ago.

My favorite part was just coming up with a simple pointer to indicate wind direction. I initially thought of doing static bitmaps or a lookup table or somesuch, but laziness won out and trigonometry saved the day (I hope my high school teachers are around to bask in my admission of trigonometry being ‘lazy’). This is still a work-in-progress, but it actually works!

#!/usr/bin/env python3

import urllib.request
import xml.etree.ElementTree as ET
import datetime
import math

airportcode = "KOSH"

# That's the configurables, now for the code

print("Running windoled.py at " + datetime.datetime.now().strftime('%d/%m/%Y %H:%M'))

# Retrieve METAR from aviationweather.gov data server
# Details about parameters can be found here: https://www.aviationweather.gov/dataserver/example?datatype=metar
url = "https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=5&mostRecentForEachStation=true&stationString=" + airportcode
print(url)
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 Edg/86.0.622.69'})
content = urllib.request.urlopen(req).read()

# Retrieve flying conditions for the airport noted in airportcode
root = ET.fromstring(content)
for metar in root.iter('METAR'):
	stationId = metar.find('station_id').text
	if metar.find('flight_category') is None:
		print("Missing flight condition, skipping.")
		continue
	flightCategory = metar.find('flight_category').text
	windGust = 0
	windSpeed = 0
	windDir = 0
	visibility = 0
	pressure = 0
	lightning = False
	if metar.find('wind_gust_kt') is not None:
		windGust = int(metar.find('wind_gust_kt').text)
	if metar.find('wind_speed_kt') is not None:
		windSpeed = int(metar.find('wind_speed_kt').text)
	if metar.find('wind_dir_degrees') is not None:
		windDir = int(metar.find('wind_dir_degrees').text)
	if metar.find('visibility_statute_mi') is not None:
                visibility = float(metar.find('visibility_statute_mi').text)
	if metar.find('altim_in_hg') is not None:
		pressure = float(metar.find('altim_in_hg').text)
		formatted_pressure = "{:.2f}".format(pressure)
	if metar.find('raw_text') is not None:
		rawText = metar.find('raw_text').text
		lightning = False if rawText.find('LTG') == -1 else True
	print(stationId + ":" + flightCategory + ":" + str(windSpeed) + ":" + str(windGust) + ":" + str(lightning))
print("WindDir:")
print(windDir)
print("WindSpeed:")
print(windSpeed)
print("WindGust:")
print(windGust)
print("visibility:")
print(visibility)
print("flightCategory:")
print(flightCategory)

# now for the display stuff
from board import SCL, SDA
import busio
from PIL import Image, ImageDraw, ImageFont
import adafruit_ssd1306

# Create the I2C interface.
i2c = busio.I2C(SCL, SDA)
# Create the SSD1306 OLED class.
disp = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)

# Clear display.
disp.fill(0)
disp.show()

# Create blank image for drawing.
# Make sure to create image with mode '1' for 1-bit color.
width = disp.width
height = disp.height
image = Image.new("1", (width, height))

# Get drawing object to draw on image.
draw = ImageDraw.Draw(image)

# Draw a black filled box to clear the image.
draw.rectangle((0, 0, width, height), outline=0, fill=0)

# Load our font of choice
# Pixellari is a great font, but others can be found at http://www.dafont.com/bitmap.php
#font = ImageFont.load_default()
#font = ImageFont.truetype('Minecraftia-Regular.ttf', 8)
font = ImageFont.truetype('/home/pi/Pixellari.ttf', 16)

# Write our textual info on the right side of the display
TextXStart = 66
TextYStart = -1
TextRowSpacing = 13
draw.text((TextXStart, TextYStart + TextRowSpacing * 0), airportcode, font=font, fill=255)
draw.text((TextXStart, TextYStart + TextRowSpacing * 1), str(windDir) + " deg", font=font, fill=255)
if windGust: 
    draw.text((TextXStart, TextYStart + TextRowSpacing * 2), str(windSpeed) + " G " + str(windGust), font=font, fill=255)
else:
    draw.text((TextXStart, TextYStart + TextRowSpacing * 2), str(windSpeed) + " kts", font=font, fill=255)
draw.text((TextXStart, TextYStart + TextRowSpacing * 3), str(visibility) + " sm", font=font, fill=255)
draw.text((TextXStart, TextYStart + TextRowSpacing * 4), str(formatted_pressure) + " in", font=font, fill=255)

# Figure out how to draw the wind pointer
PointerRadius = 32
ArrowTailSize = 25 # Degrees per side for the arrow tail (How chonky to make the pointer - 10=A Fine Boi; 50=OH LAWD HE COMIN)
ArrowTipX = PointerRadius * (math.sin(math.radians(windDir + 180)))
ArrowTipY = PointerRadius * (math.cos(math.radians(windDir + 180)))
ArrowTailX = PointerRadius * 0.5 * (math.sin(math.radians(windDir)))
ArrowTailY = PointerRadius * 0.5 * (math.cos(math.radians(windDir)))
ArrowTailLeftX = PointerRadius * (math.sin(math.radians(windDir + ArrowTailSize)))
ArrowTailLeftY = PointerRadius * (math.cos(math.radians(windDir + ArrowTailSize)))
ArrowTailRightX = PointerRadius * (math.sin(math.radians(windDir - ArrowTailSize)))
ArrowTailRightY = PointerRadius * (math.cos(math.radians(windDir - ArrowTailSize)))

#translate wind pointer to quadrant IV and get absolute values for Y
ArrowTipX += PointerRadius
ArrowTipY = abs(ArrowTipY - PointerRadius)
ArrowTailLeftX += PointerRadius
ArrowTailLeftY = abs(ArrowTailLeftY - PointerRadius)
ArrowTailX += PointerRadius
ArrowTailY = abs(ArrowTailY - PointerRadius)
ArrowTailRightX += PointerRadius
ArrowTailRightY = abs(ArrowTailRightY - PointerRadius)

#draw wind circle
draw.ellipse((0,0,(PointerRadius * 2), PointerRadius * 2 - 1), outline=255, fill=0)

#draw wind pointer if there is wind and fill it if conditions are VFR
if windSpeed:
  if flightCategory == 'VFR':
    draw.polygon(
      [(ArrowTipX, ArrowTipY), (ArrowTailLeftX, ArrowTailLeftY), (ArrowTailX, ArrowTailY), (ArrowTailRightX, ArrowTailRightY)],
      outline=255,
      fill=1,
    )
  else:
    draw.polygon(
      [(ArrowTipX, ArrowTipY), (ArrowTailLeftX, ArrowTailLeftY), (ArrowTailX, ArrowTailY), (ArrowTailRightX, ArrowTailRightY)],
      outline=255,
      fill=0,
    )

# Display image.
disp.image(image)
disp.show()

print()
print("Done")

The arrowhead gets filled if conditions are VFR, and the font can certainly be changed to add more rows of data if desired. Yes, the code is ugly, but…

Naturally, after I wrote all this up, I found that Philip had just added his own OLED output capability to his code… Welp, great minds think alike! Er, at least, that’s what I keep telling myself…

Making a METAR Map

The METAR (METeorological Aerodrome Report) is a staple for pilots wondering what the weather is like at a given airport. While a full report looks like incomprehensible output from a 1960’s teletype (because, well, that’s pretty much exactly what it is), pilots are lazy and sometimes just like having a “yeah/nah” appraisal of weather rather […]

The METAR (METeorological Aerodrome Report) is a staple for pilots wondering what the weather is like at a given airport. While a full report looks like incomprehensible output from a 1960’s teletype (because, well, that’s pretty much exactly what it is), pilots are lazy and sometimes just like having a “yeah/nah” appraisal of weather rather than something like
KOSH 290304Z 10012KT 3SM BR OVC004 02/01 A2990 OMG WTF LOL

Laziness aside, it’s pretty handy to get an idea of flying conditions across a region by looking at a weather map such as the one provided at aviationweather.gov or via various forms of flight planning software. Green, blue, red, and purple indicators give a quick indication of current cloud ceiling/visibility for reporting airports. In the past couple of years, making a live lighted wall map to provide this information has become a popular craft project for flyers, and commercial versions have become available as well.

I’ve been wanting to make a METAR map for my flight instructor ever since first seeing examples online, and finally got around to building one. My primary guide in this was Philip Rueker’s blog post as well as his GitHub project files (though there were several other sites that also provided information and inspiration). Rather than rehash those excellent instructions, this post is regarding my own approach to building.

First off, shadow boxes are much more expensive than regular picture frames. I decided to try to keep the depth of lights and electronics to a minimum so that I could use a standard picture frame. I wound up getting a 20×28 frame from Michael’s for the purpose (and made sure to wait for a good coupon or sale, as $57 is a ridiculous price for a few pieces of MDF and a sheet of glass).

While pretty much every other METAR map build I’ve seen just has through holes for the LEDs, I didn’t want to use this approach for two reasons. First, I wanted to keep the map intact so that it would just be backlit (and thus allowing replacement in the future should there be a big airspace change – sectional maps are only valid for 6 months, after all). Second, I needed to keep the components as low profile as possible. Thus, I decided to forego the WS2811 LED strings used by others and instead opted for the far more compact WS2812B PCB ‘chip’ LEDs.

The picture frame used a fiberboard backing, which I figured would be a fine substrate to mount the LEDs to. I used an outdated sectional map cut just larger than the frame backing, and gave the back of the map a light mist of 3M spray adhesive. After letting the adhesive dry off for about 10 minutes (I didn’t want it to be sticky, just tacky), I carefully applied it to the fiberboard backing, aligning a longitudinal line with a corner of the backing (ensuring that I could remove the map and replace it with a new one).

After trimming the map to the backing, I then zoomed in on the online weather map at aviationweather.gov and marked off every airport on the paper map that showed up online. 38 airports in total would need to be represented. Once I had them all tagged, I used a 1/4″ brad point drill bit and a section of clear acrylic sheet on top of the map/backing to drill a hole cleanly through each airport location.

After that, I marked the backside of the backing board with each airport identifier and name. Then, I removed the old map and made sure each hole was cleared of swarf. I prepared a current sectional chart with spray adhesive, let it tack up, and applied it to the backing board in the same fashion as before, leaving an unscathed map on top (after each application, I used a razor knife to trim the map to the size of the backing board – would have been much more difficult to try getting it sized right beforehand).

Then it was time for the drudgery. Namely, hot-gluing 38 tri-color LED PCBs to the rear of the backing board. And then soldering them all together in a chain. Six solder pads per LED. Honestly, the process wasn’t that bad and I did it over the course of a few evenings. With that completed, I could finally think about powering the whole project. While Philip Rueker chose to run his directly from the RasPi’s GPIO port, he was only dealing with 22 LEDs. With this map being 38 LEDs deep, I opted to have them powered directly from a separate 5V supply. So, how to power the RasPi and LED chain effectively? Well, the RasPi has a micro-USB connector for power. And USB itself runs at 5 volts… A bit of digging through boxes of old hardware yielded a powered USB hub that didn’t need an active host in order for the ports to be powered.

I 3D printed mounting brackets for the RasPi and USB hub. With yet more hot glue to secure them to the backing board, the hardware side was complete. Data and 0V ran from the RasPi GPIO to the LED chain, while 5V and 0V ran from another port on the USB hub to the chain (I didn’t need a diode or level shifter to bring the signal line voltage closer to the LED supply voltage).

The USB hub was a little bit taller than hoped, so I used self-adhesive wall hooks on each corner of the frame to give everything a little more wall clearance (and serve as a way to hold up the power cord).

Much to my shock and amazement, everything seemed to be working great. It only took a little bit of tweaking the metar.py file to complete the project (the LEDs I used have an RGB addressing scheme rather than the WS2811’s GRB order).

Not what I wanted to see weather-wise this weekend, but 100% what I wanted to see project-wise!

Edit: The system wasn’t as stable as hoped, and a strange reboot loop would result within an hour or so of startup. A bit of googling pointed to a feeble power supply as a culprit. I figured a big beefy linear supply wall wart coupled with a substantially warm voltage regulator on the USB hub PCB would equate to an inefficient yet thoroughly reliable voltage source. Yet replacing it with a cheapo dual-port USB wall outlet cube eliminated all issues. Huh, sometimes “they don’t make ’em like they used to” turns out to be a compliment regarding the newcomer!

I also made a few final tweaks to the software side of things. My home airport (where the map will live at) doesn’t have any sort of automated weather reporting system, but I still installed an LED for it. I set rc.local to illuminate that LED in white right away as an indication that the system had booted. After that, I added a “sleep 10” line before running the startup.sh script that initially fires up metar.py (I found that the RasPi wasn’t necessarily yet connected to WiFi, and you might have to wait for cron to kick in before any LEDs would light up as a result of the API lookup failing). Finally, I modified metar.py to show our airport as white (I have it as an entry in the airports file, but since it doesn’t have weather reporting, the LED is normally off). I probably know as much about python in a zoological respect as I do in a programming respect, so it took me a little bit of trial and error to finally figure something out. In the end, inserting a line of “pixels[27] = (85,85,85)” just before the final “pixels.show()” command did the trick.

Jeppesen TechStar Flight Computer Manual

Recently a friend gave me their duffel bag of old student pilot training materials (they kept their log book – hopefully they might pick up training again at some point!) and among the various old books, binders, and brick-a-brac was this gem: It’s an old handheld flight computer, and not the ‘whiz wheel’ E6B circular […]

Recently a friend gave me their duffel bag of old student pilot training materials (they kept their log book – hopefully they might pick up training again at some point!) and among the various old books, binders, and brick-a-brac was this gem:

It’s an old handheld flight computer, and not the ‘whiz wheel’ E6B circular slide rule we’re accustomed to, but an actual electronic flight calculator. I had been pondering getting one for my knowledge test just because there’s a handful of cross-country planning questions that require you to work backwards on the E6B from the standard “set wind direction, mark wind speed, set course, etc.” process, and it’s pretty confusing. Whereas with an electronic flight computer, you key in what you know and the magic silicon pixies do the rest for you.

For a 26-year-old device, it still does handily, but it seems like nobody out on the webernets has a manual for it (searches turn up a load of spam links). Fortunately, I found the manual tucked into a pocket, so I scanned it and am posting it here for others to hopefully find:


Joystick Repair

I intended to post this a few months ago, but the old server had simply gotten too rickety to cope with new posts, much less OS or WordPress updates.  So I opted to roll an entirely new VM with an OS version published this decade.  Hopefully previous posts imported properly, but the site may be […]

I intended to post this a few months ago, but the old server had simply gotten too rickety to cope with new posts, much less OS or WordPress updates.  So I opted to roll an entirely new VM with an OS version published this decade.  Hopefully previous posts imported properly, but the site may be a work-in-progress for a while.

A friend’s all-in-one Namco joystick had broken, and they wondered if I might be able to fix it.

The issue was that the bushing that the joystick shaft is pressed into had split.  Since it looked to be Nylon, my guess was that just trying to glue it back into place (even with epoxy) would not last long as a fix.

While the manufacturer is still in business (though on a different URL), their site doesn’t appear to have any mention of this particular unit.  I wasn’t really expecting to find an exploded diagram and parts ordering form anyhow, but once in a while pleasant surprises pop up.  Not so in this case, so time to wield Phillips screwdrivers with careless abandon.

The joystick mechanism looks to be secured under that square base plate.

This turned out to be a far more complex mechanism than I had anticipated.  It wasn’t until I gave the unit back that I learned that this is due to the Pole Position game using joystick twist for steering instead of normal left/right movement.

My plan was to find some thinwall stainless or brass tubing to sleeve the outside of the bushing and thus collapse down the split section.  I didn’t have much luck in finding an appropriate size tube in the McMaster-Carr catalog, however.

No big deal when you have machine tools, though!  I found a piece of scrap stainless rod, faced the end, and drilled a shallow hole with a W size drill bit (0.386″, which is just the size of the bushing’s outside diameter).  I then thinned down the outside until I reached a point of ‘that looks about right’.  This turned out to be a wall thickness of around 0.017″ which I hoped would be thin enough to retain full movement of the stick.

After parting off the ring, I did a little light deburring.

The ring pressed snugly into place on the bushing, and the crack is practically invisible now.

I carefully hammered the joystick shaft back into the bushing when done.  Interestingly, the end of the shaft has both splines and ridges to keep it from pulling out and from twisting – that should have been a clue to me regarding the twist operation.

A few games of Galaga verified that operation is back to normal!

Aviation pt. 2

It’s been close to 2 years since my previous post on the subject of aviation.  I’ve done a great deal since then – I obtained my sport pilot license, I’m now working towards my private pilot license, my main instructor moved away so she could become a test pilot for an aircraft manufacturer (which I […]

It’s been close to 2 years since my previous post on the subject of aviation.  I’ve done a great deal since then – I obtained my sport pilot license, I’m now working towards my private pilot license, my main instructor moved away so she could become a test pilot for an aircraft manufacturer (which I brag about at any given opportunity), and I stumbled into helping out with two different aircraft restorations via her father, who has since become a good friend and source of inspiration.  That summary glosses over a lot of details of little importance to anyone who is not, well, me.

Last night I drove to the field to drop off some drawings and get some dimensions for one of the restorations we’re working on.  I stopped by my flight school’s hangar to see if anything interesting was going on.  It was a perfect evening, with almost zero wind, endless visibility, and a beautiful setting sun in a sky dotted with only a handful of clouds – the sort of sky pilots dream of.  As it turned out, the school’s owner and chief instructor was doing a little flying with one of the kids who had been helping out at the hangar since I started my own training, and after they landed, he hopped out of the Cub and gave some instruction and encouragement to her.  Yes, this was to be her first solo.  She absolutely nailed her landings, leaving those of us on the ground wishing we could make our own approaches as cleanly.

One of my other instructors who was trained and then actually taught at the school (and is now a fresh new FO at a regional airline) even drove 2 hours to show up for the event.  After my own first solo, I’d still tell people that I was just a ‘student pilot’.  However, one pilot that I admire chastised me for prepending the ‘student’ moniker, admonishing that “there is no more binary distinction than those who have flown a plane by themselves, and those who have not”.

When she finally taxied back to the hangar, pictures were taken and scissors were deployed to remove her shirttails as per tradition – the rafters of the hangar are filled with the autographed fabric (mine included) of those who have made that leap across the divide.  There’s a lot more training and studying to be sure – but I hope she now calls herself  a ‘pilot’ instead of ‘student pilot’.  We’re all student pilots, after all – even my old instructor, the regional FO who now flies airline jets, will need to get checked out in the school’s Warrior before he can give an IFR refresher to one of the new instructors.

We all recounted our own first solo, how the plane becomes a rocketship without your instructor in front, and the fear and exhilaration that comes with flying an airplane all by yourself.  It’s a really special occasion, and I think it’s only properly appreciated by others who have gone through that same experience.  Flying is a very small brotherhood, but last night, we added one more to our ranks.