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

Поделиться
HTML-код
  • Опубликовано: 3 июл 2024
  • 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
  • НаукаНаука

Комментарии • 35

  • @Aleziss
    @Aleziss Год назад +5

    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 8 месяцев назад +1

      This is tuned to a limited code speed. Also he doesn’t seem to do numbers.

    • @markanderson8066
      @markanderson8066 7 месяцев назад

      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.

    • @danielreyne6147
      @danielreyne6147 Месяц назад

      ruclips.net/video/9k6xkEo8leI/видео.html

  • @davewalters9926
    @davewalters9926 Год назад +2

    LOVE THIS! I'd love to see more ways to use AI algorithms on an Arduino/ESP32. Keep the videos coming.

  • @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.

  • @EvgeniX.
    @EvgeniX. 7 месяцев назад +2

    Wonder can this be used to decode amateur radio cw transmissions reliably?

  • @grahamrobinson1438
    @grahamrobinson1438 Год назад +3

    Thank you for another very interesting item. Perhaps gesture recognition would be a good candidate for small scale AI.

  • @manningphillips6976
    @manningphillips6976 2 месяца назад

    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.

  • @makersfunduck
    @makersfunduck Год назад +2

    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 :)

  • @perrimcelvain923
    @perrimcelvain923 6 месяцев назад

    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?

  • @flylord4361
    @flylord4361 4 месяца назад

    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.

  • @diegogarciamedina6363
    @diegogarciamedina6363 Год назад +1

    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

  • @MQGT
    @MQGT Год назад

    I would like to see how to program lights out puzzle on arduino 3x3 and 4x4 version

  • @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!

  • @letmelooktv
    @letmelooktv 7 месяцев назад

    I would love to see this running on M5Stack Core2 ESP32 it would be a very cool gadget

  • @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 7 месяцев назад

      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.

  • @WestCoastMole
    @WestCoastMole 7 месяцев назад

    Have you tested how far an operators code spacing can get bent out of shape before the training algorithm fails?

  • @SuperMicroguy
    @SuperMicroguy 2 месяца назад

    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.

  • @pincus321
    @pincus321 29 дней назад

    Perfect that is exactly what we want to make

  • @user-um3ui1gu9t
    @user-um3ui1gu9t Год назад +2

    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.

  • @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....

  • @DoctorMikeReddy
    @DoctorMikeReddy 7 месяцев назад

    Which esp32 board did you use?

  • @billfrug
    @billfrug Год назад

    Awesome, had not heard of micromlgen.

  • @pincus321
    @pincus321 29 дней назад

    Can we look at your code we want to make this we were trying to use goertzel calculation method of decoding the length etc but it is not very reliable your method may prove to be better.

  • @stewsta
    @stewsta Год назад +1

    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.
    ruclips.net/video/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!

  • @randalstout
    @randalstout Год назад

    Will this run on an ESP8266 also?

  • @jimlynch9390
    @jimlynch9390 11 месяцев назад

    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.