[SOLVED] NE555 as a tone generator for Morse code practice - Page 1
Forum section: electronics / beginners

author: Larzzon
author_rank: Newbie
timestamp: September 15, 2019, 01:57:39 pm
content: I am quite new to the NE555 (not that i have a lot of experience at all with electronics) and thought i should learn more about it cause i know you can do bunch of stuff with it, so i found this simple circuit, see attachment.Which is a a circuit to practice morse code which i thought would be simple enough, but i did not get the expected result.I followed the circuit almost exactly on a breadboard, the exception i did was instead of R4 i did i put a 500Ohm resistor (also tried without the resistor). (Cause i did not have an 1KPot at home).The result i was expecting was a good tone from the speaker (frequency depending on the resistance over R10 100KPot), but i only get an extremely weak tone (barely possible to hear) when "pressing" the key (the key is just to loose wires) (with R4 at 0 Ohm) but i clearly can hear the speaker "click". And if i would get the tone at the same volume as the click i would be happy.I hope that someone can explain to me why i did not get the results i expected.I did not buy the kit, just found the circuit online and realized i had everything at home to make it, except the 1KPot.And i shall mention that i have tried two different but similar circuits and got the same not expected results.Best regardsStefan

author: AvariCe
author_rank: Newbie
timestamp: September 15, 2019, 03:12:25 pm
content: Hey Stefan, my guess is that the 555 timer can't pass enough current to the speaker.If you have an NPN transistor, try the circuit on the left.Edit: removed malicious link.

author: ledtester
author_rank: Super Contributor
timestamp: September 15, 2019, 03:25:06 pm
content: Some questions and things to try:0. Is your 9V battery fresh? Or are you using a power supply?1. Try removing R4 entirely - just connect that one end of the speaker directly to C3.2. Can you post a picture of your set up including the speaker?3. Do you have a piezo disk like this:It might work as a better speaker. You can find them in magnetic window/door alarms which are cheaply available:4. What test equipment do you have? Scope? Frequency counter? Multimeter? If you have a multimeter, what model is it?5. When powered the circuit should be switching the output (pin 3) from +9 to 0 very quickly. You can check this with a LED as follows:Replace C3, R4 and the speaker with a resistor and an LED:Code:pin 3 ---- /\/\/\/ ---- LED ---- GNDThe resistor can be anything >300 ohms. It won't matter which way you plug in the LED because you'll be testing it in both orientations. In both orientations the LED it should light up (constantly). This will verify that the 555 is oscillating. If you have a frequency counter mode on your multimeter you can determine the frequency of oscillation - just put one probe on pin 3 and the other on GND.

author: Larzzon
author_rank: Newbie
timestamp: September 15, 2019, 05:37:12 pm
content: Quote from: AvariCe on September 15, 2019, 03:12:25 pmI can't enter the website which you are linking, cause my firewall in my router is blocking it, and my browser is saying that it is not safe, and my antivirus/firewall is warning me.Quote from: ledtester on September 15, 2019, 03:25:06 pm

author: AvariCe
author_rank: Newbie
timestamp: September 15, 2019, 06:22:55 pm
content: Quote from: Larzzon on September 15, 2019, 05:37:12 pmSorry, due to my setup everything was blocked and didn't notice the page had a crypto miner. Anyway, I attached the schematic.

author: PA0PBZ
author_rank: Super Contributor
timestamp: September 15, 2019, 06:37:52 pm
content: You have pin 5-8 numbered the wrong way, look at this:

author: ledtester
author_rank: Super Contributor
timestamp: September 15, 2019, 06:49:11 pm
content: A piezo element is a lot easier for a 555 to drive, so I'd try that out instead of the cap and speaker.I goofed on the oscillation test. Both of these configurations should result in a steady illuminated LED:Code:pin3 --- /\/\/ --- -|>|- --- GNDpin3 --- /\/\/ --- |<|- --- +9

author: StillTrying
author_rank: Super Contributor
timestamp: September 15, 2019, 07:26:53 pm
content: You have pin 5-8 numbered the wrong way, look at this:I'd fix that problem first myself.

author: Larzzon
author_rank: Newbie
timestamp: September 15, 2019, 07:28:50 pm
content: Quote from: PA0PBZ on September 15, 2019, 06:37:52 pm......Feeling kinda stupid, but i guess that's why i posted in the beginners forum.I wonder why i thought it was the other way around, i probably just took for granted that i knew how the pins where numbered, but that's a lesson that some where down the line need to be thought i guess, always check the datasheet. (especially if it is not working like expected).I redid what was wrong and it worked out fine, although i think i blew my speaker (cause i did not have any resistor before the speaker) so regardless i need to go grab some spares tomorrow.Quote from: ledtester on September 15, 2019, 06:49:11 pmI will check out the piezo element, what do i need to think about when using a piezo element instead of a regular speaker element, you mentioned that i do not need a cap, is that the only difference?I wanna thank everybody for the help given, much appreciated!Best regardsStefan

author: ledtester
author_rank: Super Contributor
timestamp: September 15, 2019, 07:59:18 pm
content: Quote from: Larzzon on September 15, 2019, 07:28:50 pmYou can drive it directly from pin 3:https://youtu.be/u7zjf9jpXgYVideo description also has a link to the schematic.

author: StillTrying
author_rank: Super Contributor
timestamp: September 15, 2019, 08:12:18 pm
content: Quote from: Larzzon on September 15, 2019, 07:28:50 pmThe speaker would only be blown if you were using quite a powerful PSU. It's quite safe to test a 8R speaker by connecting it to a small 1.5V battery, there should be quite a noticeable click.

