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

    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 !

  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
    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

  3. #3
    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 !

  4. #4
    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.

  5. #5
    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! :-)

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


    Did you find this post helpful? Yes | No

    Default

    Dave,

    It seems like there is an answer in using several of the ideas mentioned. Using the PIC as your control device to since when you are speaking, a simple lm386 sound distortion circuit for your voice, and I would use a small cheap digital mp3 player for your sound(s). There are so many awsome sound effects free for the download... and the storage, sorting and interface platform is already built into the mp3 players.

    Pop one apart, tie in a couple of wires and let the pic toggle through to the sound of your choice.

    I did this with a CD player once. I programmed the pic to choose different wav files to play. It worked great.

    And you can create your own sounds ... sans all the circuit hardware.

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

    I like that! :-)

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


    Did you find this post helpful? Yes | No

    Default

    ...You could even pre-program the chip to call an mp3 file that sounds like the base commander is calling you on your headset. HA! It could add to the realism.

    The processor need not be bigger than a 12f675. You just need the analog input, and three or four outputs to trigger and toggle the mp3 player.

    I like that the mp3 player leaves the sound end completely open to quick and easy modifications.

    Quick wav file sample attached:

    Ross
    Attached Files Attached Files
    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