New Posts New Posts RSS Feed - Design a circuit to use any device's sound output
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Welcome to the Graham Slee Audio Products Owners Club


Open to all owners plus those contemplating the purchase of a Graham Slee audio product wishing to use our loaner program: join here
Subscribe to our newsletter here (Rules on posting can be found here)

Design a circuit to use any device's sound output

 Post Reply Post Reply
vivitern View Drop Down
New Member
New Member

Joined: 31 Oct 2017
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote vivitern Quote  Post ReplyReply Direct Link To This Post Topic: Design a circuit to use any device's sound output
    Posted: 20 Nov 2017 at 7:56am
I am a beginner in electronics. I got myself a second-hand analog oscilloscope but I don't have a function generator. So, as a first project, I am trying to design a circuit to use any device's sound output (PC, mobile phone, etc.) to generate simple sine waves. This will allow me to start learning about designing and how to use an analog oscilloscope.

I have been reading about op-amps in the Art of Electronics and on various websites, so I have based my design around op-amps. I'm specifying a SA5230 Op Amp from ON Semiconductor ( I would like to have some input about my design, if it has any glaring shortcomings and things that I have missed as a beginner. Also, I am not sure how to choose values for R and C. Here is my design, please keep in mind it is my first ever experience in electronics & circuit design.

First, I have done some research about the signals that a typical sound card outputs, and it seems like it has no DC offset and is centered about 0V. Since I will be powering my circuit with the USB port's +5V referenced to ground, I will need to provide a DC offset to the signal.

The first part of my circuit is meant to supply this DC offset. I will be using an op-amp in the voltage follower configuration driven by a voltage divider.
CircuitLab Schematic mh8t9p CircuitLab Schematic g482g5

1.I could have used the output of the voltage divider R1 // R2 as my DC bias out, without using the first op-amp OA1. However, according to my understanding, due to the op-amp's huge input impedance, it serves as a buffer between my computer's sound card and the circuitry I will be driving with the signal, which is a desirable feature. On the other hand, I could've connected the output of the voltage divider R1 // R2 directly to the DC offset input of the second circuit which is also using an op-amp. If I do that, I still retain that huge input impedance and the buffering protection. Therefore I am thinking that the first op-amp OA1 is not really needed, and that I could have done the same thing with only one op-amp.
2.In the first circuit, how do I determine R1 and R2? Let's say I want +2.5V at the output of the divider, then I have to choose R1 equal to R2. If I choose values too low, lots of current will be wasted through the resistors, but if I choose too high, loading effects will start to be noticeable. I have chosen R1 = R2 = 100K.
3.C1 is a bypassing capacitor that shorts AC noise to ground, am I correct? How would I choose its value? I have seen on the internet that a bypass capacitor is also inserted at the output of op-amps that provide DC bias (C2). Is it really needed? Why would it be needed if the AC noise has already been shorted to ground at the input? What capacitance value should I set it to?
4..Could I use a potentiometer as my voltage divider? This would allow me to vary the DC offset with a knob. However, it could short out my USB rail to ground when I turn the knob all the way.
5.C3 is a capacitor that is used to block any DC in the incoming signal. How do I choose its value?
6.How can I be sure that R3 won't load my input signal?
7.R4 and R5 determine the gain of the amplifier (gain = 1+R2/R1). For a given gain, how do I determine R2 and R1? What is the tradeoff between bigger resistances and lower resistances? For example, if I want a gain of 2, R2 must be equal to R1, but what are the constraints and considerations to chose the values of these resistances?
8.Can I use a potentiometer instead of R4 and R5 to make the gain adjustable with a knob? If I do so, is there anything I should take into account?
9.C4 is there to make the gain at DC = 1 (roll off the gain at DC). How do I set its value?
10.Am I missing anything?
Thank you very much for your help. Any comments and feedback will be welcomed.
Back to Top
Graham Slee View Drop Down
Admin Group
Admin Group
Telling it as it is

Joined: 11 Jan 2008
Location: South Yorkshire
Status: Offline
Points: 9264
Post Options Post Options   Thanks (0) Thanks(0)   Quote Graham Slee Quote  Post ReplyReply Direct Link To This Post Posted: 20 Nov 2017 at 11:11am
First things first and I will be moving this topic to the DIY section eventually.

Welcome to our owner's club forum. I am happy to answer your questions as and when I am able to find the time. I trust you will be patient enough with me?

I also think you are in need of a little primer work. Try this resource:

It might be heavy going for you, but give it a few reads. You will also notice a formula you need to familiarise yourself with: f = 1/2pi.R.C; which you can use to find the values required for your input and gain turnover frequencies. It is easy to manipulate the formula to make R or C the subject. You just need some starting values which I can help you with.

I will email you the link to where future posts on this topic will be.

Not simple enough for Google-Bot to understand...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.01
Copyright ©2001-2018 Web Wiz Ltd.

This page was generated in 0.063 seconds.