Manjaro Update Woes & Resolutions

On August 18, 2018 I updated my Manjaro Linux system with the arrival of a rather large update and it broke my printers. I have three printers, all Brother brand – one USB connected HL-2140 laser printer, one WiFi connected HL-L2180DW laser printer and one Wifi connected inkjet MFC-J430W. ALL printers stopped working after the update!

I deleted and re-installed the two WiFi connected printers and they resumed working. The USB printer was MUCH more stubborn. The problem seemed to be USB related rather than printer (I eventually discovered that USB memory stick drives also didn’t work) . I ended up seeking help from six pundit volunteers on the Manjaro forum. After several days and exhausting the efforts of the forum. all gave up.

While looking at the journal (journalctl -f) I noticed a udev error “Aug 31 14:59:42 asrock systemd-udevd[243]: Invalid rule /usr/lib/udev/rules.d/96-scanner.rules:1: unknown key ‘BUS‘”, however, I ignored it since my USB connected scanner was working – in fact it was the ONLY USB connected device that worked. Consequentially, I ignored the error as unrelated. However, one forum pundit, petsam, was suspicious of the 96-scanner.rules error and asked for the output of a couple of diagnostic commands. The result was “No package owns /usr/lib/udev/rules.d/96-scanner.rules”. I decided to delete the offending udev/rules.d/ 96-scanner.rules. This cured the USB problem and the printer came alive again (partially) as did USB-Sticks. I find it odd that a udev parsing error thrown on an unrelated and unused rule could screw up other USB connections. I assume that this error caused udev parsing to abort before the printer and memory-sticks were parsed, resulting in their not working.

The HL-2140 printer now worked and seemed to be fully functional, but I was wrong. When I tried to print an envelope with libreoffice for a letter that I wrote, the insert envelope feature was all screwed up, producing the wrong size envelope and screwing up formatting and paper position. I found nothing useful in libreoffice, Manjaro or Arch forums but I did find something useful in a Ubuntu forum. A user reported an envelope printing problem similar to mine and the pundit repeatedly told him that the problem was caused by the printer driver (the user doubted the pundit). I originally got the malfunctioning printer working again with the “Brother HL-2140 for CUPS” driver and left it there because “it worked”,  but the envelope issue made me decide to switch to the driver that worked well before the Aug. 18 update – the “Brother HL-2140 Foomatic/hl1250” driver. Success! Now the USB connected HL-2140 printer is fully functional, even with envelopes, and the August 18th trials have been fully resolved.

Posted in Linux | Tagged , , , , , , , | Leave a comment

Video on Creating pcb-rnd PCB footprint e/w Silk from part’s PDF spec

When I create Printed Circuit Boards (PCB), I prefer using the program pcb-rnd. Pcb-rnd was originally forked from gEDA’s PCB program but it has incorporated so many new functions and features that its capabilities far exceed the gEDA’s PCB program from which it sprang. Many of pcb-rnd new or improved options are new to me so I made a video on Creating a subcircuit including Silk from the Part’s PDF using inkscape. A subcircuit is pcb-rnd’s take on a PCB part “footprint”. I did this video partly to help others new to the process and partly as a refresher for the future me. This part is a coin cell battery retainer that I am using in a project.

The pcb-rnd’s lead reviewed the video and supplied some some suggestions for improving the process that I used. I’ve included them in the comments below the video – click the “SHOW MORE” text. So, the video has some areas needing improvement but isn’t without value in its current form.

YouTube Link:

If you are interested in trying pcb-rnd, it is available in the repository of various Linux desktop distributions with official packages in Debian, Ubuntu and Arch Linux and also can built from from source. Compatible operating systems are Linux, Mac OS X, IRIX 5.3 and OpenBSD.

Posted in EDA, Electronics, hardware, PCB Design | Leave a comment

Nifty SD Card Gadget

I recently purchased, on eBay, a nifty little SD Card gadget. You can plug either a regular or micro-size SD card into it and then plug into either a standard or micro USB port. It is pretty handy, especially for a laptop. I tested it on my Manjaro/Arch Linux desktop and on my Android phone. It worked flawlessly. Actually, I was quite surprised when I plugged it into the charging micro-usb port, opened the File Manager App and there it was! All of the photos on the card were present and displayed in thumbnails. I am impressed with this thing.

BTW: I purchased it from eBay seller fashion-bestbuy for $2.15USD including shipping from China.

