Duck And Cover With This WiFi “Geiger Counter”

There’s perhaps no sound more recognizable than the frantic clicking of a Geiger counter. Not because this is some post-apocalyptic world in which everyone is personally acquainted with the operation of said devices, but because it’s such a common effect used in many movies, TV shows, and video games. If somebody hears that noise, even if it doesn’t really make sense in context, they know things are about to get serious.

Capitalizing on this phenomena, [Anton Haidai] has put together a quick hack which turns the ESP8266 into a “Geiger counter” for WiFi. Rather than detecting radiation, the gadget picks up on the strongest nearby WiFi signal and will start clicking in response to signal strength. As the signal gets stronger, so does the clicking. While primarily a novelty, it’s an interesting idea that could potentially be useful for things like fox hunting.

The hardware is really about as simple as it gets, just a basic buzzer attached to one of the digital pins on a NodeMCU development board. This project is more of a proof of concept, but if it were to be developed further it would be interesting to see the electronics placed into a 3D printed replica of one of the old Civil Defense Geiger counters. Perhaps even integrating an analog gauge that can bounce around in response to signal strength.

Software-wise there is the option of locking onto one single network SSID or allowing the device to find the strongest network in the area. Even if you’re not in the market for a chirping WiFi detector, the code is a good example of how you can detect signal RSSI and act on it accordingly; a neat trick which might come in handy in a future project.

If you’re more interested in the real thing, we’ve got plenty of DIY Geiger counters in the archive for you to check out. From diminutive builds that can be mounted to the top of a 9V battery to high-tech solid state versions with touch screen interfaces, you should have plenty of inspiration if you’re looking to kit yourself out before your next drive through the Chernobyl Exclusion Zone.

Continue reading “Duck And Cover With This WiFi “Geiger Counter””

Tracking Binary Changes: Learn The DIFF-erent Ways Of The ELF

Source control is often the first step when starting a new project (or it should be, we’d hope!). Breaking changes down into smaller chunks and managing the changes between them makes it easier to share work between developers and to catch and revert mistakes after they happen. As project complexity increases it’s often desirable to add other nice to have features on top of it like automatic build, test, and deployment.

These are less common for firmware but automatic builds (“Continuous Integration” or CI) is repetitively easy to setup and instantly gives you an eye on a range of potential problems. Forget to check in that new header? Source won’t build. Tweaked the linker script and broke something? Software won’t build. Renamed a variable but forgot a few references? Software won’t build. But just building the software is only the beginning. [noseglasses] put together a tool called elf_diff to make tracking binary changes easier, and it’s a nifty addition to any build pipeline.

In firmware-land, where flash space can be limited, it’s nice to keep a handle on code size. This can be done a number of ways. Manual inspection of .map files (colloquially “mapfiles”) is the easiest place to start but not conducive to automatic tracking over time. Mapfiles are generated by the linker and track the compiled sizes of object files generated during build, as well as the flash and RAM layouts of the final output files. Here’s an example generated by GCC from a small electronic badge. This is a relatively simple single purpose device, and the file is already about 4000 lines long. Want to figure out how much codespace a function takes up? That’s in there but you’re going to need to dig for it.

elf_diff automates that process by wrapping it up in a handy report which can be generated automatically as part of a CI pipeline. Fundamentally the tool takes as inputs an old and a new ELF file and generates HTML or PDF reports like this one that include readouts like the image shown here. The resulting table highlights a few classes of binary changes. The most prominent is size change for the code and RAM sections, but it also breaks down code size changes in individual symbols (think structures and functions). [noseglasses] has a companion script to make the CI process easier by compiling a pair of firmware files and running elf_diff over them to generate reports. This might be a useful starting point for your own build system integration.

Thanks [obra] for the tip! Have any tips and tricks for applying modern software practices to firmware development? Tell us in the comments!

A Contact Lens Launcher That Knows The Weather

