Go Down

Topic: Audio Amplifier (Read 1 time) previous topic - next topic

Nooffswitch

I'm working on something using the WT588D-16p voice chip seen here.



The chip info states the PWM output can directly drive 0.5W/8Ω speakers, push-pull current abundant.

I have uploaded 2 audio 22000Hz mono wav files into the chip, and connected it a .5W/8Ω speaker and hooked it all up on a breadboard with a button to play the audio. Everything works fine and the audio plays, but I need it to be louder. Here's what I don't understand, I have two LM386 Modules laying around like this:



I connected the two PWN pins from the sound chip to the LM386 and 9Volts for power. When the volume knob on the LM386 is at it's lowest the audio plays, but is very quiet. If I turn the knob a bit higher the audio gets distorted/noisy/inaudible.

Any idea why that is happening? I tried different speakers and voltages for the LM386 and it doesn't make any difference. Is there something I'm missing here?

Grumpy_Mike

Quote
Any idea why that is happening?
I would suggest that it is clipping.
Paying attention to the speaker and it's mounting will probably be the best way to get more volume. Otherwise use another amplifier.

Nooffswitch

Thanks, I just bought a few different amplifiers and will test them when they arrive.

MarkT

The chip has class-D output and cannot therefore be amplified by an analog amplifier.  The
datasheet doesn't say what the PWM frequency is, but that it can handle +/- 200mA.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Nooffswitch

Does that mean I need a class-D amplifier? Will that work on the PWM pins or will I need to use the DAC pin?

Grumpy_Mike

Quote
Will that work on the PWM pins or will I need to use the DAC pin?
Their is no DAC pin on anything but the Due or Zero.

Quote
Does that mean I need a class-D amplifier?
Only if you do not have a restoration filter between the PWM and the audio input.

MarkT

#6
May 25, 2017, 10:25 am Last Edit: May 25, 2017, 10:27 am by MarkT
Does that mean I need a class-D amplifier? Will that work on the PWM pins or will I need to use the DAC pin?
I suspect you don't understand what class D is.  Standard class D amplifers are analog in, class D out.  You
have class D already, so you merely need to boost the voltage and current of the signal which is purely
digital/binary which a switching device or devices.  This might be done with a fast H-bridge for instance.

At high power the output should really be low-pass filtered with LC filter to reduce the EMI from the speaker
leads...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Nooffswitch

Yeah I know next to nothing about audio so I'm trying to figure it out. When I asked about connecting the PWM or DAC, I meant from the audio chip to the amplifier not from the arduino based on a schematic I found where someone connected the WT588D to a LM386 circuit using the DAC pin from the WT588D.


Would it make more sense to go from digital to analog like this or use an h-bridge as mentioned by MarkT? As long as the sound isn't garbled I'm not worried about it being perfect quality.

Is there a recommended circuit board I can buy that does what I need like the L298N or something?

Grumpy_Mike

Quote
Would it make more sense to go from digital to analog like this or use an h-bridge as mentioned by MarkT?
No MarkT was, along with me, under the impression you had a digital output.

The simplest system is to have a "computer" speaker that is available everywhere.

Nooffswitch

So any computer speaker with an adapter would work if I just connect the audio GND to the PWM- and the audio signal to the PWM+? Since my audio file is mono I only need one speaker. If that's all I need that's good news. Thanks guys.

Grumpy_Mike

Quote
So any computer speaker with an adapter would work if I just connect the audio GND to the PWM- and the audio signal to the PWM+?
No connect the amplifier to the DAC pin, through a 4u7F capacitor, like in the diagram. Also keep C6 and R6.

You caused confusion with not being clear about what sort of output you had, the diagram in #7 should have been in the original post. We all found the photograph in that post less than helpful.

Nooffswitch

#11
May 26, 2017, 12:10 am Last Edit: May 26, 2017, 12:17 am by Nooffswitch
Ok, I tried that and it's not working, still get garbled audio when turning up the volume pot on the LM386. Here's some pics of my setup, maybe someone can see what's wrong. I added a 0.1uF ceramic capacitor, 510 resistor, and 4.7uF capacitor before connecting to the DIN on the LM386.





Edit: Oh and the battery pack connections came out while I was taking the photos so ignore that...

Grumpy_Mike

I thought we said use a computer speaker, not the LM386?

Nooffswitch

Ohhh... I'll see if I can find some old computer speakers when I get home tonight.

Nooffswitch

I hooked up the speakers (usb powered) and it's working. If I crank up the sound all the way it's a good volume, but there's still some static while the audio file is playing, and a pop at the end from the speaker.

It doesn't seem to make any difference if I connect the mono cable into the DAC/GND directly on the WT588D or use the resistor/capacitors mentioned earlier in the circuit, since both sound exactly the same. I should mention the static is there regardless how low/high the volume knob gets turned.

Any suggestions for cleaning up the static?

Go Up