PS: While I show two SD cards inserted, I did NOT test it that way. Assuming that it would not work, or worse, I tested only one SD card at a time.



FIG 1: SD Multi-Function USB Adapter

Posted in Electronics | Tagged , , , | Leave a comment

Tamarack Fan – What’s Inside

Another non-electronic post. It is an interesting design using cams, levers and microswitches. It’s sort 1960s, in a Rube Goldberg’ish way but it works and that is what counts. Well, the mechanism works well but the fan is noisy and doesn’t move much air. Still, impressive mechanical engineering with a touch of electrical engineering.

This post is basically just a video of what is inside the Tamarack Attic fan. Enjoy:


Posted in Mechanical Engineering | Tagged , | Leave a comment

Whole House Fan (Non Electronic Post)

I haven’t posted lately because an electronic project that I worked on for much of 2017 and into 2018 occupied most of my spare time. Unfortunately, it hit a roadblock (cost of FCC compliance testing, not technical) and my attention was then diverted to more domestic pursuits (one is topic of this post). I do have a new electronic project, in fact I’ve already produced a PCB for it – but – it’s not time to talk about it yet. I did not post about the previous time-consuming project because it, and also the new project, have a commercial aspect and thus I am not prepared to disclose details about them, at this time.

Anyway, this post is about a recent domestic project. It isn’t electronic but you “may” find it interesting nonetheless. I live in the North Carolina mountains and it is cool enough that the air conditioning is seldom needed. In the summer, some afternoons between 3PM and 7PM it can get warm enough that air conditioning is needed. My home used to have a Tamarak HV1000 Whole House fan that I pretty much disliked. It seemed as loud as an airplane engine and provided minuscule air movement. Last year one of its two direct drive electric motors died and it is not a serviceable item, per Tamarak. BTW, to Tamarak’s credit they have added quite a few new fan types since my HV1000 was purchased about ten years ago, but they cost more than the solution that I selected.

I opted for a self-install Quiet-Air 4800 fan which is pretty quiet – maybe 5%-to-10% of the Tamarak’s noise level and exchanges air at 3,500cfm. It was expensive but my house just doesn’t have a good place for the cheaper old, traditional horizontal attic fans (which are also quite noisy). Some photos of my QuietAir install are below. I deviated slightly from Quiet-Air’s instructions, as follows: (1) QuietAir provides two steel mounting arms1 that are screwed into a ceiling joist and the damper box is supported on one side by screws into the ceiling joist and 2/3 towards the far side by the two mounting arms. This is OK except that one side of the ceiling grill would be supported by screws into Sheetrock, which is not acceptable to me. Thus I framed around the damper box with 2X4s primarily as support for the ceiling grill, but it also allowed better support for the damper box by screws into the 2X4s; (2) I used aluminum HVAC tape to seal around the damper box to sheet-rock seams, and also the flexible duct interface to the motor and damper-box so that absolutely no suction power was lost; (3) I added rubber washers to the fastening lag-screw that secures the motor support chain. The idea was to mitigate any vibration being transmitted to the rafter. Vibration turned out to be undetectable so the rubber washers are probably unnecessary. Click on photo thumbnails below to view larger. Click the enlarged photo to step to the next photo.


  1. QuietAir would significantly improve their product if the damper box support arms were lengthened and shaped at the far end with a horizontal section pre-drilled and tapped to accept the grill attachment screw. In this way the grill would not need to be supported by Sheetrock. See Figure 1, below.

Figure 1 – Improved Damper Support Arm

Posted in Uncategorized | 3 Comments

Solar Garden-Light Failure Autopsy

About a year ago I placed a Dollar-Tree Solar Garden-Light, (Fig 3, below) in a sunny place of our yard. From a previously identical light I knew that the battery contacts were thinly plated steel which would corrode and cause lamp failure after a few months of exposure to the weather. Consequentially, for this lamp I sealed every opening, every crack and every screw with silicone rubber. To its credit it lasted almost a year before it died.

When I opened up the light to autopsy it I was surprised that the point of failure wasn’t the battery contacts. They looked pretty good with almost no corrosion. However, the entire interior was coated with a brownish powdery deposit (see Fig 1, below). The deposition source looked to be the AAA NiCd battery. Apparently it spewed out vapors which condensed on most the interior. The battery tests 100% non-conductive on a multimeter. It is truly dead.

I inserted an alkaline AAA battery into the Garden-Light but it refused to turn on. Apparently the NiCd battery’s fumes did more internal damage beyond looking ugly.

