Tuesday, August 18, 2015

UREI 527A Replacement Slide Assembly

UREI 527A Replacement Slide Assembly
Replacement slide assembly pops right in
Just 2 PCBs, standoffs, trimmers and
breakable headers connect the boards
New slide pots have center dentent
Used CAD software to design the PCBs
Both PCBs have large ground planes
connected to chassis
The UREI 527A graphic eq is a great circuit. It's inductor capacitor design is accurate and very quiet. But after 20 years sitting in some dusty attic, it's slide pots almost always get horribly gummed up. Of 4 units that I have, only one was actually usable. I worked on one with Deoxit for hours without success. Even if a slider can move, often there are positions where the wiper loses contact such that the effect of that band is lost. So these units are routinely dumped for less than $100 USD.

But the circuit itself is one of the most elegant as analog circuits go because when a slider is in the center position it contributes very little noise or distortion to the output (this is why the new slide pots have center dentent) and a single op amp can handle multiple bands. The 527 uses only 4 op amps (each handling every 4th band) for all 27 bands. The resonant filter of each band is a simple passive RLC (resistor inductor capacitor) circuit connected to the wiper of each slide pot. The result is a simple circuit that is measurably quieter than most graphic eqs even by today's standards. With my QA400 audio analyzer (basically a codec in a box but with software specifically designed for analyzing audio signals) I measured an SNR of over 95 dB with the eq IN and with all sliders in the center position. I measured an SNR of over 100 dB with sliders around the test frequency up.

So to fix the slide pot problem and resurrect a pair of these awesome eqs, I have created a replacement slide assembly for the UREI 527A. It's just two PCBs connected by standoffs and uses the old pins to connect to the motherboard just like the old slide assembly. It just pops right in place of the old one. The build takes about 2 hours. I just unsoldered the old connector pins (taking care no to lose them, I could not find replacements), stuff the boards with trimmers (or resistors), new slide pots (but leave out pots where header pins go for later), break header pins and insert, join the boards with standoffs, solder in header pins (making sure they don't protrude above the board so that they cannot possibly contact the slide pot above), solder in remaining side pots, solder in the old pins using existing residual solder, insert and secure the assembly into the unit, flip it over and reheat the connector pins adding solder so that the pins reset into their preferred position.

Finally I used the QA400 software to view the frequency response in real-time and adjust the Q of each band by putting a slider up, adjusting it's trimpot to ~11 dB and then I did a second pass by putting two adjacent sliders up and adjusting so that the two peaks match. Adjusting the Q like this makes all of the peaks level and accurate.

Some people claim that the UREI 527A adds some distortion or grit or crunch. I have not experienced this. Naturally with enough signal and with the input level switch in the 0 dB position (which actually means that gain is applied at the input and a corresponding amount of attenuation is applied on the output) then with enough signal one could certainly overdrive the unit. But at normal signal levels the 527A has relatively low distortion. I always use the +20 dB level position so that there is no noise added by the gain / attenuation circuitry. Using the QA400 I measure ~0.006 % THD which is quite respectable (see graphic). The op amps in the two units pictured here are socketed LF356 which is a decent JFET / bipolar type of part. I'm not sure if someone upgraded the op amps in these particular units or if they're standard but I know some units have LM301 op amps which is a lesser part.
SNR 95.2 dB / THD 0.00582 %

The only "distortion" I have seen that is unexpected is when the sliders are positioned exactly as shown in the following pic, I get a strange 40 dB notch at 630 Hz. This only occurs with this particular slider configuration. If one of the high frequency sliders is moved down, the notch becomes 10 dB as expected. Also the notch does not occur if I supply a single tone at exactly 630 Hz. Strange.

Strange notch with sliders in
certain configuration
Screenshot of strange notch
Parts List

