Тёмный

I trained an AI to decode Morse code messages on an ESP32! 

Playful Technology
Подписаться 47 тыс.
Просмотров 7 тыс.
50% 1

There's a massive buzz about A.I.-generated content at the moment - both the incredibly convincing quality of the content itself (and associated ethical questions about deep-fakes etc.), and also the sheer technical complexity of models like ChatGPT, Midjourney, Dall-E, which have made advanced machine-learning models available to anyone, requiring only a simple phrase or word in your browser as a prompt.
But there's many more uses for artificial intelligence than just churning out blog content and superimposing celebrities' faces on dodgy videos... and, in this tutorial, I'm going to demonstrate just one practical example: a classifier function that I'm going to train to decode Morse code. And, rather than require distributed server clusters with petaflops of processing power, I'll be running the whole thing on a humble ESP32 processor.... simpler models could even be run on an Arduino Nano!
I'll be using the SciKit-Learn Python library (scikit-learn.org) and a set of training data of button presses gathered from the Arduino IDE serial monitor. I'll then use MicroMLGen (pypi.org/project/micromlgen/) to convert that into a C header file that can be imported back into an Arduino sketch, and, in just a few lines of code, can be used to classify any new input of dots and dashes into a letter - without ever having been explicitly told the Morse code alphabet!
The use-case I demonstrate is for a Morse code puzzle in an escape room, but this obviously has many more potential applications - let me know if you have any suggestions in the comments ;)
00:00:00 - 00:01:06 Introduction
00:01:07 - 00:03:11 The problem:- decoding Morse code
00:03:12 - 00:04:24 Gathering training data
00:04:25 - 00:07:47 Creating the model
00:07:48 - 00:09:06 Using the classifier in an Arduino sketch
00:09:07 - 00:10:43 Demonstration
00:10:44 - 00:12:29 Wrapup
You can download all the code used in this tutorial from my GitHub repository at github.com/playfultechnology/...
If you enjoyed this video or found it helpful, please like and subscribe to this channel. And, if you'd like to download the resources used in all the escape room projects shown on this channel (and support me to continue making more tutorials in the future!), please check out my Patreon at / playfultech

Наука

Опубликовано:

 