The Battery-University website says “Most rechargeable cells include a safety vent that releases excess pressure if incorrectly charged. The vent on a NiCd cell opens at 1,000–1,400kPa (150–200psi)…With each venting event some electrolyte escapes and the seal may begin to leak. The formation of a white powder at the vent opening makes this visible. Multiple venting eventually results in a dry-out condition.”

This certainly seems to be what happened in my Garden-Light. The only deviation being that the powder is brownish rather than white. This could possibly due to a chemical reaction with other components within the Garden-Light or possibly a unique Chinese chemical brew for the electrolyte?

The electronics in these Garden-Lights do have logic to prevent total discharge but have NO protection for over-charging nor does it limit the charging duration,  voltage or current. The solar cell on the light produces over 2V in bright sun. In other words, the Garden-Light is rather battery unfriendly when it comes to charging. I can certainly see the opportunity for overcharging on bright sunny days. Do this over and over during the summer and venting would be likely escalate until “poof” – dead light!

NiMH have a similar venting issue with improper charging so switching from NiCd to NiMH won’t help. Without proper charging control it would seem that a one dollar Solar Garden light is worth only what you paid for it. Consider it mild entertainment for a few months to a year, at most.


Fig 1: Autopsy of Light Internals


Fig 2: New Light Internals


Fig 3: New lamp


Posted in Electronics | Tagged , , , | Leave a comment

Macrofab Pick and Place (PnP) – musings

NOTE: This post has some significant update of January 28, 2018

I have been doing some PCB SMT design using pcb-rnd with a goal of trying a board assembly shop.  I’ll do a few prototypes but that is all. Macrofab has enough recommendations for prototype quantities that I have been concentrating on it. Pcb-rnd  a spin-off from geda pcb. Geda pcb has stagnated, not dead but somewhat stagnate, so an interested team created pcb-rnd in order to accomplish some significant new features while maintaining backward compatibility to geda pcb. There are numerous YouTube videos about Macrofab HEREpcb-rnd has significantly diverged from geda-pcb since it was forked, Pcb-rnd has added many more features and uses different file formats, although geda-pcb formats can be imported/exported.

It turns out that PnP assembly is tricky as there are NO real industry standards. I’ve tested centroid/xyrs part placement files with several fab houses and each wants a different file format. Likewise each fab company has other peculiarities in its required x/y measurement origin, nomenclature and unit of measure. Additionally, their documentation for “their” format is typically scant to none, ScreamingCircuits being an exception as they have significant documentation. I have been helping Tibor Palinkas (Igor2), the Lead Developer of the pcb-rnd project, on getting pcb-rnd to export a xyrs file that Macrofab can correctly read. It was a challenge but we are finished and pcb-rnd correctly produces a centroid file that has correct rotation and size values.

With square/rectangle boards pcb-rnd uses the implicit Pick and Place (P&P) origin of 0;0 at the lower left corner. Pnp-rnd handles the origin used by XYRS with odd shaped boards with a special dot on any layer of the board – a “PnP-Mark”.  The PnP-Mark dot is created by drawing a short line and then drag&drop move the endpoint of the unselected mark line back to its origin endpoint – this will result in a zero length line, which looks like a filled circle. Next select the mark, drag&drop move it to the lower left corner of the outline box relative to the outline’s line centerlines, as shown in Figure 2, below. With the mark still selected, press ctrl+e and click on the “add attribute” button in the property editor. Type in “pnp-origin” in the “Attribute key” and “yes” in the “Attribute value” field (see Fig 3 below); click ok and close the property editor. Finally, export the Gerber and xy files.

Creating Macrofab Compatible Files with pcb-rnd

Macrofab requires Protel-like
. Macrofab has a help page that explains their requirements at THIS-LINK.
For example, the Top Copper layer’s suffix is GTL, i.e.,

  • With square/rectangle boards pcb-rnd uses the implicit Pick and Place(P&P) origin of 0;0 at the lower left corner.
  • For odd shaped boards pcb-rnd handles the origin used for XYRS files with a special mark on any layer of the board – a “pnp-origin” Mark.

