An Introduction to Storm Detector Modules

Lightning storm detectors have been around for a surprisingly long time. The early designs consisted of a pair of metal bells and a pendulum. When there was a charge applied, for example by connecting one bell to the ground and the other to a lightning rod, the bells would ring when a lightning storm was close by. In the mid 18th century, these devices were only practical for demonstration and research purposes, but very likely represent the earliest devices that convert electrostatic charge to mechanical force. A bit over a hundred years later, the first lightning detector was considered by some as the first radio receiver as well.

As soon as I found out about storm detector chips, I knew I would have to get one working. For about $25, I ordered an AMS AS3935 module from China. This chip has been featured before in a number of excellent projects such as Twittering lightning detectors, and networks of Sub-Saharan weather stations. While there’s an Arduino library for interfacing with this IC, I’m going to be connecting it up to an ESP8266 running the NodeMCU firware, which means digging into the datasheet and writing some SPI code. If any of the above tickles your fancy, read on! Continue reading “An Introduction to Storm Detector Modules”

CUDA is Like Owning a Supercomputer

The word supercomputer gets thrown around quite a bit. The original Cray-1, for example, operated at about 150 MIPS and had about eight megabytes of memory. A modern Intel i7 CPU can hit almost 250,000 MIPS and is unlikely to have less than eight gigabytes of memory, and probably has quite a bit more. Sure, MIPS isn’t a great performance number, but clearly, a top-end PC is way more powerful than the old Cray. The problem is, it’s never enough.

Today’s computers have to processes huge numbers of pixels, video data, audio data, neural networks, and long key encryption. Because of this, video cards have become what in the old days would have been called vector processors. That is, they are optimized to do operations on multiple data items in parallel. There are a few standards for using the video card processing for computation and today I’m going to show you how simple it is to use CUDA — the NVIDIA proprietary library for this task. You can also use OpenCL which works with many different kinds of hardware, but I’ll show you that it is a bit more verbose.
Continue reading “CUDA is Like Owning a Supercomputer”

Linux Fu: File Aliases, Links, and Mappings

Have you heard it said that everything in Linux is a file? That is largely true, and that’s why the ability to manipulate files is crucial to mastering Linux Fu.

One thing that makes a Linux filesystem so versatile is the ability for a file to be many places at once. It boils down to keeping the file in one place but using it in another. This is handy to keep disk access snappy, to modify a running system, or merely to keep things organized in a way that suits your needs.

There are several key features that lend to this versatility: links, bind mounts, and user space file systems immediately come to mind. Let’s take a look at how these work and how you’ll often see them used.

Continue reading “Linux Fu: File Aliases, Links, and Mappings”

Linux Fu: Regular Expressions

If you consider yourself a good cook, you may or may not know how to make a souffle or baklava. But there are certain things you probably do know how to do that form the basis of many recipes. For example, you can probably boil water, crack an egg, and brown meat. With Linux or Unix systems, you can make the same observation. You might not know how to set up a Wayland server or write a kernel module. But there are certain core skills like file manipulation and editing that will serve you no matter what you do. One of the pervasive skills that often gives people trouble is regular expressions. Many programs use these as a way to specify search patterns, usually in text strings such as files.

If you aren’t comfortable with regular expressions, that’s easy to fix. They aren’t that hard to learn and there are some great tools to help you. Many tools use regular expressions and the core syntax is the same. The source of confusion is that the details beyond core syntax have variations.

Let’s look at the foundation you need to understand regular expression well.

Continue reading “Linux Fu: Regular Expressions”

Successful Experiments In Multicolor Circuit Boards

Printed circuit boards have never been cheaper or easier to make. We’re not that far removed from a time where, if you wanted a printed circuit board, your best and cheapest option would be to download some proprietary software from a board house, use their terrible tool, and send your board off to be manufactured. A few copies of a 5x5cm board would cost $200. Now, anyone can use free (as in beer, if not speech) software, whip up a board, and get a beautifully printed circuit board for five dollars. It has never been easier to make a printed circuit board, and with that comes a new medium of artistic expression. Now, we can make art on PCBs.

PCB as Art

For the last year or so, Hackaday has been doing a deep-dive into the state of artistic PCBs. By far our biggest triumph is the Tindie Blinky Badge, an artistic representation of a robot dog with blinking LED eyes. [Andrew Sowa] turned some idiot into PCB coinage, and that same idiot experimented with multicolor silkscreen at last year’s DEF CON.

Others have far surpassed anything we could ever come up with ourselves; [Trammel Hudson] created an amazing blinky board using the standard OSHPark colors, and [Blake Ramsdell] is crafting full panels of PCB art. The work of Boldport and [Saar Drimer] has been featured in Marie Claire. The world of art on printed circuit boards has never been more alive, there has never been more potential, and the artistic output of the community is, simply, amazing. We are witnessing the evolution of a new artistic medium.

Printed circuit boards are a limited medium. Unless you want to shell out big bucks for more colors of silkscreen, weird colors of soldermask, or even multiple colors of soldermask, you will be limited to the standard stackup found in every board house. One color, the fiberglass substrate, will be a pale yellow. The copper layer will be silver or gold, depending on the finish. The soldermask will be green, red, yellow, blue, black, white, and of course purple if you go through OSH Park. The silkscreen will be white (or black if you go with a white soldermask). What I’m getting at is that the palette of colors available for PCB art is limited… or at least it has been.

For a few months now, Hackaday has been experimenting with a new process for adding colors to printed circuit boards. This is a manufacturing process that translates well into mass production. This is a process that could, theoretically, add dozens of colors to any small PCB. It’s just an experiment right now, but we’re happy to report some limited success. It’s now easy — and cheap — to add small amounts of color to any printed circuit board.

Continue reading “Successful Experiments In Multicolor Circuit Boards”

Create a Discord Webhook with Python for Your Bot

Discord is an IRC-like chat platform that all the young cool kids are hanging out on. Originally intended as a way to communicate during online games, Discord has grown to the point that there are servers out there for nearly any topic imaginable. One of the reasons for this phenomenal growth is how easy it is to create and moderate your own Discord server: just hit the “+” icon on the website or in the mobile application, and away you go.

As a long-time IRC guy, I was initially unimpressed with Discord. It seemed like the same kind of stuff we’ve had for decades, but with an admittedly slick UI. After having used it for a few months now and joining servers dedicated to everything from gaming to rocket science, I can’t say that my initial impression of Discord is inaccurate: it’s definitely just a modern IRC. But I’ve also come to the realization that I’m OK with that.

But this isn’t a review of Discord or an invitation to join the server I’ve setup for my Battlefield platoon. In this article we’re going to look at how easy it is to create a simple “bot” that you can plug into a Discord server and do useful work with. Since anyone can create a persistent Discord server for free, it’s an interesting platform to use for IoT monitoring and logging by simply sending messages into the server.

Continue reading “Create a Discord Webhook with Python for Your Bot”

OpenSCAD: Tieing It Together With Hull()

What’s your favorite OpenSCAD command? Perhaps it’s intersection() or difference()? Or are you a polygon() and extrude() modeler? For me, the most useful, and maybe most often overlooked, function is hull(). Hull() does just what it says on the can — creates a convex hull around the objects that are passed to it as children — but that turns out to be invaluable.

Hull() solves a number of newbie problems: making things round and connecting things together. And with a little ingenuity, hull() can provide a nearly complete modelling strategy all on its own. If you use OpenSCAD and your creations end up with hard edges, or you spend too much time figuring out angles, or if you just want to experience another way to get the job done, read on!

Continue reading “OpenSCAD: Tieing It Together With Hull()”