PIC Audio


Closed Thread
Results 1 to 29 of 29

Thread: PIC Audio

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Interesting project

    Hi Dave,

    Do you have a substitute amplifier board that will amplify your voice? That part may be a little tough, to get a PIC to amplify audio.

    If you have an amplifier board or could build / buy one, the PIC may be able to do the rest.
    Instead of a mechanical push-button switch, the A/D input or the comparator input could be used to “trigger” on a preset level. Some times called “VOX” (voiced operated transmission), this is used for hands free transmitter control.

    You could tap into the audio and allow an adjustable threshold (voice) level to tell the PIC to be ready to playback your sounds. When the level drops below the threshold for a programmed period of time that would tell the PIC to play the sound now.
    In other words; the PIC senses you are talking and then, that you have stopped talking. So it plays the sound, into the audio amplifier.

    You have to figure out how to get the sound you want out of the PIC.

    Interesting project
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  2. #2
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hi Dave,

    Do you have a substitute amplifier board that will amplify your voice? That part may be a little tough, to get a PIC to amplify audio.

    If you have an amplifier board or could build / buy one, the PIC may be able to do the rest.
    Instead of a mechanical push-button switch, the A/D input or the comparator input could be used to “trigger” on a preset level. Some times called “VOX” (voiced operated transmission), this is used for hands free transmitter control.

    You could tap into the audio and allow an adjustable threshold (voice) level to tell the PIC to be ready to playback your sounds. When the level drops below the threshold for a programmed period of time that would tell the PIC to play the sound now.
    In other words; the PIC senses you are talking and then, that you have stopped talking. So it plays the sound, into the audio amplifier.

    You have to figure out how to get the sound you want out of the PIC.

    Interesting project
    -Adam-
    Adam,
    Yes I was planning on using an external amp..not sure which one yet but using the A/D comparator sounds like a great idea! The noise I want the PIC to simulate is just static or the short squelch sound that you hear when you unkey a transmitter... Forgot to mention that the board I am trying to emulate is driving 8 ohm speakers... I think it's pushing like 8 watts at 12vdc.. It's actually pretty loud in the video that I watched.

    I figured since I have PBP and Proton Plus that I should be able to beat the 105 pound sterling ($210.00us) price for the board if I build it myself. Like everyone else though, I just lack the time.. I'd buy the dang board if he had them available just to save myself the trouble.

    -Dave

  3. #3
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Lightbulb rectify the audio

    Hey Dave,

    Do you have a link to the board you are looking at?

    You may want to make a band pass filter to get the restricted radio voice type sound.
    The PIC could add the rushing radio sound (squelch tail) at the end of your “transmission”.

    If you have the schematic of the amplifier that would be handy.
    You could add a rectifier stage to rectify the voice audio. Use this audio voltage to charge a capacitor. Monitor the capacitor voltage with the comparator or A/D of a PIC. Let the PIC decide you have been talking and now you have stopped (for a certain length of time).
    Have the PIC produce a “burst” of white noise.

    We all know about lack of time (seems to be universal), do what fits.
    If you do find time to make your own, you could add stuff. Like color LEDs. Green most of the time, red to show you are talking, blue to show “end of transmission”......
    Maybe the red LEDs could be a line of LEDs that travels back and fourth while you are speaking?

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  4. #4
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hey Dave,

    Do you have a link to the board you are looking at?

    You may want to make a band pass filter to get the restricted radio voice type sound.
    The PIC could add the rushing radio sound (squelch tail) at the end of your “transmission”.

    If you have the schematic of the amplifier that would be handy.
    You could add a rectifier stage to rectify the voice audio. Use this audio voltage to charge a capacitor. Monitor the capacitor voltage with the comparator or A/D of a PIC. Let the PIC decide you have been talking and now you have stopped (for a certain length of time).
    Have the PIC produce a “burst” of white noise.

    We all know about lack of time (seems to be universal), do what fits.
    If you do find time to make your own, you could add stuff. Like color LEDs. Green most of the time, red to show you are talking, blue to show “end of transmission”......
    Maybe the red LEDs could be a line of LEDs that travels back and fourth while you are speaking?

    -Adam-
    Adam,
    Sorry for the late response, I've been on the go all weekend. I like your ideas and can probably incorporate them into the design initially to help with the design. The link to the board I am trying to emulate is

    http://www.romfx.com/

    Check it out and go to the Audio / Video page and you can listen to what the board actually does. I know the PIC will play tones.. but do you actually think you can produce an un-squelch sound?

    -Dave

  5. #5
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile SOUND Generates tone and/or white noise

    Hi Dave,
    There are two things that you may want to try.
    Find a way to band-pass or “restrict” the audio going through your amplifier.
    This will make your voice sound like it is coming over the radio (like a telephone voice sound).

    I have never made white noise with a PIC.

    The PICBASIC Pro manual says it is possible with the sound command.
    See PBP manual: 5.78. SOUND
    SOUND Generates tone and/or white noise on the specified Pin.

    You may have to make a filter similar to the one in the DTMFOUT section.
    See PBP manual: 5.17. DTMFOUT
    Maybe leaving the signal as a white noise square wave would enhance the “radio” sound. This will be a low level volume. It will have to be injected into the amplifier at a low level stage. Hope someone that has used the white noise jumps in here.

    If you are set-up to breadboard the PIC SOUND command, you should try it to see (or hear) for yourself. It should sound like the burst of broken squelch a radio makes when turning back to receive.

    This sounds like a do-able project but it may take you a little more time that you might expect. The fun of doing it would be the reason, not the money saved.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  6. #6
    Join Date
    Feb 2006
    Posts
    20


    Did you find this post helpful? Yes | No

    Smile

    I recomend using an lm386 audio op amp to handle the amplification. If you boost the gain up by connecting a 20uf capacitor accross pins 1 and 8 you may get some distortion at the ouput to make your voice sound like it is coming over an rf link. You could also use a different op amp (lm741 ect) and wire it up with a very high gain to increase distortion. This could be achived by conecting a low value feedback resistor from the inverting input to the output. After you amplify the signal, you should feed it into a comparator chip. An lm393 would work well for this application. Set the + threshhold voltage with a two resistor divider. Conect the output from the audio amp to the - input of the comparator and pull the output of the comparator up with about 3k. The ouput can then be fed directly into the PIC. Your program will simply need to wait for the output of the comparator to go high and then fall low again indicating that you have finished speaking. It can then be programed to output white noise with the sound command. PIC generated white noise sounds very steady. If you want a more realistic sound you could try to set up a very simple radio reciever built around another 386 op amp. This is simpler then it sounds and would produce a good sound. You would simply wire up the lm386 as usual and then conect a tuned circuit (capacitor and inductor) accross the input. You could easily wind a simple coil and use a small value capacitor to make this circuit produce the desired sound.

  7. #7
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    I recommend the element of surprise...

    Do you see how careless those storm troopers were! It would be easy to conseal a light saber in the crowd. Just at the right moment... POW! BAM!
    BLING! Cut them right in half!

    Just don't hit the HELMETS!

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

Similar Threads

  1. Replies: 33
    Last Post: - 8th September 2010, 11:28
  2. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  3. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  4. Audio Encoding and playback in a PIC
    By Rob in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 24th March 2005, 08:56
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts