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!

3D Print Yourself A Split Flap Display

Split flap displays! They’re mechanical, clickety-clackity, and largely commercially irrelevant in our screen-obsessed age. That doesn’t mean you can’t have a ball making one of your own, though! [Morgan Manly] did just that, with tidy results.

An ESP32 C3 SuperMini serves as the boss of the operation, running the whole display. The display is designed to be modular, so you can daisy chain multiple characters together to spell longer words. Each module has 37 characters, so it can display the alphabet, numerals 0 to 9, and a blank. Each module contains a 28BYJ-48 stepper motor for controlling the flaps, and a ULN2003 driver board to run it and a PCF8575 IO expander to handle communciation. An A3144 hall effect sensor is also used for positional feedback to ensure the display always shows the right character. The flap mechanism itself is relatively straightforward—a drum with all 37 flaps is until the correct character is reached, with the blank flaps hosting a magnet to trigger the aforementioned hall effect sensor. The flaps themselves are 3D-printed, with filament changes used to color the characters against the background.

If you’ve ever dreamed of building a flap-display clock or ticker, you needn’t dream of finding the perfect vintage example. You can just build your own! The added bonus is that you can make it as big or as small as you like. We’ve seen some interesting variations on the split flap concept recently, too. If you’re cooking up your own kooky electromechanical displays, don’t hesitate to let us know!

Octet Of ESP32s Lets You See WiFi Like Never Before

Most of us see the world in a very narrow band of the EM spectrum. Sure, there are people with a genetic quirk that extends the range a bit into the UV, but it’s a ROYGBIV world for most of us. Unless, of course, you have something like this ESP32 antenna array, which gives you an augmented reality view of the WiFi world.

According to [Jeija], “ESPARGOS” consists of an antenna array board and a controller board. The antenna array has eight ESP32-S2FH4 microcontrollers and eight 2.4 GHz WiFi patch antennas spaced a half-wavelength apart in two dimensions. The ESP32s extract channel state information (CSI) from each packet they receive, sending it on to the controller board where another ESP32 streams them over Ethernet while providing the clock and phase reference signals needed to make the phased array work. This gives you all the information you need to calculate where a signal is coming from and how strong it is, which is used to plot a sort of heat map to overlay on a webcam image of the same scene.

The results are pretty cool. Walking through the field of view of the array, [Jeija]’s smartphone shines like a lantern, with very little perceptible lag between the WiFi and the visible light images. He’s also able to demonstrate reflection off metallic surfaces, penetration through the wall from the next room, and even outdoor scenes where the array shows how different surfaces reflect the signal. There’s also a demonstration of using multiple arrays to determine angle and time delay of arrival of a signal to precisely locate a moving WiFi source. It’s a little like a reverse LORAN system, albeit indoors and at a much shorter wavelength.

There’s a lot in this video and the accompanying documentation to unpack. We haven’t even gotten to the really cool stuff like using machine learning to see around corners by measuring reflected WiFi signals. ESPARGOS looks like it could be a really valuable tool across a lot of domains, and a heck of a lot of fun to play with too.

Continue reading “Octet Of ESP32s Lets You See WiFi Like Never Before”

Cute Face Tells You How Bad The Air Quality Is

You can use all kinds of numbers and rating systems to determine whether the air quality in a given room is good, bad, or somewhere in between. Or, like [Makestreme], you could go for a more human visual interface. He’s built a air quality monitor that conveys its information via facial expressions on a small screen.

Named Gus, the monitor is based around a Xiao ESP32-C3. It’s hooked up with the SeeedStudio Grove air quality sensor, which can pick up everything from carbon monoxide to a range of vaguely toxic and volatile gases. There’s also a THT22 sensor for measuring temperature and humidity. It’s all wrapped up in a cute 3D-printed robot housing that [Makestreme] created in Fusion 360. A small OLED display serves as Gus’s face.

The indications of poor air quality are simple and intuitive. As “Gus” detects poor air, his eyelids droop and he begins to look more gloomy. Of course, that doesn’t necessarily tell you what you should do to fix the air quality. If your issue is pollution from outside, you’ll probably want to shut windows or turn on an air purifier. On the other hand, if your issue is excess CO2, you’ll want to open a window and let fresh air in. It’s a limitation of this project that it can’t really detect particulates or CO2, but instead is limited to CO and volatiles instead. Still, it’s something that could be worked around with richer sensors a more expressive face. Some will simply prefer hard numbers, though, whatever the case. To that end, you can tap Gus’s head to get more direct information from what the sensors are seeing.

We’ve seen some other great air quality projects before, too, with remarkably similar ideas behind them. Video after the break.

Continue reading “Cute Face Tells You How Bad The Air Quality Is”

Automatic Pill Dispenser Is Cheap And Convenient

If you’re taking any medication, you probably need to take it in a certain dose on a certain schedule. It can quickly become difficult to keep track of when you’re taking multiple medications. To that end, [Mellow_Labs] built an automated pill dispenser to deliver the right pills on time, every time.

The pill dispenser is constructed out of 3D printed components. As shown, it has two main bins for handling two types of pills, controlled with N20 gear motors. The bins spin until a pill drops through a slot into the bottom of the unit, with the drop detected by a piezo sensor. It uses a Beetle ESP32 as the brains of the operation, which is hooked up with a DS1307 real-time clock to ensure it’s dosing out pills at the right time. It’s also wired up with a DRV8833 motor driver to allow it to run the gear motors. The DRV8833 can run up to four motors in unidirectional operation, so you can easily expand the pill dispenser up to four bins if so desired.

We particularly like how the pill dispenser is actually controlled — [Mellow_Labs] used the ESP32 to host a simple web interface which is used for setting the schedule on which each type of pill should be dispensed.

We’ve featured some other pill dispenser builds before, too.

Continue reading “Automatic Pill Dispenser Is Cheap And Convenient”

Push Your Toy Train No More, With This Locomotive!

One of the most popular evergreen toys is also one of the simplest, wooden track with push-along trains. We all know the brand name, and savvy parents know to pick up the much cheaper knock-off because the kid won’t know the difference. But a really cool kid shouldn’t have to push their train around by hand, and thus [Lauri] has given the wooden track a real, powered, locomotive.

In the 3D printed chassis goes a small geared motor driving one axle, with an ESP32 and a motor driver taking care of the smarts. Power comes from an 18650 cell, which almost looks like the right scale for a fake steam boiler. The surprise with this train comes in the front axle, this machine has steering. We’re curious, because isn’t the whole point of a train that the track directs it where it needs to go? Or perhaps a little help is required in the absence of a child’s guidance when it comes to points. Either way, with remote control we guess there would be few kids who wouldn’t want one. We certainly do.