Author Archives: powermadindustries

My LME49810 High-Power Amplifier

AUdioAmp

I’m designing this amplifier as a wedding gift for a friend of mine. I’ll be building the integrated amplifier (more info on the preamp and enclosure soon) and another friend of mine will be building the speakers.

This amplifier uses 3 pairs of Toshiba 2SC5200/2SA1942 driven by 2SA1930/2SC5171. I have followed the guidelines from Dougles Self in his power amplifier book. The amplifier features a built in protection circuit (the protection relay features a time delay, a DC offset protection, and it also senses loss of one of the main power supply rails). A dual FET opamp is used to provide both a DC servo and a comparator for over temperature protection. I also have basic output short circuit/overcurrent protection.

Several other LME49810 amplifiers are available as kits or assembled modules. Here is a high power assembled board. I have not purchased or used the ConnexElectronics board (but I do use and like their switching power supplies). I have also purchased a PCB-kit version of this amplifier which uses the interesting “ThermalTrak” output devices. (I haven’t tested it yet).

This amplifier is currently in the testing phase. I’ve quickly mounted the output devices to a random piece of angle aluminum, not as a proper heatsink, but to allow low power testing without worrying about rapidly destroying output transistors if I have a problem. Since this is my first use of the LME49810, I made sure to use many jumper links to reconfigure the circuit to make debugging easier. From a quick and dirty test with the Audio Precision, I get 0.003% THD (80Khz bandwidth, 1Khz test tone, a few volts output). This is an unloaded THD number, but is also before any circuit optimization or even output stage biasing has been done.

Formula SAE ECU

ECU front_big

