Fixed Samsung TV Turning On & Off

My 40″ Samsung TV model LNT4053HX/XAA developed a problem where when first turned on it would make clicking noises and turn on and off until it finally stayed on. I lived with it for a few months but it progressively took longer and longer to fully turn on. Before I purchased a replacement I decided to search the Internet for a fix. I figured that others may have encountered the same problem. Sure enough Paul of TampaTec YouTube channel explained exactly how to fix my problem. It seems that Samsung engineers under-specified the TV’s power supply capacitors and they were swelling up and failing. I ordered the five capacitors that Paul indicated were usually the problem.

Today, I went through the significant trouble to remove the TV from its tight, cable-full under-counter nest, took out many screws and opened it up. The power supply had one, and only one, capacitor that had failed, see photo below. After scrutinizing all of the power supply capacitors I decided (fingers crossed) that the other four were OK and only replaced the obviously bad one. IT WORKED – the TV now powers up correctly and, hopefully it work for years to come. Thanks Paul of TampaTec YouTube channel.

Bad TV Capacitor

Bad TV Capacitor

Posted in Electronics | 2 Comments

Inexpensive ESP8266 in UNO Form

Two+ weeks ago I purchased an ESP8266 Module board in an Arduino UNO form factor. See Fig.1, below. It cost me $3.20 US including shipping from China, I didn’t need it or even have a use for it, that I can think of, but at that price, why not. By the way, the seller (Aliexpress seller ShengYang Store) has since dropped the price to $3.16. Delivery took 17 days, which isn’t bad – I’ve had Chinese delivery take much longer. The official product name is “WeMos D1 WiFi uno”.

WeMos D1

Fig. 1: WeMos D1

As soon as I received the WeMos D1 package, I wanted to test it. The D1 has a traditional Arduino UNO Power Barrel Connector Jack but also a micro-USB connector.  Obviously, the Power Barrel Connector Jack only supplies power but the micro-USB connector may be used to supply the 5 Volts and also a bidirectional serial communications interface.

The micro-USB connector serial communications interface utilizes a CH340G I/O chip which requires special drivers with Windows but often “just works” with Debian derivative Linux distros, like Mint, which I used to use. This is because Mint is built with the CH341 Linux kernel driver already installed.  I now run Manjaro on my desktop and I discovered that the CH341 Linux kernel driver is NOT pre-installed in Manjaro. The D1 board was detected and I could even get a /dev entry once I built an appropriate /etc/udev/rules.d rule:

SUBSYSTEM=="tty", GROUP="users", MODE="0660", ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="wemos"

This created the /dev/wemos entry but not /dev/ttyUSB0, which I needed for communications. I needed the missing CH341 driver (lsusb indicated that it was absent).

$ pacman -Qs ch341
local/i2c-ch341-dkms 20151116-1
    CH341 USB-I2C adapter driver

Once I installed the ch341 kernel driver the /dev/wemos is created as well as /dev/ttyUSB0, which is actually a link to /dev/wemos.

$ ls -l /dev/ttyUSB0
crw-rw---- 1 root users 188, 0 Sep 25 11:57 /dev/ttyUSB0

So far, so good. Now I could finally load some code to test the wemos D1 board. A little (previously done) Google’ng lead me to Steve Kemp’s website wherein he has posted a great article titled “Absolute WeMos D1 Mini (ESP8266) Basics“. It was just what I needed. Since he uses Debian Linux I did need a very little minor tweaking but, on the whole, his article is perfect for my system. Rather than go into detail about his code and instructions it is best that you read his web page linked above.

The code installed in my $3.20 WeMos D1 board without error using the Arduino IDE. I then connected to the WeMos D1’s serial port at 115,200, via the Arduino IDE’s monitor function,  and pressed reset on the WeMos D1. The displayed text displays the URL to access the web server running on the WeMos D1

Connecting to SSID
WiFi connected
Server started
Use this URL to connect:

The web server running on the WeMos D1 presents two links that turn on/off an LED of the WeMos D1 via the Internet. Very nice! BTW – the logic in Steve Kemp’s source is inverted, at least for this board, and “off” is “on” and visa-versa. I haven’t changed it yet.

Led pin is now: Off

Click here turn the LED on pin 2 ON
Click here turn the LED on pin 2 OFF


I’m not sure what I’ll do with the WeMos D1 but for $3.20 I am impressed.

P.S.: I suspect that the WeMos D1’s low price is because it is may be a discontinued product and the seller is dumping inventory.

Posted in Arduino, ESP8266, wireless | Leave a comment

Pololu USB AVR Programmer V2

I recently purchased another ATmel AVR programmer. I normally use a USBasp programmer with out-of-circuit chips and, less frequently, in-circuit chips. Anyway, Pololu is an electronics manufacturer based in the USA, specifically Los Vegas, Nevada. I’ve previously used a couple of their products and they are of good quality and are well thought out. This isn’t a product endorsement – I simply like the product.

Pololu USB AVR Programmer V2 interested my because of its unique features combined with a bargain price and good support. So, I made a short video of using the Pololu USB AVR Programmer V2 with the Arduino-IDE. I also tested it using avrdude in a Makefile but that isn’t shown in the video. The video shows me using a ISP-6 to ISP-10 adapter because I was programming an ATTiny85 DIP in my old homemade universal programmer socket adapter and it only has an ISP-10 connector.

Interesting features:

  • Connects to computer through USB
  • Emulates an STK500 programmer through virtual port
  • Works with standard AVR programming software, including Atmel Studio, AVRDUDE, and the Arduino IDE
  • Configuration software provided for Windows, Mac OS X, and Linux (not manually configurable)
  • Supports 3.3 V and 5 V devices
    • can be configured to auto-switch operating voltage based on detected target VCC
    • Can optionally power the target at 3.3 V or 5 V via Pololu provided configuration software
  • USB-to-TTL serial adapter for general-purpose serial communication – pinout of commonly-available FTDI USB-to-serial cables allows plugging directly into some Arduino-compatible boards, such as the Adafruit Trinket.
  • Provides a 100 kHz clock output.
  • All I/O pins are protected with 470 Ω resistors
  • 6-pin ISP connector


Posted in Arduino, Electronics, hardware | Tagged , , , | 2 Comments

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