author: Zero999
author_rank: Super Contributor
timestamp: September 15, 2019, 08:18:01 pm
content: It's possible you blew the speaker, but I think it's more likely you blew the IC. The maximum output current rating of the 555 is only 200mA and an 8 Ohm speaker will draw more than that, so a current limiting resistor, in the form of an extra resistor in series with the volume control, is necessary. This will ensure the current won't be too high, even when the potentiometer is set to the lowest value. The 555's output from the 555 will drop a couple of volts, so a 10R resistor will probably do.I doubt a 1k potentiometer in series would affect the volume much with a piezo transducer. The potentiometer should be connected as a potential divider, i.e. the wiper should be connected to the piezo and one end connected to pin 3 and the other to 0V.

author: soldar
author_rank: Super Contributor
timestamp: September 15, 2019, 09:06:31 pm
content: I have assembled this type of circuit many times.The output of pin 3 is more than enough to drive a small conventional speaker and I generally need to insert a resistor in series in order to lower the volume and protect the speaker.By switching the power supply the first few cycles are unstable until the frequency stabilizes so I generally do not switch the power supply but leave it running continually and switch the speaker on/off. That way the problem is avoided.

author: Zero999
author_rank: Super Contributor
timestamp: September 16, 2019, 07:41:58 am
content: soldar,What power supply voltage were you using?Unless the capacitor is small enough to limit the current, running this circuit at 9V with an 8 Ohm speaker, is marginal design.Assuming the 555 output stage drops 2.5V, the peak-to-peak voltage will be 9-5V = 4V, giving an RMS voltage of 2V, which is a current of 250mA with an 8Ohm speaker, when the IC is only rated to 200mA maximum. You'll probably get away with it, at low duty cycles or because the battery voltage might drop a bit, but it's not recommended. I admit I was being conservative by suggesting 10R. A lower value can be used if it's not loud enough, but I think the volume will be ample.

author: MarkF
author_rank: Super Contributor
timestamp: September 16, 2019, 03:56:48 pm
content: Quote from: soldar on September 15, 2019, 09:06:31 pmSwitching the RESET pin would probably be a better option than switching either the power pin or the speaker.

author: Zero999
author_rank: Super Contributor
timestamp: September 16, 2019, 04:11:18 pm
content: Quote from: MarkF on September 16, 2019, 03:56:48 pmThe downside to switching the speaker or the reset pin is, the quiescent current of the 555 will drain the battery fairly quickly.I wouldn't bother with a 555 circuit for this. I'd just use a piezo buzzer. Granted, it's not so educational, as using the 555, but much easier and will get the job done. If you want to learn, use a three wire piezo transducer and drive it with a single transistor oscillator circuit.The next step is to use a two wire transducer and the classic two transistor astable, which is louder. D1 & D2 aren't needed for supply voltages under 6V.

author: soldar
author_rank: Super Contributor
timestamp: September 17, 2019, 09:14:46 am
content: I have made many alarms with this basic circuit and it works well. Water tank overflow, open gate alarm, etc. Plenty uses.I should add that I was using the older bipolar version because it may be the CMOS has higher output impedance.Also, I was using a wall wart to power the thing. I avoid using batteries if I can but if it is for Morse code practice you can just provide a power switch.Does anybody really use Morse code any more? I had to pass the test to get my ham radio license decades ago but I don't think I could do much today.

author: bd139
author_rank: Super Contributor
timestamp: September 17, 2019, 09:47:18 am
content: Yes we do use morse code. I don't use any other mode on amateur radio. It goes a very long way with crappy propagation, low power and very simple radios and is fun. There are literally thousands of people using it on the average weekend all over the world.As for the morse code practice oscillators, the 555 I don't recommend. One of the things you will find is it's a square wave and this is fatiguing rather quickly. There are a lot better designs out there that use phase shift or twin-t oscillators to produce a sine instead. You can listen to that for hours without ending up with a brain ache.Good design here:http://k4icy.com/weekend_radio_3tr-audio-amp.html

author: Zero999
author_rank: Super Contributor
timestamp: September 17, 2019, 10:03:06 am
content: Quote from: bd139 on September 17, 2019, 09:47:18 amI agree about using a sine, rather than square, wave but that design is more complex than necessary. The LM386 itself can double as the oscillator, as well as power amplifier. There's a Wien bridge oscillator design on the LM386 data sheet: refer to figure 16, page 12.http://www.ti.com/lit/ds/symlink/lm386.pdf

author: bd139
author_rank: Super Contributor
timestamp: September 17, 2019, 10:17:37 am
content: That's not a bad idea with the LM386 actually. I might use that for something elseHowever the complexity is probably necessary here. There's a keying envelope that needs to be used for best copy. Turning an oscillator on and off tends to lead to overshoot, thumping and warbling while it stabilises, especially lamp feedback wein oscillators. If you just gate the signal then you end up with fast rise time edges which results in clicking at the start and the end of the tone. Both of these lead to interpretation problems. Thus you usually have an oscillator, a gate with an RC curve on the leading and trailing edges, then a power amplifier. This generates a nice envelope like this:This is one of those problem domains that is a lot more complicated than it looks. It's like a mono-note analogue synthesizer really!Edit: incidentally a lot of the proper CW transmitters do exactly the same thing to the power output envelope on transmit.

author: Zero999
author_rank: Super Contributor
timestamp: September 17, 2019, 01:10:54 pm
content: Minimising the coupling capacitor will reduce power on thump. Don't forget it only has to pass 1kHz, not the usual 20Hz in an audio amplifier. The turn on sound will be a higher pitch click, than a big thump. Using diodes, rather than a lamp will make the oscillator stabilise more quickly, at the expense of a poorer THD.