Help on a Simple LED and Short Beep Circuit

SgtWookie

Joined Jul 17, 2007
22,230
OK, looks like you have a problem in the area of the 2N2222 transistor (wow, a real TO-18 case version! :))

I'm looking at this photo: http://gallery.me.com/jklinephd#100066/07-Breadboard_garage_circuit&bgcolor=black
or full size: http://gallery.me.com/jklinephd/100066/07-Breadboard_garage_circuit/web.jpg?ver=12583468750001

On the 2N2222 transistor, there is a rectangular tab on the rim of the TO-18 can. The tab can be seen pointing towards the lower right corner of the board.

This tab is closest to the emitter wire, which you now have connected to the black wire of the switch; the emitter needs to be connected to ground instead; it is the ONLY point in the circuit that connects to ground. The collector is the furthest wire from the emitter wire; it needs to connect to the LED's cathode, the 7805's ground terminal, and the rest of the connections shown in the schematic The easiest way to correct this would be to move your power supply negative wire from the - rail to the + rail next to it (now unused), plug the emitter of the 2N2222 into the other end of the + rail, and plug the collector into the same column (3) as the LED's cathode or the - rail; you will need to add a jumper wire between the - rail and column 3 to power the LED and the rest of the items. The base wire is between the emitter and collector; it needs to plug into column 1; row "a" would be the easiest.

The yellow jumper with one end plugged into i-1 is supplying the 7805, it's connected incorrectly. It needs to go straight from the +12v rail to the IN terminal of the 7805. Otherwise, all of the current for the circuit has to flow through R3, a 2.4k Ohm resistor. It will not work well like that. That's why you're getting the beep, but not the LED.

You seem to have done quite well with the resistor color codes - but just in case you need a bit of help with them, here's a graphic 5-band resistor color code decoder:
http://samengstrom.com/nxl/10116/5_band_resistor_color_code_page.en.html
Just click on the colors in the vertical bar to select & move to the next band.
 
Last edited:

Thread Starter

n2glox

Joined Aug 29, 2009
38
OK, looks like you have a problem in the area of the 2N2222 transistor (wow, a real TO-18 case version! :))

I'm looking at this photo: http://gallery.me.com/jklinephd#100066/07-Breadboard_garage_circuit&bgcolor=black

On the 2N2222 transistor, there is a rectangular tab on the rim of the TO-18 can. The tab can be seen pointing towards the lower right corner of the board.

This tab is closest to the emitter wire, which you now have connected to the black wire of the switch; the emitter needs to be connected to ground instead; it is the ONLY point in the circuit that connects to ground. The collector is the furthest wire from the emitter wire; it needs to connect to the LED's cathode, the 7805's ground terminal, and the rest of the connections shown in the schematic The easiest way to correct this would be to move your power supply negative wire from the - rail to the + rail next to it (now unused), plug the emitter of the 2N2222 into the other end of the + rail, and plug the collector into the same column (3) as the LED's cathode or the - rail; you will need to add a jumper wire between the - rail and column 3 to power the LED and the rest of the items. The base wire is between the emitter and collector; it needs to plug into column 1; row "a" would be the easiest.

The yellow jumper with one end plugged into i-1 is supplying the 7805, it's connected incorrectly. It needs to go straight from the +12v rail to the IN terminal of the 7805. Otherwise, all of the current for the circuit has to flow through R3, a 2.4k Ohm resistor. It will not work well like that. That's why you're getting the beep, but not the LED.

You seem to have done quite well with the resistor color codes - but just in case you need a bit of help with them, here's a graphic 5-band resistor color code decoder:
http://samengstrom.com/nxl/10116/5_band_resistor_color_code_page.en.html
Just click on the colors in the vertical bar to select & move to the next band.
Thank you. I am off to the bench now. Thanks for the link to the resistor codes, they are a <snip>. I have an iphone app that helps a lot, and the iphone is easy ot have at my workbench. My biggest problem is reading the colors correctly (not color blind, just that some look an awful lot a like).

The ground gets me a little confused on schematics. I don't have a true ground (as in 3rd wire as in AC circuits) so I was not certain where that went.

Thanks!

Jeff
 
Last edited by a moderator:

SgtWookie

Joined Jul 17, 2007
22,230
Sure thing, Jeff.

One thing that I didn't think about before is the possibility of Q1 (the 2N2222) leaking current.

If you want to make certain that it stays off when it's supposed to be off (the magnetic switch is open) then jumper a resistor between the base and the emitter; of a value anywhere from 3k Ohms to 10k Ohms; somewhere in the middle of those two would work fine.
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
Sure thing, Jeff.

One thing that I didn't think about before is the possibility of Q1 (the 2N2222) leaking current.

