Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Piezzo siren/alarm

Piezzo siren/alarm

Scheduled Pinned Locked Moved Hardware
26 Posts 4 Posters 2.4k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ben999B Offline
    ben999B Offline
    ben999
    wrote on last edited by ben999
    #1

    Hi guys

    I would be sooooo grateful if you could show me the path to get my piezzo buzzer up and running!

    This is what i bought

    0_1554806591772_Capture.JPG

    My plan is to re-use the enclosure, solar panel (6V), siren, battery (3.7V 2200mAh) and possibly the LEDs.

    But i'm already having some troubles with the piezzo siren module...

    0_1554800122288_IMG_0309[1].JPG

    Schematic

    As it looks like a naked piezzo module (no oscillator inside, unknown voltage) I conected it to a PMW pin on Arduino with a Tone() sketch
    There are some datasheets out there for similar buzzers, some are 5V others 12V... less than 200mA seems a good average. So i used a TIP120 (and even a BC238 but looked a bit undersized for 200mA)
    0_1554805667055_Capture.JPG

    What did I expect to happen?

    A hell of a noise!!! (same as when i power the original unit)

    What happened instead?

    At best i get a cheap watch alarm noise when playing with different levels of Tone()
    Applying different voltage doesn't change a thing: 1S, 2S and 3S generate the same amount of noise...

    The original board

    From that picture can you tell if the voltage is boosted to a high voltage? Or any trickery that would explain my silent buzzer?
    0_1554824059739_IMG_0310[1].JPG

    Nasty part

    I also tried to inject DC current to the poor piezzo unit :innocent: :smiling_imp:
    Just made a "tic" sound when connected. And a "tic" every time a different voltage is applied. I went up to 12V (1S, 2S and 3S LiPo battery, from balancing plug)

    Any idea chaps? Thanks for your help.

    mfalkviddM 1 Reply Last reply
    0
    • bjacobseB Offline
      bjacobseB Offline
      bjacobse
      wrote on last edited by bjacobse
      #2

      Adafruit have this one, can you try to make your setup similar? Notice that you need to oscillate it at resonance frequency to provide loudest beep.
      Piezo buzzers are used for making beeps, tones and alerts. This one is petite but loud! Drive it with 3-30V peak-to-peak square wave. To use, connect one pin to ground (either one) and the other pin to a square wave out from a timer or microcontroller. For the loudest tones, stay around 4 KHz, but works quite well from 2KHz to 10KHz. For extra loudness, you can connect both pins to a microcontroller and swap which pin is high or low ('differential drive') for double the volume.
      https://www.adafruit.com/product/160
      And maybe your piezo is just a quiet buzzer - try to scavenge a piezo from a smoke alarm, that will give you around 105dB, and notice they have 3 pins and not only 2 pins
      https://electronics.stackexchange.com/questions/18212/whats-the-third-wire-on-a-piezo-buzzer

      ben999B 1 Reply Last reply
      0
      • ben999B ben999

        Hi guys

        I would be sooooo grateful if you could show me the path to get my piezzo buzzer up and running!

        This is what i bought

        0_1554806591772_Capture.JPG

        My plan is to re-use the enclosure, solar panel (6V), siren, battery (3.7V 2200mAh) and possibly the LEDs.

        But i'm already having some troubles with the piezzo siren module...

        0_1554800122288_IMG_0309[1].JPG

        Schematic

        As it looks like a naked piezzo module (no oscillator inside, unknown voltage) I conected it to a PMW pin on Arduino with a Tone() sketch
        There are some datasheets out there for similar buzzers, some are 5V others 12V... less than 200mA seems a good average. So i used a TIP120 (and even a BC238 but looked a bit undersized for 200mA)
        0_1554805667055_Capture.JPG

        What did I expect to happen?

        A hell of a noise!!! (same as when i power the original unit)

        What happened instead?

        At best i get a cheap watch alarm noise when playing with different levels of Tone()
        Applying different voltage doesn't change a thing: 1S, 2S and 3S generate the same amount of noise...

        The original board

        From that picture can you tell if the voltage is boosted to a high voltage? Or any trickery that would explain my silent buzzer?
        0_1554824059739_IMG_0310[1].JPG

        Nasty part

        I also tried to inject DC current to the poor piezzo unit :innocent: :smiling_imp:
        Just made a "tic" sound when connected. And a "tic" every time a different voltage is applied. I went up to 12V (1S, 2S and 3S LiPo battery, from balancing plug)

        Any idea chaps? Thanks for your help.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @ben999 can't you just measure the output signal from the original board?

        ben999B 2 Replies Last reply
        0
        • mfalkviddM mfalkvidd

          @ben999 can't you just measure the output signal from the original board?

          ben999B Offline
          ben999B Offline
          ben999
          wrote on last edited by ben999
          #4

          @mfalkvidd hi thank you for your answer.

          I did try to take measurment with my voltmeter but it is kinda slow to react.
          The 'welcome' tone when powering the board lasts about half a second... so no luck there.

          Might be time to buy one of those very affordable oscilloscope from eBay or aliExpress... do you own one?

          mfalkviddM 1 Reply Last reply
          0
          • bjacobseB bjacobse

            Adafruit have this one, can you try to make your setup similar? Notice that you need to oscillate it at resonance frequency to provide loudest beep.
            Piezo buzzers are used for making beeps, tones and alerts. This one is petite but loud! Drive it with 3-30V peak-to-peak square wave. To use, connect one pin to ground (either one) and the other pin to a square wave out from a timer or microcontroller. For the loudest tones, stay around 4 KHz, but works quite well from 2KHz to 10KHz. For extra loudness, you can connect both pins to a microcontroller and swap which pin is high or low ('differential drive') for double the volume.
            https://www.adafruit.com/product/160
            And maybe your piezo is just a quiet buzzer - try to scavenge a piezo from a smoke alarm, that will give you around 105dB, and notice they have 3 pins and not only 2 pins
            https://electronics.stackexchange.com/questions/18212/whats-the-third-wire-on-a-piezo-buzzer

            ben999B Offline
            ben999B Offline
            ben999
            wrote on last edited by
            #5

            @bjacobse great thanks a lot for this links!

            Up to 30V then... I then need to know what voltage comes out of the board...

            Second link is very interresting, thanks for sharing!

            1 Reply Last reply
            0
            • ben999B ben999

              @mfalkvidd hi thank you for your answer.

              I did try to take measurment with my voltmeter but it is kinda slow to react.
              The 'welcome' tone when powering the board lasts about half a second... so no luck there.

              Might be time to buy one of those very affordable oscilloscope from eBay or aliExpress... do you own one?

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              @ben999 I bought a cheap oscilloscope kit a while ago. Photos: https://forum.mysensors.org/topic/7836/what-did-you-build-today-pictures/603
              Graphs: https://forum.mysensors.org/topic/7836/what-did-you-build-today-pictures/614

              This kit is very basic, but works for most of my needs.

              ben999B 1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                @ben999 I bought a cheap oscilloscope kit a while ago. Photos: https://forum.mysensors.org/topic/7836/what-did-you-build-today-pictures/603
                Graphs: https://forum.mysensors.org/topic/7836/what-did-you-build-today-pictures/614

                This kit is very basic, but works for most of my needs.

                ben999B Offline
                ben999B Offline
                ben999
                wrote on last edited by
                #7

                @mfalkvidd oh thanks for quick reply and links.

                A bit off-topic here: would you rather go for a computer version or a portable one ?

                mfalkviddM 1 Reply Last reply
                0
                • ben999B ben999

                  @mfalkvidd oh thanks for quick reply and links.

                  A bit off-topic here: would you rather go for a computer version or a portable one ?

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #8

                  @ben999 I am not sure I know the difference between portable and computer version, but I'll try to answer anyway. As with most things, it depends on the use case.

                  Last weekend I went to a hackathon. I brought my oscilloscope since it doesn't weigh much and doesn't take up much space. Most "real" oscilloscopes would have been too large and heavy to bring, especially since I don't travel by car.

                  I usually have a computer when messing with electronics, so I don't mind using the computer's screen instead of a built-in screen. Having the user interface on my computer makes it easy to take screen shots.

                  1 Reply Last reply
                  1
                  • FotoFieberF Offline
                    FotoFieberF Offline
                    FotoFieber
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    For portable usage I have a https://pokitmeter.com/ which is really small and lightweight.

                    ben999B 1 Reply Last reply
                    1
                    • FotoFieberF FotoFieber

                      For portable usage I have a https://pokitmeter.com/ which is really small and lightweight.

                      ben999B Offline
                      ben999B Offline
                      ben999
                      wrote on last edited by ben999
                      #10

                      @fotofieber woooooooooooooooow :heart_eyes_cat: :heart_eyes_cat: :heart_eyes_cat:

                      I searched last night for something similar (iOS and BT) but couldn't find one

                      So i bought a cheap portable one on aliExpress

                      https://fr.aliexpress.com/item/JYE-Tech-DSO138-13805K-Mini-Digital-Oscilloscope-DIY-Kit-SMD-Parts-Pre-soldered-Electronic-Learning-Set/32919633946.html?spm=a2g0w.10010108.1000016.1.6349de7cOC8Hnf&isOrigTitle=true

                      We're not talking about the same amount of money there...

                      But i'm now deeeeeeeeeply in love and will consider PokitMeter for my next workshop toy :heart_eyes:

                      Thank you for the link :facepunch: :+1:

                      1 Reply Last reply
                      0
                      • mfalkviddM mfalkvidd

                        @ben999 can't you just measure the output signal from the original board?

                        ben999B Offline
                        ben999B Offline
                        ben999
                        wrote on last edited by
                        #11

                        @mfalkvidd Something puzzling me here, can i please borrow your brain for a sec ?

                        @bjacobse mentionned that his small piezzo buzzer could take up to 30V...

                        So i had a go with my own buzzer and the previous schematic with 1S LiPo up to 6S LiPo (close to 25V) and 440Hz up to 32kHz (max Tone() )

                        No change there. Still the same noise i got with a smaller transistor and a 5V power supply.

                        Tone() changes the width of the modulation (X scale), so i get different tones.
                        Voltage of the power suppy changes the power going through the piezzo disc... but it doesn't get any louder.

                        So what is the magic to get a loud buzzer? I shall get my oscilloscope within a month, so until then i keep scratching my head !!

                        bjacobseB 1 Reply Last reply
                        0
                        • ben999B ben999

                          @mfalkvidd Something puzzling me here, can i please borrow your brain for a sec ?

                          @bjacobse mentionned that his small piezzo buzzer could take up to 30V...

                          So i had a go with my own buzzer and the previous schematic with 1S LiPo up to 6S LiPo (close to 25V) and 440Hz up to 32kHz (max Tone() )

                          No change there. Still the same noise i got with a smaller transistor and a 5V power supply.

                          Tone() changes the width of the modulation (X scale), so i get different tones.
                          Voltage of the power suppy changes the power going through the piezzo disc... but it doesn't get any louder.

                          So what is the magic to get a loud buzzer? I shall get my oscilloscope within a month, so until then i keep scratching my head !!

                          bjacobseB Offline
                          bjacobseB Offline
                          bjacobse
                          wrote on last edited by
                          #12

                          @ben999
                          I guess you don't hit resonance frequency.
                          Why not scavenge a piezo from a smokealarm, then you you know that the circuit is made for resonance frequency.
                          BTW I did not write MY piezo is working at 30V, I directed to a piezo that Adafruit is using, and that uses up to 30V - just to correct that I hvae not used the pieo myself

                          ben999B 1 Reply Last reply
                          0
                          • bjacobseB bjacobse

                            @ben999
                            I guess you don't hit resonance frequency.
                            Why not scavenge a piezo from a smokealarm, then you you know that the circuit is made for resonance frequency.
                            BTW I did not write MY piezo is working at 30V, I directed to a piezo that Adafruit is using, and that uses up to 30V - just to correct that I hvae not used the pieo myself

                            ben999B Offline
                            ben999B Offline
                            ben999
                            wrote on last edited by
                            #13

                            @bjacobse thanks for clarification :smile:

                            No smoke came out of mine under 25V DC so i guess it's ok

                            And yes, i shall cut open an old smoke alarm, you're right.

                            Thanks a lot

                            bjacobseB 1 Reply Last reply
                            0
                            • ben999B ben999

                              @bjacobse thanks for clarification :smile:

                              No smoke came out of mine under 25V DC so i guess it's ok

                              And yes, i shall cut open an old smoke alarm, you're right.

                              Thanks a lot

                              bjacobseB Offline
                              bjacobseB Offline
                              bjacobse
                              wrote on last edited by
                              #14

                              @ben999
                              But also look careful at the smokealarm PCB, as you might be able to reuse this to ensure that you are using resonance frequency

                              1 Reply Last reply
                              0
                              • FotoFieberF Offline
                                FotoFieberF Offline
                                FotoFieber
                                Hardware Contributor
                                wrote on last edited by FotoFieber
                                #15

                                AFAIK the piezo acts like a capacitor. If you don't use AC, you may have to discharge it with a parallel resistor or discharge it with a transistor.

                                You could find some useful information on eevblog, e.g. http://www.eevblog.com/forum/projects/how-to-connect-a-piezo-speaker-to-a-microcontroller/

                                toneAC:
                                https://bitbucket.org/teckel12/arduino-toneac/wiki/Home

                                ben999B 1 Reply Last reply
                                1
                                • FotoFieberF FotoFieber

                                  AFAIK the piezo acts like a capacitor. If you don't use AC, you may have to discharge it with a parallel resistor or discharge it with a transistor.

                                  You could find some useful information on eevblog, e.g. http://www.eevblog.com/forum/projects/how-to-connect-a-piezo-speaker-to-a-microcontroller/

                                  toneAC:
                                  https://bitbucket.org/teckel12/arduino-toneac/wiki/Home

                                  ben999B Offline
                                  ben999B Offline
                                  ben999
                                  wrote on last edited by ben999
                                  #16

                                  @fotofieber hi thank you for your message

                                  I was coming back here to share my findings.... been playing with... ToneAC :joy:

                                  Yes you're right, differential drive makes a hell of a difference! each pin of the piezo speaker are connected to its own arduino output (serial resistor on one pin though) that send the same signal in opposition as to get a differential movment.

                                  But i don't quite get it :

                                  • driving the piezo speaker with up to 25V doesn't improve noise level at all
                                  • switching to differential drive @5V (so it's a 10V potential peak-to-peak) opens hell's doors wide open

                                  That's the part i dont understand. I'll carry on investigating.

                                  Still: noise level is a bit below as compared to same pizeo speaker connected to original alarm enclosure...
                                  I might have a go with transistors and try a differential of 2S or 3S LiPo.
                                  Also waiting for my oscilloscope to find out!

                                  And lastly: ToneAC uses pins 9 and 10... so it's a NO-NO with nRF24 :cry:
                                  Enters... ToneAC2. It's inferior (CPU cycle, accuracy, lower freq) in many points except that pins are configurable.

                                  More soon... :nerd_face:

                                  mfalkviddM FotoFieberF 2 Replies Last reply
                                  0
                                  • ben999B ben999

                                    @fotofieber hi thank you for your message

                                    I was coming back here to share my findings.... been playing with... ToneAC :joy:

                                    Yes you're right, differential drive makes a hell of a difference! each pin of the piezo speaker are connected to its own arduino output (serial resistor on one pin though) that send the same signal in opposition as to get a differential movment.

                                    But i don't quite get it :

                                    • driving the piezo speaker with up to 25V doesn't improve noise level at all
                                    • switching to differential drive @5V (so it's a 10V potential peak-to-peak) opens hell's doors wide open

                                    That's the part i dont understand. I'll carry on investigating.

                                    Still: noise level is a bit below as compared to same pizeo speaker connected to original alarm enclosure...
                                    I might have a go with transistors and try a differential of 2S or 3S LiPo.
                                    Also waiting for my oscilloscope to find out!

                                    And lastly: ToneAC uses pins 9 and 10... so it's a NO-NO with nRF24 :cry:
                                    Enters... ToneAC2. It's inferior (CPU cycle, accuracy, lower freq) in many points except that pins are configurable.

                                    More soon... :nerd_face:

                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #17

                                    @ben999 nice work, thanks for sharing.

                                    To change pins for the nrf24, use the following in your sketch

                                    #define MY_RF24_CE_PIN 7
                                    #define MY_RF24_CS_PIN 8
                                    
                                    ben999B 1 Reply Last reply
                                    1
                                    • ben999B ben999

                                      @fotofieber hi thank you for your message

                                      I was coming back here to share my findings.... been playing with... ToneAC :joy:

                                      Yes you're right, differential drive makes a hell of a difference! each pin of the piezo speaker are connected to its own arduino output (serial resistor on one pin though) that send the same signal in opposition as to get a differential movment.

                                      But i don't quite get it :

                                      • driving the piezo speaker with up to 25V doesn't improve noise level at all
                                      • switching to differential drive @5V (so it's a 10V potential peak-to-peak) opens hell's doors wide open

                                      That's the part i dont understand. I'll carry on investigating.

                                      Still: noise level is a bit below as compared to same pizeo speaker connected to original alarm enclosure...
                                      I might have a go with transistors and try a differential of 2S or 3S LiPo.
                                      Also waiting for my oscilloscope to find out!

                                      And lastly: ToneAC uses pins 9 and 10... so it's a NO-NO with nRF24 :cry:
                                      Enters... ToneAC2. It's inferior (CPU cycle, accuracy, lower freq) in many points except that pins are configurable.

                                      More soon... :nerd_face:

                                      FotoFieberF Offline
                                      FotoFieberF Offline
                                      FotoFieber
                                      Hardware Contributor
                                      wrote on last edited by
                                      #18

                                      @ben999 said in Piezzo siren/alarm:

                                      But i don't quite get it :

                                      driving the piezo speaker with up to 25V doesn't improve noise level at all
                                      switching to differential drive @5V (so it's a 10V potential peak-to-peak) opens hell's doors wide open

                                      You may try to use a 1kOhm resistor parallel to the piezo (as suggested on eevblog).

                                      1 Reply Last reply
                                      1
                                      • mfalkviddM mfalkvidd

                                        @ben999 nice work, thanks for sharing.

                                        To change pins for the nrf24, use the following in your sketch

                                        #define MY_RF24_CE_PIN 7
                                        #define MY_RF24_CS_PIN 8
                                        
                                        ben999B Offline
                                        ben999B Offline
                                        ben999
                                        wrote on last edited by ben999
                                        #19

                                        @mfalkvidd oh yeah I forgot about that one!!! Thanks a lot! I have used this with a Mega for who-knows-what-reason in the past but completely forgot about it! ToneAC still in the race then, thanks again

                                        @fotofieber thanks a lot, but that thread is for high-level hobbyists!!! :scream: Schematics, yummy!!!
                                        "replace the resistor with an inductor then you double the swing" but no figures... i'll google that and see where it gets me...
                                        I dont even know the specs of my piezo :zipper_mouth_face:

                                        FotoFieberF 1 Reply Last reply
                                        0
                                        • ben999B ben999

                                          @mfalkvidd oh yeah I forgot about that one!!! Thanks a lot! I have used this with a Mega for who-knows-what-reason in the past but completely forgot about it! ToneAC still in the race then, thanks again

                                          @fotofieber thanks a lot, but that thread is for high-level hobbyists!!! :scream: Schematics, yummy!!!
                                          "replace the resistor with an inductor then you double the swing" but no figures... i'll google that and see where it gets me...
                                          I dont even know the specs of my piezo :zipper_mouth_face:

                                          FotoFieberF Offline
                                          FotoFieberF Offline
                                          FotoFieber
                                          Hardware Contributor
                                          wrote on last edited by
                                          #20

                                          @ben999 said in Piezzo siren/alarm:

                                          @fotofieber thanks a lot, but that thread is for high-level hobbyists!!! Schematics, yummy!!!
                                          "replace the resistor with an inductor then you double the swing" but no figures... i'll google that and see where it gets me...
                                          I dont even know the specs of my piezo

                                          I try to simplify: Take a 1 kOhm resistor and attach each side of it to another pin of the piezo. Don't change anything else.

                                          ben999B 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular