Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Morse generator

Beaksbury

New Member
Good evening!

What I am trying to do is build a morse generator that sends the letter K and drives a relay. So, when ypu power it, it automatically generates a "k" in Mose Code. I also want to have the option of the speed it drives the letter that has been generated.

I have thought about using a 4017 and a 4060. Good, old fashioned tech but there may be a simpler way using a PIC? Trouble is, I know nothing about PIC's or programming.

Any advice would be appreciated and far better if someone could design and build one for me, although using the old technology, I could built it myself if I had a circuit digram.

Thanks in advance.

Phil
 
The simple way would likely be using a PIC or similar uC (micro-controller). Typically a dit is 100 mSec and a dah is 300 mSec duration and a nice tone frequency is about 1,000 Hz (1 KHz).

You are only wanting a single letter, the letter K or k which is Dah Dit Dah or dash dot dash. I did this some time back more as a matter of curiosity. I had word pause in there but omitted the numbers.

My best guess for what you want would be doing it on a common simple ATTINY 85 which cost about $1.50 USD or a PICAXE08M2 also inexpensive. I know PICAXE has a forum for help and projects with their chips. The PICAXE chips come with a boot loader installed. The ATTINY 85 can be programmed using an Arduino IDE so either is easily done.

I did my project on an Arduino Uno Rev 3. I used a little pizeo buzzer for my audio.

I doubt you will get where you want to go with a 4017 and a 4060 or using discrete components, just my take. Maybe another member has more thoughts.

Ron
 
Pulse considerations :



Using an ATTINY85 I think this is a rough code workup needed. mBlock takes
a GUI block configuration and generates the C code to program into ATTINY85.
You use the mBlock code in Arduino IDE and a UNO or Nano board to program
ATTINY85. I got rough timing out of the two ap notes you will have to check it.
Code could be easily programmed to send a sentence. You drag and drop the
functional blocks into right hand window and configure, that is how mBlock is used.
mBlock is free.

I read a pot on the A/D pin to get speed desired in the code, then computed the
needed timing, and then burst out the timing pulses. Also the trig pin debounces,
so key closure is bounced in, then bounced out (key released), and then Morse
is emitted in the code.

1704160679676.png


To reduce complications if you just use a NANO board and its CPU, it easily interfaces and programs
with the Arduino IDE. Just a thought. Its ~ $3. Eliminate the oddball method needed to program the
ATTINY85.

By the way, when you learn a block language they are pretty much similar with different
capabilities. Here is one to do a talking voltmeter :



Regards, Dana.
 
Last edited:
A 4017 and a 4093 would likely be enough; I have built them in the past, though some decades ago..

Found a design in an old radio mag, here:

See page 60 of the PDF (page 58 by printed number).

That uses a 40106 rather than a 4093 for the oscillator and logic.

To have it run on power up rather than from a push-to-talk circuit, add a capacitor between the PTT input and positive, with a resistor and parallel diode to 0V/GND, so the PTT signal is held momentarily high.

As the cap charges and the voltage drops the circuit will trigger. The diode across the resistor ensures a fast reset with power off, and protects the IC from a negative voltage pulse that would otherwise occur.

Add a resistor & transistor from the PTT out to control the relay coil.
 
The simple way would likely be using a PIC or similar uC (micro-controller). Typically a dit is 100 mSec and a dah is 300 mSec duration and a nice tone frequency is about 1,000 Hz (1 KHz).

You are only wanting a single letter, the letter K or k which is Dah Dit Dah or dash dot dash. I did this some time back more as a matter of curiosity. I had word pause in there but omitted the numbers.

My best guess for what you want would be doing it on a common simple ATTINY 85 which cost about $1.50 USD or a PICAXE08M2 also inexpensive. I know PICAXE has a forum for help and projects with their chips. The PICAXE chips come with a boot loader installed. The ATTINY 85 can be programmed using an Arduino IDE so either is easily done.

I did my project on an Arduino Uno Rev 3. I used a little pizeo buzzer for my audio.

I doubt you will get where you want to go with a 4017 and a 4060 or using discrete components, just my take. Maybe another member has more thoughts.

Ron
Hello there Ron and thank you for the prompt response.

Reading your message is like a tuition to the world of electronics! While I have heard of Raspberry Pi's, Arduino, PIC's, Eproms and so on, I must admit I know nothing about such devices. U am told school with valves, transistors and I.C's, which is what I spent my working life in.

I have never heard of the ATTINY 85 and shall Google it, along with the Arduino. I once looked at PIC's but everybody and his uncle offer kits, all pertaining to be the best, so I never knew what to choose and decided to remain ignorant in my bliss, so if you wish to guide me on the ATTINY 85 and Arduino and how you would program it (I use a Mac if that helps) them it would be appreciated.

Thanking you and wishing you and your family a happy New Year.

Regards,

Phil
 
