Shop OBEX P1 Docs P2 Docs Learn Events
Audio Input and ouput for the propeller — Parallax Forums

Audio Input and ouput for the propeller

KyeKye Posts: 2,200
edited 2014-04-14 15:54 in Propeller 1
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,
840 x 525 - 25K
840 x 525 - 23K

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-19 23:08
    Kye, Check out Chip Gracey's Microphone to Headhones object in the object exchange. It uses the Propeller Demo Board 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
  • KyeKye Posts: 2,200
    edited 2009-01-19 23:44
    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,
  • kayjkayj Posts: 1
    edited 2014-04-13 17:22
    Kye wrote: »
    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 freedmanfrank freedman Posts: 1,983
    edited 2014-04-13 18:39
    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!!
  • PublisonPublison Posts: 12,366
    edited 2014-04-14 10:27
    Anybody notice this was from 2009. :)

    Since then, Kye has published some awsome audio stuff in OBEX.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2014-04-14 12:15
    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....
  • KyeKye Posts: 2,200
    edited 2014-04-14 15:06
    Hey, this thread is from my freshman year in college! :)
Sign In or Register to comment.