Here’s the custom ECU I built for our Formula SAE team. The ECU reads various engine sensors and operates the fuel injectors and ignition coil. The UT-FSAE team originally used an old DTA-FAST off the self programmable aftermarket ECU. They then switched to an ECU designed by Steve Robalino called the “Steve Squirt”. The units, while somewhat inspired by the popular MegaSquirt project, use a completely different microcontroller platform than MegaSquirt. The SteveSquirt uses a pair of PIC18 microcontrollers, one for fuel and one for spark – the engine sensor inputs are put in parallel. The team has used these units for several years, but has had some hardware failure (the team is likely to make incorrect connections and otherwise blow up electronics.

I have decided to make a replacement/upgraded ECU for the team. I based my design on the SteveSquirt, and I kept the firmware and PC interface software identical. My upgraded ECU uses a waterproof CINCO “MOD-ICE” enclosure, heavy duty input regulation and power filtering (with reverse polarity protection, generous filtering, and overvoltage protection). I also used self-protected automotive rated MOSFETS (which I will call “SMOSFETs” for Smart MOSFETS) to drive the four fuel injectors and smaller ones to drive the auxiliary outputs (these drive relays and dashboard indicator lights). These SMOSFETs have built in overcurrent, overvoltage (clamping),  and overtemperature protection. In fact, these allow relay coils and solenoids to be driven without the need for a “catch” diode. I use a special IGBT designed by BOSCH for ignition use. I could not buy this par in Mouser or Digi-Key – it is only available at diyautotune.com (a MegaSquirt retailer).

I used a pair of LM1815 Variable Reluctance sensor signal conditioning chips to process the Crankshaft and Camshaft signals. I also use Schottkey diode clamps to protect the analog sensor input signals and a combination of a polyfuse and zener is used to protect the 5v “VREF” output that is used to energize sensors such as a Manifold Absolute Pressure sensor and Throttle Position Sensor for faults such as shorts to ground and shorts to 12V battery. I built the board with a four layer board (inner layers are 5V power and ground) and made sure to split the groundplane between high power (ignition and fuel injectors) and small signal returns. I also pulled away the ground and power planes from the high voltage ignition coil terminals.

This ECU was used, with a Honda CBR600 4-cylinder engine, for the 2011 UT-FSAE car, which placed 8th place out of about 80 teams at FSAE-West. The ECU was used again in 2012 to run a turbocharged YFZ450 single cylinder. This worked well, but the software was not well-suited to single-cylinder engines. In 2013, the team switched to a MegaSquirt V3 ECU but the team has had some problems with the ECU (especially the trigger wheel, which was designed for carburetor). The team ended up using the stock carburetor and stock CDI ignition for competition. The team has now switched to the Performance Electronics PE3 ECU.

Here’s a writeup of this ECU: FSAE ECU

Lab upgrade with Audio Precision

I’ve added an Audio Precision System 1 dual domain (with the IMD option) to my audio analyzer system. Here it is sitting on top of my equipment stack. There is also an HP Vector Signal Analyzer (sort of a cross between a dynamic signal analyzer and a spectrum analyzer) and an older HP 8903B audio analyzer. You can also see my amplifier load bank on the floor and the two PCs, a windows 98 machine for running the audio precision (and my EPROM burner) and a windows7 laptop for general lab use.IMG_20150423_233508

Getting up and running with an Audio Precision System One

The original Audio Precision System one that was manufactured from the mid 80s up to the early 2000s still has very, very good analog performance and is still a very valuable testing tool. However, it is more difficult to get a system that was purchased used up an running than other self-contained audio analyzers. The problem is that the Audio Precision box has no real brain or user interface of its own – it needs an attached PC running their software to work. This does have the advantage that more complex user interaction is possible as well as advanced functions such as scripting and plotting. And you can move to a newer, more powerful PC (somewhat), instead of being stuck with a user interface that was built when the unit was built.

IMG_20150408_021139

before talking about how the AP connects to our PC, we should first discuss the types of units that are available – all listed on the back sticker. the AP comes in three base capability levels: base (analog only), DSP (all functions of analog and a DSP with analog IO), and the dual domain (all analog functions, and the DSP has analog and digital IO options). Also note that while most units have dual channel analog generators and analyzers (“x22” models), some where produced which were single channel only and some were even made that only had generator or analyzer functionality – so be careful when buying used! The DSP models add a DSP which has two analog inputs and a single output channel. It lets you perform FFTs and run some multitone tests in the analog domain only. The Dual domain units expand upon the DSP unit by adding digital audio input and output (in SPDIF optical and coaxial, AES3 on XLR, and serial and parallel data streams as well). The end of the model number also specified the PC connection option. Most are “A” units, which means APIB for Audio Precision Interface Bus. Some units are G or S units which have GPIB or RS232 serial connectivity. Note that the G and S units also provide the standard APIB interconnection as well. The last things listed on the sticker are options that may be installed. “IMD” is the InterModulation Distortion analyzer (a different type of distortion analysis), “W&F” Is the Wow and Flutter meter (for testing tape machines and turntables) and “BUR” is a generator option that can provide Pink, White, and bandpass noise, square waves, and sine wave bursts. The “MEM” option only applies to “DSP” units – it adds more memory to the DSP such that larger FFTs can be run. Note that all Dual Domain units include the MEM option as standard (the dual domain board has the additional memory chips built into it). “EURZ” changes the impedance options on the input and output to European ones (note that you need to tell the audio precision software about this!). The Filters section described which optional filters that the unit left the factory with. Note that you don’t need any option filters to perform most audio tests – you can test RIAA preamps with the “EQ sine” generator option and for distortion testing, the base unit always has built in high and low pass filters. Having a weighting filter is useful for noise floor measurements, however. When purchasing a unit, it is a good idea to open it up to make sure that the currently installed options match the sticker.

Users with “S” or “G” units have some limited interface choices with their units, but should probabally just turn off the G or S interface and use the APIB connection. the S or G option actually adds an internal computer with an 80186 processor and some internal ROM with a control interpreter program built in. These units also have some DIP switches for setting the baud rate (S units) or GPIB address (G units) and also provide the option to turn off the internal processor and use the unit as a plain “A” unit. The GPIB interface is not very useful for ordinary audio testing – the AP software can not interface with it. It is really meant to be run in a production testing environment with custom software. the Serial unit is a bit easier to interface to. The AP S1 DOS software can talk with the serial units (these were originally designed for remote use over modems, like for remote studio-transmitter link work), but the APWIN Windows software cannot talk with them. Particularly masochistic users could run it from a terminal emulator.

The System is meant to connect to a PC with the APIB bus. The APIB bus is basically a bi-directional 8 bit bus with a multiplexed address and data on a 25 pin DSUB cable. The controlling PC was meant to have an Audio precision interface card (provided with the unit).  The reason a proprietary interface was developed is that the unit can be made cheaper without providing a built in processor (like with the S and G units) and the original IBM PC parallel ports were not bidirectional (pre ECP and EPP). Unfortunately, usually the AP box is found alone….the APIB card tossed out in the old computer used to run the system (especially since the 25 pin DSUB looks like a regular PC serial or parallel port).

Many different interface cards were produced. The original cards were called PCI1,2, and 3. The first two were 8 bit ISA cards (confusing, since the PCI bus had not been invented yet, they called their cards Personal Computer Interface!) and the PCI3 was an IBM micro channel interface. These can only run the original S1.exe DOS software. Later, when AP-WIN Windows software first came out, they charged for the Windows version indirectly, by only allowing certain interface cards to work with it. the newer ISA cards (these had a Xilinx CPLD on them) came in a ISA-DOS (S1.exe only) and ISA-WIN (runs both) with the CPLD code the only difference. There was also a PCMCIA card made (this can run both DOS and Windows versions) and some hard-to-find PCI bus versions. Note that the USB adapter does not work for System one  (won’t run APWIN), but only works for 2700.exe (which i think might be able to run a system 2).

Luckily, there is a way to inexpensively get going on with a bare System One or System Two. There exists an “LPT Translator” solution that is a special cable (has a funny pinout) and a driver that allows a Win98 PC to control an AP box over the parallel port. A PC running Windows 98 SE with an ECP/EPP parallel printer cable is required. A driver is included in the kit that pretends to be the Audio Precision card’s driver, but actually bit-bangs the parallel port. This is the reason why Win98 is required, the newer windows with an NT base (2000, XP, etc.) do not allow for this sort of driver shenanigans . (I would expect that WinMe might work, but why bother?). I have had very good luck with the cable, and it can be purchased for under $200 on eBay or from Sound Logic.

As far as the PC, I recommend a “early windows XP era” desktop PC with onboard serial and parallel port and some USB ports (so you can mule files over USB stick). I.e.: P3/P4 or Slot-A/Socket-A Athlon. Make sure you have some PCI slots, just incase you need to buy a PCI LPT card if there’s some problem with the onboard. I have a Socket-A Athlon machine and it actually runs Win98 fairly well. For reliability and less acoustic noise, i use a 32Gig CompactFlash card in a cheap CF to IDE adapter. A bonus is that I can easily image the card (only a few gigs are used) and have an easy backup plan incase the dreaded Windows “Bit Rot” sets in. i don’t recommend putting this computer on the internet. Users lucky enough to have a PCI-bus interface card or the PCMCIA card can use up to WinXP 32-bit. I’m not sure if the ISA-WIN card can be used on XP or not. Users with the ISA-DOS card or the older 8 bit ISA cards can only run S1.exe DOS software and should just use the APIB-LPT translator solution (the APWIN software is good).

While APWIN is superior to the DOS software in almost every way, the official calibration routines for the System One require the DOS software. Note that the APIB-LPT translator software can also handle the S1.exe DOS software as well, but onyl when working in a DOS window within windows 98 – booting the PC straight into DOS outside of windows will not work since the magic VXD driver will not be loaded. emulators like DOSBOX or any of the visualization solutions like VMWARE will also not work. However, there are two problems getting S1.exe to work. The first is that there are some software delays and the program will crash or not connect when run on a semi-modern PC. About 800Mhz seems like the Limit (Sound-Logic used to sell kits with the LPT cable and a small 800Mhz mini-PC). A “Slowdown” utility can be used to fix this. I use “CPUGRAB.exe” with the slider set to about 70% and it works fine. I found it here. The second problem is it might not auto detect the APIB “card”. Starting the program with a command line option such as “s1.exe /i1” seems to work. BTW, “/h” is the “command line switch help” command. Note that some DSP stuff does not work quite right this way.

Audio Testing Lab Upgrades

I have recently gotten some a new lab space (I was craped before. And I wanted to be able to sit on my couch…). But I have also upgraded my audio analyzer. I used to use the HP 8903B but I have just purchased an Audio Precision System one Dual Domain (a SYS-322A). I expect to get it next week. I have already set up a Windows98 PC to run it.

My Tube Headphone amplifier

IMG_20141208_054803

This was my second major kiCAD project, and by this point I felt relatively proficient in the use of the basic KiCAD features. This time I used Advanced Circuits’ “$33 each” deal to fab these since it’s a larger board in which they are cheaper than OSHpark (who are unbeatable for smaller boards). I based this design off of this headphone amplifier design, but did some relatively heavy modifications:

  • completely different filament power supply
  • delay circuit for the high voltage supply so that tubes can heat up first
  • a second delay to connect the headphones (avoids a plop when the output coupling capacitor is charging)
  • two output tubes are used – the sections are put into parallel to reduce the output impedance
  • negative feedback is used to reduce the output impedance and distortion. The board can also be used without feedback as per the original design based on how some resistors are populated.

My design uses a 12V (tweaked to ~13V to get exactly 6.3V on one power tube) “silver box” SMPS to run the filaments (both power tubes in series). I then use a combination of a resistive dropper and an LM317 regulator to provide the 6.3V to the input/gain stage tube.

In the end, I had very few problems with this design. I did have to get a larger SMPS to handle the inrush current of the cold tube filaments (they draw twice their rated current for a few seconds when doing a cold start), and I had a somewhat strange noise issue with the power supply. I was actually getting capacitively coupled buzzing into the circuit from the SMPS. I assume the noise couples from the primary to the secondary of the SMPS via the inter-winding capacitance of the transformer. How it then gets into my circuitry is unknown (either the filament-cathode capacitance, or just radiating from the filament traces. The filament circuits (and the relay-timer logic) are not connected to the main circuit/audio ground or safety ground – they actually float at 1/3 of B+ voltage via a high impedance voltage divider. A 1uF capacitor from the output of the SMPS to the chassis ground totally cured the noise. I did have to make a slight bodge to the board since I got the input and output of the 317 regulator backwards due to an issue with a KiCAD library.

My little Bluetooth Audio Receiver module

IMG_20150113_155210

This was my first KiCAD PCB.  I used OSH-Park to fab these PCBs (my first time using these guys as well). I used to use Express-PCB’s service/software. This uses a Roving (Microchip now) RN52 bluetooth audio receiver module and my circuitry provides power and very-high-quality audio output. my board provides traditional unbalanced RCA output as well as propper pro-audio style balanced signals on a 1/4″ TRS. I used the THAT semiconductor (that’s really their name!) “OutSmarts” balanced line drivers.

Made a Media-Control Joystick!

My Media Controls Joystick
I wanted to have media playback controls on my desktop PC, but I did not want to get a new keyboard – I love my old IBM “Model M” keyboard and will keep it for a long time. Yes, I can use the Windows-7 quick-launch feature by using ctrl-ESC instead of “Windows Key”. I did take a quick look at USB MIDI control surfaces, but the software interfaces would not work directly with normal media software – they’re designed for music production software/Digital Audio Workstations.
I had purchased an actual arcade joystick (“Zippy” brand?) from an electronics surplus store (EPO in Houston) a year ago on a whim, and just remembered it and thought it would be really cool to have a big joystick as opposed to some wussy buttons. I installed the Joystick into a spare metal project box and interfaced it to my PC over USB using a “CARPC JOYCON EX” adapter. This was a hold-over part from when I used to have a car-PC in my car (even though I never actually used it!). This thing has four resistance input channels and looks like a standard USB HID keyboard to a computer. Most car steering wheels use a pair of wires and each button connects a different resistance across the lines when pressed. This unit is meant to map the buttons on a car’s steering wheel to a keyboard button (which the carPC front-end software then maps to a function). The JoyCon unit uses some (clunky but functional) software to map the buttons (it’s Windows only), but once configured, it does not need any software or drivers to work – it looks like a standard USB keyboard. Since this unit has four channels, I could connect the four directions of my joystick without needing to use some resistors. And in keeping with the Ragnarok-Resistant theme, I used a Neutrik 5-pin XLR connector for USB.

I’ve mapped up to PLAY, down to PAUSE, and left/right to PREVIOUS TRACK/NEXT TRACK. This works with FOOBAR2000 even if I have a different program has focus. This should work with most media player software. The joystick seems very responsive for media controls, but there is most likely too much lag (and not other buttons) for games. If you were starting from scratch (as opposed to this, where I just used spare parts – I didn’t buy anything at all), you’d probabally want to get a unit meant for games, such as those used by the people that make MAME cabinets. These have separate input lines for each button and control and are supposed to be very responsive.

eBay Audio Amplifier Kit Comparison coming soon!

About a year ago, I had purchased some inexpensive amplifier board kits (LJM L6 “terminator”) from eBay to build a simple integrated amplifier and I was rather impressed with their performance, especially for the small price. Now that I am starting to design my own amplifier, I figured I’d purchase a few more of these cheap kits out of curiosity. I have recently acquired a distortion analyzer to properly test these amplifiers. Here’s the contenders

  • LJM L6 “Terminator” amplifier (this is the one I assembled last year). This seems to be a fairly standard amplifier with a single BJT Emitter Follower output stage (no current limiting). The bias tracking VBE multiplier transistor is mounted on the heatsink (as it should be), but there is no bias adjustment potentiometer.
  • LJM “QUAD-405” Clone. This is a straight clone of the old Quad 405 “current dumping” amplifier. This is the most esoteric amplifier design in the group. This one seems like a fairly direct copy of the Quad circuit. It seems to include over-current protection, in addition to rail fuses built in to the board.
  • LJM MX50SE – This seems like an original design. This one has a CFP (Complimentary Feedback Pair) BJT output stage. The amplifier uses a degenerated input pair with a tail current source and a current mirror. There is no over-current shutdown nor a bias adjustment. The driver transistors are mounted on a small heatsink along with the bias VBE mutiplier (it seems a bit weird, but for a CFP output stage, the bias tracks the drivers and not the outputs). The bias is not adjustable, and seems rather cold.
  • LJM L12-2- This is a larger amplifier (2 output pairs). It is a very similar design to the MX50SE with a few additions. it is a parallel CFP (with emitter degeneration resistors). The input pair is degenerated, there is a tail current source, as well as a current mirror load, a Cascode, and a clamp. As before, there is no over-current protection and the bias is fixed and a bit cold. I expect this to be the best performer.
  • LJM “MX50 X2” – “Musical Fidelity X-A50” clone. This is supposedly a clone of a Musical Fidelity amplifier (I don’t have the original schematics, so I can’t be sure how close it is). This is a dual output pair amplifier. It is also a quasi-complimentary amplifier (all NPN). There is no overcurrent protection, but there is a bias adjust trimpot this time.
  • LJM L7 – This is a MOSFET output amplifier, while all the previous amps were are BJT outputs. I have not received this board yet.
  • My own amplifier design – I’m deigning an amplifier of my own design. The amplifier will use the National/TI LME49810 input stage IC and three pairs of BJT outputs in a triple emitter follower configuration.
  • A “XY HIFI” LM3886 module. This is a very simple LM3886 chip amp (“Gain Clone”). The board does have a 0.15 ohm power resistor in series with the output to ensure stability (!). I may consider replacing it with the more traditional output inductor. While I am leary of parts that originate from China/eBay, The provided LM3886 ICs look genuine when compared with my known real chips from TI’s free samples (drop shipped via DigiKey).

I got mostly the “LJM” designed kits since they seemed(I hope) like the more reputable of the inexpensive HIFI amplifier kits on eBay from China. The kits are not hard to assemble, but are not for a complete beginner (unless you have an experienced fried to help you). There is no documentation provided and no help. You literally only get a set of PCBs and the parts to stuff them (and some silpads for mounting the transistors). There is NO schematic – the boards do not have the usual R1, C5, etc. type component reference designators – instead, the actual component values are on the silkscreen. To produce a working amplifier, a chassis, power supply, heatsink, etc. are required. I did also trace out the schematics of these amplifiers and will upload them soon. (The provided schematics on the eBay auctions are sometimes (purposefully?) incorrect or of low image quality).