Go Back   Home > Forums > Blogs > googlyone

Rate this Entry

Did I REALLY do that?

Posted 12th March 2017 at 04:49 PM by googlyone

in my electronics workshop I have always had a stereo. Eight years ago I looked on the shelf and decided there was all the makings of an integrated preamp - DSP - Crossover and four power amplifiers.

That is the price of always making an extra board or two when I build a "thing" - you end up with a massive collection of bits.

I duly shoe-horned this lot into a case that is about 3" high. Tuned it up and didn't think a lot more.

Fast forward 8 years to two weeks ago, and there I was listening to the radio while wondering what to build next, and I thought the left tweeter sounded a bit low.

I swapped input to the amp L-R, and yep, it was. Odd - as the DSP treats L and R exactly the same, there is no balance control in there. So I swapped the speakers. Hmm, it wasn't the tweeter. It was inside the "box".

So I popped the lid, and found this...

Click image for larger version

Name:	DSP_XO_AMP.jpg
Views:	311
Size:	1.05 MB
ID:	2322

Damn! Did I really do this? What was I thinking! I sat staring at the stuff all squeezed together wondering where to start...

On the left is a power supply - using a heap of 2200uF caps. Wow, given this thing generally runs at about 100mw, I suppose there won't be much ripple!

In the very front are two (yes two) micro controllers and two dials and two 16*2 LCD user interfaces. Yes, it started coming back - I just wanted to turf the bits in the box, and couldn't be bothered rewriting the software on the DSP controller to drive the PGA4311. So there are two interfaces. hmmm.

In the middle is the DSP. This includes a CODEC DSP and everything to make a crossover, to the right of this is it's power supply - I recalled that putting this lot all together in the box and wiring it al to a single power supply was a recipe for disaster with ground noise. So the separate PSU was shoe horned in.

At the middle back are four 25 Watt amplifiers - each about the size of a credit card, and back left are two four channel volume controls. The reason there are two of these is that there is a Subwoofer output - which needs to be controlled with the mains.

It turned out the issue was that when I threw the software onto the micro for the volume control, I was recycling code and not thinking too hard. I set the number of channels to "3" which is correct, but didn't test the effect of this on the PGA4311.

There was a bug in the code and not using all four channels of the PGA meant that the volume offsets I was programming in for the tweeters were all stuffed up.

After 8 years I didnt have the development environment, any design notes other than the CAD files and software source.

I pulled out the source code and quickly realised where the problem was. Then I went to compile it. Hmmm What chip was that again? A PIC18F4520. The last time I used one of those was 8 years ago! Since then I have had at least 2 computers, and PIC have changed the IDE. Grrrrrr.

So two weeks later I have downloaded a new compiler, set up the project in MPLAB-X, worked out how to set all the confg bits for the PIC18F, built and tested the code... Oh and changed a "3" to a "4" in the config file.

Lesson to self - check your software!
Second lesson to self - document stuff better!
Posted in Uncategorized
Views 459 Comments 0
Total Comments 0



New To Site? Need Help?
Copyright 1999-2017 diyAudio