Homebrew Sound E-Block.

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time

Homebrew Sound E-Block.

Post by KeithSloan »

I am considering designing / building a Homebrew E-Block for sound.

On the Input side
I found http://microcontrollershop.com/product_ ... cts_id=820 which is a board that has Microphone -> Pre-amplifier -> PIC ADC, but I have not be able to find any circuit diagrams for such things. Anybody got any pointers.

On the Output side
I found http://img.maly.cz/piczvonek.png and http://prog.ic.googlepages.com/PIC32-LM386-AudioAmp.GIF

Anybody know any other resources on the web that might be useful?

Many Thanks
Keith

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Homebrew Sound E-Block.

Post by Benj »

Hello Keith

I have experience with this 2W audio driver from Rapid

Rapid - 82-2154
http://www.rapidonline.com/Electronic-C ... -ICs/67347
http://www.rapidonline.com/netalogue/specs/82-2154.pdf

On page 2 of the datasheet is a schematic for a BTL configuration. This is essentially mixing the stereo audio channels into a mono boosted push pull audio channel. The input can also be driven via PWM, I have written an article in the knowledge exchange section of our forums on streaming a song from a SD memory card using this device. There is also another schematic of the audio driver circuitry.

http://www.matrixmultimedia.com/mmforum ... =26&t=4850

Audio in is not something i've ever covered in great detail maybe someone else would be able to help here.

KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time

Re: Homebrew Sound E-Block.

Post by KeithSloan »

Thanks Ben.

I now feel comfortable on possibilities for the Sound Output.

Its the input I could do with some more pointers/ inspiration. I have now found that the micro controller detailed at http://microcontrollershop.com/product_ ... cts_id=820 does have a circuit diagram in the downloadable user guide. But it uses a high Vcc strapped by a zener-diode to 6.2v and I would prefer to create an E-Block that just used the standard 5v supply. I also don't have enough confidence to know if and how it could be adapted to a 5v supply.

Keith

KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time

Re: Homebrew Sound E-Block.

Post by KeithSloan »

Looking at the circuit diagram in viewtopic.php?f=26&t=4850 I see that it initially uses a 330R resistor and a 100nF capacitor as a low pass filter. I calculate that 1/2(pi)RC gives about 4.8Khz as a cut off frequency. Which makes me wonder how good a sound can be created with PWM compared to using say 8 pins of a port via a resistor ladder to create an analogue signal Anybody able to comment on the merits of the two approaches, apart from the fact that PWM only uses one port, compared to probably 8.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Homebrew Sound E-Block.

Post by Benj »

Hello

I tried out the R2R ladder approach when designing the audio circuitry and found it to be a little noisy. This could have been due to all the long resistor legs as I was using in a solderless breadboard. The audio booster circuit shown in the topic makes for a much cleaner signal. PWM sound really is quite good and is used by most modern MP3 player etc.

KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time

Re: Homebrew Sound E-Block.

Post by KeithSloan »

Ben

That's interesting, but confusing as I have since come across this document
http://www.microchip.com/stellent/idcpl ... e=en011071
Which comes out in favour of R-2R ladder, rather than PWM.

When you tried the R-2R ladder did you also have a low pass filter? What sort of cut off frequency was it?

Back to your PWM circuit, do you have any comments about the resistor & capacity values in your circuit,
I calculate the low pass filter of just under 5KHz.
This seems low to me, after all I thought speech was up to 12K and music up to 20K. Did I goof the calculation?

Keith

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times

Re: Homebrew Sound E-Block.

Post by Sean »

Reasonable quality (telephone standard) speech can be reproduced with a bandwith as low as 3.5KHz. The circuit Ben supplied with the 5KHz, low roll-off filter is capable of reproducing speech and music to an acceptable quality (A.M. radio quality, not Hi-Fi).
Equally important are the microphones and loudspeaker quality, digital sample rate and resolution.

At low to moderate quality and bandwidth there is not much to choose between the R-2R DAC and the PWM output. The first requires more components and port pins, the second requires a good filter. At higher quality and higher audio frequencies the R-2R DAC is probably the best option (an R-2R DAC IC would be even better).

Post Reply