Simple DIY STM32 Oscilloscope Project

In part one of what is intended to be a series on developing an STM32-based oscilloscope, [BTTLab] demonstrates a how to use the built-in ADC of an STM32F207 MCU to develop a straightforward single-channel oscilloscope. This can be followed along both via the YouTube video and the GitHub repository for this single-channel version.

Oscilloscope front-end protections. You want this. (Credit: BTTLab, YouTube)
Oscilloscope front-end protections. You want this.

Of course, an MCU’s ADC generally won’t hold a candle to a dedicated ADC for oscilloscope purposes – along with the typical beefy FPGA-based processing – with even a basic Rigol DS1054Z hitting a cool 1 GSPS, but the 2 MSPS at 12-bit resolution achieved by an STM32F207 isn’t shabby either. For more basic, low-frequency circuit and protocol debugging it would already be enough.

One thing briefly touched upon in the video is the front-end. The ADC’s inputs are rated for a specific voltage range, typically 0 to 3.3 V when running the MCU off 3.3 V, so you do not want to put higher or negative voltages into said ADC input. This is where measuring something like AC becomes rather tricky and you can get some exciting releases of magic smoke.

The demonstrated single-channel oscilloscope firmware uses the ST HAL, so it might be somewhat easy to target other STM32 MCUs as well, though naturally ADC performance will differ per MCU family and sometimes sub-family, so make sure to read the datasheet and programming manual before you dive in too deep.

Continue reading “Simple DIY STM32 Oscilloscope Project”

An open-source, DIY, point-and-shoot digital camera.

PolyShot Camera Focuses On Nostalgia

Although we personally have yet to see anyone brandishing an old digital point-and-shoot camera, we hear they’re back in vogue. Why, though? People are nostalgic for that image quality. While he certainly could have simply picked up a vintage model somewhere for a likely inflated price, [Arnov Sharma] decided to build his own version and call it the PolyShot.

The core of this project is the Unihiker K10 dev board, which uses an ESP32-S3, a whopping 2 megapixel camera, and a micro SD card to capture photos and display them back on the screen. The tricky part, if you can call it that, is the custom PCB. It’s a simple board with just three buttons: shutter, gallery, and next image. We do like that the position of the battery compartment creates a nice grip.

The biggest difference here is that there is a few-second delay between pressing the shutter button and actually capturing the image, which you can see in the short videos below. So if you’re trying to get a shot of a skink or something equally speedy, we wish you good luck.

In a future iteration, [Arnov] wants to address the issue of image quality, because this project ended up evolving into a more traditional digital camera. He would also improve the battery life, for which the current expectancy is around three hours on a charge. Ultimately, [Arnov] wants to ditch the Unihiker and design everything from the ground up, using an ESP32-S3 module.

Continue reading “PolyShot Camera Focuses On Nostalgia”

Scanning For Lifesigns With ESP32 And Raspberry Pi

It’s a sci-fi trope that you can ‘scan for life signs’ and detect if there are humans — or suspiciously human-shaped aliens — present, but in real life it’s harder than that. [The Masked Bear]’s wifisense-pi project isn’t really scanning for signs of life, either, unless you happen to consider breathing a sign of life. Even then, it’s not detecting breathing per se, but the subtle motion that goes with it: it’s a very sensitive motion detector that relies on the fact that we fleshy bags of goo disturb WiFi signals with our presence, and motion alters those disturbances.

The device uses an ESP32-S3 to measure the radio channel 100 times per second, while a Raspberry Pi 4 provides the signal processing muscle. It can detect the slightest motions, and even determine the presence of a perfectly still human by their breathing, though you can hide your presence for as long as you can hold your breath.

A single sensor, no matter how sensitive, cannot give position information, and while multiple humans will distort WiFi more than a single one, [The Masked Bear] reports you cannot reliably extract that signal. So this project answers the question: “are there humans in this room?” Or, even more likely, “are there any large breathing animals in this room?” We can’t imagine a 50 kg Mastiff looking any different to this sensor than an equivalent mass of quivering human flesh.

Before you dismiss this as just another motion sensor, keep in mind that it is sniffing the signals already present on the 2.4 GHz band, and, like the WiFi signals themselves, it can work through walls. So we think it’s pretty nifty.

Of course, there are many other ways to detect humans, from machine-learning cameras to millimeter-wave sensors to a simple PIR. This isn’t the first project we’ve seen that uses WiFi like this. It isn’t even the first with an ESP32, but it’s an interesting implementation worth checking out.

Bridging Older Tasmota Hardware Into Apple Home

The Tasmota firmware is a popular choice for flashing to a range of Espressif microcontrollers to turn them into smart home devices. If you have such devices in your house, you might wish they were easier to integrate with the Apple Home platform. As it turns out, though, there’s a convenient app for that.

