MoreRSS

site iconHackadayModify

Hackaday serves up Fresh Hacks Every Day from around the Internet. Our playful posts are the gold-standard in entertainment for engineers and engineering enthusiasts.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Hackaday

低成本使用ESP32实现声学无人机检测

2026-03-24 04:00:34

We don’t usually speculate on the true identity of the hackers behind these projects, but when [TN666]’s accoustic drone-detector crossed our desk with the name “Batear”, we couldn’t help but wonder– is that you, Bruce? On the other hand, with a BOM consisting entirely of one ESP32-S3 and an ICS-43434 I2S microphone, this isn’t exactly going to require the Wayne fortune to pull off. Indeed, [TN666] estimates a project cost of only 15 USD, which really democratizes drone detection.

It’s not a tuba–  Imperial Japanese aircraft detector being demonstrated in 1932. Image Public Domain via rarehistoricalphotos.com

The key is what you might call ‘retrovation’– innovation by looking backwards. Most drone detection schema are looking to the ways we search for larger aircraft, and use RADAR. Before RADAR there were acoustic detectors, like the famous Japanese “war tubas” that went viral many years ago. RADAR modules aren’t cheap, but MEMS microphones are– and drones, especially quad-copters, aren’t exactly quiet. [TN666] thus made the choice to use acoustic detection in order to democratize drone detection.

Of course that’s not much good if the ESP32 is phoning home to some Azure or AWS server to get the acoustic data processed by some giant machine learning model.  That would be the easy thing to do with an ESP32, but if you’re under drone attack or surveillance it’s not likely you want to rely on the cloud. There are always privacy concerns with using other people’s hardware, too. [TN666] again reached backwards to a more traditional algorithmic approach– specifically Goertzel filters to detect the acoustic frequencies used by drones. For analyzing specific frequency buckets, the Goertzel algorithm is as light as they come– which means everything can run local on the ESP32. They call that “edge computing” these days, but we just call it common sense.

The downside is that, since we’re just listening at specific frequencies, environmental noise can be an issue. Calibration for a given environment is suggested, as is a foam sock on the microphone to avoid false positives due to wind noise. It occurs to us the sort physical amplifier used in those ‘war tubas’ would both shelter the microphone from wind, as well as increase range and directionality.

[TN] does intend to explore machine learning models for this hardware as well; he seems to think that an ESP32-NN or small TensorFlow Lite model might outdo the Goertzel algorithm. He might be onto something, but we’re cheering for Goertzel on that one, simply on the basis that it’s a more elegant solution, one we’ve dived into before. It even works on the ATtiny85, which isn’t something you can say about even the lightest TensorFlow model.

Thanks to [TN] for the tip. Playboy billionaire or not, you can send your projects into the tips line to see them some bat-time on this bat-channel.

构建这个开源图形计算器

2026-03-24 02:30:18

Graphics calculators are one of those strange technological cul-de-sacs. They rely on outdated technology and should not be nearly as expensive as they are, but market effects somehow keep prices well over $100 to this day. Given that fact, you might like to check out an open-source solution instead.

NumOS comes to us from [El-EnderJ]. It’s a scientific and graphic calculator system built to run on the ESP32-S3 with an ILI9341 screen. It’s intended to rival calculators like the Casio fx-991EX ClassWiz and the TI-84 Plus CE in terms of functionality. To that end, it has a full computer algebra system and a custom math engine to do all the heavy lifting a graphic calculator is expected to do, like symbolic differentiation and integration. It also has a Natural V.P.A.M-like display—if you’re unfamiliar with Casio’s terminology, it basically means things like fractions and integrals are rendered as you’d write them on paper rather than in uglier simplified symbology.

If you’ve ever wanted a graphics calculator that you could really tinker with down to the nuts and bolts, this is probably a great place to start. With that said, don’t expect your local school or university to let you take this thing into an exam hall. They’re pretty strict on that kind of thing these days.

We’ve seen some neat hacks on graphics calculators before, like this TI-83 running CircuitPython. If you’re doing your own magic with these mathematical machines, don’t hesitate to notify the tips line.

Linux Fu:UPNP端口映射的奥德赛之旅

2026-03-24 01:00:39

