Lepy LP-2051 Class D/T Amplifier Turn-off Pop Fix Mod

A few years ago I switched my stereo system (I’m using them as computer loudspeakers) to Class D because I was annoyed by the heat the professional (Class AB) amplifiers generate heating up the room (electricity bill aside).

I personally prefer the sound from Tripath amplifiers (started with LP-2020A and LP-2024A), which they called Class-T, but it’s really just Class-D with better PWM feedback mechanism. To drive bigger speakers with stronger bass, I bought a LP-2051 (50W x 2 RMS), which uses TP2150 (200W driver) + TC2001 (Audio Signal Processor) Tripath chips.

However, this amplifier has a very fatal flaw: it has a ridiculous loud turn-off pop! The system has speaker protection relays, so there’s no turn-on pop as expected as speakers are connected 3 seconds after switching on the power.

The turn-off pop bad enough that I was about to toss that in the trash as the amplifier fearing that it might damage by expensive and hard to get ADS vintage speakers. However Class-T chips are no longer produced and the TI Class-D chips for some reason just doesn’t have the clarity in the mid-range and high-frequency range I was looking for in Class-T amps, so I’ve decided to figure it out.

DO NOT TOSS YOUR Lepy LP-2051 Amp because of the loud turn-off pop!
There’s a simple way to fix it if you have a soldering gun, some wires AND a relay (normally open, 5V coil)!

Before I get to the solution, here’s a a few things I figured from observing the board which helped:

  • The power line is 19V (the unit won’t turn on until it reaches 18V, so the acceptable range is 18V~19V)
  • The unit draws around 1/3 of the turn-on power when the power switch is off. The switch is AFTER the power rail smoothing inductor and tank capacitor so they are charged.
  • Turns out the speaker protection relays are hooked straight to the 19V plug input BEFORE the switch (two channel’s relay coils are chained in series, then to the collector of a NPN transistor acting as a switch)
  • The 5V regulated (rightmost pin of 78M05 when viewed from top) is always powered even when the power switch is off.

[Failed] Attempt 1): was to disconnect the left/right speaker wires with 24V external relays switched by the front panel power switch (it’s passing 19V and 19V is enough to activate the relay). The reason is that the power droop faster than the relay disconnect when losing power.

[Mixed success] Attempt 2): I have a big power capacitor 0.12F as external power smoother (initially used to fix huge transient power draw for huge bass transients like drums), which slows down the power droop when the power is switched off enough there’s no power-off pop. However, this solution is very clumsy as reasonably sized 0.022F capacitors won’t slow the power line droop enough to avoid the turn-off pop. This observation gave me the idea that it’s the power-loss detection circuit not reacting fast enough for the system to do the proper ‘shutdown’ procedures (muting the output or disconnecting the speaker wires).

I initially looked into expediting disconnecting speaker protection relay when the power switch goes to off position, but realized it’s already done in the transistor switch logic (cascaded NPN stages) that controls the speaker protection relay as I trace the circuits.

I started looking up the datasheet looking for built-in mechanism in the IC that mutes the amplifier as I switch the unit off (the unit is partially powered once the DC plug is in). Turns out there is: the mute pin is on TC2001’s pin 24 (MUTE):

TC2001, pin 24 is the mute pin (it’s active, aka mute, on high)
TC2001 Mute (Pin 24) has internal pull-up resistor

I tried flying pin 24 to the 5V regulated output (on 78M05) and it muted as expected. I didn’t really bother to check, but when I take out the jumper wire, it’s unmuted as expected (which contradicts with the datasheet description that floating is considered high/mute, so I assumed there’s other logic driving it low by default)

[Failed] Attempt 3): Use a NPN transistor like 2N9304 (and a potential divider to tap the 19V logic to 4.5V) to drive the mute pin (TC2001 pin 24) high (which means muted) when I power the unit off. The turn-off pop is still there because it turns out that there’s a 200ms delay for the mute pin:

So now the goal is to have mute activated (set to high) FIRST a little before the 19V power line gets disconnected. The timing order for turning on does not matter because the speakers aren’t going to be connected until after 2.5 seconds once it’s hooked up to the 19V source, it doesn’t matter what’s the logic transient logic level of the mute pin (it’s going to be NOT connected to the 5V when the SPDT power switch is ON steady).

Realizing that there the power switch acts the fastest, then the mute pin, with relay actuation being the slowest, and the power switch that came with the unit is a SPDT, I don’t even have to implement a timer to delay disconnecting the 19V line before it finishes muting. Here’s the winning solution:

I accidentally wrote 18V rail voltage instead of 19V. The unit works anywhere from 18V to 19V, so you get the idea that I meant the same thing.

I happen to have a Fujitsu/Takashimaya JY5H-K5VDC reed relay which happens to be a NO (Normally Open switch) which happens to fit the design like a glove. Here’s a picture for the experimental (working) hook up that the turn-off pop is completely gone:

