Electronic Projects


Table of Contents:

  1. Lepai Class-T Amplifier Mods
  2. Soft Touch Power Control
  3. AM Radio In a Playing Cards Box
  4. Commodore Computer-Related:
    1. Deluxe Monitor Stand for the Commodore 128
    2. Using the Commodore 128 with a VGA Monitor
    3. Using the Commodore 128 with an LCD TV
    4. Hummer Direct-to-TV (DTV) Mod

Lepai Class-T Amplifier Mods


Added January 29, 2010
Updated June 16, 2013
From about 2007 to 2009, I went through a period of renewed interest in collecting vintage audiophile equipment - this was sparked primarily by discovering a near limitless supply of dirt-cheap CD players, tuners and receivers at a local thrift store. This led to online searches and further acquisitions of piecemeal components known to be of good quality. Well, this all came to a screeching halt as 2010 rolled around, after discovering the little $20 Class-T amplifier mentioned here. If you haven't heard about the Lepai Tripath series of amplifiers, you seriously don't know what you've been missing!

Theory of operation: Traditional, Class-A amplifiers work by amplifying both phases of an audio signal. As such, they sound great but are typically only about 25% efficient. This means they waste a lot of power and generate a lot of heat - regardless of the volume level. Class-B amplifiers are theoretically two or three times more efficient, but generate too much distortion for practical use in audiophile applications. The Class-A/B design is a trade-off between the two, and is slightly less efficient than Class B. There is also a small amount of switching distortion due to the push-pull configuration of the output transistors, which some audiophiles claim to be able to hear. The Lepai LP-2020 amplifier is designed around the Tripath TA2020 IC. Although Tripath calls this a "Class-T" amplifier, this seems to be more of a marketing ploy to help differentiate themselves from manufacturers of other Class-D amplifiers, since they're both basically the same. It works by converting the input audio signal from analog to digital, with inductors on the output side to form a low-pass filter, thereby converting the amplified digital signal back into analog. Voltage is rapidly switched on or off across the inductors, exploiting the collapse of magnetic flux to smooth-out the realized waveform that is presented to the speakers. This is the basic idea behind Pulse-Width-Modulation (PWM). Transistors are traditionally used as signal amplifiers or as switches, but are most efficient when used as switches. By exploiting the advantages of transistors in switched mode, together with passive components such as inductors and capacitors, this design can reach up to 90% efficiency! This is also why a device as small as this can provide 20 Watts per channel @ 4 Ohms, continuously, while still remaining cool to the touch or only slightly warm.

I soon discovered a related forum discussing various modifications (mods) to this device to improve the sound further. Here is a listing of mods I've made to mine so far:
  1. Unsoldered the 8-pin JRC4558 op amp chip and replaced it with a socket and OPA2134PA. In lots of Tripath board designs an op amp isn't used, but in this board design it is useful to compensate for attenuation of the signal in the tone control section. , the op amp serves as a bridge between the input audio signal and the Tripath amplifier IC, and also helps to mitigate voltage drop-off from the bass and treble controls, which work by attenuating the signal. The DIP socket allowed me to sample several recommended offerings before settling on this particular chip, which sounded the best to me.
  2. Installed a 4700µF power supply capacitor to replace the 2200µF stock part. The goal here was to avoid clipping for those short-term, high volume signal transients (think bass thumps and crashing cymbals ).
  3. Replaced several carbon resistors with metal film types in the pre-amp stage. This was done to improve the signal-to-noise ratio.
  4. Replaced several 2.2µF electrolytic capacitors with 3.3µF instead. This was also done to improve the signal-to-noise ratio, as well as low-end frequency response. For the pair of coupling capacitors upstream of the op amp chip, a pair of tantalum capacitors were also soldered in parallel underneath the board - after much experimentation, I was torn between using electrolytic capacitors for their low-end bass response and tantalum capacitors for their high-end clarity. So I decided to use both... no compromises!
  5. A 10nF capacitor was added between the op amp power and rail pins, as recommended in the manufacturer's data sheet. This helped to reduce popping when adding or removing power, or when using the "power" switch on the front of the device (which doesn't actually switch power, but merely mutes the Tripath IC).
  6. Replaced the stock inductors with toroidal types. This was done to improve current-handling on the output side of the amplifier and maximize available power to the speakers. As you can probably tell by the photos, quarters were cramped and I ended up removing a few heat sink fins so everything would fit. Ordinarily this would be a major sin in the electronics field, but the heat sink Lepai chose for this design was extremely conservative, considering this chip has an 88% efficiency rating and therefore generates only about 3-4 Watts of heat at full power (assuming 8-Ohm speakers and a 12-Volt power supply are being used).
  7. Replaced the power supply inductor with a higher-amperage rated choke.
  8. Swapped the left and right input channels, since they were erroneously reversed in this production run.
  9. Replaced the lone blue LED with two Cree white LEDs. This revision of board has an empty space for adding a second LED, but the board layout has them wired in parallel and downstream from a single 1.5K resistor. Trying it this way at first, I found one would dominate and cause the other to sometimes fade or not illuminate at all - so I replaced the stock resistor with a 1K and added another so they are now powered independently. They're each drawing about 5mA, which should make for a long service life, and are comfortably bright without being irritating. I also took a file to the epoxy surface of each LED, making it rough to help diffuse the light. The fact that the case is made from reflective aluminum further helps to spread the light, which is now as uniform as can be seen in the photo on the right.
  10. Added rubber feet to the bottom of the case. Sure, they cost a bit more than foam pads, but they're also a lot less prone to sliding around a table or desktop surface when a cable is tugged.

