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

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

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

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

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

  6. #6
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rossfree View Post
    ...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
    Wow, I've been so busy building my armor that I didn't see the topic reply to this post... I've got to sit down and analyze all of the suggestions but DANG you guys ave some great ideas. Not sure about the MP3 player though but I am pretty sure the original board has a way to hook it to your computer to upload MP3s or WAV files to it to play bleeps or whatever... It would be cool like you said to have another voice come over the headset like home base or whatever..

    I have attached a pic of my helmet (Bucket) progress so far. I'm still waiting on some green lenses so it's not 100% done yet. I've been staying up till like 5am every morning trying to get this done!!
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Smile VOX circuits

    Hey Dave,

    That helmet looks great! Very impressive work.

    Good ideas about the MP3s and audio effects.

    If you have time:
    peterdeco1 had a good idea about a recorder playback chip.
    Even one like in a greeting card.
    It does not have to have loud audio, just tap it into the same amplifier for your voice.

    Alfred had some good ideas too, may need a little more power than a LM386. But there are other audio amplifier ICs that might be as simple to use.

    Ross is right about all the sound effects available in MP3 format. It would be handy to just tap into a cheap one and feed the low level (headphone) audio into you voice amp.
    He is right about “Just at the right moment... POW! BAM! BLING! Cut them right in half!” too!

    Can someone try the white noise output of a PIC and let us know if it sounds like radio static “rush” (before squelch mutes it). Maybe post a sound clip?

    Have you looked for any voice operate circuits (VOX)? Here is one example schematic. I like the voltage doubler part.
    http://www.electronickits.com/kit/co.../elec/k126.pdf
    You would not need all the amplifiers / comparators and relay.
    Your amplifier produces the level and the PIC senses voice voltage and switches your effects....

    Great ideas guys, who else?
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

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