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 input reading using 741 op amp with pic

Status
Not open for further replies.

kobre98

Full Member level 2
Joined
Sep 18, 2011
Messages
145
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
Gaza, Palestine
Activity points
2,523
hi guys,
i'm trying to build a circuit that will take the inverting dc voltage output from the pc speaker out and level shift it then using it as input to pic and send it back serially to pc program,
the idea is to read the voltage signal (audio) and input the reading to pc

i searched and found a lot of articles that talks about using 741 op-amp for this purpose
level shifting and getting analog output that can be used as input to pic microcontroller

does anyone have a circuit schematic that i can use and can do this ?! or at least tell me what specification do i need for resistors and capacitors and how to know the proper values for them before connecting the circuit ?!

regards,
 

Why do you want to use a microcontroller? You could send the audio signal straight back to the PC through the sound-card input.
 

i can't do that since it has limitations
i want to read the output from audio amplifier
the pc out will be out to amplifier and then i will read the amplified signal and compare it to the original one so i can't risk input high voltage to pc since it will destroy my sound card

---------- Post added at 22:40 ---------- Previous post was at 22:40 ----------

i can't do that since it has limitations
i want to read the output from audio amplifier
the pc out will be out to amplifier and then i will read the amplified signal and compare it to the original one so i can't risk input high voltage to pc since it will destroy my sound card
 

It's conceivable you won't need an op amp. A simple resistor network might do the job (per diagram).

Adjust values to yield desired voltage range (trough, peak, swing) at output.

Never permit a lower resistance than, say 1k ohms, between the input and either supply rail.

90_1337131921.gif
 

i can't do that since it has limitations
i want to read the output from audio amplifier
the pc out will be out to amplifier and then i will read the amplified signal and compare it to the original one so i can't risk input high voltage to pc since it will destroy my sound card
You can use a resistive divider to reduce the voltage from your amplifier to a safe level for your soundcard. All you need for this project is two resistors. You don't need a pic microcontroller or a 741.

If you really want to use a microcontroller, then Brad's circuit is good but the resistor on the left should probably be bigger, to reduce the voltage more.
 

Is it possible you are trying to mix the speaker as an input to your sound chip or both so you listen as an output?

Does the audio mixer have disabled inputs including the Speaker?

Perhaps you could try another driver with that feature built in. I think so.

Is this for some other purpose that you can tell us about?
 

It's conceivable you won't need an op amp. A simple resistor network might do the job (per diagram).

Adjust values to yield desired voltage range (trough, peak, swing) at output.

Never permit a lower resistance than, say 1k ohms, between the input and either supply rail.

90_1337131921.gif

what does this circuit basically do ?!
i noticed that it has one input terminal, i have two terminals out of the audio out speaker + and - one if u used one of them i'll lose the rest of the signal !
the 741 amplifier takes the two input terminals and give me one output terminal that i can connect directly to ADC channel in PIC so that i interface it to pc serially ?! isn't that true
i attached an image of inverting mode, is it has anything to do with my project ?!

i'll explain my whole project idea :

i need to send audio signal out of my pc to audio amplifier device and compare the signal out of my pc with the signal out of the audio amplifier
by taking voltage values over a range of time
so i have two audio outs one from pc and one from audio amplifier
i have pc program that will take the data serially or via usb
i have to use pic microcontroller ADC to get voltage values into pc
----
is there any idea in how i can do this i.e how i can read analog voltage value and send them back to pc ?!

---------- Post added at 10:34 ---------- Previous post was at 10:21 ----------

You can use a resistive divider to reduce the voltage from your amplifier to a safe level for your soundcard. All you need for this project is two resistors. You don't need a pic microcontroller or a 741.

If you really want to use a microcontroller, then Brad's circuit is good but the resistor on the left should probably be bigger, to reduce the voltage more.

if i reduce the voltage of the signal won't that add noise and make me lose accuracy ?!
besides i have problems when i try to read from sound care is there any configurations that i should know about to make the reading from the sound card to take data to program possible ?!

---------- Post added at 10:35 ---------- Previous post was at 10:34 ----------

Is it possible you are trying to mix the speaker as an input to your sound chip or both so you listen as an output?

Does the audio mixer have disabled inputs including the Speaker?

Perhaps you could try another driver with that feature built in. I think so.

Is this for some other purpose that you can tell us about?


i'll explain my whole project idea :

i need to send audio signal out of my pc to audio amplifier device and compare the signal out of my pc with the signal out of the audio amplifier
by taking voltage values over a range of time
so i have two audio outs one from pc and one from audio amplifier
i have pc program that will take the data serially or via usb
i have to use pic microcontroller ADC to get voltage values into pc
 

To answer the question strictly, if the speaker is connected in a bridge configuration, a differential amplifier would be needed to get the total signal. An audio transformer is a more easy method.

More generally speaking, I don't expect meaningful results from "comparing" the speaker output voltage with the original sound signal. You get a delayed signal, modified by frequency dependent gain and phase shift. Which parameters do you want to compare?
 

