Low-Resolution Fluid Simulation On An ESP32

Fluid simulations are a key tool in fields from aerospace to motorsports and even civil engineering. They can be three-dimensional and complicated and often run on supercomputer clusters bigger than your house. However, you can also do simple two-dimensional fluid simulations on very simple hardware, as [mircemk] demonstrates.

This build is almost like a simple toy that displays particles rolling around and tumbling as you turn it one way or the other. Behind the scenes, an ESP32 is running the show, simulating a group of particles responding to gravity in a fluid-like manner. The microcontroller isĀ  hooked up with an 3-axis gyroscope and accelerometer, which it uses to track motion and influence the motion of the particles in turn. The results of the simple fluid simulation are displayed on a screen made up of a 16 x 16 matrix of WS2812B addressable RGB LEDs, which add enough color to make the build suitably mesmerizing.

There’s something compelling about turning the display and watching the particles tumble and flow, particularly when they’re all set to different colors. [mircemk] also gave the build the ability to operate in several different modes, running “sand,” “liquid” and “gas” simulations and with dynamic coloring to boot.

We’ve seen some great videos from [mircemk] before, too, like this sensitive metal detector rig. Continue reading “Low-Resolution Fluid Simulation On An ESP32”

The rust language logo being branded onto a microcontroller housing

Esp-hal, A Stable-API ESP32 HAL Gift For Your Rust Code

Looking to write Rust on the ESP32? You’re in luck, a new challenger has entered the scene, looking to help you write code that lasts – [Scott Mabin] and the team from Espressif have brought us the esp-hal 1.0.0-beta. From a personal project to an Espressif-sponsored one to an effort under Espressif’s wing, [Scott] tells us about the arduous journey of bringing first-class Rust support to ESP32 chips, Xtensa and RISC-V alike.

In particular, esp-hal, with the hal part standing for Hardware Abstraction Layer, focuses on providing you with a stable API to access hardware, making sure your code can remain stable for years to come. For now, you get drivers for GPIO, UART, SPI and I2C, as well as a number of auxiliary features like time and SoC reset, more than enough for a large amount of projects we hackers build with a generic MCU in mind.

Next stop? WiFi and BLE support, of course, an ESP32 just doesn’t feel the same without these two. Rust is a fun and seriously promising language, and it’s a joy to use! So, if you have a wireless-less project in mind and you’re looking for a HAL, try out the esp-hal, it might just be exactly what you need.

If you’re looking for examples, here’s an STM32 touchpad project with Rust firmware, a PIC32 Rust blinky demo, and we’ve even featured larger projects like this ESP32 open-source (reverse-engineered) WiFi MAC stack being written in Rust. In case you missed it, we’ve introduced Rust to you a couple of times, even as far as 2015!

Handheld Compass CNC Lets Teensy Do The Driving

If somebody asked you to visualize a CNC router, you’d probably think of some type of overhead gantry that moves a cutting tool over a stationary workpiece. It’s a straightforward enough design, but it’s not without some shortcomings. For one thing, the scale of such a machine can quickly become an issue if you want to work on large pieces.

But what if you deleted the traditional motion system, and instead let the cutting tool roam freely? That’s the idea behind the open source Compass Handheld CNC. Looking a bit more like a combat robot than a traditional woodworking tool, the Compass tracks its movement over the workpiece using a Teensy 4.1 microcontroller and four PMW3360 optical flow sensors. With a pair of handles that look like a flight yoke and a display that shows the router’s current position versus where it should be, the user can “drive” the tool to cut or carve the desired design.

Admittedly, the Compass doesn’t pack quite the same punch as a more traditional setup. Rather than a beefy spindle motor or a full-sized consumer router clamped up in the gantry, the Compass uses a Dremel 3000. It’s fine for routing out an engraving and other fine work, but you wouldn’t want to use it for cutting thick stock. To help keep the work area clear and prevent dust and chips from jamming up the works, the 3D printed body for the tool includes a connection for a dust collection system.

If this all seems familiar, you may be remembering a tool we first covered nearly a decade ago — the Shaper Origin. That router, which is still on the market incidentally, utilizes optical tracking and fiducial markers to keep track of its position. We’d be interested in seeing how well the Compass compares over large distances without similar reference points.

The Perfect Pi Pico Portable Computer