They say that necessity is the “Mother of Invention”, but over the years we’ve started to suspect that her cousin might be an underutilized microcontroller. How else can you explain projects like the latest from [MNMakerMan], which takes the relatively simple concept of a contact lens holder and manages to turn it into an Internet-connected electronic appliance? Not that we’re complaining, of course.

He started out with a simple 3D printed holder for his wall that would let him pull out his daily lenses, which worked well enough and gained some popularity on Thingiverse. But he wondered if there wasn’t some way he could use a servo to automate the process. While he was at it, he might as well play with some of the components he’s been meaning to get some hands-on experience with, such as those little OLED displays all the cool kids are using.

Modifying his original design to incorporate servos in the bottom, he added a central compartment that would house an ESP8266 and a simple proximity sensor made from an IR LED and photodiode. The sensor tends to be a little twitchy, so he left a potentiometer inside the device so he can fine tune it as needed.

Strictly speaking the OLED display isn’t actually required for this project, but since he had a WiFi capable microcontroller sitting there doing basically nothing all day anyway, he added in a feature that shows the weather forecast. It’s not much of a stretch to say that the first thing you’d want to see in the morning after regaining the sense of sight is a readout of what the day’s weather will be, so we think it’s a fairly logical extension of the core functionality. Bonus points if he eventually adds in a notification to remind him it’s time to order more lenses when the dispenser starts getting low.

If you don’t have any contact lenses you need dispensed, never fear. A similar concept can be used to fire off your customized swag at hacker events. Don’t have any of that either? Well in that case you can always build a candy dispenser for Halloween.

Continue reading “A Contact Lens Launcher That Knows The Weather”

Building An Army Of ESP32 Air Quality Sensors

The ESP8266 and its heavyweight sibling the ESP32 are fantastic boards to develop with as they allow you to quickly and easily get a project online. Just tack a few sensors and some LEDs on them, and you’re well on the way to producing your own “Internet of Things”. The real challenge is utilizing the incredible capabilities these boards offer us to do something meaningful.

Judging by what he’s got so far, we think [Samuel Klit] is well on his way. He’s using the ESP32 and some off-the-shelf modular components to create an Internet-connected air quality monitoring station. But he’s not just building one or two of them, he’s building enough so they can be distributed and collect data over a wide area. Who knows, perhaps you’ll be building one next.

[Samuel] is using the CCS811 sensor which can pick up potentially harmful Volatile Organic Compounds (VOCs) and determine carbon dioxide concentrations, as well as a BMP280 sensor to read ambient temperature and atmospheric pressure. There’s also an SD card reader for local data storage, a 1602 LCD display that provides a basic user interface, and the electronics required to support the 18650 Li-Ion batteries which power the unit for up to 12 hours on a charge. Everything’s held in a professional looking enclosure that we’ll be sure to add to our next AliExpress order.

Collecting data is one thing, but what do you do with it once you’ve got it? To that end, each node runs a web interface that not only allows you to view current hardware status and download the locally stored data, but also provides an easy to understand visual representation of the environmental conditions. To get around the limited storage space for web assets on the chip, [Samuel] is calling out to Chart.js to inject some slick graphics into the web interface on-demand. The web interface is a particularly nice touch, and an excellent use of the power and capabilities offered by the ESP32.

We’ve previously seen air quality sensors added to Taxi cabs in Peru, the homes surrounding Barcelona’s Plaza del Sol, and of course [Radu Motisan] has done incredible work towards the goal of creating city-wide environmental monitoring networks. With increasingly capable technologies, it looks like citizens are studying the world around them in greater numbers than ever before.

Continue reading “Building An Army Of ESP32 Air Quality Sensors”

Mains Power Supply For ATtiny Project Is Probably A Bad Idea

When designing a mains power supply for a small load DC circuit, there are plenty of considerations. Small size, efficiency, and cost of materials all spring to mind. Potential lethality seems like it would be a bad thing to design in, but that didn’t stop [Great Scott!] from exploring capacitive drop power supplies. You know, for science.