2 PCBs designed using CAD software and manufactured by Advanced Circuits using their $33 service.
4 6-32 1-1/8" pan head screw (McMaster Carr 91772A154)
4 6-32 7/8" standoff (McMaster Carr 91780A750)
4 6-32 5/16" standaoff (McMaster Carr 91780A725)
27 Bourns PTA4543-2215DPB202
1 row of 36 breakable header pins with overall length of at least 1" like 3M 929700-06-36-RK or 929834-07-36-RK
27 500 ohm trimmers like Multicomp MCWIW1012-1-501-LF (or you can just use resistors but Q of each band will not be adjustable)
27 NKK AT4003A bat lever switch caps

Alltogether, I got four sets of boards (must make 4 with $33 service) shipped for ~$290 USD and the other parts add up to about $70 for each unit. So 4 units could be converted for ~$150 USD each.

Gerber Files

There are two boards so you will need to submit two jobs:

Slide_AssemblyB1_v9.zip
Slide_AssemblyB2_v9.zip

The exact dimensions of both boards is 13.4" x 3" (34cm x 7.6cm). The boards pictured are 1.5mm thick and that might be rather important as the assembly must have a certain overall depth (if you use dirtypcbs.com choose the 1.6mm option).

Note: Some UREI gear have posts screwed directly into the front panel using tapped blind holes. Meaning the screws used to mount the assembly do not pass through to the panel. This solution will not work in such units.

Optional Parts

I also added a nice conductive plastic potentiometer and socket cap screws for a new look.

10K audio potentiometer like Bourns 51AAA-B28-D15L
6-32 3/8" socket cap screw (McMaster Carr 90585A212)
6-32 1/4" socket cap screw (McMaster Carr 90585A210)

Headers connect boards so that
there are no wires
Replacement slide assembly fits perfectly
Old pins used with new assembly
Adjust the Q of each band using trimmers
Obligatory gut shot
Two nice units converted
Very clean, no rack rash
Done and racked

Sunday, December 8, 2013

ADG1414 for Professional Audio Circuits

The ADG1414 is one of numerous "iCMOS" gate chips from Analog Devices specifically designed to handle 30Vpp+ analog signals like high quality audio. This particular chip has a shift register that controls 8 gates. I have just tested this chip as a gain control for a basic microphone preamp circuit so I'm posting the results here for posterity.

The following picture shows an Arduino Micro connected to an ADG1414 to control the gain of an NE5532 circuit:


Why not just use a regular mechanical potentiometer do you ask?

One major problem with trying to build custom audio circuits is designing and actually constructing the interface with potentiometers, switches, LEDs and so on. As soon as I settle on a design I want to change it and frequently that means re-routing wires and rebuilding tediously hand-wired boards.

If all of the circuit elements can be controlled digitally, then a microcontroller or PIC could be used to control the circuit and completely decouple it from the interface. I could create a minimal interface with a few encoders and tactile switches. Or if the microcontroller could be programmed to understand MIDI commands, the circuit might be controlled entirely with your average inexpensive non-keyboard MIDI controller. Or you can create a fancy interface to digitally control your analog circuit. Emperical Labs products are conventional analog circuits that are almost completely controlled digitally.

However, I'm not aware of any pro-audio equiptment that uses these iCMOS gates. So the question is, why? On paper these chips look great. What's the problem?

The problem is that historically CMOS gates have a really bad reputation processing audio signals. But these iCMOS gates are different ...
  • Conventional CMOS gates are limited to a signal range of a few volts which is a deal-breaker for common +-15V based circuits.
  • Conventional CMOS gates have an on-resistance of several 100 Ohms which means there must be significant series resistance (or load resistance) to make a switch that really turns off (or on).
  • Conventional CMOS gates have bad on-resistance flatness which means the signal will become distorted at even medium levels.
These iCMOS chips have almost completely eliminated these problems. They handle 30Vpp. The AD1414 has an on-resistance of less than 10 Ohms and an on-resistance flatness of less than 2 Ohms.