If you want to make certain that it stays off when it's supposed to be off (the magnetic switch is open) then jumper a resistor between the base and the emitter; of a value anywhere from 3k Ohms to 10k Ohms; somewhere in the middle of those two would work fine.
Well I made the corrections, but did not put a jumper resistor between the base and the emitter, and it is not leaking current, at least as far as I know. When I turn on the switch in my case remove the magnet, so that the circuit is active, it turns on fine, the LED works, and the beep is every 22 seconds. When I put the magnet back in place (switching it off), it seems to stay off.

If leaking I would assume that after running for a while it would beep or flicker the LED? How long should I run it to see if it is leaking, or just put in a resistor?

I want to thank you. It works wonderfully. The only change I made to the Schematic is that I used a 560Ω resistor at R5. With the 1k it was not beeping, just clicking, same with a 680Ω. Obviously the R5 value will vary depending on someone's speaker. I may try a 580Ω or 600Ω if they are easy to get, to see if it makes a difference.

One other question, is it possible that I could fry the 2n2222? I made all the changes and could not get it to work. I was disconnecting the reed switch and touched something and the LED lit, but I could not recreate the effect. I decided to switch out the 2n2222 and then it started working. I thought maybe I fried it at some point.

Thanks Again.

Jeff
 

SgtWookie

Joined Jul 17, 2007
22,230
Well I made the corrections, but did not put a jumper resistor between the base and the emitter, and it is not leaking current, at least as far as I know. When I turn on the switch in my case remove the magnet, so that the circuit is active, it turns on fine, the LED works, and the beep is every 22 seconds. When I put the magnet back in place (switching it off), it seems to stay off.

If leaking I would assume that after running for a while it would beep or flicker the LED? How long should I run it to see if it is leaking, or just put in a resistor?
It won't hurt to put in a resistor. 10k would work just fine. The thing is, with the switch open, the base of the transistor is left disconnected. While this is usually not a problem, you might just wind up with some small leakage that may eventually cause the buzzer to beep at odd intervals. This is just an oversight on my part; it will help prevent the possibility of "mystery beeps" in the future.

I want to thank you. It works wonderfully. The only change I made to the Schematic is that I used a 560Ω resistor at R5. With the 1k it was not beeping, just clicking, same with a 680Ω. Obviously the R5 value will vary depending on someone's speaker. I may try a 580Ω or 600Ω if they are easy to get, to see if it makes a difference.
Standard decade values of resistance are on this page: http://www.logwell.com/tech/components/resistor_values.html
Usually, E12 (yellow columns) and/or E24 (green columns) values are the only ranges you can get locally, unless there's a big electronics store nearby.

As I mentioned early on, I selected the 1k Ohm value for R5 arbitrarily, as I didn't know what the current requirement for your buzzer was. If it didn't work at 680 Ohms but works OK with 560, I would just leave it at that. Might even go down to 510 or 470, just to make sure that it'll beep.

One other question, is it possible that I could fry the 2n2222?
Absolutely. I couldn't actually make out precisely how you had it connected, but the emitter connected to the magnetic switch was a dead give-away that it was not correct. The negative supply wire being common to all of the other grounds was another indication that your wiring was amiss.

I made all the changes and could not get it to work. I was disconnecting the reed switch and touched something and the LED lit, but I could not recreate the effect. I decided to switch out the 2n2222 and then it started working. I thought maybe I fried it at some point.
It's not hard to "zap" parts, particularly if you drag a live wire across something, or hook something up wrong. Things can get fried in a big hurry, particularly if there is no current limiting.

I used reasonable (conservative) values in the schematic diagram; if everything is wired correctly, it should be pretty reliable. You can use 1/4 Watt resistors for everything except for R4; a 1/2 Watt resistor would be better there.
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
As I mentioned early on, I selected the 1k Ohm value for R5 arbitrarily, as I didn't know what the current requirement for your buzzer was. If it didn't work at 680 Ohms but works OK with 560, I would just leave it at that. Might even go down to 510 or 470, just to make sure that it'll beep.
Well It works. I put all the parts on an Circuit board. After a few minor adjustments for errors and having to remove and re-place one resistor, it worked. Thank you again. One last question. I added an on/off switch to the speaker. Since this is designed to warn us of an open garage and not bug us, it might be nice to be bale to turn off the beep while working in the garage. On the breadboard it worked fine. On the circuit board the volumn is a little lower on the speaker. If i used a 470Ω resistor as opposed to a 560Ω would that increase the volume? can I go lower, maybe something in the 200's to see how they work?

I figured this is true and I would prototype it on the breadboard (the circuit is still up), but I only have one speaker and I did not want to disconnect it from the circuit board, i will if I need to, it's wire as opposed to surface mounted.

Maybe a trimpot? If I got a trimpot, how do I wire it with the three legs? Do I cross connect two of the legs (the wiper and one other)?

Thanks