The backstory here is that [Great Scott!] is working on a super-secret ATtiny project that needs to be powered off mains. Switching power supplies are practically de rigueur for such applications, but compared to the intended microcontroller circuit they are actually quite large, and they’ve just been so done before. So in order to learn a thing or two, [Scott!] designed a capacitive dropper supply, where the reactance of the cap acts like a dropping resistor to limit the current. His first try was just a capacitor in series with an LED; this didn’t end well for the LED.

To understand why, he reverse-engineered a few low-current mains devices and found that practical capacitive droppers need a few more components, chiefly a series resistance to prevent inrush current from getting out of hand, but also a bridge rectifier and a zener to clamp things down. Wiring up all that resulted in a working capacitive dropper supply, but a the cost of as much real estate as a small switcher, and with the extra bonus of being potentially lethal if the power supply is plugged in the wrong way. Side note: we thought German line cords were polarized to prevent this, but apparently not? (Ed Note: Nope!)

As always, even when [Great Scott!]’s projects don’t exactly work out, like a suboptimal 3D-printed BLDC or why not to bother building your own DC-AC inverter, we enjoy the learning that results.

Continue reading “Mains Power Supply For ATtiny Project Is Probably A Bad Idea”

Schrödinger Quantum Percolator Makes Half Decent Coffee

I couldn’t decide between normal and decaffeinated coffee. So to eliminate delays in my morning routine, and decision fatigue,  I’ve designed the Schrödinger Quantum Percolator — making the state of my coffee formally undecidable until I drink it.

At its core, the Quantum Percolator contains a novel quantum event detector that uses electron tunneling to determine whether to use caffeinated or decaffeinated coffee. The mechanical components are enclosed in an opaque box, so I can’t tell which type of coffee is being used.

The result is coffee that simultaneously contains and does not contain caffeine – at least until you collapse the caffeination probability waveform by drinking it. As the expression goes, you can’t have your quantum superposition of states and drink it too!

Continue reading “Schrödinger Quantum Percolator Makes Half Decent Coffee”

Arduino Converts Serial To Parallel: The Paralleloslam

After a youth spent playing with Amigas and getting into all sorts of trouble on the school computer network, I’ve always had a soft spot in my heart for hardware from the 80s and 90s. This extends beyond computers themselves, and goes so far as to include modems, photocopiers, and even the much-maligned dot matrix printer.

My partner in hacking [Cosmos2000] recently found himself with a wonderful Commodore MPS 1230 printer. Its parallel interface was very appropriate in its day, however parallel ports are as scarce as SID chips. Thankfully, these two interfaces are easy to work with and simple in function. Work on a device to marry these two disparate worlds began.

Enter: The Paralleloslam

While I was gallivanting around the Eastern coast of Australia, [Cosmos2000] was hard at work. After some research, it was determined that it would be relatively simple to have an Arduino convert incoming serial data into a parallel output to the printer. After some testing was performed on an Arduino Uno, a bespoke device was built – in a gloriously plastic project box, no less.

An ATMEGA328 acts as the brains of the operation, with a MAX232 attached for level conversion from TTL to RS232 voltage levels. Serial data are received on the hardware TX/RX lines. Eight digital outputs act as the parallel interface. When a byte is received over serial, the individual bits are set on the individual digital lines connected to the printer’s parallel port. At this point, the strobe line is pulled low, indicating to the attached device that it may read the port. After two microseconds, it returns high, ready for the next byte to be set on the output lines. This is how parallel interfaces operate without a clock signal, using the strobe to indicate when data may be read.

At this point, [Cosmos2000] reached out – asking if I had a name for the new build.

“Hm. Paralleloslam?”

“Done. Cheers!”

Continue reading “Arduino Converts Serial To Parallel: The Paralleloslam”