Shop OBEX P1 Docs P2 Docs Learn Events
Help with 1PCS Sound detection sensor module — Parallax Forums

Help with 1PCS Sound detection sensor module

XavierXavier Posts: 26
edited 2013-05-30 06:52 in Accessories
Hi,

I have this Sound detection module :
http://www.ebay.com/itm/261083086582?ru=http%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_sacat%3D0%26_nkw%3D261083086582%26_rdc%3D1

And this is the .pdf of the main chip:

https://www.fairchildsemi.com/ds/LM/LM393.pdf

I need help to connect this to a Basic Stamp2sx and create a code for this.
Please if someone could help me, Thanks.

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2013-05-27 10:08
    The output goes low when it detects sound...
    DO
      IF in0=0 THEN
        DEBUG CR,"I hear music"
        DO : LOOP UNTIL in0=1
      ENDIF
    LOOP
    

    Did the board come with documentation? It may need a pullup resistor at the output, because the LM393 pulls low but not actively high. The adjustment probably affects the threshold sound level.
  • XavierXavier Posts: 26
    edited 2013-05-29 08:54
    Thanks Allen,

    It worked fine, but I had to modify it a bit.
    DO
      IF in0=1 THEN 
       DEBUG CR,"I hear music" 
       PAUSE 50 
       DO : LOOP UNTIL in0=0 
     ENDIF
    LOOP
    

    I have some questions, ¿Can it give another type of values other then just 0 and 1? ,if it do,
    ¿What comands could I use?,
    ¿Could I use something like SERIN o PULSIN?

    Thanks.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2013-05-29 14:14
    By all indications, all it can do is 0 or 1. I don't have one, but everything it can do should be listed on its instructions sheet!
  • XavierXavier Posts: 26
    edited 2013-05-30 06:52
    Ok.

    Thanks Allen. :thumb:
Sign In or Register to comment.