Putting The Firmware In Your Firmware

Performing over-the-air updates of devices in the field can be a tricky business. Reliability and recovery is of course key, but even getting the right bits to the right storage sectors can be a challenge. Recently I’ve been working on a project which called for the design of a new pathway to update some small microcontrollers which were decidedly inconvenient.

There are many pieces to a project like this; a bootloader to perform the actual updating, a robust communication protocol, recovery pathways, a file transfer mechanism, and more. What made these micros particularly inconvenient was that they weren’t network-connected themselves, but required a hop through another intermediate controller, which itself was also not connected to the network. Predictably, the otherwise simple “file transfer” step quickly ballooned out into a complex onion of tasks to complete before the rest of the project could continue. As they say, it’s micros all the way down.

The system de jour

Continue reading “Putting The Firmware In Your Firmware”

Mirrored Music Machine Reflects Circadian Rhythms

Interactive artist [Daric Gill] wrote in to share the incredible electronic sculpture he’s been working on for the past year. It’s called the Circadian Machine, and it’s a sensor-enabled mindfulness music-and-lights affair that plays a variety of original compositions based on the time of day and the circle of fifths. This machine performs some steady actions like playing chimes at the top of each hour, and a special sequence at solar noon.

This cyberpunk-esque truncated hexagonal bi-pyramid first geolocates itself, and then learns the times for local sunrise and sunset. A music module made of a Feather M4 Express and a Music Maker FeatherWing fetches astronomical data and controls the lights, speakers, and a couple of motion sensors that, when tripped, will change the lights and sounds on the fly. A separate Feather Huzzah and DS3231 RTC handle the WiFi negotiation and keep track of the time.

On top of the hourly lights and sound, the Circadian Machine does something pretty interesting: it performs another set of actions based on sunrise and sunset, basically cramming an entire day’s worth of actions between the two events, which seems like a salute to what humans do each day. Check out the build notes and walk-through video after the break, then stick around for the full build video.

The internet is rife with information just begging to be turned into art. For instance, there are enough unsecured CCTV cameras around the world with primo vantage points that you can watch a different sunrise and sunset every hour of every day.

Continue reading “Mirrored Music Machine Reflects Circadian Rhythms”

Digital Pregnancy Tests Use LEDs To Read Between The Lines

[Foone] saw a tweet a few weeks ago alleging that digital pregnancy tests are a rip-off. Regular, cheap tests have an absorbent strip running the length of the plastic, with one end exposed for collecting urine. A few excruciating minutes later, a little plastic window in the middle will show one line, two lines, or a plus or minus sign depending on the presence of human chorionic gonadotropin (HCG) in the urine.

As it turns out, at least two digital tests out there are the exact same thing, but with more steps. Instead of a window, they include circuitry that interprets the lines and publishes the result to a little screen in plain English. It can even tell you if you’re doing it wrong by flashing a little RTFM icon.

[Foone]’s teardown reveals a CR1616 coin cell, an 8-bit microcontroller, and a little phototransistor setup that shines LEDs on the strip and reads the incoming light. Unfortunately, the micro is the mask ROM version, so [Foone] can’t reprogram it to run Doom.

The original tweet’s author is probably not alone in assuming that digital tests are supposed to be more accurate somehow. We think the accuracy claim is more about removing the frazzled and/or incompetent human variable from the equation. If the test interprets the results for you, then there’s no mistaking the results, which is technically a higher degree of accuracy. But if you’re in doubt, you get a test from a doctor.

There’s been some discussion about the e-waste aspect of these all these tests — that it’s a shame to produce a microcontroller just to pee on it and throw it away. Sure, you could look at it that way, but unlike a lot of e-waste, these are tools. It’s unfortunate that this is the industry’s idea of higher accuracy, but what should we expect? It’s just testing for the presence of a hormone in urine. Interpreting the results is up to the viewer. We should probably be astounded that they got the cost down to two for $7.

Many people choose to wait a while to start spreading the news. With a Bluetooth-enabled pregnancy test, everyone can find out together.

Thanks for the tip, [Jay]!

ESP32 Hash Monster Fills Pockets With Packets

Unless you’re reading this from the middle of the ocean or deep in the forest, it’s a pretty safe bet there’s WiFi packets zipping all around you right now. Capturing them is just a matter of having the right hardware and software, and from there, you can get to work on cracking the key used to encrypt them. While such things can obviously have nefarious connotations, there are certainly legitimate reasons for auditing the strength of the wireless networks in the area.

