Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Analog sound to PWM sound converter

Status
Not open for further replies.

boylesg

Advanced Member level 4
Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
This circuit works OK on my bread board with the sound from a tablet being output to speaker.

The 20R speaker is in the same place as the 20R resistor.

The audio output from the tablet is in place of the function generator. pwm.jpg

But are there any suggested improvements that I might try?
 

Actually that is a very crude class D power amplifier and if you get the switching frequency up above 40K or so will NOT sound at all like a buzzer.
It has its problems, DC in the speaker coil for one, but as a learning toy it is better then some I hace seen.

A Much better design is possible (Google for the phrases 'Half bridge', 'class D').

Regards, Dan.
 

The output of a 555 sounds like a buzzer. Is that what you want?

Must have a wrong component value in the circuit because the I reduced the capacitor values until I could not hear any buzzes or tones.

When I plug my tablet in all I hear is the radio audio.
 

It will work, subject to the limitations Dan has already mentioned, and the 'buzz' can be shifted out of audible range by speeding up the oscillator but it isn't really a good PWM generator as the control input on the second 555 has limited range and linearity. I suggest using a dual op-amp instead, one half generating a triangle wave and the other working as a comparator against the incoming audio. It should give far better results and probably in fewer components. You might need a little more current gain at the output so the op-amp can drive the power transistor.

With a further inverter stage (using a quad op-amp maybe) you can easily make a bridge output stage which gives four times the output power and removes the residual DC from the loudspeaker.

Brian.
 

It will work, subject to the limitations Dan has already mentioned, and the 'buzz' can be shifted out of audible range by speeding up the oscillator but it isn't really a good PWM generator as the control input on the second 555 has limited range and linearity. I suggest using a dual op-amp instead, one half generating a triangle wave and the other working as a comparator against the incoming audio. It should give far better results and probably in fewer components. You might need a little more current gain at the output so the op-amp can drive the power transistor.

With a further inverter stage (using a quad op-amp maybe) you can easily make a bridge output stage which gives four times the output power and removes the residual DC from the loudspeaker.

Brian.
Can you point me in the direction of an example circuit?

I might add that this is ultimately meant for a tesla coil interrupter rather than any sort of high quality amplifier.

But the opamp idea sounds interesting so I will give it a go.
 

There is an excellent description here: www.ti.com/lit/ug/slau508/slau508.pdf
It is obviously promoting TI components but the principle is the same if you use alternative devices.

To make it a bridge circuit you need to drive both ends of the loudspeaker with opposite polarity PWM signal (one side inverted) so you get twice the voltage and hence four times the power. Ideally you add filtering to remove the PWM switching freqency and only leave the 'average' of the waveform behind but for experimental purposes you could rely on the loudspeaker being completely unresponsive at high frequencies (use > 50KHz).

Brian.
 

There is an excellent description here: www.ti.com/lit/ug/slau508/slau508.pdf
It is obviously promoting TI components but the principle is the same if you use alternative devices.

To make it a bridge circuit you need to drive both ends of the loudspeaker with opposite polarity PWM signal (one side inverted) so you get twice the voltage and hence four times the power. Ideally you add filtering to remove the PWM switching freqency and only leave the 'average' of the waveform behind but for experimental purposes you could rely on the loudspeaker being completely unresponsive at high frequencies (use > 50KHz).

Brian.
Thanks Brian. I think I just might have a fiddle with this just for the satisfaction but I will still probably implement the circuit with 555s because I have a heap of them.

With a sound ultimately coming out of a HV arc I am doubting that there would be any noticeable improvement in sound quality anyway if I used the opamp circuit.
 

Have you ever heard the horrible distortion and hissing from a "plasma tweeter"?
Is it for Halloween? Don't zap anybody.
 

There is an excellent description here: www.ti.com/lit/ug/slau508/slau508.pdf
It is obviously promoting TI components but the principle is the same if you use alternative devices.

To make it a bridge circuit you need to drive both ends of the loudspeaker with opposite polarity PWM signal (one side inverted) so you get twice the voltage and hence four times the power. Ideally you add filtering to remove the PWM switching freqency and only leave the 'average' of the waveform behind but for experimental purposes you could rely on the loudspeaker being completely unresponsive at high frequencies (use > 50KHz).

Brian.
Brian I can see they have given a calculated example of this circuit but I can't see where they have specified what the supply voltage should be for their calculated component values.

Any idea what it should be?
 

Brian I can see they have given a calculated example of this circuit but I can't see where they have specified what the supply voltage should be for their calculated component values.

They did, just read the application note thoroughly.

It's b.t.w. using 5V OPs and comparators, so the supply voltage must not exceed 5.5 V.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top