Digispark Spoofs IR To Get Speakers Under Control

The Microlab 6C are a pretty nice pair of speakers, but [Michał Słomkowski] wasn’t too thrilled with the 8 watts they consume when on standby. The easy fix is to just unplug them when they aren’t in use, but unfortunately the digital controls on the front panel mean he’s got to turn them on, select the correct input, and turn the volume up to the appropriate level every time they’re plugged back in. Surely there must be a better way.

His solution was to use a Digispark to fire off the appropriate IR remote codes so they’d automatically be put back into a usable configuration. But rather than putting an IR LED on one of the GPIO pins, he simply spliced it into the wire leading back from the speaker’s IR receiver. All his code needs to do is generate the appropriate pulses on the line, and the speaker’s electronics think its a signal coming in from the remote.

Distinctive patterns on the IR sensor wires.

Power for the Digispark is pulled from the speaker itself, so it turns on once [Michał] plugs them back in. The code waits five seconds to make sure the hardware has had time to start up, then proceeds with the “Power On”, “Change Input”, and “Volume Up” commands with a few seconds in between each for good measure.

Not only was it easier to skip the IR and inject the signals directly, but it also made for a cleaner installation. Since the microcontroller doesn’t need line of sight to the IR receiver, [Michał] was able to hide it inside the speaker’s enclosure. From the outside, the modification is completely invisible.

We’ve seen similar code injection tricks used before, and it’s definitely one of those techniques you should file away mentally for future reference. Even though more and more modern devices are embracing WiFi and Bluetooth control, the old school IR remote doesn’t seem like it’s going away anytime soon.

DOOM Running On The Nintendo Game & Watch

Today the newly-released Nintendo Game & Watch can play DOOM. Sure, there are caveats…this is a watered down version due to the restraints of the hardware itself. But the important thing is that this shows the hardware has been fully owned. This is code written to replace the firmware that ships on the STM32 within, and that makes this a gorgeous little hardware platform that is completely open to homebrew hacking.

Honestly, you had to assume this was going to happen pretty quickly considering the effort being thrown into it. We first reported on Tuesday that the EEPROM memory which stores the ROMs on the Game and Watch had been decoded. Shortly after that was published, [stacksmashing] and [Konrad Beckmann] were showing test patterns on the display and mentioning the audio was working as well. Turns out they were able to dump the stock firmware despite the chip being security locked.

We’ll have to wait for more details on exactly how to dump firmware, but [stacksmashing] drops enough of a mention in the video below to confirm the obvious. A common approach to dumping code from a locked microcontroller is to find a vulnerability that grants execution of custom code. Being able to run just a few lines of your own code is enough set up something as simple as looping through all internal flash memory addresses and dumping them over a few GPIO pins. In this case our two heroes discovered some ARM code was being loaded from the EEPROM onto the STM32, and managed to inject their own directives to perform the dump. They have promised full details soon.

What we have today is a pretty tricky hack not just to load code, but to get DOOM to run on meager hardware specs. Notably, 128 k of SRAM and 1.3 MB of external RAM. There’s also a bottleneck with the 1.1 MB of FLASH for storing game files. The textures were stripped down, and memory allocation was rewritten, but the proof of concept is there and the game runs. Homebrew, here we come!

Continue reading “DOOM Running On The Nintendo Game & Watch”

Blue Pill As A Nerdy Swiss Army Knife

Not everyone can afford an oscilloscope, and some of us can’t find a USB logic analyzer half the time. But we can usually get our hands on a microcontroller kit, which can be turned into a makeshift instrument if given the appropriate code. A perfect example is buck50 developed by [Mark Rubin], an open source firmware to turn a STM32 “Blue Pill” into a multi-purpose test and measurement instrument.

buck50 comes with a plethora of functionality built in which includes an oscilloscope, logic analyzer, and bus monitor. The device is a two way street and also comes with GPIO control as well as PWM output. There’s really a remarkable amount of functionality crammed into the project. [Mark] provides a Python application that exposes a text based UI for configuring and using the device though commands and lots of commands which makes this really nerdy. There are a number of options to visualize the data captured which includes gnuplot, gtk wave and PulseView to name a few.

[Mark] does a fantastic job not only with the firmware but also with the documentation, and we really think this makes the project stand out. Commands are well documented and everything is available on [GitHub] for your hacking pleasure. And if you are about to order a Blue Pill online, you might want to check out the nitty-gritty of the clones that are floating around.

Thanks [JohnU] for the tip!

Micro Macro Keyboard Is ‘Mega-Based