16 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@davewalters9926
@davewalters9926 Год назад
LOVE THIS! I'd love to see more ways to use AI algorithms on an Arduino/ESP32. Keep the videos coming.
@EvgeniX.
@EvgeniX. 6 месяцев назад
Wonder can this be used to decode amateur radio cw transmissions reliably?
@grahamrobinson1438
@grahamrobinson1438 Год назад
Thank you for another very interesting item. Perhaps gesture recognition would be a good candidate for small scale AI.
@Aleziss
@Aleziss 11 месяцев назад
I always wonder why there isn't such decoder available for ham radio operators where AI could actually listen CW on the air and have a perfect decoding with all the noise and multiple stations at the same time, it might be a powerful tool to decode CW better than just timing like current decoder uses...
@wf2v
@wf2v 7 месяцев назад
This is tuned to a limited code speed. Also he doesn’t seem to do numbers.
@markanderson8066
@markanderson8066 6 месяцев назад
You could train for numbers and punctuation. There are many morse decoders out there, in fact my Kenwood radio has one built in. I don't know if any use an AI approach.
@mikeglide1292
@mikeglide1292 Год назад
Cool stuff. This gets added to "the File". After viewing your video on radio transmissions, I was thinking that a lookup table in Node Red and a Arduino random number generator could be used to create puzzle answers like map coordinates or page numbers, (numerical suff mainly), and could mix things up a bit. The info in this video is a nice addition to that thinking. Thank you for sharing.
@perrimcelvain923
@perrimcelvain923 4 месяца назад
Great video! Do you have any ideas for dealing with spaces between words in a sentence without adding a special character for a space? Would you say that for your training data your decoder may only be used with single words?
@epedja
@epedja Год назад
Great stuff! Now the question is how it handles real time situations like change in speed of Morse Code, irregular spaces between characters and words. Have you challenge it with that?
@markanderson8066
@markanderson8066 6 месяцев назад
Based on his method, I'd expect training and recognition would be speed agnostic. I might build and test! Looks like a fun project. I work with students on ai projects and I'm a ham radio operator who prefers morse.
@MQGT
@MQGT Год назад
I would like to see how to program lights out puzzle on arduino 3x3 and 4x4 version
@manningphillips6976
@manningphillips6976 Месяц назад
Wonderful thinking. This could be a life saver for actual emergency situations because of the power and range advantages of CW. I wonder if you were to feed the parseing code actual CW tones from 100s of operators, could you achive even 80% accuracy, which would be unbelivably good.
@diegogarciamedina6363
@diegogarciamedina6363 Год назад
Hi, do you think that with this training it can decode at a speed of 20 words per minute a real human radio ham ? 73
@makersfunduck
@makersfunduck Год назад
Cool. If a burglar ties my neighbor to his cellar, and he is forced to ask for help in Morse code, I can help him with this :)
@flylord4361
@flylord4361 2 месяца назад
The training data doesn't have the static involved in listening to real radio. Train the program on real CW receivers, then see how it does. This would be most valuable.
@DoctorMikeReddy
@DoctorMikeReddy 5 месяцев назад
Which esp32 board did you use?
@adarshsonkusre750
@adarshsonkusre750 Год назад
i want to also add the morse code numbers in your model can u plz assist me on how to do tha please....
@letmelooktv
@letmelooktv 6 месяцев назад
I would love to see this running on M5Stack Core2 ESP32 it would be a very cool gadget
@WestCoastMole
@WestCoastMole 6 месяцев назад
Have you tested how far an operators code spacing can get bent out of shape before the training algorithm fails?
@bornach
@bornach Год назад
The wake word recognition that is performed locally by home assistants might be used as a secret incantation to unlock a puzzle. Should be possible on ESP32 using Tensorflow lite
@PlayfulTechnology
@PlayfulTechnology Год назад
The voice-recognition modules that run locally are disappointingly fragile, n my experience - reminds me of the first generation of voice-typing software that you used to get on a PC in the 1990s! I don't think they'd be reliable for multiple voices talking and background noise that you'd expect, but I'll take a look into it - thanks for the suggestion!
@SuperMicroguy
@SuperMicroguy Месяц назад
I also wondered about the Morse code sent by various people using a push button. If they all send at a slow rate, with a variety of times between elements is the AI limited to people who send at 2 to 5 words/minute? Or can the same decision trees and AI software also handle perfect Morse code at 30 wpm. I'd like to see the presenter test his AI algorithm over a range of reception rates, say from 5 to 30 wpm. And what happens with weak or noisey signals? Those tests might provide more confidence in this decoder's "intelligence" and whether it's worth "in the field" use. I am a ham-radio licensee.
@billfrug
@billfrug Год назад
Awesome, had not heard of micromlgen.
@randalstout
@randalstout 11 месяцев назад
Will this run on an ESP8266 also?
@markanderson8066
@markanderson8066 6 месяцев назад
I think it should.
@stewsta
@stewsta Год назад
There's a video by William Osman where he tries to recreate an interactive display from Harry Potter at Universal Studios which uses a magic wand with a retro reflector on the tip and a infrared filtered camera to trace a pattern. It would be cool to see if you could recreate something similar - I can see where ML could be useful in the same way you've presented here in that every person has a different cadence to their input. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZuRIQu0oOAA.html
@PlayfulTechnology
@PlayfulTechnology Год назад
I wrote a tablet game years ago that used gesture recognition on a touch screen using the $P recogniser (depts.washington.edu/acelab/proj/dollar/pdollar.html) - I could certainly look at porting that to ESP32 - thanks!
@jimlynch9390
@jimlynch9390 9 месяцев назад
Interesting, now feed the results into ChatGPT or other AI and It'll probably be able to detect spelling errors and break up recognized words into recognizable text.
@user-um3ui1gu9t
@user-um3ui1gu9t Год назад
One important point : "Artificial intelligence" has nothing to do with "intelligence" it is just a marketing word to name a new programming method back in the 70s... Nothing new here, just the processors performances allowing more sophisticated applications ! Good video with an interesting application !
@lesdmark
@lesdmark Год назад
Machine learning is really the better term to use to describe what it does. It's just a algorithmic decision tree with all the merits and flaws that exist in such a thing.
Далее
Audio modules for electronics project
37:54
Просмотров 34 тыс.
Matrix game
2:06
Просмотров 84
The Friden STW-10 Calculator Plays The Friden March
10:03
ESP32 Guide 2024 | Choosing and Using an ESP32 Board
41:06
How to Run Linux on an ESP32
18:53
Просмотров 144 тыс.
Practice QSO with a Virtual CW Bot
11:47
Просмотров 10 тыс.
We don't need a DAC - ESP32 PDM Audio
9:15
Просмотров 10 тыс.
Индуктивность и дроссель.
1:00
Просмотров 861 тыс.
Наушники Ой🤣
0:26
Просмотров 493 тыс.