Exploring Custom Firmware On Xiaomi Thermometers

If we’ve learned anything over the years, it’s that hackers love to know what the temperature is. Seriously. A stroll through the archives here at Hackaday uncovers an overwhelming number of bespoke gadgets for recording, displaying, and transmitting the current conditions. From outdoor weather stations to an ESP8266 with a DHT11 soldered on, there’s no shortage of prior art should you want to start collecting your own environmental data.

Now obviously we’re big fans of DIY it here, that’s sort of the point of the whole website. But there’s no denying that it can be hard to compete with the economies of scale, especially when dealing with imported goods. Even the most experienced hardware hacker would have trouble building something like the Xiaomi LYWSD03MMC. For as little as $4 USD each, you’ve got a slick energy efficient sensor with an integrated LCD that broadcasts the current temperature and humidity over Bluetooth Low Energy.

You could probably build your own…but why?

It’s pretty much the ideal platform for setting up a whole-house environmental monitoring system except for one detail: it’s designed to work as part of Xiaomi’s home automation system, and not necessarily the hacked-together setups that folks like us have going on at home. But that was before Aaron Christophel got on the case.

We first brought news of his ambitious project to create an open source firmware for these low-cost sensors last month, and unsurprisingly it generated quite a bit of interest. After all, folks taking existing pieces of hardware, making them better, and sharing how they did it with the world is a core tenet of this community.

Believing that such a well crafted projected deserved a second look, and frankly because I wanted to start monitoring the conditions in my own home on the cheap, I decided to order a pack of Xiaomi thermometers and dive in.

Continue reading “Exploring Custom Firmware On Xiaomi Thermometers”

Repurposing Large Electronic Price Tags

If you’ve recently braved the pandemic long enough to make a trip to a big box retailer, you may have spotted a few massive e-paper price tags affixed to large items like appliances. These seven inch displays were likely designed to be used in e-readers such as the Kindle, but through some surplus deal, are now shouting out clearance savings on last year’s washing machine. After checking out a particularly good price for a Samsung refrigerator at the local Home Depot, [YodaLogic] got to wondering if they could be bent to the hacker’s will.

Now to be clear, [YodaLogic] didn’t steal any of these tags. It turns out you can pick them up on eBay for less than $15 a pop, or at least that’s what they cost before this article went out. It’s an exceptionally good price when you realize that these displays are actually capable of color…albeit only two. Apparently when the retailer orders the so-called “Chroma 74” tags, they can pick between either yellow or red as the secondary color. While not quite as exciting as a full-color display, it certainly sets them apart from most of the e-paper panels we’ve seen used in DIY projects thus far.

The panel gets mighty close to the HaD color scheme

We’d like to tell you that [YodaLogic] cracked one of these things open and was able to wire it right up to a Pi or microcontroller, but the truth is a bit more complicated. Connecting the Chroma 74’s panel to the control board intended for a similar Waveshare 7.5 inch display didn’t seem to do anything. After some poking and prodding, it became clear that the WFD0750BF19 e-paper panel used in the Chroma needed a custom software profile to bring it to life. Unfortunately, there doesn’t seem to be a datasheet available for this particular panel.

By combining what could be gleaned from the datasheets of similar displays with a bit of experimentation, [YodaLogic] came up with a configuration profile thatĀ mostly works. It doesn’t seem like the yellow is as vibrant as it should be, and a refresh can take as long as 20 seconds, but it’s certainly a start. Perhaps the code can be tightened up with some input from the community, or even better, maybe somebody out there knows where we can get our hands on the datasheet for this panel.

While we’ve started to see more projects use e-paper displays, their high price still keeps many hackers away. Being able to repurpose cheap hardware like this could really spur some interesting development, so we’re excited to see [YodaLogic] put the finishing touches on this project and opened it up to a wider audience.

A CPU-Less Computer With A Single NOR-Gate ALU

We see a lot of discrete-logic computer builds these days, and we love them all. But after a while, they kind of all blend in with each other. So what’s the discrete logic aficionado to do if they want to stand out from the pack? Perhaps this CPU-less computer with a single NOR-gate instead of an arithmetic-logic unit is enough of a hacker flex? We certainly think so.

We must admit that when we first saw [Dennis Kuschel]’s “MyNor” we thought all the logic would be emulated by discrete NOR gates, which of course can be wired up in various combinations to produce every other logic gate. And while that would be really cool, [Dennis] chose another path. Sitting in the middle of the very nicely designed PCB is a small outcropping, a pair of discrete transistors and a single resistor. These form the NOR gate that is used, along with MyNor’s microcode, to perform all the operations normally done by the ALU.

While making the MyNor very slow, this has the advantage of not needing 74-series chips that are no longer manufactured, like the 74LS181 ALU. It may be slow, but as seen in the video below, with the help of a couple of add-on cards of similar architecture, it still manages to play Minesweeper and Tetris and acts as a decent calculator.

We really like the look of this build, and we congratulate [Dennis] on pulling it off. He has open-sourced everything, so feel free to build your own. Or, check out some of the other CPU-less computers we’ve featured: there’s the Gigatron, the Dis-Integrated 6502, or the jumper-wire jungle of this 8-bit CPU-less machine.

Continue reading “A CPU-Less Computer With A Single NOR-Gate ALU”

Coaxial Connectors, Starting With The PL259

For the casual breadboard experimenter with a microcontroller and a few peripherals, there’s little concern over interconnects as a set of jumper wires will suffice. But as any radio amateur will tell you though, at higher frequencies it’s a very different affair. [Ria Jairam N2RJ] has embarked upon a series of videos exploring co-axial cable and its various connectors, and her first offering features the humble UHF connector, sometimes known as the PL259. Though it’s one of the older choices and its design flaws mean that “UHF” is more of an aspiration for it than a reality, it remains a common connector at the lower end of the amateur radio frequency range.

She starts with a brief history of co-axial cable, before introducing the UHF connector. We’re the introduced to its major flaw, in that it doesn’t present a constant impedance. The resulting mismatch presents a significant problem to a transmitter, especially at higher frequencies. We’re then taken through the various different models of UHF connector, including those with honeycomb dielectric to minimize the mismatch, and the fancy expensive plugs with strain relief. Finally she takes us through the proper fitting of a PL259 plug, something that there’s a bit more to than most of us might think. Altogether it’s an interesting and informative watch from an engaging and knowledgeable host, and we look forward to more.

Meanwhile, the field of RF connectors is something we’ve dipped a to into from time to time ourselves.

Continue reading “Coaxial Connectors, Starting With The PL259”

Espressif Leaks ESP32-C3: A WiFi SoC That’s RISC-V And Is ESP8266 Pin-Compatible

Six years on from the emergence of the Espressif ESP8266 we might believe that the focus had shifted to the newer dual-core ESP32. But here comes a twist in the form of the newly-revealed ESP32-C3. It’s a WiFi SoC that despite its ESP32 name contains a RISC-V core in place of the Tensilica core in the ESP32s we know, and uses the ESP8266 pin-out rather than that of its newer sibling. There’s relatively little information about it at the time of writing, but CNX Software have gathered together what there is including a draft datasheet whose English translation is available as a Mega download. As with other ESP32 family members, this one delivers b/g/n WiFi and Bluetooth Low-Energy (BLE) 5, where it differs is the RISC-V 32 Single-core processor with a clock speed of up to 160 MHz. There is 400 kB of SRAM and 384 kB ROM storage space built in.

While there is no official announcement yet, Espressif has been dropping hints. There’s been an OpenOCD configuration file for it in the Espressif repositories since the end of last month. And on Friday, Espressif Software Engineering Manager [Sprite_tm] answered a reddit comment, confirming the RISC-V core.

ESP-01: Kjerish, CC BY-SA 4.0, RISC-V logo: RISC-V foundation, Public domain.

Why they are releasing the part as an ESP32 rather than giving it a series number of its own remains a mystery, but it’s not hard to see why it makes commercial sense to create it in an ESP8266-compatible footprint. The arrival of competing parts in the cheap wireless SoC space such as the Bouffalo Labs BL602 we mentioned recently is likely to be eating into sales of the six-year-old chip, so an upgrade path to a more capable part with minimal new hardware design requirements could be a powerful incentive for large customers to stay with Espressif.