If you’ve ever run a game server or used BitTorrent, you probably know that life is easier if your router supports UPnP (Universal Plug and Play). This is a fairly old tech — created by a standards group in 1999 — that allows a program to open an incoming port into your home network. Of course, most routers let you do this manually, but outside of the Hackaday universe, most people don’t know how to log into their routers, much less how to configure an open UDP port.

I recently found myself using a temporary setup where I could not access the router directly, but I needed some open ports. That got me thinking: if a program can open a port using UPnP, why can’t I? Turns out, of course, you can. Maybe.

Caveats

The first thing, of course, is that you need your firewall open, but that’s true no matter how you open up the router. If the firewall is in the router, then you are at the mercy of the router firmware to realize that if UPnP opens something up, it needs to open the firewall, too.

You might think, “Of course it will do that.” However, I’ve found there is a lot of variation in the firmware from different vendors, and if you aren’t in control of the router, it is more likely to have buggy firmware.

The other caveat is that the router needs UPnP enabled; if it isn’t and you have to get into it anyway, you might as well set up port forwarding in the usual way. I was in luck. The router I was behind had UPnP turned on.

In Theory

There are several libraries aimed at working with UPnP and many of them come with simple test clients. I decided to install miniupnpd, which has the upnpc utility. You don’t have to be root to run it. In theory, it should be very simple to use. You can use -l to list all the router’s current UPnP ports. The -a option adds a port, and -d deletes it. There are a few other options, but that covers most of the common use cases.

So, to open external port 2222 to port 22 on 192.168.1.133 you should be able to say:

upnpc -e 'HaD Test' -a 192.168.1.133 22 2222 tcp 3600

The -e option lets us make up a creative title for the mapping. The 3600 is the number of seconds you need the port open. Easy, right? Well, of course not.

Under the Hood

UPnP covers several different areas, including IP assignment and streaming media. However, the part of it we are using is for NAT traversal. Your router identifies as an Internet Gateway Device that other UPnP-aware programs can locate.

Unfortunately, there are two versions of the gateway device specification, and there are many compatibility problems. You are also at the mercy of the vendor’s correct interpretation of the spec.

UPNP has been known to be a security risk. In 2011, a tool appeared that let some UPnP devices map ports when asked from outside your network. Easy to imagine how that could be a bad thing.

UPNP devices advertise services that others can use, and, hopefully, your router advertises that it is a gateway. The advertisement itself doesn’t tell you much. But it does let you fetch an XML document that describes the device.

For example, part of my XML file looks like this:

11urn:schemas-upnp-org:device:InternetGatewayDevice:1OpenWRT routerOpenWRT
http://www.openwrt.org/OpenWRT routerOpenWRT router1
http://www.openwrt.org/00000000uuid:00000000-0000-0000-0000-000000000000
urn:schemas-upnp-org:service:Layer3Forwarding:
1urn:upnp-org:serviceId:L3Forwarding1/L3F.xml/ctl/L3F/evt/L3Furn:
schemas-upnp-org:device:WANDevice:1WANDeviceMiniUPnPhttp://miniupnp.free.fr/WAN DeviceWAN Device20260105
...

In Practice

There are a few strange things about the way upnpc works. First, when you do a list, you’ll get an error at the end. Apparently, that’s normal. The program simply asks for entry zero, one, two… until it gets an error (a 713 error).

However, when I tried to add an open port to this particular router, it always failed, giving me an error that implied that the port was already in use. Of course, it wasn’t.

Through experimentation, I figured out that the UPnP service on the router (the one I can’t get into) isn’t running as root. So any port number less than 1,024 is unmappable in either direction. Of course, this may not be a problem for you if you have a sane router. You could argue whether this is a bug or not, but it certainly didn’t give a good error message.

Testing, One, Two…

Just to do a simple test, I issued the following command. (with my firewall off, just for testing):

upnpc -e HADTEST -a 192.168.1.133 8022 8023 tcp 3600

I verified the port opening using the -l option. Then I stood up a really dumb telnet-style server on the local port (8022):

socat readline TCP-LISTEN:8022,reuseaddr,fork

From a machine on another network, I issued a telnet command to my public IP (198.37.197.21):

telnet 198.37.197.21 8023

