CL-32: The Minimum Possible For A Useful Handheld Computer

For almost as long as there have been microcomputers, there have been attempts with varying success to make tiny handheld microcomputers. Sometimes these have been very good, and other times they’ve missed the mark in some way. Latest to find its way to us is the CL-32 from [Moosepr], it’s a handheld computer with an ESP32 as brains, an electronic paper display, and a QWERTY keyboard in its smart printed case.

The hardware is relatively standard, save for the keyboard which is a dome-switch design in which the membrane carrying the domes is hand-made. We like this, and don’t think we’ve seen anyone else doing that. Expansion is taken care of by a novel socket arrangement in which boards nestle in a recess in the surface. Some experimentation was required as always to drive the display, but the result is a functional computer.

Sadly there’s little detail in terms of what the software will be, and no hardware files as yet. But what we can see is promising enough to make this one to watch, so we’ll look forward to what they come up with. If an ESP32 OS is a problem, there’s always badge.team, who have been continuously improving theirs since 2017.

A Cheap DIY PLC Based On The Atmega328P

If you’re running a big factory, you’ve probably got a massively expensive contract with a major programmable logic controller (PLC) manufacturer. One shudders to think about the cost of the service subscription on that one. If you’re working on a smaller scale, though, you might consider a DIY PLC like this one from [Mr Innovative.]

PLCs are rarely cutting-edge; instead, they’re about reliability and compliance with common industry standards. To that end, this design features the ATmega328P. Few other microcontrollers are as well understood or trusted as that one. The device is compatible with RS232 and RS485 and will run off 24 VDC, both of which you would find in a typical industrial environment. It offers 24 V digital inputs and outputs, as well as analog inputs and outputs from 0 to 10 V. [Mr Innovative] demonstrates it by hooking up a DWIN human-machine interface (HMI) for, well… human interaction, and a variable frequency drive to run a motor.

If you want to run a basic industrial-lite system but can’t afford the real industrial price tag, you might enjoy tinkering around at this level first. It could be a great way to get a simple project up and running without breaking the bank. Video after the break.

Continue reading “A Cheap DIY PLC Based On The Atmega328P”

Tulip Is A Micropython Synth Workstation, In An ESP32

We’re not sure exactly what Tulip is, because it’s so many things all at once. It’s a music-making environment that’s programmable in Python, runs on your big computer or on an ESP32-S3, and comes complete with some nice sounding synth engines, a sequencer, and a drum machine all built in. It’s like your dream late-1980s synthesizer workstation, but running on a dev board that you can get for a song.

And because Tulip is made of open-source software and hardware, you can extend the heck out of it. For instance, as demonstrated in this video by [Floyd Steinberg], you can turn it into a fully contained portable device by adding a touchscreen. That incarnation is available from Makerfabs, and it’s a bargain, especially considering that the developer [Brian Whitman] gets some of the proceeds. Or, because it’s written in portable Python, you can run it on your desktop computer for free.

The most interesting part of Tulip for us, as programmer-musicians, is that it boots up into a Micrypython REPL. This is a synth workstation with a command-line prompt as its primary interface. It has an always-running main loop, and you make music by writing functions that register as callbacks with the main loop. If you were fast, you could probably live-code up something pretty interesting. Or maybe it wants to be extended into a physical musical instrument by taking in triggers from the ESP32’s GPIOs? Oh, and did we mention it sends MIDI out just as happily as it takes it in? What can’t Tulip do?

We’ve seen some pretty neat minimalist music-making devices lately, but in a sense Tulip takes the cake: it’s essentially almost entirely software. The various hardware incarnations are just possibilities, and because it’s all open and extremely portable, you can freely choose among them. We really like the design and sound of the AMY software synthesizer engine that powers the Tulip, and we’re sure that more synthesizer models will be written for it. This is a music project that you want to keep your eyes on in the future.

Your ESP32 As A USB Bluetooth Dongle

Using Bluetooth on a desktop computer is now such a seamless process; it’s something built-in and just works. Behind that ubiquity is a protocol layer called HCI, or Host Controller Interface, a set of commands allowing a host computer to talk to a Bluetooth interface.  That interface doesn’t have to be special, and [Dakhnod] is here to show us that it can be done with an ESP32 microcontroller through its USB interface.

