Making a door chime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dannyx
    CertifiedAxhole
    • Aug 2016
    • 3912
    • Romania

    #1

    Making a door chime

    Good day folks. This may seem like something totally stupid and pointless, but I want to make one of those chimes which emit a fairly loud sound when someone opens the door to let me know someone has walked in Of course you can just buy one of these, but that's beside the point.

    I'm thinking of the humble 555 again and sure enough, I found something which is fairly close: THIS. I'd like it to beep 5-6 times in rapid succession at a high pitch (2000Hz or so) then stop (how these chimes typically work). To achieve this, I may need TWO 555s: one to generate the ringing (which is illustrated in the article) and another to handle the 1-2 second countdown in which the thing is allowed to beep, then cut its power so to say. A N/O reed switch in alarm systems will detect the door's closure/opening: when the door is closed, so is the switch and the circuit is disabled. When the door opens, so does the reed switch, which triggers a fast sequence of beeps then stops - that would be the operating principle.

    I HAVE built a 555 countdown timer for another project so I know that works, but I was wondering if someone had any better ideas to cut down the part count even more. 2 555s seem a bit overkill.
    Wattevah...
  • goontron
    5000!
    • Dec 2011
    • 4108
    • US

    #2
    Re: Making a door chime

    Things I've fixed: anything from semis to crappy Chinese $2 radios, and now an IoT Dildo....

    "Dude, this is Wyoming, i hopped on and sent 'er. No fucking around." -- Me

    Excuse me while i do something dangerous


    You must have a sad, sad boring life if you hate on people harmlessly enjoying life with an animal costume.

    Sometimes you need to break shit to fix it.... Thats why my lawnmower doesn't have a deadman switch or engine brake anymore

    Follow the white rabbit.

    Comment

    • Dannyx
      CertifiedAxhole
      • Aug 2016
      • 3912
      • Romania

      #3
      Re: Making a door chime

      Right, I was actually wondering whether they made DUAL 555s...I just realized that battery life would be a big problem with that countdown timer I had in mind, since it "leaks" VCC to GND via the discharge pin when "disabled", so that's no good at all....will have to rethink it. That's another thing I needed to mention: battery life if important since I can't run any wires up to that door.
      Wattevah...

      Comment

      • eccerr0r
        Solder Sloth
        • Nov 2012
        • 8697
        • USA

        #4
        Re: Making a door chime

        <sarcasm>One...microcontroller... </sarcasm>

        Comment

        • petehall347
          Badcaps Legend
          • Jan 2015
          • 4426
          • United Kingdom

          #5
          Re: Making a door chime

          Comment

          • R_J
            Badcaps Legend
            • Jun 2012
            • 9535
            • Canada

            #6
            Re: Making a door chime

            what about this
            Attached Files

            Comment

            • CapLeaker
              Leaking Member
              • Dec 2014
              • 8123
              • Canada

              #7
              Re: Making a door chime

              Lol

              Comment

              • budm
                Badcaps Legend
                • Feb 2010
                • 40746
                • USA

                #8
                Re: Making a door chime

                Originally posted by R_J
                what about this
                I like it, no power needed and no bad caps to go bad and it will last forever!
                Never stop learning
                Basic LCD TV and Monitor troubleshooting guides.
                http://www.badcaps.net/forum/showthr...956#post305956

                Voltage Regulator (LDO) testing:
                http://www.badcaps.net/forum/showthr...999#post300999

                Inverter testing using old CFL:
                http://www.badcaps.net/forum/showthr...er+testing+cfl

                Tear down pictures : Hit the ">" Show Albums and stories" on the left side
                http://s807.photobucket.com/user/budm/library/

                TV Factory reset codes listing:
                http://www.badcaps.net/forum/showthread.php?t=24809

                Comment

                • Dannyx
                  CertifiedAxhole
                  • Aug 2016
                  • 3912
                  • Romania

                  #9
                  Re: Making a door chime

                  That would work, though it's not really DIY is it ? A micro would make it easy but it's overkill...
                  Wattevah...

                  Comment

                  • Curious.George
                    Badcaps Legend
                    • Nov 2011
                    • 2305
                    • Unknown

                    #10
                    Re: Making a door chime

                    Originally posted by Dannyx
                    Good day folks. This may seem like something totally stupid and pointless, but I want to make one of those chimes which emit a fairly loud sound when someone opens the door to let me know someone has walked in Of course you can just buy one of these, but that's beside the point.

                    I'm thinking of the humble 555 again and sure enough, I found something which is fairly close: THIS. I'd like it to beep 5-6 times in rapid succession at a high pitch (2000Hz or so) then stop (how these chimes typically work). To achieve this, I may need TWO 555s: one to generate the ringing (which is illustrated in the article) and another to handle the 1-2 second countdown in which the thing is allowed to beep, then cut its power so to say. A N/O reed switch in alarm systems will detect the door's closure/opening: when the door is closed, so is the switch and the circuit is disabled. When the door opens, so does the reed switch, which triggers a fast sequence of beeps then stops - that would be the operating principle.

                    I HAVE built a 555 countdown timer for another project so I know that works, but I was wondering if someone had any better ideas to cut down the part count even more. 2 555s seem a bit overkill.
                    Why the obsession with 555's? You can use a microcontroller in the same physical space with thousands of times more capability/flexibility. (about all the 555 offers is more source/sink current capability on the output pin -- something you can add to an MCU with a discrete transistor/FET). Time spent fiddling with an archaic 555 would be more fruitfully spent playing with MCU's. And, once you've mastered that, you'll be at the doorstep of writing VHDL/Verilog to design FPGA's, etc.

                    (OTOH, if you're fixated on the 555, Signetics has some excellent databooks that are oriented exclusively on 555 applications -- which are numerous and varied!)

                    [As a hardware designer by training -- EE -- I am chagrined at how often I can solve a problem with a bit of code and a 50 cent microcontroller cheaper and more flexibly than a "real" hardware solution!]

                    Without using any hardware timers (which would impact the range of MCU choices available to you), your application boils down to:

                    #define BEEP_PERIOD (??)
                    ASSERT(2*BEEP_PERIOD > 0)

                    #define BEEP_CYCLES (??)
                    ASSERT(BEEP_CYCLES > 0)

                    #define PAUSE_INTERVAL (??)
                    #define NUMBER_OF_BEEPS (5)

                    main() {
                    int count = 0;
                    while (count++ < NUMBER_OF_BEEPS) {
                    beep(BEEP_PERIOD/2, BEEP_CYCLES);
                    delay(PAUSE_INTERVAL);
                    }
                    }

                    beep(long halfperiod, long cycles) {
                    do {
                    set_output(HIGH);
                    delay(halfperiod);
                    set_output(LOW);
                    delay(halfperiod);
                    } while (cycles--);
                    }

                    delay(long time) {
                    while (time--) { /* No-Op */ }
                    }

                    Compile it with all optimizations off.

                    Start by picking (in your mind) a nominal beep frequency (e.g., 2KHz). And, a nominal "beep duration" -- say half a second? From this, you can compute the number of BEEP_CYCLES as duration*frequency (e.g., 1000)

                    Initially, set NUMBER_OF_BEEPS to one to ensure you don't have multiple beeps running together (until we know how to specify the PAUSE_INTERVAL). Then, poke in values for BEEP_PERIOD until you get a beep that is about the right duration (note that this should ensure the beep is about the correct frequency as the two are related by the equation saving you the need to drag out a 'scope to measure the actual frequency!)

                    Take whatever number you've come up with for BEEP_PERIOD and compute frequency*BEEP_PERIOD to yield a figure roughly representative of "one second". Take that number and use it to derive a PAUSE_INTERVAL figure (e.g., if you want to pause for half a second between beeps, use half of the number you've come up with).

                    Replace NUMBER_OF_BEEPS with the desired number of beep tones.

                    You can eliminate much of this "guesswork" if you know the MCU you've targeted (so you know how fast it runs and how expensive its opcodes are) and the code generation characteristics of the compiler you're using (so you know which opcodes it is using to implement each of the above statements).

                    Power the circuit from the "door is open" switch. The program will just stop when it completes (if the door remains open indefinitely).

                    Or, if you want to be able to play a long series of beeps initiated by a short duration door switch, poll a switch to determine when to start the program.

                    Capacitively couple the drive to the speaker to remove the possibility of DC sitting on the coil.

                    Comment

                    • Curious.George
                      Badcaps Legend
                      • Nov 2011
                      • 2305
                      • Unknown

                      #11
                      Re: Making a door chime

                      Originally posted by Dannyx
                      That would work, though it's not really DIY is it ? A micro would make it easy but it's overkill...
                      By the same token, isn't a 555 overkill? Using electronics to electromagnetically move a diaphram to recreate the vibrations that a metallic object creates when struck?

                      How about hiring someone to stand by the door and go "ring-a-ling-a-ling" when folks come in? That has the added advantage of being a unique solution -- one that can be customized on-the-fly (heck, it could even ANNOUNCE the identities of your visitors!!)

                      [One gets the impression that you're just trying to find a use for a 555]

                      Comment

                      • Dannyx
                        CertifiedAxhole
                        • Aug 2016
                        • 3912
                        • Romania

                        #12
                        Re: Making a door chime

                        Originally posted by Curious.George
                        By the same token, isn't a 555 overkill? Using electronics to electromagnetically move a diaphram to recreate the vibrations that a metallic object creates when struck?

                        How about hiring someone to stand by the door and go "ring-a-ling-a-ling" when folks come in? That has the added advantage of being a unique solution -- one that can be customized on-the-fly (heck, it could even ANNOUNCE the identities of your visitors!!)

                        [One gets the impression that you're just trying to find a use for a 555]
                        The human doorbell would require payment, plus we already do that ourselves and would like a day off every now and then

                        The idea was to use parts from my junk box, but on a serious note: an Attiny perhaps ? I'm not vexed in micros so I know they CAN be used, but don't know WHICH to use for the job...I'll just use my Arduino Mega then
                        Wattevah...

                        Comment

                        • Curious.George
                          Badcaps Legend
                          • Nov 2011
                          • 2305
                          • Unknown

                          #13
                          Re: Making a door chime

                          Originally posted by Dannyx
                          The human doorbell would require payment, plus we already do that ourselves and would like a day off every now and then

                          The idea was to use parts from my junk box, but on a serious note: an Attiny perhaps ? I'm not vexed in micros so I know they CAN be used, but don't know WHICH to use for the job...I'll just use my Arduino Mega then
                          There are innumerable small MCUs that will tackle any of these jobs. It boils down to a matter of personal preference. Most folks start using "Brand X" and find themselves using it over and over again -- for no real reason (other than the fact that Brand X and Brand Y are practically equivalent in terms of price/performance... it's a commodity market!)

                          "Familiarity" drives these decisions. What components are you used to using, what tools do you have available, what parts do you have in stock, etc. I used to rely heavily on 74163's when doing MSI designs even when I just needed a latch (i.e., not a counter) -- instead of specifying a different component that was just a latch! Being a fully synchronous part made it easier for me to use without having to gate clocks, or synthesize multiphasic control signals. Folks looking at my designs would scratch their heads wondering why the "counters never counted" <frown>

                          It's only when you get to pinching pennies -- or, operating on the bleeding edge, performance wise -- that the actual device you choose takes on special significance.

                          Nowadays, there is very little barrier to getting started with most processors. Tools are virtually free, development boards are inexpensive, etc. You don't have to purchase a "development system", PROM programmer, In-Circuit Emulator, assembler/linker/compiler, etc. Indeed, you can even simulate your code on a desktop PC without having any "real" hardware available!

                          The ATtiny family, some of the smaller PICs, etc. are all good fits. You just decide which you want to play with or already have on hand! I've used small MCUs as "slave processors" in some designs to offload certain well-defined aspects of the application from the "master processor" (iff there is a clean semantic interface between them)

                          IME, its good to play with different components so you are coerced into trying different approaches to problems -- you discover that component Y doesn't have a capability that component X had and you are forced to come up with an alternative, equivalent way of doing something.

                          Part of the fun is figuring out what you didn't need in a design and using that knowledge to optimize your next one!

                          Do chase down the Signetics docs on the 555 (556/558/559) if you're interested in them. You would be amazed at the number of interesting applications that folks have created for that venerable part! (And, the folks at Signetics were notorious for their sense of humor so expect some interesting Easter Eggs along the way)

                          Time to go count falling stars...

                          Comment

                          • stj
                            Great Sage 齊天大聖
                            • Dec 2009
                            • 30983
                            • Albion

                            #14
                            Re: Making a door chime

                            Originally posted by eccerr0r
                            <sarcasm>One...microcontroller... </sarcasm>
                            funny you should say that,
                            i have code to play tunes or even a short sound-sample from an atmel tiny-series.

                            also, for a couple of € on ebay -
                            Attached Files

                            Comment

                            • eccerr0r
                              Solder Sloth
                              • Nov 2012
                              • 8697
                              • USA

                              #15
                              Re: Making a door chime

                              Yeah, I was thinking the atmel could also be used to play arbitrary tones and not just have to turn on a buzzer -- just use a speaker.

                              I don't think it has enough memory to PWM a voice sample, maybe if you used an ARM. Now it might be "overkill" for a doorbell, but it having it say:

                              "SHH! SOMEONE'S AT THE DOOR, QUICK! HIDE IT ALL!!!"

                              is priceless...

                              Comment

                              • Dannyx
                                CertifiedAxhole
                                • Aug 2016
                                • 3912
                                • Romania

                                #16
                                Re: Making a door chime

                                Originally posted by eccerr0r
                                Yeah, I was thinking the atmel could also be used to play arbitrary tones and not just have to turn on a buzzer -- just use a speaker.

                                I don't think it has enough memory to PWM a voice sample, maybe if you used an ARM. Now it might be "overkill" for a doorbell, but it having it say:

                                "SHH! SOMEONE'S AT THE DOOR, QUICK! HIDE IT ALL!!!"

                                is priceless...
                                My boss wouldn't quite like the idea of me creating a device that says that While some clients may get a little laugh out of it, some might not, so a simple buzzer is OK. I found a way to actually run some power to that door, since I personally don't like batteries all that much to begin with - shoot me My colleague is more vexed with micros and has played around with Attiny before so I might ask him to lend me a helping hand...After all, all it needs is a buzzer and a reed or even mechanical switch.
                                Wattevah...

                                Comment

                                • Dannyx
                                  CertifiedAxhole
                                  • Aug 2016
                                  • 3912
                                  • Romania

                                  #17
                                  Re: Making a door chime

                                  Question: can I use arduino code on chips other than Atmels ? I heard that it is possible somehow. I already have a buzzer project so it would be easier to send that straight to the micro (with the obligatory modifications to do what I want of course) than to struggle with code for a an entirely different micro.....true, as somebody pointed out, that would be part of the learning experience, but I'm too "young" at this to venture that far...at least for now. You can't really learn to drive on a perfectly flat and straight road - true, but it's also not a good idea to try out 5 different cars days after getting your license
                                  Wattevah...

                                  Comment

                                  • eccerr0r
                                    Solder Sloth
                                    • Nov 2012
                                    • 8697
                                    • USA

                                    #18
                                    Re: Making a door chime

                                    Well, that's what the "mapping" issue I was alluding to on the other thread, you'll have to "map" your code to the target architecture which will differ. Arduino was meant as an add-on to Atmel. You'll have to convert it to run it on other chips, and perhaps there are add-ons to other chips that will take Arduino code directly. You could even have to map Arduino to ATTiny directly so you don't use Arduino code, but if mapped carefully it's likely smaller; at the very least that the Arduino "loader/library" adds a bunch of code that wastes space...

                                    It is a bit troubling that microcontroller manufacturers like to differentiate themselves to get people to stick with a particular microcontroller as "vendor lock-in". I ended up learning PIC first to do a project (if you don't count z80 and the likes) but was instantly in love with Atmel after getting it to work for a different project... Probably because I was more used to load-store architectures and actual stack pointers (instead of dedicated stacks) in memory.

                                    Comment

                                    • Curious.George
                                      Badcaps Legend
                                      • Nov 2011
                                      • 2305
                                      • Unknown

                                      #19
                                      Re: Making a door chime

                                      Originally posted by stj
                                      funny you should say that,
                                      i have code to play tunes or even a short sound-sample from an atmel tiny-series.
                                      You can do a lot with a single bit (on/off) output -- if you have a sufficiently high sample clock. The speaker in the original PC (or, maybe it was the AT?) could be made to "speak" with a little utility called SAY.COM.

                                      Here's a version with a canned (unalterable) message within... (unpack for DOS executable)

                                      [Run it in a sandbox if you fear it]
                                      Attached Files

                                      Comment

                                      • Curious.George
                                        Badcaps Legend
                                        • Nov 2011
                                        • 2305
                                        • Unknown

                                        #20
                                        Re: Making a door chime

                                        Originally posted by Dannyx
                                        Question: can I use arduino code on chips other than Atmels ? I heard that it is possible somehow.
                                        Code that you write in a portable language is... portable! (C, python, etc.)

                                        Where you will most encounter problems is when you start using non-portable extensions to a language. Or, support libraries that may be tied to a particular "board" (i.e., there is no portable way to turn on a digital output bit cuz there are no standards governing them).

                                        This is why pseudo-code is a big win -- you express what you want the algorithm to do in a language that is almost real. The parts that are fictional end up being implemented (by you) in whatever way is necessary to fit the microprocessor/microcontroller that you've targeted.

                                        E.g., in my example, upthread, there is no definition for the "set_output()" function, included... because that code sample has no idea of which MCU you'll be using for the actual implementation! Will the "output" be a digital output bit on a port on the MCU? Will that port reside at some particular memory address? Or, some particular I/O address?? Will I need to write a special value -- or series of special values -- to drive the pin HIGH? etc.

                                        By writing the algorithm the way I did, I can "port" it to virtually any processor -- including an IBM PC -- just by changing that non-portable aspect of the code (and using a compiler appropriate for the computer in question).

                                        Comment

                                        Related Topics

                                        Collapse

                                        Working...