I can honestly say there was a marked improvement in sound quality after replacing the cheap (as in quality and probably price) op amp chip. The other mods provided more subtle improvement - but each was still worth the effort. This board is a 2009 revision, and more recent offerings sport a tone-defeat switch and speaker-protection relay... but also use surface-mounted components, which can often make mods more challenging.

I like the separate treble and bass controls on these Lepai amps, which is a rarity among popular Class-T designs in this price range, and they're usually cranked-up to the max anyway... so the absence of a tone-defeat switch doesn't bother me at all. After adding the filtering capacitor to the power pins on the op amp, the power-on "click" is only barely audible when it even occurs - so while a speaker relay would probably be a nice addition, I can live without it. The simple solution is to leave the unit on longer and enjoy more music.








Soft Touch Power Control


Added June 25, 2012
About four years ago, I posted a page describing how I had modified a laptop monitor stand to allow easy control of A/C power to other devices. Being a long-time Commodore computer enthusiast, this had appeal since many of their vintage computers used heavy "brick" power supplies, and often with the power switch on the adaptor itself. This meant either crawling to the floor to turn it on or off, moving it to an already crowded desktop or using a clunky rocker-type power switch on a power strip or 1990's-era monitor stand with neon-backlit rocker switches. It seemed such a luxury to have a laptop and docking station at work with soft-touch power buttons within arms reach at my desk. Since the laptop was getting a bit shall we say, "long in the tooth", I thought about picking up one for myself as prices were coming down. While looking for accessories, I noticed prices for matching monitor stands were dropping like a rock! Then it occurred to me that for just $6, it might be worth buying one just to bastardize it and see if the switches could be exploited for my own uses.