The linked repository doesn’t tell us which of the ESP32 variants it works with, but since not all of them have a USB peripheral we’re guessing one of the newer variety. It works with Linux computers, and we’re told it should work with Windows too if a HCI driver is present. We might ask ourselves why such a project is necessary given the ubiquity of Bluetooth interfaces, but for us it’s provided the impetus to read up on how it all works.

We can’t find anyone else in our archive who’s made a Bluetooth dongle in this way, but we’ve certainly seen sniffing of HCI commands to reverse engineer a speaker’s communications.

PCB Design Review: HAB Tracker With ATMega328P

Welcome to the Design Review Central! [VE3SVF] sends us their board, and it’s a HAB (High Altitude Balloon) tracker board. It’s got the venerable ATMega28P on it, a LoRa modem and a GPS module, and it can be powered from a LiIon battery. Stick this board with its battery onto a high-altitude balloon, have it wake up and transmit your coordinates every once in a while, and eventually you’ll find it in a field – if you’re lucky. Oherwise, it will get stuck hanging on a tree branch, and you will have to use a quadcopter to try and get it down, and then, in all likelihood, a second quadcopter so that you can free the first one. Or go get a long ladder.

The ATMega328P is tried and true, and while it’s been rising in price, it’s still available – with even an updated version that sports a few more peripherals; most importantly, you’re sure to find a 328P in your drawer, if not multiple. Apart from that, the board uses two modules from a Chinese manufacturer, G-Nice, for both GPS and Lora. Both of these modules are cheap, making this tracker all that more accessible; I could easily see this project being sold as a “build your own beacon” kit!

Let’s make it maybe a little nicer, maybe a little cheaper, and maybe decrease the power consumption a tad along the way. We’ll use some of the old tricks, a few new ones, and talk about project-specific aspects that might be easy to miss.

Continue reading “PCB Design Review: HAB Tracker With ATMega328P”

A devboard with the CH32V003, with a few resistors and bodges, with a USB-C cable plugged into it, and a programmer plus an extra probe attached.

USB PD On CH32V003 Teaches You Everything

How do you talk USB Power Delivery (PD)? Grab a PHY? Use a MCU with one built-in? Well, if you’re hardcore enough, you can do it with just a few resistors and GPIOs. [eeucalyptus] shows you their implementation of USB-PD on a CH32V003, which has no PD peripheral. This includes building a PD trigger, completely open source, and walking you through the entire low-level PD basics, too!

It helps that CH32V003 is a 32-bit MCU with a good few resources and peripherals, for instance, an internal comparator. Other than that, you don’t need much in terms of hardware resources, but you do need a steady hand — parts of the firmware had to be written in assembly to keep up with PD timing. Want to tinker with the fruit of this research, perhaps, further build upon the code? There’s an example board on GitHub, too!

Want to try your own luck with this method? There’s a schematic, and logic analyzer captures, and a board to refer to. Again, more than enough information on every single low-level detail! Otherwise, grab an MCU pre-programmed to talk PD, maybe a trigger board chip, or maybe even a PD PHY and implement PD communications with it directly – it’s pretty easy!

We thank [Julianna] for sharing this with us!

SIMD-Accelerated Computer Vision On The ESP32-S3

One of the fun parts of the ESP32-S3 microcontroller is that it got upgraded to the newer Cadence Xtensa LX7 processor core, which turns out to have a range of SIMD instructions that can help to significantly speed up a range of tasks. [Shranav Palakurthi] recently used this to speed up the processing of video frames to detect corners using the FAST method. By moving some operations that benefit from SIMD over to an optimized version written in LX7 ASM, the algorithm’s throughput was increased by 220%, from 5.1 MP/s to 11.2 MP/s, albeit with some caveats.

The problem with the SIMD instructions in the LX7 other than them being very poorly documented – unless you sign an NDA with Cadence –  is that it misses many instructions that would be really useful. For [Shranav] the lack of support for direct misaligned reads and comparing of unsigned 8-bit numbers were hurdles, but could be worked around, with the results available on GitHub.

Much of the groundwork for this SIMD implementation was laid by [Larry Bank], who reverse-engineered the SIMD instructions from available documentation and code samples, finding that the ESP32-S3 misses quite a few common SIMD instructions, including various shifts and unaligned reads and writes. Still, it’s good enough for quite a few tasks, as long as you can make it work with the available instructions.