There’s a certain kind of joy that comes in throwing something together from spare parts, or from finding utility in a proof of concept for another project. [Clewsy] is cooking up something clacky and built this baby keeb to prove some stuff out, such as reading a key matrix. Now it’s become a music/media controller that looks great next to a giant matching volume knob.

Beneath the gently backlit Gateron blues is a custom ATMega32u4-based board, which is viewable through the clear acrylic bottom plate. That’s a nice touch. We’re not sure if the wood came from a picture frame, but if not, they seem like a great candidates for enclosure material.

This keeb looks fantastic, and we are partial to both the clear and the chrome keycaps. We can only hope [Clewsy] sends the details of the next build our way.

If you want to get started building keyboards, you can’t go wrong with a macro keyboard like this one. If you have way more than four macros in mind, build something bigger, like a custom game pad with a joystick.

E-Ink Calendar Paves A Path For All

[Martin Fasani] has set out to build a beautiful low power E-Ink Calendar he can hang on his wall. But perhaps more importantly, the work he has done makes it easier for everyone in the future to have a e-ink display. Many battery-powered e-ink projects connect to some server, download a bitmap image, display the new image, and then go into a deep sleep power mode. [Martin’s] project is no different, but it uses a handy microservice that does the conversion and rendering for you.

The firmware for this ESP32/ESP32S2 based calendar is open sourced on GitHub, with a version based on the Arduino framework as well as the native ESP-IDF framework. One particularly fantastic part of the firmware is a C++ component called CalEPD that drives e-paper displays. CalEPD extends the Adafruit_GFX class and is broken out in a separate repo, making it easy to consume on other projects. Since this supports dozens of different e-paper displays, this simplifies the process of building a calendar with different screens. The firmware includes a Bluetooth setup flow from a smartphone or tablet. This means you can quickly configure how often it wakes up, what it queries, and other important features.

The hardware shown in the demo video has a 7.5″ Waveshare screen with 800 x 400 resolution nestled inside a 3D-printed shell. There is also a 5,000 mAh battery with an ESP32 TinyPICO powering the whole system. The TinyPICO was picked for its incredible deep sleep power consumption. All this fits into a frame just 11 mm thick, for which STL files are available. [Martin] continues to work on this calendar display and has recently added support for FocalTech touch panel controllers. We’re excited to see where he takes it next!

This isn’t the first e-ink display project we’ve seen but this is a great reference to build your own. If you need another good starting point, this weather display might give you that little bit of inspiration you need.

Continue reading “E-Ink Calendar Paves A Path For All”

Actuator Opens The Door To Drier Dishes

Dishwashers are great at washing dishes and even rinsing them, most of the time. Where they tend to fail is in the drying part. Somehow these things dry hot enough to warp stoneware dishes, but not so well that things are actually dry when you open the door. Blame it on the lack of air movement.

Ideally, the dishwasher cycle is started soon after dinner time so it can be finished and opened up before it’s time for bed. But if you do that, then you miss all the dishes from late-night snacking and the occasional wine glass. Wait until bedtime to start it, and it has to sit several hours with moisture inside. Obviously, the answer is to listen for the victory beeps at the end of the cycle, and use a slow but forceful actuator to push the door open.

[Ivan Stepaniuk] is listening for the dishwasher’s frequencies with a microphone, amplifying them with a trusty LM386, and using an STM32 blue pill to crunch the audio. [Ivan] has plans to incorporate an ESP8266 board for IoT, presumably to get a notification when the door has been opened successfully. Check out the demo after the break.

Yes, dishwashers are great until they aren’t, and some little part breaks. But why pay for a new detergent compartment cover when you can just print one?

Continue reading “Actuator Opens The Door To Drier Dishes”

Bare-Metal STM32: From Power-Up To Hello World

Some may ask why you’d want to program a Cortex-M microcontroller like the STM32 series using nothing but the ARM toolchain and the ST Microelectronics-provided datasheet and reference manual. If your first response to that question wasn’t a panicked dive towards the nearest emergency exit, then it might be that that question has piqued your interest. Why, indeed?

Definitely, one could use any of the existing frameworks to program an STM32 MCU, whether the ST HAL framework, plain CMSIS, or even something more Arduino-flavored. Yet where is the fun in that, when at the end of the day one is still fully dependent on that framework’s documentation and its developers? More succinctly, if the contents of the STM32 reference manuals still look like so much gibberish, does one really understand the platform?

Let’s take a look at how bare-metal STM32 programming works, and make the most basic example run, shall we? Continue reading “Bare-Metal STM32: From Power-Up To Hello World”