A 4017 and a 4093 would likely be enough; I have built them in the past, though some decades ago..

Found a design in an old radio mag, here:

See page 60 of the PDF (page 58 by printed number).

That uses a 40106 rather than a 4093 for the oscillator and logic.

To have it run on power up rather than from a push-to-talk circuit, add a capacitor between the PTT input and positive, with a resistor and parallel diode to 0V/GND, so the PTT signal is held momentarily high.

As the cap charges and the voltage drops the circuit will trigger. The diode across the resistor ensures a fast reset with power off, and protects the IC from a negative voltage pulse that would otherwise occur.

Add a resistor & transistor from the PTT out to control the relay coil.
Thank you so much for taking the time and trouble to help in my quest.

Along with the replied from Ron earlier, I feel that I am an embarking on a new journey and expanding my knowledge, and I have just googled the URL that you have sent me.

Thanking you and wishing you a happy New Year.

Phil
 
The Arduino IDE for MAC here (for programming the board) :


Note if using standard Arduino board like NANO or UNO mBlock
directly programs the board, using the Arduino IDE programmer. So
you have to install the Arduino IDE even if you dont use if for writing
the code.

mBlock :

https://www.mblock.cc/en/download/ Note there is no MAC version
for running directly on Mac, but there is the web version here. Or use
WINE on MAC to run windows version of mBlock. This is a little more
complicated to get setup. The version difference is web projects saved
on web, whereas local projects saved on PC.

The board to use (NANO) has xtal timing accuracy, regulator :

1704190665316.png


Buy it with pins soldered in so it out of the box fits into a protoboard.
simple applications. Get a few of these to make life easy to proto (Temu, Amazon, Ebay) :

Something like this :

1704193204995.png


And one of these :

1704193309366.png




Training :



Note mBlock used extensively in schools to teach programming. I use it, as well as C/C++
based IDEs. When doing simple applications I choose the block programming for rapid
proto and development. Lots of fun. The other block programming, similar to mBlock, are
Visuino, Scratch for Arduino, Flowcode, Ardublock, Tuniot (to do wireless stuff), Snap4Arduino,
Nodered. Roughly half are free, the rest paid.

Lastly look at how simple it took to do a analog V to PWM duty cycle output control :

1704193673559.png


Or a programmable timer/controller :




Regards, Dana.
 
Last edited:
I second the Arduino. Nice and easy to get started with, tons of examples on the internet, free development Environment and designed with the beginner in mind. I got some Nano boards with USB C for ~USD0.50 see here.
The IDE can be downloaded for free so you can get going for less than 1 USD.

Mike.
PS. can get lots of help here.
Edit, it's also a great way to get your toe in the water.
 
The Arduino IDE for MAC here (for programming the board) :


Note if using standard Arduino board like NANO or UNO mBlock
directly programs the board, using the Arduino IDE programmer. So
you have to install the Arduino IDE even if you dont use if for writing
the code.

mBlock :

https://www.mblock.cc/en/download/ Note there is no MAC version
for running directly on Mac, but there is the web version here. Or use
WINE on MAC to run windows version of mBlock.

The board to use (NANO) has xtal timing accuracy, regulator :

View attachment 143922

Buy it with pins soldered in so it out of the box fits into a protoboard.
simple applications. Get a few of these to make life easy to proto :

Something like this :


And one of these :




Training :



Note mBlock used extensively in schools to teach programming. I use it, as well as C/C++
based IDEs. When doing simple applications I choose the block programming for rapid
proto and development. Lots of fun. The other block programming, similar to mBlock, are
Visuino, Scratch for Arduino, Flowcode, Ardublock, Tuniuot (to do wireless stuff), Snap4Arduino.
Roughly half are free, the rest paid.


Regards, Dana.
Dear Dana,

Thank you for your e-mail and I can only look at you with envy for your technical abilities. Showing this to me is like showing somebody from the 15th century electric light or the internal combustion engine. Frankly, I wouldn't know where or how to start and once I had such equipment, it would be a paperweight. It is beyond my level of understanding, I regret to say.
 
The IDE is available on P.C. as well. Windows and Linux. Give it a go, it's so cheap to get started that, even if it ends up as a paper weight, it's well worth it.

Mike.
 
Just a thought Beaksbury but if you have been using a 4 function calculator
since birth you have been programming, just no one thinks of it that way.

You understand the sequence of operations.
You understand variables, the values you enter.
You understand basic math, + - / *
You understand output, using the result of the operations.

And you understand basic logic, considering your initial post using CMOS logic parts

Just a thought. But good luck with basic logic, many good designs done that way
in the past.


Regards, Dana.
 
Just keep something in mind. Every enthusiast or professional starts somewhere. Don't let yourself be intimidated looking at code or for that matter anything else. Like anything there is a learning curve. You start in the shallow end of the pool.

Ron
 

Latest threads

New Articles From Microcontroller Tips

Back
Top