As described on the other page, I was able to isolate the wires leading to the two front-facing switches with built-in bidirectional LEDs. I created a switching circuit from a schematic I found on the web, and embellished upon it to also support the LEDs by lighting them green for "On" and amber for "Off" (I know, it should really indicate "Standby"... so we'll bend the rules a bit, okay? . After the circuit was working, I moved the protoboard into a project box big enough to contain it along with a power outlet. It worked as a prototype, but I didn't feel comfortable enough to use it long term due to the close proximity of the high and low voltages... it probably wouldn't have received the UL logo anyway, if they even go through that anymore.

Then I recently stumbled upon a web page describing how someone is using a modified power strip to allow his switched amplifier to control power to more devices than it was originally designed for. He did this by installing a relay in the unused space within the power strip, then added a jack to feed it power. Then it occurred to me that I could probably update my switching circuit to similarly control such a relay-readied power strip. This would have the benefit of isolating the low-power circuit from the high-power one. Once the power strip was ready for prime time, updates could later be made to the control circuit without impacting wiring for the devices running from A/C. It would be a win-win!

I found the exact power strip described above at Fry's for just over $3, so I picked up a couple. The operation went without a hitch, although I cheated a bit - instead of soldering wires between the input jacks and relays, I fed the reverse-biased diodes through the soldering holes on the RCA jacks and extended the leads all the way to the solenoid input pins, making them serve as wires. It saved a bit of time, and between the thick leads on the 400x-variety diodes and A/C wires soldered to opposing sides of the relays, along with cramped quarters within the housing of the power strip, there's little room for jostling and possible arcing.

Besides relocating the relay to the power strip, I wanted to update the control circuit as well, since the original implementation suffered badly from switch bounce. I tried several other designs based mostly on the 555 Timer IC, but each came with a caveat that I wasn't willing to settle for. Instead of the transformer-based power supply in the previous version, I wanted to go with a switched-mode power supply. For a circuit using less than 70 mA total, including relay, it seemed unnecessarily wasteful to use a power supply sucking 300 mA regardless of load. The switched-mode supply I intended to use had a no-load maximum draw of just half a Watt, so I could cut the energy expenditure by 77% by using it instead. I know we're not talking about the power involved in lighting a stadium or anything, but every little bit helps, right? Well, it just so happened that the 555-based circuits would occassionally toggle state when there was noise on the lines - usually when turning the fluorescent kitchen lights on or off. No amount of smoothing electrolytic capacitors on the rails or filtering ceramic discs next to the ICs themselves seemed to help (yes, I even added one to Control Pin #5 on the 555). Another circuit would toggle twice if the switch was held down too long.

I finally found the perfect circuit for the task, based on the 4013 Dual D-Type Flip-Flop IC. It's perfect not only because it works flawlessly with the switched mode power supply, and not only because it stays in the selected state no matter how long the switch is held down, and not only because it doesn't suffer from switch bounce, but it also has provisions for controlling TWO inputs (devices). Since the monitor stand has two sets of switches and bidirectional LEDs, all the stars aligned on this one because it cut the number of required components to an absolute minimum. The previous implementation used discrete components and had double everything, so you can probably imagine my excitement to get started wiring-up the circuit once the benefits and simplicity of this design were realized!

The astute reader will notice that on the schematic, current is "trickling" through the relay in the off condition. This is by design so as to supply the amber LED with 5 milliamps, whereas the relay needs approximately 25 milliamps to activate. I've been using the circuit for a couple weeks now (as of 25-Jun-2012), and so far there hasn't been a single hiccup or anomaly to mention.

Any A/C devices can of course be used with the modified power strips, but they're currently set up so the left switch controls power to the computer and related peripherals, while the right switch allows effortless access to a reading light. I used a higher value resistor for the amber LEDs as compared to the green ones - the reason being that devices powered by the strips are usually off at night, so I wanted the LEDs to be bright enough to be visible, without being so strong that they would become a source of irritation. Yeah, I'm probably being overly-picky... but I guess if I'm picky enough to want a better power switch, it's probably just par for the course, right? At some point I'll probably look into adding a photoresistor to vary the intensity of all LEDs depending on ambient light, but that's not on the radar (for now).






AM Radio In a Playing Cards Box


Added February 2, 2009
Probably every electronics hobbyist has built a crystal set or small transistor radio at one time or another, and this was my attempt. It's based on the MK484 "radio-in-a-chip" IC, which doesn't really look like an IC since it uses a TO-92 case; usually seen only with transistors. The idea of running a radio from a single, 1.2-Volt AAA rechargeable battery seemed like such an amazing feat I just had to check it out. It drives a set of 32-Ohm earbuds or Walkman-style headphones at a respectable volume, and while it's not a superheterodyne, sensitivity and selectivity are still pretty decent.

After finalizing the board layout, I needed to find a permanent home for it. While meandering at a local thrift store one day, I found an old playing cards storage box with a casino's logo imprinted on it. I thought it would give the project a good "retro" look, so I snatched it up and... well, here it is.

The volume control includes a power switch, which is exploited in this circuit. I would have preferred to use matching knobs for tuning and volume, but the tuning capacitor has more range of motion and because of that, the detent on the knob comes in contact with the flange running along the bottom edge of the box. I probably could have filed it down, but to save time just swapped it with a spare I had laying around. While mentioning caveats, it also would have been nice to mount the audio jack through a hole on the side of the box, but alas I couldn't find one with the depth necessary to position it there - so the box needs to be open when listening to a station. Not the biggest deal in the world, right? Besides, it lets one admire the superior craftsmanship of this winning hand (very big chuckle).