How to detect sound direction?


Results 1 to 8 of 8

Threaded View

  1. #5
    Join Date
    Oct 2008
    Location
    Southern California
    Posts
    17


    Did you find this post helpful? Yes | No

    Cool You're in for a long project

    You can do what you want to do, but don't think this is going to be an easy project for the weekend. You'll need to convert to square waves, use the internal comparator, use as high a clock speed as possible, 2 PICs, comms between the PICs, and OPAMPs externally for a start. Yes, you need 3 mics (or 4 might be easier). Or, just deal with the left-right ambiguity if you can (much simpler if you know which 180 degrees of the originating signal). You're probably not going to be happy with the results in the end. You're trying to accomplish Time Difference of Arrival (TDOA) with a ~40 MHz (10 really) PIC. Get really comfortable with PBP and interrupts. Read up on "zero crossing detection" as well. It isn't because of the speed of sound, but the looong waves and abiguity in the zero crossings that will make this rough. You'll have to get good with the internal counters also.Brush up on your trigonometry too. PBP isn't strong in that area. In the end, you're going to have most of the chip working toward the goal and still not be happy with the result. YOU'RE GOING TO LEARN A TON TRYING!! I don't mean to sound like this is impossible, but you're biting off a REALLY big chunk of work. Great idea, but hard (and advanced) to implement! Even experienced programmers struggle with TDOA and higher power processors than PICs.

    Another possible way to do it if you're not worried about accuracy so much is to set up 8 mics in a wide as possible circle (omni mics pointing up) and external circuits to amplify and convert to square waves at zero crossings, and then use port B (interrupt on change). At least you can tell the basic direction of arrival (45 degrees-ish) instead of all the work of true TDOA. As others said, this is going to be hard to do if you have interfering sounds at all. How would you want to display the information? LEDs in a compass rose? To the LCD? Serial data out?

    Post your code when you're done! Good luck.
    Last edited by rswain; - 11th December 2008 at 00:53.

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  2. new to PIC programming could really do with some help
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2008, 14:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. Sound and sound control with minimal parts
    By bartman in forum General
    Replies: 23
    Last Post: - 18th January 2005, 14:08
  5. Re: quick fix for sound command?
    By Melanie in forum Code Examples
    Replies: 0
    Last Post: - 9th July 2004, 01:44

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