[Abe] wanted the perfect portable computer. He has a DevTerm, but it didn’t quite fit his needs. This is Hackaday after all, so he loaded up his favorite CAD software and started designing. The obvious choice here would be a Raspberry Pi. But [Abe] didn’t want to drop in a Linux computer — he was going for something a bit smaller.

An RP2040 Pico would be a perfect fit. Driving a display with the Pico can be eat a lot of resources though. The solution was a PicoVision from Pimoroni. PicoVision uses two RP2040 chips. One drives an HDMI port, while the other is free to run application software. This meant a standard HDMI screen could be used.

The keyboard was a bit harder. After a lot of searching, [Abe] found an IR remote designed for smart TVs. The QWERTY keyboard was the perfect size but didn’t have an interface he could use. He fixed that with an adapter PCB including an I2C GPIO expander chip. A bit of I2C driver software later, and he had a working input keyboard.

Hardware doesn’t do anything without software though. The software running on the handheld is called Slime OS, and the source is available at [Abe’s] GitHub. It’s a launcher, with support for applications written in python. [Abe] has a few basic demos working, but he’s looking for help to get more features up and running.

Although it wasn’t quite what [Abe] was after, our own [Donald Papp] came away fairly impressed when he gave the DevTerm a test drive back in 2022. Something to consider if you’re looking for a Linux handheld and not quite ready to build one yourself.

Continue reading “The Perfect Pi Pico Portable Computer”

Pico Gets A Speed Bump

The release notes for the 2.1.1 Raspberry Pi Pico SDK have a late holiday present: The RP2040 chip is now certified to run at 200 MHz if you use at least 1.15V as the supply voltage.

Previously, the certified speed was 125 MHz, although it was well-known you could overclock the device. By default, the 125 MHz figure is still what you’ll get, though. If you want a higher frequency, you need to set SYS_CLK_MHZ to 200 before doing a build. Continue reading “Pico Gets A Speed Bump”

Add A Little WOPR To Your Server Rack

Like so many of us, [aforsberg] found themselves fascinated with the WOPR computer from WarGames — something about all those blinking LEDs must speak to nerds on some subconscious level. But rather than admire the light show from afar, they decided to recreate it at a scale suitable for a 1U server rack.

So what goes into this WOPR display? In this case, the recipe simply calls for three MAX7219 dot matrix LED modules and a Raspberry Pi Pico, although you could swap that out for your favorite microcontroller if you wish. You should probably stick with something that at least runs MicroPython though, or else you won’t be able to use the included Python code to mimic the light patterns seen in the film.

What we like most about this project is how simple and inexpensive it is to recreate. There’s no custom PCB, and all the parts are mass produced enough that the economies of scale have made them comically cheap. Even at Amazon prices, you’re looking at around $50 USD in parts, and quite a bit less if you’ve got the patience to order everything through AliExpress.

Critics will note that, in its current state, this display just shows gibberish (admittedly stylish gibberish, but still). But as we’ve seen with similar projects, that’s simply a matter of software.

Space Monitor Points Out Celestial Objects

Logically we understand that the other planets in the solar system, as well as humanity’s contributions to the cosmos such as the Hubble Space Telescope and the International Space Station, are zipping around us somewhere — but it can be difficult to conceptualize. Is Jupiter directly above your desk? Is the ISS currently underneath you?

If you’ve ever found yourself wondering such things, you might want to look into making something like Space Monitor. Designed by [Kevin Assen], this little gadget is able to literally point out the locations of objects in space. Currently it’s limited to the ISS and Mars, but adding new objects to track is just a matter of loading in the appropriate orbital data.

In addition to slewing around its 3D printed indicator, the Space Monitor also features a round LCD that displays the object currently being tracked, as well as the weather. Reading through the list of features and capabilities of the ESP32-powered device, we get the impression that [Kevin] is using it as a sort of development platform for various concepts. Features like remote firmware updates and the ability to point smartphones to the device’s configuration page via on-screen QR aren’t necessarily needed on a personal-use device, but its great practice for when you do eventually send one of your creations out into the scary world beyond your workbench.

If you’re interested in something a bit more elaborate, check out this impressive multi-level satellite tracker we covered back in 2018.

Continue reading “Space Monitor Points Out Celestial Objects”