Shop OBEX P1 Docs P2 Docs Learn Events
My Stamp Audio Sensor — Parallax Forums

My Stamp Audio Sensor

SN96SN96 Posts: 318
edited 2009-12-04 17:09 in Robotics
This project started out as an idea I had to allow my robot to “hear” sounds in it’s environment, and to add new behaviors based on this device. I started out by looking on the web for microphone circuits which then led me to another site that explained how to power microphones. This was my first section of my circuit design. My next step was to find out how to utilize the output of this simple mic circuit, which led me to the Parallax forums.·· Bean was kind enough to get the ball rolling by presenting the use of an op amp to increase the gain of my mic. This got me to the second stage of my circuit design. Now I had a powered mic feeding into an op amp to amplify the mic’s output. I still needed a way to compare left and right audio and to have the output usable for the basic stamp. This brought me to the third and final section of my circuit design. With a lot of help from Beau Schwabe, I was able to get starting values for the design and was pointed to resources that describe the use of AD converters.
·
I built the circuit on a SSB and began to test the design. Using just one mic for simplicity reasons, I was able to get a reading of the electret mic. I also had a lot of help from a friend who I met on a different forum. Together we discussed a lot about fine tuning the design and he tested various segments of the circuit on his end since he had an O’ Scope, and I did not.
·
The code I used was example code developed by Jon Williams. I modified the code so that it worked with my sound sensor. The debug window proved that the sound sensor was in fact, responding to left and right audio sounds. I later used a servo to rotate left and right depending on the sound source. Although not 100% perfect, it worked.
·
The board was designed using Eagle Cad Lite. My special thanks go to Paul Baker for many helpful tips using eagle cad spanning over the many months that I was a Parallax forum member.
·
The circuit board was fabed by Advanced Circuits. They provide a quality that matches any professionally made board in my opinion, and I highly recommend them to anyone that has a proven design that needs to be fabed.
·
Special thanks go to everyone for sharing their knowledge and experience, as I could have never been able to get this project done and work the first time. I joined the Parallax forums not knowing exactly what a microcontroller was or how to use it, which is why I bought the book “What’s a microcontroller”. That book was the best starting book I have ever bought. Here I am now with a finished first project in less than a year!

The Schematic:
stampaudiorevab1vf.gif

The breadboard circuit:

stampaudio3fb.jpg



The Fabs:

Topside
abtop5fg.jpg
Bottomside
abbottom7yn.jpg

The Final Product:

abassembled2jx.jpg
micleads1fs.jpg

The video demo:

http://www.youtube.com/watch?v=2kcdB808JXg

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike



