Showing posts with label TAS5548. Show all posts
Showing posts with label TAS5548. Show all posts

Saturday, December 20, 2014

Got it together but not for a while

Finally we settled in our new house. Can't say I'm done with our new IKEA kitchen but it is usable now. So it's time to have some hobby fun and play with my amp and speakers.

Finally I put all six channels together with BeagleBone Black and two switching power supplies - one for power amp and one for the BBB. Also I got very sexy VFD display from eBay for a very good price so I'd like it to show some useful information very soon.

Standard Debian seems to be a good choice but I found two problems with it (updates a pretty frequent so the latest one may work better):
1. it can't find my USBStreamer if it was reconnected
2. MPD playback has noticeable drops.
Then I found a great distribution - Voyage MPD. It is outdated but it doesn't have these two problems I mentioned above. But this distribution would not work for folks who want to use HDMI output - HDMI itself works but HDMI audio output is not available.

So I mounted my NAS, set it all up and finally got my music played without drops and pops!

But my happiness did not last for long. I wanted more. So I tried to put some coefficients into loudness biquad... And got my tweeters fried in a faction of a second. As well as one TAS5631B chip.  Woofers and midranges survived.
So I got a very good lesson - always disconnect speakers when you play with biquads! And use a scope first!

Wednesday, February 12, 2014

TAS5548 PWM Modulator board

I started with PWM modulator. What is the reason of soldering the whole amplifier board if PWM doesn't work?
And even more, my setup requires only one PWM modulator board and I have ten available. Plus 5548 has its pins on two sides only which probably can make the soldering a little bit easier.

Well, it was not that scary,
I'm not a soldering guru and I was scared about SMD components, especially chips with 0.5 and 0.6 mm pitch. But it turned out to be not such a big deal. Thanks to Steve from EEVBlog for his video tips on how to solder smd chips.
TAS5548
Not bad for the first try
The only thing I really struggled with is crystal oscillator. It has its pads underneath and I couldn't place it well. But it works and I don't want to re-solder it.

Here is my test setup:
BeagleBone Black + MiniDSP USB Streamer + my PWM modulator:
It is a whole different story how to setup BBB...
Adafruit has python libraries to drive I2C bus so here my first python program ever:
import Adafruit_BBIO.GPIO as GPIO
import Adafruit_BBIO.PWM as PWM
from Adafruit_I2C import Adafruit_I2C
 
def i2cPrint32(x): 
 bytes = i2c.readList(x, 4)
 print "%X %X %X %X" % (bytes[0],bytes[1],bytes[2],bytes[3])

i2c = Adafruit_I2C(0x1A) # see notes about I2C address below

print "5548: 0x%x = %X" % (0x01, i2c.readU8(0x01))

### UnMute
print "============="
print "CTRL:"
ctrl = i2c.readU8(0x03)
ctrl = ctrl & ~0x10
print hex(ctrl)
i2c.write8(0x03, ctrl)


### VOLUME ###
print "Master Volume:"
volume = [0,0,0,0xAF]
x = 0xD9
i2c.writeList(x, volume)
bytes = i2c.readList(x, 4)
print "%X %X" % (bytes[2], bytes[3])
it umutes the modulator and sets some non-zero volume.
And here is the output:
5548: 0x1 = 4
=============
CTRL:
0xa0
Master Volume:
0 AF

After unmute I can see 50/50 PWM duty cycle:
And when input signal is applied:
So looks like it works. On first try!

But there was a caveat with 5548 I2C addresses. My BeagleBone didn't want to work with 5548 chip at the address from its datasheet - 0x34/0x36 (depending on jumper). Luckily Linux has a command to scan I2C buses so my device was found in a couple of minutes (googling):
root@arm:~/py# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 
I put this address 0x1A into my python script and voila!

So it's time to build an amplifier board.