PDA

View Full Version : Audio Input and ouput for the propeller



Kye
01-20-2009, 05:52 AM
Hey guys,

I can't seem to find any information on this online and I'm having a bit of a problem figuring it out myself.

I want to get the propeller chip to be able to output audio and input audio. My idea is that if I use operational amplfiers to integrate a pwm wave I can then create a nice DAC for sound generation. For audio input I plan to use a comparator with a sample and check circuit which simply generates a voltage using the audio output technique and then·uses the campator to check if the voltage generated is equal to the input, this is then done very fast to sample the input.

Now, addtionally the point of the operational amplfiers is to produce a level shifted signal for the PC audio. The problem is... I can't seem to find good reference material on what the the PC audio line level voltage is and how it swings. Additonally I'm not sure if a the 5V power supply on the prop proto board can power the operational amplfiers.

I'm not really good at using analog circuits. Help would be appreciated.

Thank you,

Oh, at the bottom are some quick sketches of the circuits.

There would be 3 analog output circuits and 1 comparator circuit. The first two analog output circuits would generate stereo audio and third would be used to drive the analog input for the comparator to sample the input signal.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Paul Baker
01-20-2009, 06:08 AM
Kye, Check out Chip Gracey's Microphone to Headhones object (http://obex.parallax.com/objects/57/) in the object exchange. It uses the Propeller Demo Board (http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropDemoDschem.pdf) circuits, the input is an AC coupled electret microphone (could be adapted to a line in) and ADC input circuit and the output is a simple RC circuit that is amplified.

I think your circuits will cause too much distortion for the singal to be close to the original.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)

Kye
01-20-2009, 06:44 AM
You do not understand, the analog input is actually the signal from from the propeller chip using pwm.

The idea is that the operational amplfiers integrate (like low pass) the pwm signal to generate a voltage which is then level shifted to the proper level.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

kayj
04-14-2014, 12:22 AM
Hey guys,

I can't seem to find any information on this online and I'm having a bit of a problem figuring it out myself.

I want to get the propeller chip to be able to output audio and input audio. My idea is that if I use operational amplfiers to integrate a pwm wave I can then create a nice DAC for sound generation. For audio input I plan to use a comparator with a sample and check circuit which simply generates a voltage using the audio output technique and then·uses the campator to check if the voltage generated is equal to the input, this is then done very fast to sample the input.

Now, addtionally the point of the operational amplfiers is to produce a level shifted signal for the PC audio. The problem is... I can't seem to find good reference material on what the the PC audio line level voltage is and how it swings. Additonally I'm not sure if a the 5V power supply on the prop proto board can power the operational amplfiers.

I'm not really good at using analog circuits. Help would be appreciated.

Thank you,

Oh, at the bottom are some quick sketches of the circuits.

There would be 3 analog output circuits and 1 comparator circuit. The first two analog output circuits would generate stereo audio and third would be used to drive the analog input for the comparator to sample the input signal.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
you could store whatever notes you plan to output as 8 bit numbers that correspond to a frequency (note) then you could make a voltage controlled oscillator (VCO) with a mosfet and 2 op amps, then the propeller could output those 8 bit numbers and you could go through a DAC chip to convert them to an analog voltage, put that through the VCO and connect the VCO output to some speakers

frank freedman
04-14-2014, 01:39 AM
Here is a link for some answers for the audio line levels.

http://www.ovnilab.com/articles/linelevel.shtml

If you want to get into the analog side of things, there is the all about circuits series (google it), and for op amps, a good reference is the TI publication:

OP AMPS for Everyone and Handbook of Operational Amplifiers, both published by TI. Downloadable as PDF. Best of all the price point can not be beat..FREE!!

Publison
04-14-2014, 05:27 PM
Anybody notice this was from 2009. :)

Since then, Kye has published some awsome audio stuff in OBEX.

frank freedman
04-14-2014, 07:15 PM
Not noticed, We the trusting lead by the ............... sorry............

But hopefully the references will be of use to someone.......

And yes, I will go see what he has placed in OBEX. He has a thing for doing interesting/awesome stuff it seems....

Kye
04-14-2014, 10:06 PM
Hey, this thread is from my freshman year in college! :)

Clock Loop
04-14-2014, 10:54 PM
LOL, diggin up graves...

Speaking of audio in/out...

Heres a chip for such purpose...
http://www.sparkfun.com/products/9943

AND RAM to make up for the props lack of it,...
23K256 32KB SRAM
http://www.digikey.com/product-detail/en/23K256-I%2FP/23K256-I%2FP-ND/2001112


And an example project using the VS1053 chip, the propeller, ethernet, and the extra RAM.
http://learn.parallax.com/inspiration/thumper


http://forums.parallax.com/showthread.php/153288-VS1053-mSD-to-run-mp3-on-its-own?highlight=vs1053

http://forums.parallax.com/showthread.php/138503

http://forums.parallax.com/showthread.php/127083-2-audio-source-to-1-headset?highlight=vs1053

http://forums.parallax.com/showthread.php/121305-Who-has-some-experience-with-VS10xx-decoder-chips?highlight=vs1053



Harrisonpham.com shows nothing, and all other websites referred don't work.
http://hdpham.com

http://forums.parallax.com/member.php/40649-Harrison.
http://forums.parallax.com/search.php?searchid=1871238

You can find one obex object from the same author.... http://obex.parallax.com/object/222