Choosing The Right RTC For Your Project

When it comes to measuring time on microcontrollers, there’s plenty of ways to go about things. For most quick and dirty purposes, such as debounce delays or other wait states, merely counting away a few cycles of the main clock will serve the purpose.  Accurate to the tens of milliseconds, they get the average utility jobs done without too much fuss.

However, many projects are far more exacting in their requirements. When you’re building a clock, or a datalogger, or anything that relies on a stable sense of passing time for more than a few minutes, you’ll want a Real Time Clock. So called due to their nature of dealing with real time, as we humans tend to conceive it, these devices take it upon themselves to provide timekeeping services with a high degree of accuracy. We’ve compiled a guide to common parts and their potential applications so you can get things right the first time, every time.

Continue reading “Choosing The Right RTC For Your Project”

WiFi Hacking Mr. Coffee

You wake up on a Sunday, roll out of bed, and make your way to the centerpiece of your morning, the magical device that helps you start your day: the coffee machine. You open the companion app, because everything has an app in 2020, and select a large latte with extra froth. As you switch open a browser to check Hackaday, the machine beeps. Then the built-in grinder cranks up to 100, the milk frother begins to whir, and the machine starts spraying water. Frantic, you look at the display for an error code and instead see a message instructing you to send $75 to a bitcoin wallet, lest your $300 machine become a doorstop.

Outlandish though it may seem, this has become quite a real possibility, as [Martin Hron] at the Avast Threat Labs demonstrates. In fact, he could probably make your modern macchiato machine do this without setting foot in your house (so long as it comes with a built-in ESP8266, like his did).

Building on others’ work that identified the simple commands that control the machine over it’s WiFi connection (nothing says “brew me a nice cup o’ joe” like 0x37), [Martin] reverse-engineered the Smarter Coffee companion app to extract and reverse engineer its firmware. He was actually able to find the entire firmware image packaged within the app- relatively uncommon in the world of Over-The-Air (OTA) updates, but convenient in this case. Using Interactive Disassembler (IDA) to sift through the firmware’s inner workings, he identified the functions that handle all basic operations, including displaying images on the screen, controlling the heating elements, and of course, beeping. From there, he modified the stock firmware image to include some malicious commands and ran an OTA update.

The mind-boggling part here is that not only was the firmware transmitted as unencrypted plaintext over unsecured WiFi, but the machine didn’t even require a user to confirm the update with a button press. With one quick reboot, the trap was set. The machine operated normally, while waiting for “Order 66,” causing it to turn all the heating elements on, spool up the built-in grinder, and beep. Constantly.

While a broken coffee machine seems relatively innocuous, there are some pretty significant lapses in hardware/firmware security here that, while avoidable, almost seem unnecessary in the first place. It makes us wonder- why does Mr. Coffee need a smartphone in the first place?

Continue reading “WiFi Hacking Mr. Coffee”

Check Your Pockets For Components

The ideal component tester is like a tricorder for electronics — it can measure whatever it is that you need it to, all the time. Maybe you have a few devices like an ohmmeter and maybe a transistor socket on our multimeter. But what do you do when you need to see if that thyristor is faulty? [Akshay Baweja] wants an everything-tester at the ready, so he’s building a comprehensive device that fits in a pocket. It will identify the type and size of: Continue reading “Check Your Pockets For Components”

A Battery To Add A Tingling Sensation To Your Tweets

Internet-connected sex toys are a great way to surprise your partner from work (even the home office) or for spicing up long-distance relationships. For some extra excitement, they also add that thrill of potentially having all your very sensitive private data exposed to the public — but hey, it’s not our place to kink-shame. However, their vulnerability issues are indeed common enough to make them regular guests in security conferences, so what better way to fight fire with fire than simply inviting the whole of Twitter in on your ride? Well, [Space Buck] built just the right device for that: the Double-Oh Battery, an open source LiPo-cell-powered ESP32 board in AA battery form factor as drop-in replacement to control a device’s supply voltage via WiFi.

Battery and PCB visualization
Double-Oh Battery with all the components involved

In their simplest and cheapest form, vibrating toys are nothing more than a battery-powered motor with an on-off switch, and even the more sophisticated ones with different intensity levels and patterns are usually limited to the same ten or so varieties that may eventually leave something to be desired. To improve on that without actually taking the devices apart, [Space Buck] initially built the Slot-in Manipulator of Output Levels, a tiny board that squeezed directly onto the battery to have a pre-programmed pattern enabling and disabling the supply voltage — or have it turned into an alarm clock. But understandably, re-programming patterns can get annoying in the long run, so adding WiFi and a web server seemed the logical next step. Of course, more functionality requires more space, so to keep the AA battery form factor, the Double-Oh Battery’s PCB piggybacks now on a smaller 10440 LiPo cell.