On the board, there’s actually a reserved spot for a on-board jumper in place of the supplied/installed SPDT switch. Those are the two red wires rerouted to the relay switch.
(FYI, the bottom node goes to 19V of the DC jack, the top node goes to the rest of the 19V circuit)
The 5V line is the green wire. Goes to the common/middle pin to be switched by the SPDT switch.
The mute pin (pin 24) is the brown wire. Goes to the furthers/longest pin of the switch
Ground is the black wire. Goes to any one side of the relay coil
The shortest pin of the switch goes to the other side of relay coil. I soldered it directly to the relay pin

Completed mod after cleanup:

Overview

There’s a few cleanup that I did:

  • I hot glued the relay on the two hard switches as they are not near any heat sources and mechanically stable
  • I stole the ground (going to the coil) from the nearby C5’s ground pad (C5 is the moderately big 470uF SMD cap nearby).
  • The old right-angled hard switch’s pins were lifted from the board by bending the pins straight.
  • The utmost pin/pad (leftmost, closest to the power plug) for the switch is not connected anywhere else on the board. It was a dummy as the SPDT switch was only used as a SPST switch. Good for me so I can solder one of the 3 pins there for mechanical support (otherwise we’ll twist the front two dummy solder joints for mechanical stability when we toggle the lever repeatedly). I chose to bend the middle pin to solder it to the board because the other two are either too far out or too short.
  • In summary, furthest SPDT switch pin goes to mute pin, the middle is the 5V regulated rail to be switched between the mute pin or the relay coil. The shortest SPDT switch pin goes to the coil. The rest are obvious

Here’s the finished mod with different angle shots for you to see the wiring:

Given the amp itself is cheap (but it’s really an excellent bang for the buck: clear sound, solid bass, class-D efficiency, small size and light weight), those who are not that electrically savvy might not be inclined to do that mod. If you are going to throw it away anyway, please send it to me (I’ll pay for postage).

It’s a very very simple mod that any beginner electronic hobbyists or an electronics student might be willing to do it for you with the instructions here for a small fee. Basically it’s just some wires and a relay and some good solder wick (or if you have a nice desoldering pump, it works fine too).

I typically don’t take petty service orders (under <$500), because of all the hassles shipping back and forth, opening it up, putting it back, and keeping records for the IRS, plus the liability risks. So please find a kiddo, hobbyist or tech to do it.

Loading

Dissociating Windows 10 account with Microsoft (online) account

I’ve recently closed my Microsoft account (finding big tech too intrusive and too eager to make users subjects of their social experiments, aka data harvesting) and do not want Windows to link to it.

After tons of research on forums, I’ve found that Microsoft removed “Sign in with a local account instead” button/link in “Settings->Accounts->Your Info” page since 2017. So this method won’t work anymore:

So far nobody offered a solution that does not involve starting over with a new local account, but in involves moving your user specific settings and desktop folders, which is a pain in the butt.

After exhausting publicly available avenues so that I’m not reinventing the wheel, I decided to go back to first principles trying to ‘crack the code’. The first thing I thought of, based off my intuition about Windows system since middle school, is to search for my associated Microsoft Account ID (the email account string) in the registry. Turns out it only appears only in two keys (branches):

#1: HKEY_CURRENT_USER\Software\Microsoft\IdentityCRL\UserExtendedProperties\{Microsoft ID}

#2: HKEY_USERS\.DEFAULT\Software\Microsoft\IdentityCRL\StoredIdentities\{Microsoft ID}
#3: HKEY_USERS\.DEFAULT\Software\Microsoft\IdentityCRL\StoredIdentities\{Microsoft ID}\{SID}

Replace {Microsoft ID} with your Microsoft (Web) Account Email address. {SID} is the security identifier of the underlying local/domain user account (starts with “S-1-” followed by a long string of numbers with dashes)

If your Microsoft (Web) account is associated with only one local/domain account (SID), simply delete the two registry branches (called keys) #1 and #2 that ends with your {Microsoft ID}. The line #3 is just a sub-key (sub-folder/ranch) under line #2, so if you delete the whole line #2 branch, the rest below it is gone.


Given the registry key structure, I’d anticipate that if you have associated the same {Microsoft ID} to a few windows local/domain accounts, and only wanted to just break its link to specific local/domain accounts without affecting the rest, you might want to just get rid of this

HKEY_USERS\.DEFAULT\Software\Microsoft\IdentityCRL\StoredIdentities\{Microsoft ID}\{SID}

instead of the first two registry paths that covers information about the {Microsoft ID} unrelated to the local/domain account. To find out which {SID} refers to the local/domain account you want to delete, go to command prompt and type this

WMIC useraccount get name,sid

