Shop OBEX P1 Docs P2 Docs Learn Events
Audio Line level signal into BS2 to drive a servo — Parallax Forums

Audio Line level signal into BS2 to drive a servo

Vidur SoodVidur Sood Posts: 4
edited 2008-12-30 14:45 in BASIC Stamp
Hi Folks,

Has anyone done a line level audio into a BS2 and then drive a servo - the louder the signal the greater the servo deflection? Any schematics here? Possible to use just the components that came with my pack - BS2 BOE board. I think there is a 2N 2824 (or something like that..) transistor in the set ?

I did see a posting about an output from a propeller to an op amp and then driving a speaker, but that's not what I'm looking for..

Thanks.

Vidur

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-29 16:59
    You will need some external components to do this properly. The BS2 is not fast enough to do the necessary audio processing by itself (the Propeller or SX could do it).

    You need to rectify and filter the audio signal, then do an analog to digital conversion. Depending on the source of your signal, something as simple as a diode and capacitor will do for the rectifier and filter. Have a look here for some notes on Stamp use (www.emesystems.com). Click on "app-notes" and you'll see an item on measuring battery voltage with the Stamp using the RCTIME statement. This is about as minimal an A-D converter as you can get. It's very limited in speed and accuracy, but may do. You might also want to look at using an external converter like the ADC0801. Its use is well documented in the StampWorks manual and in the Basic Analog and Digital tutorial.
  • Vidur SoodVidur Sood Posts: 4
    edited 2008-12-30 14:45
    Hi Mike,

    Thanks much for the info. I will look into it.

    Regards and hope you have a wonderful New Year.

    Vidur
Sign In or Register to comment.