Post Edited (SN96) : 2/22/2006 2:31:34 AM GMT
«1

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2006-02-22 01:17
    This is one amazing project (on several levels!)! You have truly inspired me! Did you have additional boards made? If so I would really be interested in purchasing one. Again, really great project!!!!
  • gibbmangibbman Posts: 98
    edited 2006-02-22 01:35
    Very, very nice Mike!
    Jim

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    In the end, it seems that it's all about getting the LEDs to blink....
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2006-02-22 01:56
    SN96,

    Awesome!! glad you got things going! That looks really nice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • SN96SN96 Posts: 318
    edited 2006-02-22 02:10
    Thanks for the kind words guys!

    Yes, I do have several copies of this circuit board 25 total were made - 1 assembled and 2 going to a friend that helped me a lot with this project. I have 22 left. smilewinkgrin.gif

    Sorry about the very poor video. All I have is a old... old web cam.

    Also, the reson the servo moves twice in the video is a direct result of the linear program code. When the servo is instructed to move, the ADC chip is not being read. A servo controller will take care of this problem.

    Again thanks for the comments!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • Tronic (Greece)Tronic (Greece) Posts: 130
    edited 2006-02-22 09:59
    Great project!!!

    This would be great addon for small robots!!!



    Thanos
  • steve_bsteve_b Posts: 1,563
    edited 2006-02-22 15:15
    Very slick!
    Would like to see you encorporate it in to some sort of mannequin or bot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Steve JoblinSteve Joblin Posts: 784
    edited 2006-02-22 15:44
    how will you be selling these? Can you put them on e-bay? if so, what would you be charging?
  • SN96SN96 Posts: 318
    edited 2006-02-22 17:33
    I have not intended to sell them originally but I may decide to sell a few. As for the price, I will let you decide on that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • neotericneoteric Posts: 144
    edited 2006-02-22 18:22
    Very impressive.· Amazing that with this hobby you can do so much so quickly.· I think you should put together some kits.· That way you make a little more on the items in the kit.· Put me down for two please!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-02-23 02:51
    Hi EveryOne

    Very impressive and a very nice project please put 2 of·down for a well

    You gave idea of a project that i was not sure how to do for souund decetion i do not have the detail worked
    out yet but this has·inspired me to think more about·how to do it

    ······················· idea.gif

    Thanks for you project idea that you had

    Sam
    ····························································································· hop.gif
  • Steve JoblinSteve Joblin Posts: 784
    edited 2006-02-23 18:30
    SN96 - Let's get you started in owning your own business!

    First step is to figure out what you will sell...
    1. just the board
    2. board and parts as a kit
    3. pre-assembled kit

    Next step is to figure out your delivery model...
    1. Sell directly
    2. Sell as a manufacturer and sell to distributors such as Parallax, Acroname, Sparkfun, etc.
    3. both 1 and 2

    Next step is to figure out pricing....
    1. Offer the product at a price that just covers your fixed and variable costs (this is a great way to get your product out there because the cost will be as low as possible, but of course, you make no money... this may be acceptable if you are doing this as a philanthropic exercise to support the amature hobbyist
    2. Offer the product at a price that covers your fixed and varialbe costs and then pads on a few extra dollars profit. The amount of money you make will, of course, be based on how much you sell. If you only sell 50 of these, and you want to make $5 profit per, you will only net $250 before tax... I don't know your financial situation, but $250 may not make a big enough difference for you and you may get more pleasure in having sold 60 at no profit.

    Ball is in your court on packaging, delivery, and pricing... just giving you food for thought...
  • SN96SN96 Posts: 318
    edited 2006-02-23 19:53
    I am curenly working on writing a pdf manual to go with the board. As for providing it as a kit, I don't think I will make them kits. All the parts but one, can be bought at your local radioshack store. I can compile a parts list to make buying your parts easier.

    I am still deciding on price. What ever I decide, it will be cheap.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • bulkheadbulkhead Posts: 405
    edited 2006-02-24 05:33
    Wow! That is nice!! The board makes it look really clean and professional. A robot equipped with one of those can almost have AI, or at least it will look like it has it when it responds to sounds in its environment...

    I think it's a good idea to provide a parts list for circuits like these instead of offering kits, so that the you (the seller of the item) are less liable for failure (or misuse, in most cases) of the smaller components that go with the circuit. Also, if we mess up on soldering, or damage a part, we can easily pick up another from RS, instead of searching the net for the original part. As for the one part that can't be bought at RS, it may be nice if it were included with the board...otherwise we'd have to order it online, and pay $8 shipping for a $.50 part -_-
  • SN96SN96 Posts: 318
    edited 2006-02-24 22:45
    The one part that you can not buy from radioshack is the ADC0832 chip. I bought mine from Arrow electronics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • miniBotminiBot Posts: 11
    edited 2006-02-28 21:49
    I found a webiste where you can get all the parts for this project...almost, everything but the mics...

    http://www.futurlec.com/Components.shtml

    Thanx!
  • BeanBean Posts: 8,129
    edited 2006-03-01 01:23
    Mike,
    I would recommend selling either just the PCB or as an assembled module. Kits bring out the worst in people. If they don't get it together right, they want to call it defective and return it. One exception might be if you sell it to a "kit" company that sells other kits. They have the right customer base.

    If you decide to sell them assembled do NOT under-estimate your time to build them. Find out what a company would charge to populate say 100-200 of them and add in that cost. Trust me it's no fun sitting home on a Saturday night building the same module over and over. If you get a big order, you can go ahead an pay someone else to build them (and not lose money).

    My video modules are fairly cheap because I'm not in it to make a pile of money, but on the other hand you don't want to lose money either. You need to stay in "business" so you can offer other products [noparse];)[/noparse]

    Don't forget the cost of the manual (and time to fold and staple them), the packaging (if any), and shipping.

    Put me down for a couple. Or we can "trade" if your interested.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Never under estimate the importance of being nice when you don't have to be."
    ·
  • steve_bsteve_b Posts: 1,563
    edited 2006-03-01 03:04
    Hmmm....sounds like enough interest to get a small 'line' going.

    I'd be interested in 1....deliverable to Canada?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-01 13:42
    What's going on here?
    I see that someone taps on a microphone and, I guess, a servo actuates on account of it.
    That much could be done with a switch.
    How does this "work" with sound/sounds (whistles, claps, etc.)·as opposed to the microphony as demonstrated?
    There are two microphones, but how well does it differentiate between the two?· What happens if you tap both?· What happens when there isn't dead silence as in the demo/s?
    ·
  • SN96SN96 Posts: 318
    edited 2006-03-01 16:12
    Hey PJ, it almost seems that you are a bit frustrated.
    ·
    Well if you tap on both mics at the same time, the mic with the largest value will respond. it responds to finger snaps, phone rings, paper crunching, dog barks, kids talking, etc...·Will a switch do that? And yes, it does differentiate between the two mics well. In the demo, the mics are just hanging in open air so the mics can capture ambient audio. I have not done this yet, but if you put the mics in a body of some sort, such as a head for example, the body will act as a kind if "baffle" improving the separation.
    ·
    An environment with constant noise is not being realistic unless you are talking about a room full of kids or·tv noise, but that was not the goal of the project. The goal of the project was to design a board that would give the stamp a sensor that would respond to sounds, and that is exactly what I have done. This is my very first project including the design. Although not perfect, it works. Although one could·accomplish the same concept using a very different approach, this is my crack at it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike



    Post Edited (SN96) : 3/1/2006 4:39:10 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-01 17:16
    · Hey SN96, it seems that you are more than a bit defensive.
    · I guess I didn't realize that your purpose in Posting this Project of yours was an exercise in affirming mistaken conclusions or that it's beyond any sort of peer review.
    · My questions and comments are based solely on the demo/s that you, afterall,·provided.
    · You state, "...the goal of the project was to design a board that would give the stamp a sensor that would respond to sounds...", but your demo/s don't exactly give evidence of this.
    · It doesn't take a two-channel ADC to "...give the stamp a sensor that would respond to sounds...."

    · Congratulations on having had somebody place some traces on a board for·you, for your having soldered some components to it, and having effected what you believe·to be a result: that's exactly what you have done.

    ·
  • SN96SN96 Posts: 318
    edited 2006-03-01 17:44
    No comment...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • BeanBean Posts: 8,129
    edited 2006-03-01 19:27
    Well put Mike, nice show of class.

    PJ Allen, that was uncalled for...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Never under estimate the importance of being nice when you don't have to be."
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-01 19:48
    Can everyone shake virtual hands and move on please?· A disagreement in project design is worth arguing about in the forums.· Thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Piper984Piper984 Posts: 74
    edited 2006-03-01 20:58
    Hello Mike,

    When you were testing different audio circuits, did you ever try using the PUSLIN command (with the output of an OpAmp going to a BS2 pin) to determine the pitch of incoming audio signal? I have been working on doing audio pitch detection with a BS2 for a little while now. It works (kinda) but the mic preamp, and waveform squaring circuits I have constructed so far introduce some errors. Any experience doing this??
  • SN96SN96 Posts: 318
    edited 2006-03-02 00:00
    Hello Piper984,

    There are several ways to code using this board. I have not tried experimenting much with the code. I have been focusing on the performance of the circuit. I have not tried using PULSIN command for detecting pitch. My approach was to use an ADC to do the comparing rather than using code. The only problem I have encountered was the speed at which the sensor would respond to sounds. It seemed to take a while for the cap to "drain off" when a sound was made. What I did to fix this problem was solder in parallel a 1meg resistor to each non-polarized cap. This modification has improved its response time tremendously.

    Your idea is very interesting. Don't give up, keep trying.

    And thanks Bean, you are like a big brother to me on the forums. You certainly helped me out more than you know, as with many other on this forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
  • Steve JoblinSteve Joblin Posts: 784
    edited 2006-03-02 01:06
    Let's stay focused on the critical next steps...

    when can we place our orders!· Who do I make my check out to, or how do I provide my CC info?· This is the real important stuff!
  • Russ FergusonRuss Ferguson Posts: 206
    edited 2006-03-02 02:39
    Mike:

    I would like to breadboard the circuit and find out what it is capable of.

    The local parts store has some ADC0834, but not the ADC0832.

    It looks like the substitution should be pretty straighforward, send the right code to the DI and basically ignore the fact that there are more pins.·You have·gotten the ADC0832 working and I am·only just scanning through the spec sheet, so what·do you think?
  • SN96SN96 Posts: 318
    edited 2006-03-02 03:01
    Hello Russ,

    I'm not sure if the ADC0834 would have any differences or not. You might want to ask Jon Williams about if there would need to be any code chages to drive it. I'm new to this stuff, and I'm really·not sure. I used the ADC0832 since there was already example code available for this chip. I know Arrow Electronics sells the ADC0832 in quatities of 1. Go here:

    www.arrow.com· or a better place to look is here: http://www.national.com/pf/AD/ADC0832.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike



    Post Edited (SN96) : 3/2/2006 3:11:54 AM GMT
  • Tricky NekroTricky Nekro Posts: 218
    edited 2006-03-02 09:17
    Why naven't I seen this project so long...

    It's flawless... Well done...

    Do you include code with your project?

    Thanks, Provas, Greece



    P.S. The first project is the hardest, then you go on without promblem...

    Keep up the good work!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rule your Destiny-
    --Be Good. Be Bad. Be Provas--


    provassiggy5yt.jpg
  • SN96SN96 Posts: 318
    edited 2006-03-02 13:04
    Hello Provas,

    Yes I did include example code on the first page of this thread. After all the photos·at the bottom, you can click on the attachment link to download it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
Sign In or Register to comment.