We’re left to guess on how exactly the rollout will proceed. We expect to see similar developer support to that they now provide for their other chips, and then ESP32-C3 powered versions of existing ESP8266 boards in short order. It’s also to be hoped that a standard RISC-V toolchain could be used instead of the device-specific ones for current Espressif offerings. What we should not expect are open-source replacements for the blobs that drive the on-board peripherals, as the new chip will share the same closed-source IP as its predecessors for them. Perhaps if the PINE64 initiative to reverse engineer blobs for the BL602 bears fruit, we might see a similar effort for this chip.

Intel’s Forgotten 1970s Dual Core Processor

Can you remember when you received your first computer or device containing a CPU with more than one main processing core on the die? We’re guessing for many of you it was probably some time around 2005, and it’s likely that processor would have been in the Intel Core Duo family of chips. With a dual-core ESP32 now costing relative pennies it may be difficult to grasp in 2020, but there was a time when a multi-core processor was a very big deal indeed.

What if we were to tell you that there was another Intel dual-core processor back in the 1970s, and that some of you may even have owned one without ever realizing it? It’s a tale related to us by [Chris Evans], about how a team of reverse engineering enthusiasts came together to unlock the secrets of the Intel 8271.

If you’ve never heard of the 8271 you can be forgiven, for far from being part of the chip giant’s processor line it was instead a high-performance floppy disk controller that appeared in relatively few machines. An unexpected use of it came in the Acorn BBC Micro which is where [Chris] first encountered it. There’s very little documentation of its internal features, so an impressive combination of decapping and research was needed by the team before they could understand its secrets.

As you will no doubt have guessed, what they found is no general purpose application processor but a mask-programmed dual-core microcontroller optimized for data throughput and containing substantial programmable logic arrays (PLAs). It’s a relatively large chip for its day, and with 22,000 transistors it dwarfs the relatively svelte 6502 that does the BBC Micro’s heavy lifting. Some very hard work at decoding the RMO and PLAs arrives at the conclusion that the main core has some similarity to their 8048 architecture, and the dual-core design is revealed as a solution to the problem of calculating cyclic redundancy checks on the fly at disk transfer speed. There is even another chip using the same silicon in the contemporary Intel range, the 8273 synchronous data link controller simply has a different ROM. All in all the article provides a fascinating insight into this very unusual corner of 1970s microcomputer technology.

As long-time readers will know, we have an interest in chip reverse engineering.

High-Speed Spectrometer Built With Cheap Linear CCD

If you’ve ever dreamed of building a proper spectrometer, it looks like the ESPROS epc901 CCD sensor is absolutely worth your attention. It’s fast, sensitive, easy to interface with, and at just $24 USD, it won’t break the bank. There’s only one problem: implementing it in your project means either working with the bare 2×16 0.5 mm pitch BGA device, or shelling out nearly $1,400 USD for the development kit.

Thankfully, [Adrian Studer] has come up with a compromise. While you’ll still need to reflow the BGA to get it mounted, his open hardware breakout andĀ adapter boards for the ESPROS epc901 make the sensor far easier to work with.

It’s not just a hardware solution either, he also provides firmware code for the STM32L4 based Nucleo development board and some Python scripts that make it easy to pull data from the sensor. The firmware even includes a simple command line interface to control the hardware that you can access over serial.

With the sensor successfully wrangled, [Adrian] partnered with [Frank Milburn] to build an affordable spectrometer around it. The design makes use of a 3D printed chamber, a simple commercial diffraction grating, and an array of entrance slits ranging from 0.5 to 0.0254 millimeters in width that were laser-cut into a sheet of stainless steel.

In the videos after the break, you can see the finished spectrometer being used to determine the wavelength of LEDs, as well as a demonstration of how the high-speed camera module is able to study the spectral variations of a CFL bulb over time. [Adrian] tells us that he and [Frank] are open to suggestions as to what they should point their new spectrometer at next, so let them know in the comments if you’ve got any interesting ideas.

We’ve seen an incredible number of spectrometer builds over the years, and some of the more recent ones are really pushing the envelope in terms of what the DIY scientist is capable of doing in the home lab. While they’re still fairly niche, these instruments are slowly but surely finding their way into the hands of more curious hackers.

Continue reading “High-Speed Spectrometer Built With Cheap Linear CCD”