Jeff
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
Well It works. I put all the parts on an Circuit board. After a few minor adjustments for errors and having to remove and re-place one resistor, it worked. Thank you again. One last question. I added an on/off switch to the speaker. Since this is designed to warn us of an open garage and not bug us, it might be nice to be bale to turn off the beep while working in the garage. On the breadboard it worked fine. On the circuit board the volumn is a little lower on the speaker. If i used a 470Ω resistor as opposed to a 560Ω would that increase the volume? can I go lower, maybe something in the 200's to see how they work?

I figured this is true and I would prototype it on the breadboard (the circuit is still up), but I only have one speaker and I did not want to disconnect it from the circuit board, i will if I need to, it's wire as opposed to surface mounted.

Maybe a trimpot? If I got a trimpot, how do I wire it with the three legs? Do I cross connect two of the legs (the wiper and one other)?

Thanks

Jeff
Ignore the above. I switched out the 560 (R5) with a 100Ω and it works fine. Louder, but not too bad. Considering the placement (behind a wall plate, the louder beep will actually be better.

Thanks again for all the help.

Jeff
 

SgtWookie

Joined Jul 17, 2007
22,230
Ignore the above. I switched out the 560 (R5) with a 100Ω and it works fine. Louder, but not too bad. Considering the placement (behind a wall plate, the louder beep will actually be better.

Thanks again for all the help.

Jeff
Sorry Jeff, I completely missed your earlier post.

Glad you got it figured out.

The trouble with adding a disable switch (like a toggle switch), is that it will need to be turned back on. Such things are easy to forget to turn back on, and the original purpose of the circuit will be defeated.

One possibility would be to build another one-shot timer circuit operated by a momentary switch that would pull pin 4 of the beeper timer circuit low for a half-hour or so. The idea here is that you could shut the darn thing up for awhile if you wanted to, but eventually it will start to nag you about the door being open again - which is what you wanted it to do in the first place, right?
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
Sorry Jeff, I completely missed your earlier post.

Glad you got it figured out.

The trouble with adding a disable switch (like a toggle switch), is that it will need to be turned back on. Such things are easy to forget to turn back on, and the original purpose of the circuit will be defeated.

One possibility would be to build another one-shot timer circuit operated by a momentary switch that would pull pin 4 of the beeper timer circuit low for a half-hour or so. The idea here is that you could shut the darn thing up for awhile if you wanted to, but eventually it will start to nag you about the door being open again - which is what you wanted it to do in the first place, right?
That's an interesting idea. How would the schematic look? I have 3 more 555 chips. :)

Thanks.

jeff
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, here goes nuttin!



The only change from the previous circuit, is that pin 4 of U1 (555 timer) used to be connected to pin 8/Vcc - and now it's connected to the new 555's pin 3. Oh, and I updated R5 from 1k to 100 Ohms, like you said you did. Everything else is added.

The new 555 should be a CMOS version, like a TLC555. If you don't have any, Radio Shack sells them.

The 470uF cap won't be hard to find. You might have to order the 4.7 megohm resistor, or use five 1 Meg resistors in series.

Pressing S2, a N.O. pushbutton, starts the new timer. It drops pin 4 (reset) of the old timer, which prevents it from running.

It will take about 40 minutes until C5 discharges enough through R8 to hit the threshold, which will raise pin 4 again, so that it will start beeping about every 22 seconds again.
 

Attachments

Last edited:

Thread Starter

n2glox

Joined Aug 29, 2009
38
OK, here goes nuttin!



The only change from the previous circuit, is that pin 4 of U1 (555 timer) used to be connected to pin 8/Vcc - and now it's connected to the new 555's pin 3. Oh, and I updated R5 from 1k to 100 Ohms, like you said you did. Everything else is added.

The new 555 should be a CMOS version, like a TLC555. If you don't have any, Radio Shack sells them.

The 470uF cap won't be hard to find. You might have to order the 4.7 megohm resistor, or use five 1 Meg resistors in series.

Pressing S2, a N.O. pushbutton, starts the new timer. It drops pin 4 (reset) of the old timer, which prevents it from running.

It will take about 40 minutes until C5 discharges enough through R8 to hit the threshold, which will raise pin 4 again, so that it will start beeping about every 22 seconds again.

That is a neat circuit. It would also not be too hard to integrate it into the old circuit so I don't have to redo the whole thing. I would need a second circuit board. And it might not be pretty, but then I am not gong for pretty. I really appreciate the help. I will get some components, I have some and may add a second breadboard to mock up this one and see if I can combine the two.

Thanks again.

Jeff
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
Two Wizards debating....:)
The rest of the class has that glassy eye'd stare!
Sgt Wookie is the wizard. I am a true novice who barely understands ohms law. :). I am more a technician, and one that is minimally skilled. It took me about 2 hours to breadboard the original circuit, with some help. It took me 3 or 4 hours (maybe 5) to solder the original circuit.

