Digital Sound to Analog Sound

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Hi

Is it possible to to convert digital sound for example police siren generated using 555, to a real analog sound? If yes, how?
 

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Hook the output to a speaker.
:D Perhaps, I didn't put my question clearly.

Of course, it is understood that the sound (digital) coming out from the 555 siren circuit could be heard using speaker. But, the quality of that sound is not smooth.
 

crutschow

Joined Mar 14, 2008
38,321
It's not smooth because it's a square-wave but that doesn't mean it's not a "real analog sound" when run through a speaker.
You could run it through a high-order low-pass filter to remove the harmonics that generate the harsh sound, leaving only the fundamental sine wave.
 

wmodavis

Joined Oct 23, 2010
739
Clarity and precision are foundational especially when discussing technical subjects but that should not prevent them from being highly important of all communications.
 

Sinus23

Joined Sep 7, 2013
250
This is from talking electronics.com. It produces more of a triangle wave than a sine wave. But at least it is smoother than a square wave.

 

crutschow

Joined Mar 14, 2008
38,321
Below is the simulation of a 1kHz squarewave into a 3-pole 1kHz low-pass active filter.
The filter removes most of the squarewave high frequency components, leaving the fundamental sinewave with reasonably low distortion V(out).

For comparison the output is also shown from a 1-pole passive 1kHz RC LP filter V(out2). As you can see it looks more like a rolled off squarewave rather than a sinewave.

Note that the filter is basically for a single frequency and the output amplitude will be reduced as the squarewave frequency is increased.
If the frequency is reduced the distortion will increase.

If you don't mind some distortion in the output then you can use a simpler filter.

Here is the website I used to generate the filter component values.

Filter.GIF
 
Last edited:

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Below is the simulation of a 1kHz squarewave into a 3-pole 1kHz low-pass active filter.
The filter removes most of the squarewave high frequency components, leaving the fundamental sinewave with reasonably low distortion V(out).

For comparison the output is also shown from a 1-pole passive 1kHz RC LP filter V(out2). As you can see it looks more like a rolled off squarewave rather than a sinewave.

Note that the filter is basically for a single frequency and the output amplitude will be reduced as the squarewave frequency is increased.
If the frequency is reduced the distortion will increase.

If you don't mind some distortion in the output then you can use a simpler filter.

Here is the website I used to generate the filter component values.

View attachment 79717
Thanks for your input.

Okay, now for example if there are two tones with different frequencies to be mixed; do they need two separate low-pass filters before mixing or only one after mixing?

Please see this schematic. Did I understood the subject correctly?

Screenshot 2015-02-01 16.06.23.png
 
Last edited:

crutschow

Joined Mar 14, 2008
38,321
Yes, you would need a separate filter for each frequency you generate with the filter corner frequency equal to the square-wave frequency.

Edit: If you need a sinewave then generating the sinewave directly, as bertus suggested, might be a better choice.
 
Last edited:

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Yes, you would need a separate filter for each frequency you generate with the filter corner frequency equal to the square-wave frequency.

Edit: If you need a sinewave then generating the sinewave directly, as bertus suggested, might be a better choice.
Okay, then which of the techniques mentioned in the link should I start with to have a harmonic-free final signal? And again, do I need to introduce two sine-wave generators for each frequency and then mix them?

Please bear with me, as I already mentioned I am absolutely new to this subject.
 

electrojim

Joined Jun 3, 2009
20
A low-pass filter will certainly modify the harmonic content of a square waveform, but perhaps abuhafss wants to retain a bit of the siren sound, and sirens don't put out sine waves. I'd suggest hooking a 100k pot in series with the output, and a 0.01uF cap on the far side of that. Then he could play with the sound and determine if even more filtering might be desirable.
 

electrojim

Joined Jun 3, 2009
20
I'd go before the OUT-MIX. That's already low-pass filtered by two separate filters. Forget those filters for now. From each of the 555 outputs, connect a 1k resistor to a common point. We'll call that the 'combining' point. Connect that common (combined) output to one end of a 100k pot, and from the wiper, put a 0.01uF cap to ground. Because the 555s give an output between the supply rail and ground, cap-couple from the top of the 0.01uF to your amplifier, or whatever you're feeding. That will remove the DC offset. Now start up your 555s and crank on the pot to see if you can get a sound you like. What this will do is remove the 'edge' from the sound (some of the way-out harmonics), and give you mostly the 3rd and 5th harmonics.

Now if you want to get really fancy, stuff some current into the 555 so that the output is not a symmetrical square wave. Once you destroy the symmetry, you'll have even-order harmonics in there too. Most people feel that even-order harmonics (2nd, 4th, etc.) sound less strident than the odd-order ones. You'll have both, even and odd, in this case, but you might like the sound better.
 
Top