Last night I decided to finish the preamplifier I started building to use with my new amplifier. The requirements are that it affects the audio signal as little as possible, has three inputs and two of the inputs have remote controlled volume. This is because I opted for it a "Keep It Simple Stupid" approach to building the amplifier and it just has a regular volume knob and a single stereo input. That makes it hard to adjust the volume to be just right for listening on the couch. Besides which, what am I, an olympic athlete? I can't get up off the couch every 10 minutes to change the volume
Burr Brown make a nice volume control IC (which is what Silicon Chip used in their remote control preamplifier) but they're hard to get in Australia. I'll order some next time I order from overseas but that's expensive. So I decided to use some of the LM1972 ICs I already had. They're not quite as good, but pretty good really. That plus two OPA2227 low noise/low distortion stereo amplifiers, two latching relays, the infrared receiver and an Atmel Tiny2313 microcontroller are all the active components that go into the preamp. Most of the other components are power supply - it has 5 power supplies - +5V, +15V, -15V, +6V and -6V, to suit the various ICs.
So, I built it, but that's only half the work. I then had to program the microcontroller and test it. So, I started off making the microcontroller colour cycle the status LED (it looked pretty!) then ported over my infrared receiver software and tested that. It works very nicely. Then I added support for switching the relays (to select inputs) and adjusting the volume via remote control.
This is where I started to have a bit of a headache. There was no sound from one of the output channels. I thought it was probably a short circuit in the output and I was right - there was a tiny solder bridge between two pins of the surface mount LM1972 which was hard to see except from a certain angle. I re-heated that a couple of times and eventually managed to melt it off.
So now I had sound in both channels, only one channel (the one that I had just fixed) was too quiet, and had a nastly clicking noise every time I changed the volume. I thought I might have broken the (expensive) LM1972 with the short circuit - although that seemed unlikely since that pin is not actively driven. So I replaced that, with some difficulty, as it's necessary to heat the carrier it's mounted on to about 200 degrees celcius to get the solder on all 20 legs to melt so that it can come free, and then I had to clean up all the blobs of solder it left behind before installing a new one.
Well, that didn't fix it. The good news is that means I didn't break any of the chips. The bad news was I didn't know what the problem was. I spent hours trying to work it out - looking for shorts, isolating the inputs and outputs.
Well it turns out the main problem was I'm an idiot. When doing the initial LED colour cycling tests with the microcontroller I had taken a shortcut with the way I changed the colour, thinking "oh I'll just do it this way to test and fix it up later". Well, I had forgotten to fix it, and since the LED was on the same output port as the communications with the LM1972 that meant every time the LED status changed, it accidentally commanded the volume control to set the volume on one of the channels. Since this meant every time I changed volume it was actually changing twice, that was the reason for the clicking. Also because it was initiating the communications before it was supposed to, that made the volume control deliver half the proper volume for that channel, hence the disparity.
By this time it was about 3am but at least I'd worked out what the problem was! I fixed up the dodgy code, finished off the board and case, and put the whole thing together. Actually it was about 4am before I was finished since I also spent a while trying to work out why there was a signicant DC offset in the input of the LM1972 despite the fact I had AC coupled it. According to the data sheet, its input current is so low that it should not generate a significant DC compnent but it was. I solved this by using the second OPA2227 amplifier as an input buffer, since its input current IS very low and its output impedence is low too. Checking with an oscilloscope confirmed that after this, DC offset was basically unmeasurable, and that minimises any clicks heard while changing volume due to DC attenuation. Yay!
Well I have to say I'm pleased with the result. I'm listening to The Eagles "Hotel California" DVD Audio disc now, played through the preamp. It sounds great and now I don't have to get my lazy ass up off the couch. In addition I can hook some other sound sources up to it and switch it remotely, for example I can watch a movie and play the sound for the left and right channels through the new amplifier while the other channels are driven directly by the receiver. Yay!
Plus it look cool in a minimalist way. It's just a black plastic box with a single red/green/blue LED on the front. I like minimalism in electronics (probably because I grew up in the 80s, age of every amplifier having a million knobs, sliders, buttons and lights).
So anyway that's the story of how I stayed up most of last night trying to fix the *(!#&@$ preamplifier because of my idiocy, but it all worked out alright.
P.S. if you are curious about the parts I used here is some information:
[link]
[link]
[link]
[link]









--
Chutkat
"The Legend of the Possesed hand"
Chutkat's soul for sale
[link]
--
I love you =Julijaaa, my princess
#SydneySyders Admin
#devBUG Debugger
#F-City Cityfolk
#designerscouch Apprentices
--
There are no victories in all our histories without love
--
There are no victories in all our histories without love
--
Lisa Sweet
Prints Customer Service
~shop | FAQ | HELP
--
♥ for the animals ♥ [link]
--
"I am the voice of the Knight Industries Two Thousand's microprocessor.
KITT for easy reference or Kitt if you prefer..."
Me too I think it was one of the era's most memorable images. Thanks for Faving
--
Joe Roberts [link]
thanks for the Favs!
Have a good one
--
"We must never forget that art is not a form of propaganda; it is a form of truth." -- John F. Kennedy --
Ever seen a midget fight a elephant? [link]
Pedestrian-zone [link]
There may well be others that are good but I'm pretty busy, and have hundreds of devwatches to go through...
Anyway good work!
Whats been happening of late good sir?
--
I'm trying to keep up with messages and deviations but there are a lot.
I await to hear about your trip in the form of a journal or something along those lines when you get back.
Be well!
--
You've been pretty quite on here!
--
My cliché signature:
My cliché gallery link | My cliché portfolio link | My cliché website link
I decided I was totally sick of Windows a few years ago, and didn't want to pay a lot to get an Apple computer so I just switched to Linux. I'm pretty happy I did. So are several of my friends (although some of them use FreeBSD for some reason...)
I personally keep switching between Fedora and Ubuntu.
--
FAQ #39: How to get more pageviews?
#hangintherebaby whore.
Previous Page12345...Next Page