I am a novice.

Jeff
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
SGTWookie, I am having weirdness that makes no sense.

I created the Circuit on a regular board and tested it on my bench. Ran into two problems. The circuit was designed for 12v DC, but my benches adjustable cheap wall wart puts out about 17v when it is supposed to be 12v (little Slider Switch). So now the speaker does not make enough sound. Since it was designed for 5v, I am figuring that getting a a 1.5v to 6v Speaker/Buzzer will work better. I removed the 100 Ω Resistor (R5) and it still does not beep with 12v (my garage circuit puts out a stead 12.06v DC). Replacing the speaker should be easiest. it is attached to the board and has two jumper wires. I can de-solder and reattach. Am I on the right track?

Here is the second weirdness that makes no sense.

After building the board I tested it. I had the Same exact magnetic switch.
0.02Amp./100VDC (max.)
0.2Amp./10VDC (max.)
3W (max.)

I hooked up the power source (17-18v not 12v). Hooked up the magnetic switch. Worked like a charm. Red light, and Beep worked. Added Switch to turn off Beep adn still worked fine. Added the 10,000Ω Resistor you suggested at the 2N2222, and it still worked nice.

I take it up stairs to the garage to test it. My set up is that the switch is mounted above the door of the garage, with a wire running to the place where the light and speaker are mounted (about 35" travel). The Magnet is mounted on the garage door. Door opens and the light comes on, and it beeps.

Now the problem. I connected the board to the power source (12v). The wires for the reed switch is 18ga (too heavy, but it was what I had). I connect the wires. I get no beep. I get an red Light when the door is open, but no beep, just a click or more of a hiss. I figure too little voltage as indicated above.

Now here is the weirdness. I also get a dim LED and a Softer click from the speaker when the reed witch is "off" (Normally Open I think - when the door is closed). When the garage door goes up the light gets brighter and the speaker clicks louder. Confused.

I then figure there is a problem with the switch. I bring the duplicate switch and hook it in out at the garage door. Running the switch back to the circuit with the same 18ga wire. Same thing happens. When i bring the magnetic switch in to the house and connect it directly to the board it works (LED is on and goes off with magnet close to circuit) Speaker still does not beep, but that is a voltage issue.

I tried it today this time with the more powerful wall wart rather than the 12v source I already had wired. This time I got the beep when the door opened, but when the door was closed I got no dim red LED and click from the speaker.

So with the higher voltage the circuit seems to work better, but I cannot ramp up my power source to 17 v. I also cannot figure out why I am getting ?leakage? with the lower power source, the dim LED and click from the speaker.

Any ideas.

Below is the modified circuit. Any ideas how to get rid of the dim LED and click?

I have checked the wiring of the reed switch. It is correct, there are no problems with the wire and it is a straight shot. it runs fine. THe reed switch is fine also and also hooked up correctly. I also get the same things when i use a duplicate of that switch. Only thing that is that the wire from the reed Switch is 18ga, with 2 wires. Is the thickness of the wire the problem? too much resistance?

Thanks

 

Thread Starter

n2glox

Joined Aug 29, 2009
38
How do I test a circuit board's components to see if I fried something. The circuit above is what I am working with. When I test it on my lab bench it worked fine. I think i inadvertently hooked it up with reversed polarity to a power source, now I get nothing. I have a Voltmeter, but I do not know how to use the probes to examine the various parts that might have gotten fried. Lie the 2n2222A or the 555 Chip, or the 7805, or the diode. Any help?

Thanks.

Jeff
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, if you hooked it up in reverse polarity, you probably fried it.

Didn't think to put in a diode to protect against that. Sorry.

I'm surprised you didn't fry it when you ran it on 17v. It wasn't designed for that much voltage.

You probably fried the LED and the 7805 regulator. Replace the LED and the 7805. Or, you could see if you can get the LED to light up.

If you're getting 5v at the output of the regulator, it's probably OK.

If the LED doesn't come on, it's fried.
 

Thread Starter

n2glox

Joined Aug 29, 2009
38
Well, if you hooked it up in reverse polarity, you probably fried it.

Didn't think to put in a diode to protect against that. Sorry.

I'm surprised you didn't fry it when you ran it on 17v. It wasn't designed for that much voltage.

You probably fried the LED and the 7805 regulator. Replace the LED and the 7805. Or, you could see if you can get the LED to light up.

If you're getting 5v at the output of the regulator, it's probably OK.

If the LED doesn't come on, it's fried.
I am getting more than 5v at the output of the 7805.

I will disconnect the LED and hook it up to a resistor to see what's up.

I can also change out the 7805 easy enough. I hate desoldering, but I am getting good at it. :)

Need to mark my wires better. :)
 
Top