The following circuit uses 3 gates of the ADG1414 to control the gain of an op amp. The 3 gates can generate 2 to the power of 3 gain states but for this microphone preamp application, only 6 of the 8 states are really useful (~0dB, +6dB, +12dB, +20dB, +40dB and +50dB).


The purpose of this test circuit is to see if there are any unexpected problems. In particular, my main concern was noise. Any noise whatsoever would be completely unacceptable for a microphone preamp.

The following plot shows the FFT output of the AD1414 test circuit with the gates in the +20dB state. The signal is 20Vpp at 900 Hz.



Note that the harmonics are actually NOT from the ADG1414.

The following plot is the equivalent circuit with the AD1414 "surfboard" removed from of the breadboard and replaced with two jumpers for the closed gates.


You can see the harmonics remain. So it's not the ADG1414.

Replacing the gates with jumpers did increase the gain slightly. Presumably because the 10 Ohms of gate on-resistance is significant compared to the 68R.

Where are the harmonics coming from do you ask?

Because I am not an Engineer, my "laboratory" consists of an XP laptop and an old M-Audio FastTrack USB. So to do even a basic SNR type of measurement I had to use the other half of the NE5532 to boost the output of the FastTrack +40dB and then, after the test circuit, the output is tapped off of a 1K / 10R voltage divider because the FastTrack can only handle an few volts. This extra circuitry might be responsible for some distortion I suppose. But the first harmonic is -80dB down so maybe it's not completely abnormal for two gain stages of +40dB and +20dB. Anyway, the harmonics drop significantly and dissapear at ~3Vpp.

The final graphic shows the noise floor which is appears to be greater than -110dB. With the equiptment I have, that is as good as I'm used to seeing.



Finally, I listened to the circuit using a headphone amplifier with the preamp input grounded using the 220 Ohm resistor. I could not perceive any additional noise above the hiss expected of higher gain settings. Specifically, in the +50dB setting, in addition to the gain provided by the headphone amplifier, the hiss of the noise floor is very audible. But there is no hum or odd rumble and, most important, the hiss level is the same with or without the ADG1414 (although I had to temporarily turn the circuit off to remove the surfboard and add the jumpers in it's place so this is by no means an A/B test). At low gain settings, there was no audible noise at all.

Note that when I initially breadboarded the circuit, I did not properly separate the microcontroller supply or ground from the test circuit and of course I got quite a bit of hum and rumble. This was completely resolved by properly separating the supply and grounds of the microcontroller from the analog circuitry containing the AD1414. With supplies properly separated, there is no buzz or switching noises when cycling through gains using the tactile button or even when resetting the microcontroller. There is a little bit of popping when switching between +20dB, +40dB and particularly +50dB. When designing a circuit with a chip like this, it might be a good idea to have the SPI control lines (clock, data and 5V reference) run over wires from a seprate board hosting the microcontroller. So the ADG1414 should be positioned as though it was simply part of the analog circuit with all non-SPI control pins referenced to the analog supply. The ground pin and all unused gate terminials were connected to local analog ground.

Sound analysis software and corresponding plots created using DSSF3 from ymec.com.

I have no affiliation with Analog Devices.

Friday, March 27, 2009

Fixing up my 1987 Peavey Renown 400 Guitar Amp

Back in 1987 I purchased this Peavey Renown 400 Solo Series guitar amplifier new from Rondo Music in New Jersey. Shortly thereafter I replaced the standard black netting with groovy paisley fabric purchased from a local Ralph Lauren store.

The amp is somewhat unique in that the two Scorpion Plus 12 inch 8 ohm speakers are 200 watts each and the head can put out 210 watts. And that's continuous, not peak. The magnets on these things are 9 lbs. You know those amps that "go to 11"? Well I've never actually turned this up beyond about 4. You just can't do it because it gives you a strong sense that something bad is going to happen.




The functionality of the amp is fairly straight forward. It has two channels - Lead Gain and Normal Gain. There are lots of equalizer settings so it makes a good multi-purpose foundation for guitar or a PA. I used to run music through this at parties. The distortion is nothing special but there are jacks in the back to insert your effects between the pre-amp output and power-amp input.

After 20+ years of sitting unused in my mother's attic I tried to sell this filth covered 70 pounder at her garage sale for $40. But clearly it had problems so it didn't sell. One of the speakers was blown and the sound would cut out as you played.

But being the problem-solver type I decided to try to resurrect this beast. I'm not an EE but dad is and I managed to get some help from someone on a Peavey forum who actually knew something about this model. Fortunately it turned out there wasn't much wrong with the amp at all aside from a loose connection somewhere. If I jammed on the guitar while I whacked the casing with the rubber handle of a pair of heavy pliers I would get a little static and then the sound would cut out. I never identified the specific connection responsible but after I briefly remelted the solder joints on all of the filter capacitors and power transistors and re-hot glued some of the larger components, the amp has been solid ever since. I've never heard so much as a hiccup.

With the amp working well I set out to just clean it up. I scrubbed the cabinet inside and out with a dilute solution of Simple Green and wiped it down with a wash cloth. An old horse hair brush worked very well at getting into the Tolex. I used a lint roller to clean the fabric cover which was totally impregnated with dust. Note that the "3M/Scotch" lint rollers are much better than everything else. I used a tooth brush on the grooves of each knob. I did not submerge them or use a cleaning agent as I feared it might loosen the colored plastic tabs.






There is supposed to be a foot switch to toggle each channel and the reverb. But I lost it so I rigged up a hand switch instead. I went to Radio Shack and bought a Center-Off DPDT micro-switch for switching channels and a SPDT for enabling the reverb (an SPDT and SPST would work equally well of course but they were out of those particular switches). Now I can just reach behind and flip it to the left for the Lead Gain channel, to the right for the Normal Gain channel and center it to leave both channels on.

I used some alligator jumpers to test the switches and figure out the wiring. Then I made a switch plate to fit in place of the foot switch DIN using a small piece of aluminum roof flashing folded in two. I wired everything in parallel to the foot switch DIN connector so that if a foot switch should turn up I could just bolt it back in place without rewiring anything. Finally I put the DIN connector in a small plastic bag so that it cannot rattle around or short-out on anything.






I think it's definitely worth $40 now.

Wednesday, September 24, 2008

Does strong typing produce more secure code?

The OWASP AppSec Conference 2008 is underway in New York this week. I attended a number of interesting presentations including Hans Zaunere's which addressed PHP's unwarranted notoriety for being insecure. It seems there were some people in the audience were not convinced because someone suggested that PHP's lack of strong typing was somehow a liability.

Apparently this person had performed code audits and discovered SQL injections where the programmer constructed an SQL statement without escaping a field because they assumed the user supplied parameter would always be an integer.

For example:
$age = $_GET['age'];
$sql = "INSERT INTO employee (age) VALUES ($age)";
Of course the supplied 'age' parameter could be a string like:
42); DROP TABLE employee ....
and thus you have the potential for SQL injection.

So does it make sense to blame PHP's lack of strong typing for SQL injections?

No. This case is no different in Java:
String age = request.getParemeter("age");
String sql = "INSERT INTO employee (age) VALUES (" + age + ")";
In both languages we need to either cast and validate the value or better still always escape everything int or otherwise. Escaping SQL parameters (e.g. with mysql_real_escape_string) ensures that the code is not vulnerable to SQL injection. Validation should be used to prevent putting garbage into your database.

The bottom line is that you must escape all parameters when constructing an SQL statement. This is true regardless of what programming language you use.

Strong typing is a constraint used to help the compiler find mistakes and optimise the resulting machine code. But for programmers who know the language well (which is usually a prerequisite for any real project), strong typing mostly equates to more typing.