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.
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:
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.
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.
Not bad for the first try |
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.
No comments:
Post a Comment