Of course, I could have used 8022 for both ports, but I wanted it to be clear which argument was which. At this point, typing some things on the remote machine should show right up on the local machine, punching through the firewall.

In case you forgot, you can escape out of Telnet using Control-] and then a “q” will close the program. You can also just terminate the socat program on the local side.

More Than One Way

It is a bummer I couldn’t open up an ssh port using this method, although you can run sshd on a high port and get there that way. But it is better than nothing. Better still would have been to replace the router, but that wasn’t an option in this case.

There are other tools out there if you are interested. NAT-PMP is easy to use from Python, for example. There’s also something called PCP (not the performance co-pilot, which is something else). Many routers don’t support either of these, and we hear that implementations are often buggy, just like UPnP.

For the record, NAT-PMP didn’t give me a better error message, either. So the moral is this: if you can, just punch a hole in your router the old-fashioned way. But if you can’t. Linux almost always gives you another option.

一个简单的开关用于处理过多电流

2026-03-23 23:30:23

A switch is simple: connect two pieces of metal together and bam! Except, it’s not that simple at high currents. How much current? Just about 400 car batteries worth would certainly cause some issues. This is the issue that [Technology Hobby] hoped to fix with his clever switch design.

While many content creators are great at finding or making high-current sources (looking at you, Styropyro), their switches can’t always hold up to the abuse. [Technology Hobby] found that many of the switches used by these creators had issues based on an inconsistent and limited contact area. Making a bigger contact patch is always fairly easy; keeping those contacts from skipping can be a bit more difficult.

[Technology Hobby] found success in making a V-shaped channel formed from separated contacts where a matching contact would bridge the gap between, completing the circuit. The construction of the high-current switch was simply done with a 3D printed frame filled with concrete for stiffness.

There’s a lot of fun with high current, but sometimes you need something more practical. For those needing some practical current supply, check out this retro-modern power supply!

零功耗飞行计算机

2026-03-23 22:00:20

In the early days of aviation, pilots or their navigators used a plethora of tools to solve common navigation and piloting problems. There was definitely a need for some kind of computing aid that could replace slide rules, tables, and tedious dead-reckoning computations. This would become even more important during World War II, when there was a massive push to quickly train young men to be pilots.

The same, but different. A Pickett slide rule (top) and an E6B slide rule (bottom). (Own Work).

Today, we’d whip up some sort of computer device, but in the 1930s, computers weren’t anything you’d cram on a plane, even if they’d had any. For example, the Mark 1 Fire Control Computer during WW2 was 3,000 pounds of gears and motors.

The computer is made to answer flight questions like “how many pounds of fuel do I need for another hour of flying time?” or “How do I adjust my course if I have a particular crosswind?”

History

There were a rash of flight computers starting in the 1920s that were essentially specialized slide rules. The most popular one appeared in the late 1930s. Philip Dalton’s circular slide rule was cheap to produce and easy to use. As you’ll see, it is more than just an ordinary slide rule. Keep in mind, these were not computers in the sense we think of today. They were simple slide rules that easily did specialized math useful to pilots.

Dalton actually developed a number of computers. The popular Model B appeared in 1933, and there were refinements leading to additional models. The Mark VII was very popular. Even Fred Noonan, Amelia Earhart’s navigator, used a Mark VII.

A metal E6B (public domain).

Dalton thought the Mark VII was clunky and developed a way to do vector calculations using an endless belt inside the computer. This proved to expensive to make, so he created a flat wind computer and put, essentially, the Model B on the other side. While he called this the Model H, the Army called it the E6A.

In 1938, the Army Air Corps asked for a few minor changes and  adopted the computer as the E6B, although pilots often call it the “whiz wheel” or the “Dalton Dead Reckoning Computer.” Oddly enough, some pilots still swear by the E6B, and flight schools sometimes make you learn them because they help you develop a feel for the math you don’t get with a calculator.

Sadly, Dalton died in a plane crash with a student pilot in 1941. P.V.H. Weems, a well-known navigator and Fred Noonan’s mentor, carried on the work of improving the E6B.

Besides, they are almost a perfect backup computer. Small, light, cheap, not prone to breaking, and they need no power. Some are made of cardboard, some of metal, and others of plastic. Wartime E6Bs were on a plastic that glowed under cockpit illumination. Later, there would be electronic or software E6Bs (see the video below), but a real whiz wheel is something you can hold in your hand, and you never have to change the battery.

 