and it will show you a table that maps your Windows local/domain account name to SIDs so you can pick out the right registry key path (#3) to delete.

Of course, after you’ve deleted the last SID associating {Microsoft ID} on your computer, you might as well delete all references to the {Microsoft ID} to avoid orphan registry keys that confuse people.

Loading

HP 54003-61617 Probe = HP 10017A

I have a 54003-61617 probe lying around and I never got a chance to find out what bandwidth so I rarely used it. After some digging, thanks to searchable PDFs, I found on 1986-04 edition of HP Journal (Archived copy here) that 54003-61617 probe is equivalent to 10017A:

By the way I noticed HP Labs still had the old HP Journal PDF files hosted on the website except without indexing: https://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/YYYY-MM.pdf, replace YYYY with year and MM with month.

HP Journal (hparchive.com has an excellent collection) is an excellent source of hard-core electronic engineering education materials, better than anything you can get in colleges because electronic circuit design (not IC designs) is not an academic research area anymore. As of 2000, the only way to get into this area is to work at companies (apprenticeships) instead of formal training like classes. There’s a little problem though because this specialty (analog electronics) is so disorganized, very often even veterans in analog electronics has blind spots like not taking advantage of math tools/thinking enough (they tend to be very good at back-of-envelope calculations).

Finding the specs for 10400A series (10017A) is not easy either because the datasheet is not on Keysight (the new name for HP’s instrument division). It’s listed in an 1998 catalog “How to Select A Probe” kindly hosted by Marc Mislanghe (who passed away in 2014) as HPMemoryProject.org that listed the specs of 10017A in attempt to find an approximate ‘modern’ substitute:

HP 10017A (54003-61617) mini-probe has the following specs:

  • Attenuation: 10:1
  • Input Capacitance: 8pF
  • Input Resistance: 1MOhm
  • Bandwidth: 300Mhz
  • Compensation range: 9~14pF
  • Takes up to 300V
  • 1 meter long cable

Even older record, Operating Note Part No. 5955-6270 courtesy of HParchive.com shows:

I bought a bunch of snap-on ground lead alligator clips (MP2+MP3) and grabbers (MP7) for the probe

Figure 2. 100XXA probe with hook tip or grabber

The snap-on alligator ground clip actually has two parts: the alligator clip (MP2, 5061-1258) and the snap-on ground lead (MP3, 10006-61301) and they are screw-mated :

I happened to have bought a pack of multiple new ground leads and grabbers (MP7, 10017-69501) for this model series, more than what I’d need. They’ll fit miniature probes models 10017A, 10018A, 10040A, 10041A, 10042A.

These accessories will also fit 10021A, 10022A, 10026A, (10027A?), 10032A, 10033A as well.

Loading

Updates to Linux on Pogoplug v4

I have an old Pogoplug v4 series hacked to install Debian Linux based on this instruction long ago: http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html
which boots on an SD card, which I used as a no-ip update client.

I realized some of the URLs to the package servers are broken. So here’s my notes to update it.

First apt-get doesn’t work anymore because the files has been moved to the archive package server. The solution is to replace all the contents (now obsolete) in /etc/apt/sources.list by this line:

deb http://archive.debian.org/debian wheezy main

Then you update the package manager (apt-get) with this command:

apt-get update && apt-get upgrade

Note that it’s still Debian 7 and it will not work with new software that requires later versions

Loading

NextCloud quirks – moving folder breaks the site

I changed the folder of where my NextCloud files is and got this error.

Adding the “.ocdata” dummy file there doesn’t work. The message is cryptic. I tried to run occ at the root folder (hoping it’s some sort of management tool) by running this at the command/SSH prompt:

php ./occ

and it spits out:

Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in 
{New Folder}/lib/private/Console/Application.php:168
Stack trace:
#0 {New Folder}/console.php(99): ...

I replaced my actual path for the new location of the NextCloud files with {New Folder}, so you get the idea.

I also noticed the old path was regenerated with just a /data folder with two files

This means some programmer got lazy and hard-coded the path somewhere!

Line 99 of console.php didn’t give too much hint so I looked at the code around for some sort of config-related operations before. Then I noticed this:

So I searched for config.php and found it’s located in /config/config.php. Bingo!

<?php
$CONFIG = array (
...
  'trusted_domains' => 
  array (
    0 => '{Old URL}',
  ),
  'datadirectory' => '{Old Path}/data',
...
  'overwrite.cli.url' => 'https://{Old URL}',
...
);

And to my horror the SQL password is stored in plain text in config.php! WTF! I’ll choose a password that’s dedicated to one use and not shared!

I recalled a when I rename WordPress databases, I have to manually edit the changes in wp-config.php. Turns out nobody warned us about that for NextCloud! That config file also contain database settings, so I bet if I change the database names or database usernames, I’ll have to come back and edit it manually too.

The site is working after I made the migration changes, all in /config/config.php.

Loading