First create macrofab compatable files

  1. You will be more successful if your pcb-rnd layout includes certain fields for your board. Consequentially, make sure that your layout is production ready before starting this process:
    • Your part’s footprint and value attributes (Edit→edit_attributes_of→subcircuit) should be meaningful.
      This is because macrofab will need real manufacturer part
      and values (ohms, etc).
    • Macrofab’s Bill of Materials screen can search parts that are available from component vendors but if your part number is a real manufacturer’s part number and value then the process will go much more smoothly.
  2. The pnp-origin dot is created by drawing a short, thin line and then drag&drop move the endpoint of the unselected mark line back to its origin endpoint – this will result in a zero length line, which looks like a small filled circle.
  3. Next select the dot, drag&drop move it to be centered on the lower left corner of the outline box relative to the board outline’s line centerlines (bounding
  4. With the mark still selected, press ctrl+e and click on the “add attribute”button in the property editor.
  5. Type in “pnp-origin” in the “Attribute key” and “yes” in the “Attribute value” field; click ok and then close the property editor. A short video of pnp-origin creation is available at THIS-LINK.
  6. Finally, export the Gerber and xyfile:
    1. When exporting the gerbers (File→Export_Layout→gerber), select checkbox “all-layers” and select name-style “universal”.
    2. When exporting the XY file (File→Export_Layout→XY), select “Macrofab” format. Rename the XY file’s suffix to XYRS.

Note 1: The pnp-origin mark is not explicitly visible in the XY file nor is it explicitly passed to macrofab. Instead, all part coordinates are calculated considering the mark’s center as 0;0.

Note 2: However, the mark is not hidden or suppressed by pcb-rnd from any of the output. It must be a line, but it can be on any of the layers. Thus the mark potentially could show up on the board. There are options to make the mark disappear:

  • Make the mark diameter smaller that the router mill bit diameter and place the mark on a copper layer; the board fab will have the copper dot, but it will be milled away.
  • This should also work if the mark is on a silk layer or even on the solder mask layer where this object would be a small cutout over void
  • Make a new (copper) layer or unused layer, such as an inside layer, place the mark there and don’t send that layer’s Gerber export to macrofab.

Next Upload Files to macrofab

Macrofab has help pages that explain their process for uploading and verifying board files to their system for several EDA software products but not specifically for
pcb-rnd. If your board is created as described above you should have no problems.


For the record:

  • Macrofab measures x/y placement, in mils, based on the lower left corner of the board or, if present, the lower left corner of the outline centerline. For an example of the proper position, see Figure 2, below. Placement is looking through the board (think X-ray). NOTE that Macrofab uses bounding box measurement so if your board is an odd shape, for example wider at the top than the bottom, the lower-left corner will be that of the bounding box and not necessarily that of the board’s outline. See Figure 1 “Bounding Box PCB Example” below.
  • Macrofab requires the part dimensions, in mils, of the part’s Rotation-0 orientation regardless of the rotation of particular placement. So, a part, measured Rotation-0 orientation, of XSize 366.27, YSize 237.17 would use the same value when in Rotation 90, etc.
  • Macrofab rotation is based upon Dual inline chips being oriented at 0 (zero) rotation with pin one on the upper left. Two pin and single inline components are oriented at 0 (zero) rotation with pin one to the left. See figure below. Also, rotation for the bottom is the same but with the board flipped, bottom now facing you.
  • Macrofab requires the XYRS file be TAB delimited with columns in a fixed order, meaning a heading row is ignored and, in fact, creates a problem if present. The order is: Designator, X-Loc, Y-Loc, Rotation, Side, Type, Xsize, Ysize, Value ,Footprint, Populate, MPN

BTW – some may wonder why I use pcb-rnd or geda pcb instead of kicad (I avoid non-open-source software). I have tried kicad enough to know that it is a very capable product – but – it is too monolithic for me. I prefer the Linux/Unix approach of a tool-suite, which geda pcb and pcb-rnd provide. I have a history with geda pcb, having used it for years – I know it and therefore find it easy to use – but pcb-rnd has many more features than older geda-pcb and is therefore what I use. That said, for a newcomer that has never before used pcb layout software, I would recommend kicad.

Image Credit: ScreamingCircuits


Fig 1: Bounding Box PCB Example


Fig 2: PnP-Mark re Outline Centerline


Fig 3: PnP Mark Example

Posted in Electronics, PCB Etching | Tagged , , , , , | 3 Comments

awka – awk to C converter

I love AWK. I am among a minority. While many people use awk one-liners in shell scripts, few utilize awk as it was originally intended – a stand-alone language. I used to use it extensively back in the 1990s and continued to use it as my go-to language whenever I needed some heavy lifting text file manipulation.

Recently I wrote a small but powerful awk program to manipulate certain fields in genealogy GEDCOM files. My problem was that the GEDCOM standard allows NOTES and SOURCES to be linked, or cross referenced (XREF). For example here are a couple of lines of an “in-line” note:

1 NOTE This file demonstrates all tags that are allowed in GEDCOM 5.5. Here are some comments about the HEADER record
2 CONC and comments about where to look for information on the other 9 types of GEDCOM records. Most other records will

The note immediately follows the NOTE keyword in field 2. The CONT line that follows is a “continuation” line of the preceeding line.

Here is what a cross-linked/XREF note looks like:

1 NOTE @N24@
1 CHAN 2 DATE 11 Jan 2001
3 TIME 16:00:06
1 RIN 1
… (many lines later)
0 @N24@ NOTE
1 CONC Comments on "Charlie Accented ANSEL" INDIVIDUAL Record.
1 CONT To represent accented characters, the ANSEL character set uses two-byte codes. The 

Note @N24@ is the cross reference to the actual note @24@ much later (often near the bottom) in the file.

My problem was that, recently, I have been using the genealogy website and their new GEDCOM import process (GEDCOMpare) has some bugs. Currently it discards cross-linked notes. To resolve this problem I wrote an awk program that converts cross-linked Notes and Sources into In-Line, which mitigates the WikiTree GEDCOM import problem.

Now, with the background out of the way – on to the reason for this post. Awk isn’t blindingly fast since it is an interpreted language so a binary executable of the awk program would help with large GEDCOMs. I stumbled across a SourceForge project by Andrew Sumner named “awka” In addition to being hosted on SourceForge it is also hosted by noyesno of Shanghai, China on GitHub. I compiled and installed it with only one issue – it put its library in /usr/local/lib instead of where I needed it for my system – /usr/lib. In one word AWESOME! Awka creates C source that compiles into an executable that is functionally identical to the subject awk script.

If you’re into awk check out awka! And if you aren’t into awk – GET INTO AWK!

Posted in Programming | Tagged , , | 2 Comments

Useful Small PCB Work holder

I was watching a YouTube video series about removing and replacing a BGA IC and the talented technician was using a really useful looking PCB holder. You’ll see the PCB holder at 3:50 into the YouTube video link below. The video is in Vietnamese but that doesn’t really matter as you can clearly understand what he is doing. Unfortunately, my first BGA removal was a failure because I was a bit too eager to lift the chip, applied too much pressure and lifted several BGA traces on the PCB. I fear that the board is ruined beyond recovery. I should have first practiced on a junk board.

I purchased one of these useful little PCB holder via eBay and it arrived yesterday – see my photo below. It seems well made and I definitely believe that it will be as useful as in the video. The base is a painted steel and the vise parts are plated but show machining marks so they may be machined rather than cast, which is a good thing. The base measures 12cm x 8cm. I purchased mine for $3.41-USD (including shipping) from eBay seller “94racing-us“. It was delivered in twelve days from order.  Domestic delivery is often slower than that  and this came across the globe from China.


PCB Holder – Empty and loaded with a PCB


Posted in Electronics | 1 Comment

Linux Associate file icon and application

I could not get association of a file icon, mime type and application to work satisfactorily. There are numerous how-tos on the Internet but all are incomplete or wrong. The greatest help, for me, was the ARCH Linux Default applications help page. It helped more than any other, but wasn’t all of what I needed. BTW, I couldn’t get the icon to work in the .local directory so I had to put it into ‘/usr/share/icons/Mint-X/mimetypes/scalable/’ in my Mint 17.2 system.

Anyway, I wrote up a cheat sheet for me using the freerouting java program as my example. Here it is:

Example - add file icon and application for freerouting in ~/bin

Place inkscape created icon.svg in:

In ~/.local/share/mime/packages/ place application-x-specctra-dsn.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="">
  <mime-type type="application/x-specctra-dsn">
    <glob pattern="*.dsn"/>
    <glob pattern="*.DSN"/>
    <comment>SPECCTRA DSN for autorouters</comment>
    <icon name="application-x-specctra-dsn"/>

In ~/.local/share/applications/ place file freerouter.desktop
[Desktop Entry]
Comment=freerouter Autorouter for pcb

sudo gtk-update-icon-cache /usr/share/icons/Mint-X/
sudo update-desktop-database

NOTE: In this example "/home/username/bin/freerouting" is a shell command:
java -jar /home/username/bin/FreeRouting/fr.jar

It executes a java program
Posted in Linux | Leave a comment