Help on a Simple LED and Short Beep Circuit

Discussion in 'The Projects Forum' started by n2glox, Oct 24, 2009.

  1. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0
    I created a simple LED circuit with a Reed switch to show when my garage door is open. I used a simple LED (2VF), with a 680 ohm resistor. My power supply is 12v. This works well with the switch (switch is normally open when door is shut). Garage door goes up, magnet leaves the reed switch and the circuit is activated. Light goes on.

    I would like to add to this simple circuit. I want to add a small beep that goes off every 15-30 seconds, relatively soft, and lasts for about 0.5 sec to 1.0 seconds in duration. I have piezo speaker (5v) and some capacitors, resistors, and a 555 chip. I cannot quite find a circuit that does what I want.

    If I can make it so that the LED is constantly on when activated then I would prefer that, but if it is simpler to have it flash then that is ok too.

    So can anyone help me with the schematic for the additional timed beep? Also can I soften the speaker with resistors or something else?

    Thanks.

    Jeff
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    [​IMG]
     
  3. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0
    Thank you for the nice schematic. Ok, I think I understand the schematic. I understand that I will need a 390k resistor and a 12KΩ resistor. i will need a capacitor that is 100μF and one that is 0.1F.

    Let me see if I can get the layout correct. I am very new at this and need to make certain I understand.

    I can run a line in from my other LED circuit with power so that this circuit gets power at the same time as the other one. Run a wire right after the reed switch. OK, power goes in (+) and connects to Pin 8, I connect Pin 4 to Pin 8 also. I connect the Power in also to Ra and to the speaker. Pin 7 comes out and connects between Ra and Rb. I then Connect Pin 2 to Pin 6. and then connect that after Rb and then connect that to C1.

    THe Speaker is connected to the power coming in (+) and then connected to Pin 3. Pin 5 is connected to C2 and Pin 1 goes out (-) to finish the circuit?

    If I am understanding I also connect C1 and C2 to the same (-) wire?

    A. Does the above make sense?

    B. I am on the right track with regards to the Breadboarding and eventual circuit?

    Thank you for all your help.

    I have to get the Resistors and the Capacitors so I will breadboard then.

    Jeff
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, a couple of cautions here.

    Reed switches are only designed to carry a very small amount of current. If you try to provide power or ground to the 555 timer via your reed switch, it will very quickly get burned up!

    Instead, you need the reed switch to turn on a transistor or power MOSFET to light up your LED and run the 555 timer circuit.

    There is another little problem in that your piezo buzzer is designed for 5v, and as the circuit above shows, you will get about 12v to the piezo buzzer when the 555 timer output goes low. It will be a short beep, indeed!
     
  5. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    A chirping piezeo speaker sounded familiar, so dug out my chelation timer from about 1988. Increase C1 to about 47μF for 15-30 sec. For a longer chirp increase R2. For different freq. play with C2. Chip is 556 or 2 555's
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Gee Bernard,
    There doesn't seem to be a charge path for C1.
    I think you meant to have the 200k resistor connected just after the power switch, and the junction between the 200k and 3Meg pot connected to the discharge pin. It couldn't possibly work otherwise.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here's an idea similar to Bill Marsden's, but it shows all the components that I think you'll need.

    It will beep a little more frequently than you have in mind, but I find that beeps that are spaced far apart are annoying, because it takes awhile to figure out where they're coming from. If you increase C1 to 33uF, you'll get about 20 seconds between beeps.

    [​IMG]

    Your piezo buzzer is only rated for 5v. The 7805 regulator takes care of that problem.

    S1 is your existing reed switch.
    R3 limits the current through your reed switch to 5mA.
    The 2N2222 transistor has to carry around 200mA at times. That's OK, it'll survive; your reed switch wouldn't last long with that kind of current going through it.

    R4 and D1 are your original 680 Ohm resistor and LED.

    C2, C3 and C4 are necessary for the stability of the circuit.
    R1 and R2 are the timing resistors, C1 is the timing capacitor.
    R1 + R2 controls the buzzer OFF time, R2 controls the buzzer ON time.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    Another problem I thought of after drew it, those pesky darlingtons. If the buzzer quietly sounds when it should be off add either an LED in series with the pizieo, or a couple of diodes (any flavor).

    Depending on the buzzer, it may not be a problem.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, I think that our OP is a complete novice, and may not have any idea on how to proceed.

    I think that they are still expecting an answer from you as to how to go forward. They certainly have lots of questions rolling around in their head.

    I don't think that a piezo buzzer designed to operate at 5v will make much of a noise (if any) when subjected to the 1.3v differential on the 555 output.

    I don't happen to have one of them offhand. But our OP could test it by using an AA battery to see if it would make a noise.

    I posted my schematic suggestion as a potential complete solution to our OP's dilemma. You posted before me; go for it.
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    OK, when I get home I'll redraw it.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You don't necessarily have to re-draw it; just explain it.

    My schematic is ugly, but it's based in reality; how our OP will more or less have to orient components in order to make the circuit work.
     
  12. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    Aw heck, I'll redraw it and make it purdy.

    Basically Wookie is using a transistor as a switch, it is one of their strengths. Low current through the base emitter causes the Collector Emitter to act like a relay.

    Wookie and I don't alway agree on capacitors, but in this case the LM7805 requires it. These kind of regulators need the capacitors to keep from oscillating. If you look at the equations I included on the first schematic you can tweak the durations to whatever you like, we just designed for different values. I went for the top end, thinking you could adjust it as needed.

    If you use a Sonalert (or similar brand) they can work down to 1.5V, and the 555 on the positive end only goes to around 1.4V of the power supply. This can be fixed easily, I'll show you one the next revision of schematics.
     
  13. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0
    Yes the OP is a complete novice. My soldering is pretty nice and I am starting to understand this stuff, but I am still far behind the curve.

    THe speaker did great with a AA battery. Plenty loud. A little less voltage would be fine to make softer.

    I do want it to be brief and spread out at about 15 second intervals. My reason is that this is designed to alert us when the Garage Door is up, when it gets triggered late at night (don't ask why this happens, its complicated). I may lengthen the time between beeps and make the beep last longer. once I get it breadboarded I can play with capacitors and resistors.

    We do not routinely leave our garage door up for long periods of time so it will not be too irritating.

    Thanks!!

    Jeff
     
  14. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0

    Would I still need the 78L05 regulator if the speaker runs fine with 1.5v?

    Also the Reed Switch specs say the following:

    0.02Amp./100VDC (max.)
    0.2Amp./10VDC (max.)
    3W (max.)

    Does that change any of the figures? If I am running 12v to it now, then I clearly need to reduce the voltage anyway, and 5v will be fine. Heck I can go lower if necessary.

    Thanks again.

    Jeff
     
  15. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    No mistake Sgt., works fine as shown, C1 charges from pin 5, output. ' see piezeo " speaker " has built in oscillaton-net mentioned by OP.
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Jeff,
    Yes, you will still need the 7805 regulator. Ignore the "L" in the middle of the part number.

    Here is a revised schematic:

    [​IMG]

    The changes were necessary because your piezo buzzer makes noise with 1.5v across it. With these changes, the buzzer will have almost no voltage across it (and therefore not buzzing) during the time delay.

    Note that the values for R1 and R2 have changed places, and there is now a diode across R2. R1 controls the duration of the buzzing, currently about 0.6 seconds Don't decrease R1 below about 1.5k Ohms, or you will damage the 555 timer. R2 controls the delay between the buzzing, currently about 22 seconds. Note that C1 is now 33uF.

    Also note that the connections to the piezo buzzer have been changed. The 555 output pin 3 is now connected to the buzzer's + input, and the buzzer's - input is connected to the collector of Q1. R5 has been added to reduce the current flow through the buzzer, in an attempt to reduce it's volume somewhat. I do not know the specifications of your buzzer besides that it works when supplied with voltage from 1.5v to 5v. You will have to experiment with different values for R5, but 1k might be a good starting place.

    Although your reed switch has a capacity of 0.2A @ 10v, it will last far longer if you are using the transistor Q1 to carry the brunt of the load, rather than the reed switch.
     
  17. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    I don't think I've seen using the diode like that, though it makes sense.
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yep, it gives you the capability of a wide range astable multivibrator using the standard datasheet example connections. Otherwise, the output high duration will always be greater than 50% of the PRT (pulse repetition time).
     
  19. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0
    Thank you both so much for the help. I have to get some parts and then sit down at the breadboard. If I have questions about breadboarding it, I will ask. Thank you again.

    Jeff
     
  20. n2glox

    Thread Starter Active Member

    Aug 29, 2009
    38
    0
    Ok, It took me two tries but I got the circuit breadboarded - sort of. I am clearly getting some of it to work , because my beep comes through like a i planned - about 1 second or less in duration and 24 seconds between. I may try to make it louder, but will experiment, once I get the rest of the circuit working.

    All of the parts are what was on the schematic except that R2 is 866Ω rather than 850, because i could not find an 850Ω

    So I get it setup and plug in a 12v power supply, and activate the magnetic switch. 24 seconds later I get a nice beep. No red LED. Disconnect the switch and I still get a beep, but no red LED flash (or solid LED).

    So here is a link to pictures of the breadboard lay out.

    Here is a link to the schematic from earlier in the thread.

    [​IMG]

    Here is one of the better pictures of the layout (follow the link above and the pictures are bigger).

    [​IMG]

    here is another shot from the back:

    [​IMG]

    I figure I have a jumper or something in the wrong place. I know it is close.

    Thanks for all the help, this has been a neat project, and i am excited.

    Jeff
     
Loading...