But then, where’s the point of having a WiFi-enabled vibrator with a web server — that also happens to serve a guestbook — if you don’t open it up to the internet? So in some daring experiments, [Space Buck] showcased the project’s potential by hooking it up to his Twitter account and have the announcement tweet’s likes and retweets take over the control, adding a welcoming element of surprise, no doubt. Taking this further towards Instagram for example might be a nice vanity reward-system improvement as well, or otherwise make a great gift to send a message to all those attention-seeking people in your circle.

All fun aside, it’s an interesting project to remote control a device’s power supply, even though its application area might be rather limited due to the whole battery nature, but the usual Sonoff switches may seem a bit unfitting here. If this sparked your interest in lithium-based batteries, check out [Lewin Day]’s beginner guide and [Bob Baddeley]’s deeper dive into their chemistry.

Internet Connected E-Paper Message Board

Are you still writing notes on paper and sticking them to the fridge like it’s the ’80s? Well, if you are, and you read this site, you’d probably like to upgrade to something a bit more 21st century. And, thanks to robot maker [James Bruton], you can leave your old, last century, message taking behind as he has a tutorial up showing you how to build an internet connected e-paper message display board. And, if you have a Raspberry Pi, an e-paper display and adapters just lying around doing nothing, then this project will cost you less than the buck that paper and a magnet will cost you.

Sarcasm aside, this is a pretty nice project. As mentioned, the base of this is a Raspberry Pi – [James] uses a Pi 4, but you could get away with an older, lower powered model as well. This powers the cheap(-ish) e-paper display he found online, which comes with the necessary adapters for the Pi, as well as a python library to write to the display. [James] uses a Google Sheet as the cloud storage for the message board, and there is some python code to access the cells in the Sheet and print them on the display if anything has changed. A cron job runs the script every 5 minutes to catch changes in the messages.

As with most of the projects that [James] does, he gives a good overview in the video and goes over the process of finding the hardware and writing and updating the script. He’s put the script and details as well as the CAD file for the frame he created for the project up on GitHub. [James] has been featured several times on the site before, check out some of his projects.

Continue reading “Internet Connected E-Paper Message Board”

Hard Disk Drives Have Made Precision Engineering Commonplace

Modern-day hard disk drives (HDDs) hold the interesting juxtaposition of being simultaneously the pinnacle of mass-produced, high-precision mechanical engineering, as well as the most scorned storage technology. Despite being called derogatory names such as ‘spinning rust’, most of these drives manage a lifetime of spinning ultra-smooth magnetic storage platters only nanometers removed from the recording and reading heads whose read arms are twitching around using actuators that manage to position the head precisely above the correct microscopic magnetic trace within milliseconds.

Despite decade after decade of more and more of these magnetic traces being crammed on a single square millimeter of these platters, and the simple read and write heads being replaced every few years by more and more complicated ones, hard drive reliability has gone up. The second quarter report from storage company Backblaze on their HDDs shows that the annual failure rate has gone significantly down compared to last year.

The question is whether this means that HDDs stand to become only more reliable over time, and how upcoming technologies like MAMR and HAMR may affect these metrics over the coming decades.

Continue reading “Hard Disk Drives Have Made Precision Engineering Commonplace”

What’s Inside An FPGA? Ken Shirriff Has (Again) The Answer

FPGAs are somewhat the IPv6 of integrated circuits — they’ve been around longer than you might think, they let you do awesome things that people are intrigued by initially, but they’ve never really broke out of their niches until rather recently. There’s still a bit of a myth and mystery surrounding them, and as with any technology that has grown vastly in complexity over the years, it’s sometimes best to go back to its very beginning in order to understand it. Well, who’d be better at taking an extra close look at a chip than [Ken Shirriff], so in his latest endeavor, he reverse engineered the very first FPGA known to the world: the Xilinx XC2064.

If you ever wished for a breadboard-friendly FPGA, the XC2064 can scratch that itch, although with its modest 64 configurable logic blocks, there isn’t all that much else it can do — certainly not compared to even the smallest and cheapest of its modern successors. And that’s the beauty of this chip as a reverse engineering target, there’s nothing else than the core essence of an FPGA. After introducing the general concepts of FPGAs, [Ken] (who isn’t known to be too shy to decap a chip in order to look inside) continued in known manner with die pictures in order to map the internal components’ schematics to the actual silicon and to make sense of it all. His ultimate goal: to fully understand and dissect the XC2064’s bitstream.

Of course, reverse engineering FPGA bitstreams isn’t new, and with little doubt, building a toolchain based on its results helped to put Lattice on the map in the maker community (which they didn’t seem to value at first, but still soon enough). We probably won’t see the same happening for Xilinx, but who knows what [Ken]’s up to next, and what others will make of this.