A weather station with an E-ink display

Low Power Challenge: Weather Station Runs For Months Thanks To E-Ink Display

Having a device in your living room that shows weather information is convenient, and building one of those is a great project if you enjoy tinkering with microcontrollers and environmental sensors. It’s also a great way to learn about low-power design, as [x-labz] demonstrated with their e-ink weather station which works for no less than 60 days on a single battery charge. It has a clear display that shows the local temperature and humidity, as well as the weather forecast for the day.

The display is a 4.2″ e-paper module with a resolution of 400 x 300 pixels. It uses just 26 mW of power for a few seconds while it updates its image, and basically zero watts when showing a static picture. It’s driven by a tiny ESP32C3 processor board, which downloads the weather forecast from weatherapi.com every two hours. The indoor climate is measured by an SHT-21 temperature and humidity sensor mounted behind the display, while the outdoor data is gathered by a WiFi-connected sensor installed on [x-labz]’s balcony.

The inside of an e-ink powered weather stationThe key to achieving low power usage here is to keep the ESP32 in sleep mode as much as possible. The CPU briefly wakes up once every five minutes to read out the indoor sensor and once every fifteen minutes to gather data from outside, using the relatively power-hungry WiFi module.

To further reduce power consumption, the CPU core is driven at the lowest possible clock speed at all times: 10 MHz when reading the indoor sensor, and 80 MHz when using the WiFi connection. All of this helps ensure that just one 600 mAh lithium battery can keep everything running for those 60 days.

E-ink displays are perfect for text and simple graphics that don’t change too often, which is why they’re very popular in weather stations. With a bit of tweaking though, LCDs can also be optimized for low power.

Open World 3D Game Runs On The RP2040 Microcontroller

The Raspberry Pi RP2040 is versatile and cheap, but it’s by no means known as the most powerful microcontroller on the world. Regardless, it is capable of great things, as demonstrated by [Bernhard Strobl], who built a 3D open world game engine that runs on that very platform.

The graphics are simple, but with a compelling low-poly style.

The game engine itself is built to run on the Pimoroni PicoSystem, which is essentially a handheld gaming platform built around the RP2040 chip. The engine takes advantage of the multi-core nature of the RP2040, using the second core as a dedicated rasterizer to keep frames pumping out.

The basic game [Bernhard] built in the engine features 50 NPC characters and 50 further zombies, all running at the same time. Specs are impressive, with the engine’s included game simulating a “world” of 120 x 120 meters in size. As a maximum limit, the engine can handle a 2.56 x 2.56 km world, thanks to the use of 8-bit integers for directional data. However, limited storage space would make it difficult to achieve such a large world in practice.

We don’t get to see much of the gameplay in the YouTube video, but the quality of the graphics is impressive for such a cheap microcontroller. It seems within the bounds of possibility that an actual open-world game could be practical on the PicoSystem if only enough storage were available. Video after the break.

Continue reading “Open World 3D Game Runs On The RP2040 Microcontroller”

Make It Compatible

I’m probably as guilty as anyone of reinventing the wheel for a subpart of a project. Heck, sometimes I just feel like working on a wheel design. But if that’s the path you choose, you have to think about whether or not it’s important that others can replicate your project. The nice thing about a bog-standard wheel is that everyone has got one.

The case study I have in mind is a wall-plotter project that appeared on Hackaday this week. It’s a really sweet design, and in many ways would be an ideal starter project. I actually need a wall plotter (for reasons) and like a number of the choices made. For instance, having nearly everything, including the lightweight geared steppers on the gondola makes it easy to install and uninstall — you just pin up the timing belt from which it hangs and you’re done. Extra weight on the gondola helps with stability anyway. It’s open source and based on the Arduino libraries, so it should be easy enough to port to whatever microcontroller I have on hand.

But the image-generation toolchain is awkward, involving cutting and pasting into a spreadsheet, which generates a text file in a custom plotting micro-language. Presumably the designer doesn’t know about Gcode, which is essentially the lingua franca of moving machines, or just didn’t feel like implementing it. Where in Gcode, movement commands are like “G1 X100 Y50”, this device expects “draw_line(0,0,100,50)”. They’re essentially equivalent, but incompatible.

I totally understand that the author must have had a good time thinking up the movement commands and writing the spreadsheet that translates SVG files into them. I’ve been there and done that! But if the wall plotter spoke Gcode instead of its own dialect, it would slot instantly into any number of graphics processing workflows, which would make me, the potential user, happier.

When you are looking at reinventing the wheel, think about your audience. If you’re the only person likely to see the project, go ahead and scratch whatever itch you’ve got. You’ll learn more that way. But if you want to share the project with as many people as possible, adhering to the most widely used standards is a good choice for your users, even if it is less fun than dreaming up your own movement language.

Digital Rain Animation Crammed Into Pi Pico

With a new Matrix movie now in cinemas, we’ve all been reminded of those screensavers that were just the coolest thing ever when the original film dropped in 1999. [en0b] decided to recreate the classic “digital rain” effect on the Raspberry Pi Pico, using up all the little microcontroller’s storage in the process.