Not Just a Slide Rule

The front of the E6B is, essentially, a circular slide rule. What makes it unique, though, is that it has special scales and markings to deal with conversions of things like nautical miles or knots. Even the arrangement of the scales work to make a pilot’s life easier.

For example, the top of the wheel is a big mark that represents 60. Why? Because there are 60 minutes in an hour, and this makes it easy to compute things like pounds of fuel per hour.

It also lets you convert things like knots to nautical miles easily because the conversion factors are marked already.

If you know how to use a slide rule, you are almost immediately proficient on the front side of an E6B. Note that the sliding part of the computer is all about the wind computer (see below). All the calculation parts are just on the wheel, like a traditional circular slide rule.

The Back Side

The back side is a graphical vector solver for wind problems. You essentially use it to plot a wind triangle. You set the wind vector, the aircraft velocity vector, and you can read off the ground track. By moving things around, you can find your groundspeed, your wind correction angle, or your heading.On some E6Bs, you have to flip the slide to do low-speed or high-speed wind problems.

For an example wind problem, consider if you have wind at 200 degrees at 10 knots. Your true course is 150 degrees, and your true air speed is 130 knots. You would like to compute your ground speed, your true heading, and the wind correction angle.

One reason that the E6B remains useful for training is that it helps you develop intuition that is hard to get from a bunch of numbers on a calculator’s LEDs. You get a feel for how much wind will deflect your track 10 degrees, for example.

You can also use the E6B in reverse. If your groundspeed isn’t what you expect, you might set up the problem to put in your true parameters and solve for what the wind must be to make that result correct.

Sure, with GPS, you probably don’t need to figure out whether you have enough fuel to make it to another airport. But without GPS and a real computer, the E6B can do those things just fine.

Learning the E6B

If you actually want to learn how to use the E6B, we suggest watching a YouTube video. There are some short videos, and at least one that has 14 different videos. The good news is that the E6B hasn’t changed in many years, so any video you find should be just fine.

We like [Aviation Theory’s] two videos, which are worth watching (see part 1, below).

If you want to follow along and don’t have an E6B, you can try one virtually in your browser. Or, pick one up. The cardboard ones are fairly inexpensive and widely available.

The Legacy of the E6B

While the E6B isn’t the essential kit it once was, it is still a valuable aid for pilots. It is also a great example of how to turn an ordinary slide rule into something specialized.

We have a feeling Gene Roddenberry, an avid pilot, was very familiar with the E6B. He even thought they’d still use them in the 23rd century, as you can see in the video clip below.

You can also catch a glimpse of these in old US Army Air Corps films like the one below (about the 14-minute mark), although we couldn’t find any training specifically for the E6-B that survived.

If you like old analog computers, read [Nicola Marras’] book. Maybe Spock would have preferred a Star Trekulator.

[Featured image: “E6b-slide-rule” by [Duke]

Stream Deck无线电控制器,采用廉价的黄色显示屏制作

2026-03-23 19:00:55

Stream decks are pretty useful in all kinds of contexts, but commercial models can feel a bit pricy for what is effectively a bunch of buttons. [WhiskeyTangoHotel] has whipped up one of their own on the cheap using some readily available parts.

The build came about due to the use of Stream Decks as a common way to control the Flex-6400 software-defined radio. [WhiskeyTangoHotel] figured that using a full-priced Elgato Stream Deck was overkill for this purpose, and that a cheaper interface could be put together for less. Enter the Cheap Yellow Display—a combination of the ESP32 microcontroller with a 2.8-inch touchscreen LCD. It was simple enough to code the device such that it had four big touch buttons to control RIT-, RIT+, XIT-, and XIT+ on the Flex-6400. Plus, with the ESP32 having WiFi onboard, it’s able to control the radio wirelessly—you just need to feed the unit 5 volts, and you’re up and running.

[WhiskeyTangoHotel] set this unit up specifically to control a radio, but you don’t have to feel limited in that regard. The ESP32 is flexible enough that you could have it control just about anything with a bit of different code. We’ve featured more flexible designs along these lines before! Video after the break.