Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

best way to connect breadboard oscillators into Line-In without clipping or noise?

Status
Not open for further replies.

dentaku

New Member
I see examples of oscillators and astable multi vibrators online and they're all capable of generating sound because... they oscillate obviously.
What I haven't been able to find is advice on how to best connect a breadboard oscillator (whether from a 555 or an opamp) to the Line-In of a computer safely and without clipping.

I've plugged the output of Pin 3 of a 555 running of 4 AA batteries into the Line-In of my old computer and I had to turn that input down to 1 (as low as it goes) to have it not clip.

Is it as simple as just adding a resistor or a pot to the signal going into center pin or ring of the 3.5mm connector?
I have a nice stereo 3.5mm TRS jack I unsoldered from something that plugs perfectly into a breadboard so that's handy.

Now that I've messed with the 555 a bit to make sounds I'd love to make a VCO with an LM324 or LM358 but I want to make sure I've got a good audio output to run them into a computer.
 
If it's a Line-In input you're feeding the signal into, then you should be aiming for a level of < 0.894Vpp, ref https://en.wikipedia.org/wiki/Line_level#Nominal_levels

You can use a resistor divider to reduce the output of your oscillator to the appropriate level. AC-coupling is likely not required as this should already be on the sound card.
 
dougy

Thank you for that link, I learned something there.

JimB
 
Now that I think of it, couldn't I use a potentiometer instead of resistors so I could dial it in to the right level easier?
As you can see, I'm truly a beginner to building this kind of stuff. :) I know how to program synths because I've been doing it for years but I'm just learning how to build even the most basic type of sound making devices, learning little bits of basic knowledge about electricity etc. along the way.

If it's a Line-In input you're feeding the signal into, then you should be aiming for a level of < 0.894Vpp, ref https://en.wikipedia.org/wiki/Line_level#Nominal_levels

You can use a resistor divider to reduce the output of your oscillator to the appropriate level. AC-coupling is likely not required as this should already be on the sound card.
 
A 10k linear pot on the output of the oscillator to ground is common, and works pretty well. The wiper of the pot goes to the sound card input (or amplifier input).

Most amplifier inputs and sound card inputs are capacitor coupled inside, so you don't usually need a series capacitor on the output from the pot wiper.
 
Every time I have tried to use the Line IN on my soundcard to input something originating from a piece of grounded equipment, I've had hum due to a ground-loop between the computer chassis and the external equipment. I've used an audio isolation transformer (sometimes called a "ground-loop isolator") to break the ground loop.
 
The output pin 3 of a 555 oscillator is already clipped because it is a squarewave. The output of the 555 swings as high as it can (1.3V less than its supply voltage) and it swings as low as it can (about 0.01V).
 
That's pretty useful information. I'll try that.
It just happens that I have a 10K linear pot taped to the metal plate my breadboard is mounted to. I salvaged it from my old Corolla radio and it comes in handy allot.

A 10k linear pot on the output of the oscillator to ground is common, and works pretty well. The wiper of the pot goes to the sound card input (or amplifier input).

Most amplifier inputs and sound card inputs are capacitor coupled inside, so you don't usually need a series capacitor on the output from the pot wiper.
 
A volume control is usually logarithmic, not linear because our sensitivity to loudness is logarithmic.
If you turn down a linear pot to half then the loudness decreases only a little.
 
Yeah. I've got some of those too (A taper pots) but I like linear ones better for most things because they're just easier to predict what they're going to do when messing around with breadboard projects.
I built a PWM LED dimmer last night and the 10K linear pot was perfect for that project.

A volume control is usually logarithmic, not linear because our sensitivity to loudness is logarithmic.
If you turn down a linear pot to half then the loudness decreases only a little.
 
A volume control is usually logarithmic, not linear because our sensitivity to loudness is logarithmic.
If you turn down a linear pot to half then the loudness decreases only a little.

Agreed, but this is not about "perceived loudness" as such A.G.

I prefer a linear pot as the output level control on a signal generator or audio device, to set the p/p amplitude. In the case of the OP's requirements it's not really about setting a nice listening level with the pot, but about setting an output amplitude that gives good amplitude for the soundcard ADC but below clipping.
 
I hooked up my 10K pot to the output of the 555 and it worked out well.
I was able to set the output to a level that doesn't clip with pin 3 of the 555 going through the pot then to ground and the wiper connected to the tip of the 3.5mm jack.
Here's what my 555 PWM led dimmer sounds like with a tiny 104 capacitor in it which makes the frequency high enough that the blinking is imperceptible.
https://skydrive.live.com/redir?resid=125168F388F05A3B!1211&authkey=!AGNDqWxNdyRs4ck

A 10k linear pot on the output of the oscillator to ground is common, and works pretty well. The wiper of the pot goes to the sound card input (or amplifier input).

Most amplifier inputs and sound card inputs are capacitor coupled inside, so you don't usually need a series capacitor on the output from the pot wiper.
 
I do not know why you talk about clipping (clipping occurs with an audio or video signal) when the output of your 555 is PWM rectangular waves that are already clipped by the switching output of the 555. Do you like to listen to the buzzing of PWM at a low frequency?

The BD136 PNP transistor at the output of the 555 will NEVER turn off because the output voltage of an ordinary 555 does not go to a voltage high enough. You should have used a voltage divider to drive the PNP transistor or an NPN transistor instead.

A "104" capacitor might be tiny but it has a lot of capacitance. It is 0.1uF which is 100nF which is 100,000pF. If the timing capacitor in your 555 circuit is 0.01uF ("103") or 0.001uF ("102") then the frequency will be high enough so it is not heard by anybody but the PWM dimmer will still work.

Do not feed amplified high frequencies into a tweeter. It is extremely fragile and will burn out.
 
I see what you mean since the square wave is already clipped but I guess I just mean that I didn't want it to make my audio level meters go into red so just adding a pot to control the output worked fine.
I was using this particular circuit to experiment with PWM and just wanted to see what it looked and sounded like using software I already understand (music software and VST plugins).

Like I said, it works fine for dimming LEDs because it's what it was intended for but I was more interested in using it the way I would use a synth for creating interesting sounds.

Oh... and yes, I like the sound of PWM. When programming a synth to sound like old Gary Numan songs and the Polymoog, slow PWM makes everything sound more warbly and late 70's early 80's ish :)

I do not know why you talk about clipping (clipping occurs with an audio or video signal) when the output of your 555 is PWM rectangular waves that are already clipped by the switching output of the 555. Do you like to listen to the buzzing of PWM at a low frequency?

The BD136 PNP transistor at the output of the 555 will NEVER turn off because the output voltage of an ordinary 555 does not go to a voltage high enough. You should have used a voltage divider to drive the PNP transistor or an NPN transistor instead.

A "104" capacitor might be tiny but it has a lot of capacitance. It is 0.1uF which is 100nF which is 100,000pF. If the timing capacitor in your 555 circuit is 0.01uF ("103") or 0.001uF ("102") then the frequency will be high enough so it is not heard by anybody but the PWM dimmer will still work.

Do not feed amplified high frequencies into a tweeter. It is extremely fragile and will burn out.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top