i want to compare the gain, i'll send a pulse within the signal with high gain and amplitude to iniate the recording process so that i can compare the same portion of signal
the problem that i'm facing here is that i couldn't even read the audio signal as voltage value and send them back to pc as a 1st step
help me with that nd other steps will follow later
but now i need to at least read the voltage values of the audio signal and send them back to pc serially through pic
 

Last edited:

what does this circuit basically do ?!
i noticed that it has one input terminal, i have two terminals out of the audio out speaker + and - one if u used one of them i'll lose the rest of the signal !

The idea is to add 2.5V to your audio AC signal. (I assume the pic wants the incoming signal to be in a volt range between 0 and +5V.) The 10K resistors accomplish this, with only 1/2 mA maximum going back into your computer. In any event it could be wise for you to install a DC blocking capacitor so that no DC goes back into your computer.

Since we don't know what is the audio signal amplitude, you can use a potentiometer to adjust it so it does not go below 0V or above 5V.

To make it complete I should have drawn the ground leads. Here is the updated schematic:

93_1337192566.png
 

Kobre98< THink hard a about precisely what you want to measure and why. YOur computer has an ADC and DAC in the sound chip. YOu can mix and monitor all signals and even listen to it. You can take Fourier transforms with Audacity.. and time delay correlation etc..

What is your purpose?

ok
could u tell me how i can use my sound chip as adc and DAC to monitor the signal that comes out from it as a start
it's amplitude and gain ?
with what software and what are the specifications ?!

---------- Post added at 20:25 ---------- Previous post was at 20:23 ----------

The idea is to add 2.5V to your audio AC signal. (I assume the pic wants the incoming signal to be in a volt range between 0 and +5V.) The 10K resistors accomplish this, with only 1/2 mA maximum going back into your computer. In any event it could be wise for you to install a DC blocking capacitor so that no DC goes back into your computer.

Since we don't know what is the audio signal amplitude, you can use a potentiometer to adjust it so it does not go below 0V or above 5V.

To make it complete I should have drawn the ground leads. Here is the updated schematic:

93_1337192566.png

thanks a lot
i'll try it
but one question
when i connect the output of this circuit to pic
it only take on analog output terminal
the other terminal i.e the grounded terminal is connected to pic ground ?!! or somewhere else
and about the potentiometer meter could u please give me full schematic including it ?
thanks a lot
 

when i connect the output of this circuit to pic
it only take on analog output terminal
the other terminal i.e the grounded terminal is connected to pic ground ?!! or somewhere else

Yes, the ground is pic ground which should also be supply ground.

about the potentiometer meter could u please give me full schematic including it ?

This would be an ordinary volume control as commonly found in audio equipment. If you cannot obtain 100k, then use a 50k, or 500k. Or else install various resistors inline, until you have a usable amplitude of your audio signal. There's even a chance your signal will not need any attenuation, which would mean the only thing you may need to do is to raise it to a DC component of 2.5V.

--------------------------

Consider downloading Audacity as mentioned in post #10. It is free at various download sites. For PC or Mac.

It will import many audio formats.

It will record audio from your built-in mic, or other audio source. It is stereo capable.

You can examine waveforms down to the smallest increment, change amplitude, examine frequency spectrum, etc.
 
when i tried the circuit u provided above it gives me 1 volt as a constant output, it doesn't change at all just 1 volt
when i tried to measure the voltage out of the audio line out from pc it gives me reading alternating between 0 and +-1 millivolt !!
is that normal ?
what is the audio output range of the signal out from pc ?!
 

when i tried the circuit u provided above it gives me 1 volt as a constant output, it doesn't change at all just 1 volt
when i tried to measure the voltage out of the audio line out from pc it gives me reading alternating between 0 and +-1 millivolt !!
is that normal ?
what is the audio output range of the signal out from pc ?!

Normal listening amplitude is a fraction of about 1/2 VAC to a few VAC. It all depends on what load resistance you put on the lines.

My headphones can get loud volume from my computer sound cards. They are much higher resistance than an 8 ohm speaker. My computers do not provide much volume to an 8 ohm speaker.

Try different loudness settings. If you cannot get sufficient volume, then you may end up having to amplify it as you originally planned.
 

Normal listening amplitude is a fraction of about 1/2 VAC to a few VAC. It all depends on what load resistance you put on the lines.

My headphones can get loud volume from my computer sound cards. They are much higher resistance than an 8 ohm speaker. My computers do not provide much volume to an 8 ohm speaker.

Try different loudness settings. If you cannot get sufficient volume, then you may end up having to amplify it as you originally planned.

when u take two wires out of your pc audio line out and measure the voltage between what range it gives u ?! volts i mean
it gives me 5 to 10 miilivolt is that normal ?!
 

It should be a few hundred millivolts, but a normal multimeter can't measure that. You could see it on an oscilloscope.
 

I Heard some rumors about the fact that i can use my own sound card as ADC and DAC is that possible ?! to read analog voltage data
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top