Rather than rely on existing graphics libraries, [en0b] set about using a high-quality GIF for the animation. The original file was 8 MB, which was far too big to fit on the Pico. After some finagling in an image editor and with the help of a custom Python script, however, [en0b] managed to fit the 127-frame animation at 240 x 135 resolution into the 2 MB Flash onboard the chip. With the microcontroller hooked up to the 1.14″ IPS “Pico Display” from Pimoroni, the final looks great and faithfully recreates the aesthetic seen in the film.

[en0b]’s technique could reliably be used for displaying any GIF that you can cut down to 14 to 16 colors without losing too much quality. It’s not the world’s highest-end graphics format, but it does the job for little animations like these.

We’ve seen similar builds before too, using more heavy-duty hardware to build a magic 8-ball in much the same way. Meanwhile, if you’ve got your own neat little GIF hacks or Pico projects, don’t hesitate to send them in!

ESP32 Clock Pushes Outrun Graphics Over Composite

We’ve covered plenty of clocks powered by the ESP32, but this one from [Marcio Teixeira] is really something special. Rather than driving a traditional physical display, the microcontroller is instead generating a composite video signal of an animated digital clock. This could be fed into whatever device you wish, but given the 80’s synthwave style it’s pumping out, you’ll probably want to find a suitably retro CRT to do it justice.

Specifically this is a variant of the “Dali” clock, where each digit seems to melt and morph into its successor. Though his version doesn’t necessarily share code with all the previous iterations, [Marcio] does credit the developers who have pulled off similar visual tricks going all the way back to 1979. Given the vintage of this particular animation, the neon skyline and infinite scrolling grid certainly feel like a perfect fit.

Want to add a little vaporwave vibe to your own workbench? Assuming you’ve already got a 80s style CRT, all you need is an ESP32 and two wires stuck into the composite video port. One goes to ground, and the other goes to the chip’s analog pin. Once everything is powered up, you’ll be able to configure the clock with a web-based interface. It doesn’t get much easier than that.

In the documentation, [Marcio] calls out a few open source projects which were instrumental to getting his clock off the ground. The pioneering work [bitluni] did to get video out of the ESP32 is something of a given, but he also sends a hat tip to [rossumur] for his collection of 8-bit game console emulators written for the microcontroller. Projects like this are a fantastic example of what’s possible when a community works together to truly push the envelope.

Continue reading “ESP32 Clock Pushes Outrun Graphics Over Composite”

A Microcontroller Friendly AR Headset On The Cheap

Generating the real-time images required for augmented reality (AR) goggles usually requires a fair amount of processing power, to the point that DIY efforts based around the Raspberry Pi often have trouble keeping up. But what if your AR aspirations don’t require fancy high-resolution graphics? If text and the occasional icon is enough to get the job done, then these lo-fi AR goggles from [bobricius] might be the ideal solution.

As with previous homebrew AR rigs we’ve seen, this one starts with an affordable headset designed to project the display of a smartphone onto a pair of curved optical combiners. But instead of tucking a phone into the headset, [bobricius] is using a custom PCB that holds a pair of ST7789 1.3 inch 240 x 240 IPS displays. Connected over SPI and supported by just about any microcontroller you’d care to use, tossing some textual data over your field of vision can be accomplished in just a few lines of code.

[bobricius] has actually put together a couple different versions of the PCB for this project. One uses his custom ATSAMD21E18-based “ArmaBrain” module that packs the MCU and an array of common components onto a 28 mm square board that can be easily dropped into other projects. If you’d rather roll your own solution, the second version of the board that simply holds the two displays in the appropriate position and routes the SPI lines to a convenient header should do nicely.

We’ve seen augmented reality displays using microcontrollers like the ESP32 before, but those were essentially just remote displays for a more powerful system. We like this simplified approach, as there are plenty of applications where just getting a few lines of text or some low-resolution images would be more than sufficient for the task at hand. Plus, the commercially-made headset this project is based on certainly looks better than some of the other donor goggles we’ve contemplated modifying in the past.

Continue reading “A Microcontroller Friendly AR Headset On The Cheap”

Optimizing GIF Playback For Microcontrollers

Despite being cooked up by Compuserve back in the late 1980s, GIFs have seen a resurgence on the modern internet, mostly because they’re fun. However, all our small embedded systems are getting color screens these days, and they’d love to join in the party. [Larry Bank] has whipped up a solution for just that reason, letting embedded systems play back short animated GIFs with limited resources.

[Larry] does a great job of explaining how the GIF format works, using LZW compression and variable-length codes. He talks about how the design of the format presents challenges, particularly when working with microcontrollers. Despite this, the final code works well, and is able to work with most animated GIFs of the right dimensions and construction. 24K of RAM is required, and image width is limited to 320 pixels. Images can be loaded from flash, memory, or SD cards, and he notes that best performance is gained with a microcontroller with fast SPI for writing to screens quickly.

It’s a great piece of software that promises to add a lot of charm, or silliness, to microcontroller projects. It also simplifies the use of animations, which can now be designed on computers rather than by using onboard graphics libraries. GIF really is the format that never seems to die; we’ve featured cameras dedicated to the form before. Video after the break.

Continue reading “Optimizing GIF Playback For Microcontrollers”