An ESP32 based plane radar for my desk

(blog.ktz.me)

145 points | by alexktz 7 hours ago

11 comments

  • freitasm 6 hours ago
    Well, a radar-like display, then. But not a radar.
  • boguscoder 4 hours ago
    Perhaps I didn’t read it thoroughly enough but it seems that lat/long of the “radar” are expected to be entered by user, I think using wifi positioning could be of great assist and could be done from mcu itself without involving web portal, though maybe portal already does it (didn’t get to see it)
  • NooneAtAll3 6 hours ago
    radar *display*

    making esp32-based radar emitter would've been cool, tho

  • kruskakli 1 hour ago
    Cool project! Funny how similar projects can pop-up at the same time; here is a somewhat similar project for identifying close-by flights, but this is a mobile app: https://github.com/etnt/skyoverhead
  • amatecha 6 hours ago
    Looks pretty cool, though kinda "cheating" by pulling from adsb.fi - though I think you'd need something a lot more powerful than an ESP32 to receive and decode ADS-B ;)
    • sephamorr 6 hours ago
      I would actually expect the math to decode ads-b traffic is substantially less complex than, for example, a TLS connection.
      • dlcarrier 2 hours ago
        TLS is supported in hardware, so it takes no more processing power than moving the data around without encryption.

        In the US, ADS-B in uses 1.3 MHz of bandwidth, which would require 2.6 Msps. The ESP32-C3 running at 160 Mhz would have ~70 instructions per sample to process the data. That's probably doable, but the ESP32-C3 is one of the less capable variations of the line, and there are dual-core versions running at more than double the frequency, and those should be able to handle ADS-B in without issue.

        • schoen 1 hour ago
          > TLS is supported in hardware, so it takes no more processing power than moving the data around without encryption.

          Specifically, common PC CPUs support AES acceleration, so you can get the ongoing encryption for an established connection with minimal overhead. There is still some initial overhead for establishing the TLS connection due to the need to do key exchange (with asymmetric cryptography primitives typically based on Diffie-Hellman with finite fields or elliptic curves).

        • cenamus 1 hour ago
          GPS is over 1 GHz, but I don't think you need to have a microcontroller running that fast to decode it?
      • greggsy 5 hours ago
        It is trivial to decode, but don’t forget that tls is extensively optimised on most networking stacks.
    • bigiain 6 hours ago
      Using ADS-B and calling it a "radar" feels wrong to me.

      (But is is a cool project)

      • daemonologist 5 hours ago
        Agreed, and even SSR always felt like cheating imo. I wanna see someone build a primary radar on an esp 32.
        • bigiain 3 hours ago
          Gotta admit that's what I clicked through hoping for.

          I've seen a few projects that use SDR to detect doppler shifts of reflections of broadcast FM radio station off planes as "passive radar". But that doesn't get much in the way of direction info, just approach velocity. I've pondered building something that uses that and correlates it with an ADS-B receiver, to see it it can detect aircraft that are not transmitting ADS-B. But that'd get me on another "list" if I published it I suspect...

          This is not the project I remember, but it's the same idea and technique: https://github.com/Max-Manning/passiveRadar

          • phire 42 minutes ago
            I suspect it's possible to build an active radar without exceeding the limits of the ISM bands.

            Actually, I know it's possible, that's how the automotive radars (used for adaptive cruise control) work. The real question is if someone can get enough range to pick up aircraft.

    • punnerud 5 hours ago
      Actually possible to receive and decode ADS-B on ESP32, but MLAT is failing (tried hard but not found a trick yet).

      Biggest problem isn’t that it’s not powerful enough, but the USB port bandwidth don’t match most SDR.

      Using some clever tricks you can receive parts of the message on a slower USB and be able to decode ADS-B

      • 1e1a 5 hours ago
        Why do you need to send the samples over USB?
        • dlcarrier 2 hours ago
          The built-in ADC doesn't have a high enough sample rate to decode ADS-B in, so an external one is needed, and USB ADCs are readily available with built-in demodulators, for use as DVB-TV receivers.
          • punnerud 1 hour ago
            No you don’t need an external one, it’s actually possible to sample parts of high bandwidth using a lower bandwidth because of the small buffer in most SDR. The problem is that you can’t freeze the buffer so have to gather multiple “sweeps” get parts of ADSB stitched together.

            Maybe I post the Rust code after some cleanup. Now I am busy build a new database from scratch to compete with them all https://github.com/punnerud/mpedb

    • greggsy 5 hours ago
      You could fit a pi zero and rtl in an enclosure not much larger than the one they’ve printed.
  • ustad 3 hours ago
    “Finally, the firmware now supports authenticated OTA updates, so future builds can be installed through the browser instead of connecting the board over USB.”

    What does that mean?

    • alexchamberlain 3 hours ago
      OTA = over the air. ie online updates you’d expect of a more polished product
      • ustad 2 hours ago
        But the browser is involved. Can the browser do OTA to esp32?
        • waste_monk 1 hour ago
          I believe the ESP32 runs a small web server that supports WebSerial (?), if you can reach it over WiFi or somesuch, you should be able to upload the new firmware blob that way.
        • cenamus 1 hour ago
          The browser connects to a webserver running on the ESP32. Over wifi -> over the air. OTA doesn't mean headless or automatic
  • holoduke 55 minutes ago
    These kind of project are now so easy. A few prompts and you have something like this. I did it with quite a few similar like projects. You can buy super cheap esps with integrated lcds for less than 20 dollars.
  • NNimaandi 4 hours ago
    Its an amazing work
  • sneak 3 hours ago
    ADS-B is not radar, despite ATC calling these sorts of things “secondary radar”.
  • nicechianti 4 hours ago
    [dead]