It might not have the computational horsepower to crack any encryption itself, but the ESP32 M5Stack is more than up to the task of capturing WiFi packets if you install the Hash Monster firmware developed by [G4lile0]. Even if you don’t intend on taking things farther, this project makes finding WiFi access points and grabbing their packets a fascinating diversion with the addition of a few graphs and an animated character (the eponymous monster itself) that feeds on all those invisible 1s and 0s in the air.

There’s some excellent documentation floating around that shows you the start to finish process of popping open a WiFi network with the help of Hash Monster, but that’s only the beginning of what’s possible with this gadget. A quick search uncovers a number of software projects that make use of the specific advantages of the M5Stack compared to more traditional ESP32 boards, namely the built-in screen, buttons, and battery. We’ve even seen it used in a few builds here on Hackaday, such as this DIY thermal camera and custom shipboard computer system.

[Thanks to Manuel for the tip.]

Miniature Faux Floppy For 8-Bit Atari Looks The Part

There’s plenty of fun to be had with retrocomputers of yesteryear, but for modern users, it can be something of a culture shock. Going back to floppy disks after all these years is a reminder of just how far storage technology has come in terms of speed, reliability, and of course, capacity. Luckily, there are ways to combine the best of both worlds.

Floppy drive emulators for classic computers are of course nothing new, but we think this one [c0pperdragon] has put together is worthy of a closer look. Not only does the ATmega32U4 based emulator have an exceptionally low part count, but the code has been written in the Arduino IDE. Both features make it easy for new players to duplicate and revise the design should they feel so inclined. In a pinch you could even implement it on a breadboard with a garden variety Arduino.

The emulator is housed in a 3D printed enclosure designed to look like an era-appropriate Atari 1050 Disk Drive, except you’re using SD cards instead of floppies. The firmware can mimic two physical drives and supports up to 100 disk images on each SD card. The user interface is about as simple as it gets, with two push buttons and a pair of seven-segment LEDs to indicate which disk image is currently loaded up.

We’ve seen some very elaborate disk emulators over the years, but there’s something compelling about how straightforward this version is. If it helps a few more people experience the unique joys of retrocomputing, it’s a win in our book.

Turning The Raspberry Pi Into A MCU Programmer

Once you graduate beyond development boards like the Arduino or Wemos D1, you’ll find yourself in the market for a dedicated programmer. In most cases, your needs can be met with a cheap USB to serial adapter that’s not much bigger than a flash drive. The only downside is that you’ve got to manually wire it up to your microcontroller of choice.

Unless you’re [Roey Benamotz], that is. He’s recently created the LEan Mean Programming mAchine (LEMPA), an add-on board for the Raspberry Pi that includes all the sockets, jumpers, and indicator LEDs you need to successfully flash a whole suite of popular MCUs. What’s more, he’s written a Python tool that handles all the nuances of getting the firmware written out.

After you’ve configured the JSON file with the information about your hardware targets and firmware files, they can easily be called up again by providing a user-defined ID name. This might seem overkill if you’re just burning the occasional hex, but if you’re doing small scale production and need to flash dozens of chips, you’ll quickly appreciate a little automation in your process.

Of course, if you’re just trying to flash some code in a pinch, there are some more expedient options out there. We’re particularly fond of using a development board to program the bare MCU.

Continue reading “Turning The Raspberry Pi Into A MCU Programmer”

Don’t Slack Off On Updating Your Status

Displaying an accurate status in Slack (or whatever other employer-provided collaboration program you may be forced to run) is crucial in 2020. If you need to make a sandwich or take the dog out real quick, but you don’t update your status to show yourself as away, you might come back to a string of increasingly concerned or frustrated messages with lots of annoying question marks and the occasional interrobang.

[Becky Stern] decided that a physical interface would be a far more fun way to keep tabs on her status, and an excellent visual reminder to actually do it. We totally agree. Inside the box is a NodeMCU which is using [Brian Lough]’s Slack API library for Arduino. This made it easy for [Becky] to create a switch/case selector of statuses, and in each of these she can set the presence token as auto or away, and show a custom message with an appropriate emoji. These of course match the emoji semi-circling the selector, which is a rotary switch with a really nice knob.

While we’re on the subject of Slack notifiers, how about a companion cat to wave when you’ve been mentioned?

Continue reading “Don’t Slack Off On Updating Your Status”