[Christof Müller] built an app called Tasmoshelf for just this purpose. Its primary claim to fame is that it can easily help port a Tasmota-based setup into the Apple Home universe. It can achieve this without requiring a Home Assistant server or MQTT broker or any other workarounds. This is thanks to the fact that Apple Home is compatible with Matter technology, as are ESP32 devices running Tasmota 13 firmware or newer. They can natively jump on an Apple Home setup, and even act as a bridge for older ESP8266 devices that can’t speak Matter themselves. The device is able to run network scans to automatically discover devices and advise whether they can hook up directly to Apple Home, or whether a bridge is needed.

If you’re running Tasmota devices and want to easily integrate them, you might find Tasmoshelf a useful addition to your smart home setup. Just note that it does require a one-off purchase if you intend to use it beyond three devices, a limit which some might find somewhat restrictive.

We’ve looked at Tasmota in detail before; it’s a great way to whip up a smart home to suit your own desires. Meanwhile, if you’re whipping up your own nifty integrations, don’t hesitate to let us know on the tipsline.

Your Laptop Keyboard, On Another Device

It’s likely many of us have been in the position of first set-up on a machine such as a Raspberry Pi, and had keyboard problems. Either no spare keyboard is to be found, or a cluttered desk has to find extra space for a full-size keyboard. [Þórarinn] and [Arni] have a handy solution: use the existing keyboard on your laptop.

His approach is both ingenious and simple, as it’s only the K part of a KVM. On the laptop end, it’s a serial terminal, without the receiving side. The serial port in question is an RP2040 board which implements a USB-to-serial port. This serial connection goes to another RP2040, which does the ingenious bit. It’s a serial-to-USB HID keyboard. All of this means that keystrokes on the laptop are sent down the serial connection, and appear on the Pi or whatever computer as a USB keyboard as though typed locally. The mildly annoying first set-up can be done, and then it can be run via SSH or whatever other remote access protocol as normal. The code is provided, so anyone with a couple of RP2040 boards can do it.

We like this hack, because we’ve had the annoyance of needing a keyboard to set up what would otherwise be a completely headless machine too many times. It’s one to store away at the back of your mind, for those rare improvisational need-an-extra-keyboard moments.

Thanks [Henk] for the tip.

Read A USB Logitech Racing Wheel On An ESP32‑S3

Now that MCUs like the ESP32-S3 are quite capable computer systems including USB host functionality, it only makes sense that you can connect USB peripherals like Logitech racing wheels to them. Of course, these aren’t basic HID USB devices, so they require a bit of setup to make them start spitting out the data updates which we’re interested in. Making this process easy is the goal of the LogiWheelHost project for ESP32-S3 by [Joel Kometz].

This single-header library supports the G29, G923, G920, G27, G25, DFGT, Driving Force Pro wheels, building on top of the EspUsbHost project. As explained in the README, these racing wheels do not start streaming all updates to their controls once powered on, but boot into a restricted mode in which only neutral or combined-axis data is sent.

To change this you need to trigger the so-called native mode switch in which far more detailed information as well as updates on extended features like separate pedals, all buttons and the gear shifter become available. This is done by sending a HID output report to the USB device, which is easy enough.

In addition to handling this detail the library also provides an API using which obtaining and using these controller states in your own code should be quite easy. Presumably the library will work on or can be ported to other ESP32 MCUs that support host USB mode, so this might be good news for anyone who is looking to do more with that old Logitech racing wheel.

A desktop Borg cube. Just kidding, it's a buttonless, cube-shaped timer with a really neat 3D-printed enclosure.

FlipBuddy Is Borg, You Will Be Assimilated

When you think about it, time is all we’ve really got. Where to go from there is ultimately up to you. Maybe you use an app to track every task, or just go with the onboard timer. But that can be a lot of steps to begin with, and then the phone screen goes dark again. For some people, the whole out of sight, out of mind thing will kick in. At worst, you get distracted, start doing something else, and then feel guilty and frustrated when the timer starts going off.

The guts of FlipBuddy inside the unfurled enclosure.But there’s hope for us visual simpletons, and the purveyor of that hope is [Edris] of Ponderly Robotics. You see, [Edris] created an extremely easy-to-use timer that looks like something you’d find on Captain Picard’s desk as a token of defeating the Borg. But the affably-named FlipBuddy is far more useful than that description implies.

[Edris] uses the open-source FlipBuddy every day, and swears by its simplicity. The point is accessibility, and respect for privacy. That said, there’s a companion app to provide insight.

Basically, you assign a task to each cube face. Choose one, and place the cube with that side facing up. FlipBuddy wakes up, connects to WiFi, and then pushes your session to the cloud, bypassing the need for your phone.

Time to switch tasks? Just put the new side face up. When you’re done for the day, use the stop face, which we’re hoping means to set it on the knocked-off corner.

You don’t need much to make FlipBuddy come to life. [Edris] used an ESP32 (an S3 SuperMini or similar will work), an MPU6050, six WS2812B LEDs, and a 3.7 V Li-Po cell. The beautiful, 3D printed origami mesh enclosure prints as a single, flat piece, and you get to fold it up around the internals and make your new buddy come to life.

Part of the point of FlipBuddy is that it can become as intuitive as punching a chess clock. So if it’s buttons you’re after, check out this simple Pomodoro timer.