Tech Note 078 - ESP32 Real Time Morse Decoder

  Рет қаралды 8,203

G6EJD - David

G6EJD - David

Күн бұрын

An ESP32 together with an OLED display and a basic microphone are used to decode in real-time Morse code. Speed automatically adjusts to the incoming Morse characters and bandwidth can be varied at compile time to improve selectivity on noisy bands.
Code: github.com/G6EJD/ESP32-Morse-...

Пікірлер: 59
@zl3dwh
@zl3dwh 3 жыл бұрын
You are very genius in building this. I tried a lot to achieve this for a long time
@anthonyj777
@anthonyj777 6 жыл бұрын
Very interesting video. This is on my fun project list! Thank you very much for sharing.
@serverguy2
@serverguy2 6 жыл бұрын
Thank you, David. You are a genius at this stuff. (Mike, W6XXX)
@davidpickut2477
@davidpickut2477 Жыл бұрын
For anyone who might be working on this with an ESP32, I've done some experimenting with the algorithm settings. Using a 16k sampling frequency and n = 32 samples, I got excellent performance from 13 to 30 wpm. At 10 wpm it started putting a space between each character. At 35 wpm it started making decoding errors. I used the ARRL code practice mp3 files as a source and fed the audio to the GPIO via a 600:600 ohm audio isolation transformer. Scope indicated a signal level of 600 to 800 mV P-P at the GPIO. I never could copy morse past about 15 wpm, so I love this project.
@mattv780
@mattv780 3 жыл бұрын
Had to change two lines 90,91 to compile with latest Arduino 1.8.10 90 for (byte index = 0; index < n; index++) {testData[index] = analogRead(A0);} 91 for (byte index = 0; index < n; index++) Worked perfectly, Brilliant.
@RTROME
@RTROME 6 жыл бұрын
Very Cool, I am KE4WLF, and have wanted to build something like this for a while, cant wait to try it !
@MauroSollar
@MauroSollar 2 жыл бұрын
Very interesting project.👋👋👋
@arniep740
@arniep740 3 жыл бұрын
Very interesting use of the ESP32. Any chance of you modifying this to outputting a scrolling multi-line display to fully utilize the OLED? Tnx de Arnie W8DU
@SA-oj3bo
@SA-oj3bo 5 жыл бұрын
Amazing!
@CharudattUplap
@CharudattUplap 6 жыл бұрын
Kool, Can you also try to have WSPR on the ESP32 using Si5351, the code is available on the net. That's one of the projects I am looking for. Preferably with a display.
@ohweh6963
@ohweh6963 4 жыл бұрын
Hello, nice job!!! Is an ESP-32 the same as the D1mini? Would it work with that either?
@G6EJD
@G6EJD 4 жыл бұрын
ohweh, the Wemos d1 mini uses the ESP8266 which is an earlier processor , the ESP32 is significantly faster than the 8266. Speed is needed for morse decoding, it’s possible the esp8266 can decode in real time I have not tried it. You can get an ESP32 based Wemos d1 mini from AliExpress
@losvideosdeea5-iii835
@losvideosdeea5-iii835 4 жыл бұрын
Thank you for the video. I have a question: Can the sketch work with nodemcu esp8266? thanks
@G6EJD
@G6EJD 4 жыл бұрын
los vídeos de EA5-III, it will compile but you will need to change line 25 and 68 for the node MCU I2C bus usually pins 4 and 5 in place of 16 and 17, I have not tried it but it may work
@losvideosdeea5-iii835
@losvideosdeea5-iii835 4 жыл бұрын
@@G6EJD tnx, 73
@Q24H
@Q24H 6 жыл бұрын
Test files worked great, tried it on some youtube vids and it's hit or miss mostly due to noise, maybe i need to tweak the mic some more, pretty cool tho! P.S the code uses 17/16 for I2C but your diagram uses 21/22.
@G6EJD
@G6EJD 6 жыл бұрын
I2C pins - It does depend on your development board type, the best way to determine what they are is to add serial.println(SDA) in your setup section of code. Bandwidth can be reduced by reducing sample size then it will analyse less noise, the frequency you set is the tone frequency it is optimised for so when tuning a radio it should be tuned to give a beat frequency of that set in the programme e.g. 558Hz or 900Hz or whatever. When listening to off air morse tuned correctly mine works ok. There is a limit to how far off frequency it can be. Hope you enjoy it. There is much that can be adjusted in the code to optimise reception, I went for a general setup suitable for most applications.
@michaelspooren9213
@michaelspooren9213 2 жыл бұрын
@@G6EJD sample size is defned in 'testData[128]'? I have noise problems with a MAX4466
@G6EJD
@G6EJD 2 жыл бұрын
@@michaelspooren9213 have you tried a decoupling capacitor across the 4466 power rails.
@best3140
@best3140 2 жыл бұрын
Can you have code for another display type like lcd 2004 or graphic lcd 12864 for large screen size less power consumption and can use under bright sunlight ? Many thanks.
@G6EJD
@G6EJD 2 жыл бұрын
Yes, just change the display driver, but nothing takes less power than an OLED
@michaelspooren9213
@michaelspooren9213 2 жыл бұрын
Thank You. It would be nice to write the Code on a micro SD. 🙂
@JimCoupeTQ
@JimCoupeTQ 6 ай бұрын
Is it possible to desolder the mic and solder a 3.5mm to it instead?
@G6EJD
@G6EJD 6 ай бұрын
Yes, but you’d need to be careful with drive levels or the amplifier may be damaged. You could try directly driving the ESP32 ADC input via a capacitor connected to two equal value resistors so that the centre point of the signal is 1.65 volts. So 3.3v--10K--10K--Gnd and then AC couple audio to the resistor junction that’s connected to the ADC input pin. Most audio outputs are 600mV and that’s adequate.
@davidpickut2477
@davidpickut2477 Жыл бұрын
I've implemented this using an ESP32-WROOM-32E dual core 240 MHz dev board. I have it working, but only with slow morse. Can anyone explain how to determine the optimum sampling frequency to use? The value in the code on Git is 45000.
@G6EJD
@G6EJD Жыл бұрын
That sounds like a poor quality audio input, as it can decode very fast 30-40wpm
@davidpickut2477
@davidpickut2477 Жыл бұрын
@@G6EJD Input is very clean, from an audio signal generator. I'm using a 744 Hz target frequency in the code and the signal generator is providing 755 Hz (it has fixed settings rather than adjustable). Is the 45k sampling frequency the correct value to use? And, thanks for the response and for posting this project. I'm determined to get it working.
@G6EJD
@G6EJD Жыл бұрын
@@davidpickut2477 the sampling frequency is many times higher than the audio frequency, where generally only x2 is required, so the routine will be getting a good sample basis. Are you sure the machine generating the Morse is correctly formatting the morse timing ratios as if it works at slower speeds this suggests the inter letter or word timings are too short relative to the dash and dot timing ratio
@davidpickut2477
@davidpickut2477 Жыл бұрын
@@G6EJD OK, I figured the sampling frequency could be lower. I actually got the best results with it at 4,000. I'm experienced with CW and have told I have a clean "fist", but I'll look at the timing ratio. I also have an Arduino-based morse sender I can use as an input. Thanks!
@davidpickut2477
@davidpickut2477 Жыл бұрын
I got it working with real radio signals and the sampling frequency at 6,000 Hz, 32 samples. Very impressive algorithm. I got very reliable output with a clean audio signal level around 500 mV P-P going to GPIO 36 (A4) on the ESP32. The radio has a good quality CW filter. Thanks so much for your assistance. 😊
@user-zr8xn3xe9d
@user-zr8xn3xe9d 2 жыл бұрын
'A0' was not declared in this scope. My IDE v.1.8.16
@G6EJD
@G6EJD 2 жыл бұрын
That's because you have not selected a Wemos D1 Mini as in my example. Determine what your board type is and what pin it uses for the ADC port.
@user-zr8xn3xe9d
@user-zr8xn3xe9d 2 жыл бұрын
@@G6EJD worked but not correct and output random data when gnd connect to mic.
@G6EJD
@G6EJD 2 жыл бұрын
@@user-zr8xn3xe9d did you AC couple the microphone via a capacitor usually 1uF
@G6EJD
@G6EJD 2 жыл бұрын
@@user-zr8xn3xe9d sounds like your microphone is not working correctly
@JimCoupeTQ
@JimCoupeTQ 6 ай бұрын
Could be better if it could make more lines.. text disapears to fast
@claytonsampel
@claytonsampel 2 жыл бұрын
I am new to this. Will any ESP32 Development Board work?
@G6EJD
@G6EJD 2 жыл бұрын
Yes, just check your pin connections but they are very nearly all identical.
@neotroncs
@neotroncs 2 жыл бұрын
@@G6EJD Awesome I will get one ordered.
@neotroncs
@neotroncs 2 жыл бұрын
@@G6EJD Got all components in the mail today. Next question how do I program this. I have been looking over youtube videos and they references to use espressif / arduino-esp32. Yes I have never programed anything in my life. Can you possibly point me in a direction that may work best for your / this project.
@G6EJD
@G6EJD 2 жыл бұрын
@@neotroncs you have to go to the Arduino website and download the Arduino IDE, the non-zip version. After that google for ESP32 add-on for Arduino, there are plenty of tutorials for that then you can download and install programs when you get going you will find it quite straightforward
@neotroncs
@neotroncs 2 жыл бұрын
@@G6EJD You are awesome. Going to do this right now. I am looking forward to this project. Thank you very much.
@haydenc2742
@haydenc2742 4 жыл бұрын
Are you selling the boards for this? Is it open source?
@G6EJD
@G6EJD 4 жыл бұрын
Brian C , no pcb required, just an ESP32 and plug in oled display and microphone
@docarmodeiras
@docarmodeiras Жыл бұрын
Very good. 73. CR7BHZ
I trained an AI to decode Morse code messages on an ESP32!
12:30
Playful Technology
Рет қаралды 8 М.
STM32F103 (BluePill) CW Decoder
19:49
jmhrvy1947
Рет қаралды 20 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 40 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 12 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 82 МЛН
OpenAI's New SearchGPT Shakes Up the Industry, Google Stock CRASHES!
10:10
ESP8266 Four Servo Motor Control using Webserver
4:19
Eleco Techoz
Рет қаралды 1,1 М.
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 155 М.
Tech Note 057 - ESP32 Ultra Low Power Test Results
7:32
G6EJD - David
Рет қаралды 33 М.
Tech Note 059 - ESP32 Using Time Services (a simple approach)
9:10
Arduino Morse Code Decoder with Audio Biasing Circuit
9:53
learnelectronics
Рет қаралды 28 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 496 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 62 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18