ESP32 Hosts A USB Keyboard In This Typewriter

Did you know the ESP32 can be a USB host? Well it can, and [Volos] uses host mode to build this fun little word processor.

The venerable ESP32 has a well-known USB device mode. Anyone who has programmed one has used it. A bit less known is the microcontroller’s ability to host USB devices. These days, operating as a USB device is relatively simple. But acting as a host is a much more complex task. The ESP32 has a software host that works — but only for Human Interface Devices (HID).  Human interface devices generally are keyboards, mice, trackballs, and similar devices that handle data relatively slowly, forming the interface with us simple humans.

[Volos] uses the EspUsbHost Arduino library for this project. The library makes USB host mode simple to use. Another piece of the puzzle is the LCD board [Volos] picked. It has a dual-role USB Type-C port, meaning the hardware to switch roles is baked in. Other boards may require some modifications or special cables to make things work.

The software is the best part of this build. [Volos] implemented a simple word processor. It can save and load files from a microSD card and, of course, edit text — all controlled by a USB keyboard. He had to use a 4-bit palette to save memory. This gives the device a retro charm that reminds us of Don Lancaster’s TV Typewriter. The source for this and all of [Volos] projects can be found on GitHub. Now, all we need is a spell check that can fit in the memory constraints of the ESP32! We have to admit the chip has a lot of potential USB tricks.

Continue reading “ESP32 Hosts A USB Keyboard In This Typewriter”

Producing An Exquisite Wooden Keyboard

Keyboards! They’ve been almost universally made out of plastic since the dawn of the microcomputer era. Meanwhile, wood is a rather desirable material and it lends itself rather well to touch-heavy human interface devices. As [ProcessX] shows us, though, it can take quite a bit of work to fabricate a keyboard entirely out of this material.

The video shows us the construction of a Japanese wooden keyboard from Hacoa, which retails for around $1000 USD. The video shows us how the wooden housing is produced from start to finish, beginning with the selection of some fine walnut. From there, we get to see how the frame is routed out and machined, along with the more delicate work to create all the keycaps out of wood, too. They’re laser engraved to give them high-quality markings that will last the test of time. What we don’t see is the construction of the electronics—it appears that’s handled separately, and the wooden frame and keycaps are then assembled around the otherwise complete existing keyboard.

It’s nice to see what it takes to produce commercial-quality parts like this out of wood. We’ve seen other wooden keyboard builds before, too.

Continue reading “Producing An Exquisite Wooden Keyboard”

Zero To Custom MacroPad In 37 Easy Steps

[Jeremy Weatherford] clearly has a knack for explaining projects well enough for easy reproduction but goes way further than most and has created a four-part YouTube series detailing every step from project inception to the final assembly, covering all aspects of 3D modelling and PCB design for a custom MacroPad design. Many tools are introduced along the way, all of which help reduce complexity and, by extension, the scope for errors. As every beginner hacker knows, early successes breed confidence and make for better and more ambitious projects.

Part 1 covers the project motivation and scope and introduces a keyboard layout editor tool. This tool allows one to take a layout idea and generate a JSON file, which is then used to drive keyboard tools. XYZ to produce a usable KiCAD project. The tool only generates a PCB project and an associated netlist file. No schematic is created; you don’t need one for a simple layout.

A very basic keyboard layout

Part 2 is a walkthrough of the design process in KiCAD, culminating in ordering the PCB from JLCPCB and assembling the surface-mount parts. This particular design uses a controller based on the Sea-Picro RP2040 module, but there are many options if you have other preferences. [Jeremy] shows what’s possible with the selected suppliers, but you need not follow this step precisely if you have other ideas or want to use someone local.

Part 3 covers exporting the mechanical aspects of the PCB out of KiCAD and into a 3D CAD program, specifically OnShape. [Jeremy] covers some crucial details, such as how to read the mechanical drawing of the keys to work out where to place the top plate. It’s very easy to plough straight in at this stage and make a design which cannot be assembled! The plan is to use a simple laser-cut box with a bottom plate with mounting holes lining up with those on the PCB. A Top plate is created by taking the outline of the PCB and adding a little margin. An array of rectangular cutouts are designed for the keys to protrude, lining up perfectly with where the keys would be when mounted on the PCB below.  The sides of the case are formed from laser-cut sections that lock into each other and the laser-cut base—using the laser joint feature-script addon tool from the OnShape community channel. A second feature script addon is used to auto-layout the laser-cut components onto a single sheet. A CAM application called Kiri Moto is used to export for laser cutting and is available on the OnShape store.

Continue reading “Zero To Custom MacroPad In 37 Easy Steps”

A black OLED screen with a happy face displayed upon it is situated at the top of a squarish calculator with a 5x6 grid of white calculator keys. It floats above a graphing calculator, Nintendo Switch, aigo numpad, and an Arduino Mega on a white table. A handful of differently-colored kalih choc switches are in various places around the table.

Mechanical Switch Sci-Calc Is Also A Macropad

Smartphones have replaced a desktop calculator for most folks these days, but sometimes that tactility is just what you need to get the mathematical juices flowing. Why not spruce up the scientific calculator of yore with the wonders of modern microcontrollers?

While you won’t be able to use Sci-Calc on a standardized test, this classy calculator will let you do some pretty cool things while clacking on its mechanical choc switches. Is it a calculator? Obviously. Is it an Arduboy-compatible device that can play simple games like your TI-84? Yes. Is it also a macropad and ESP32 dev board? Why not? If that isn’t enough, it’s also takes both standard and RPN inputs.

[Shao Duan] has really made this device clean and the menu system that rewrites main.bin based on the program selection is very clever. Escape writes main.bin back into the ROM from the SD card so you can select another application. A few classic games have already been ported, and the process looks fairly straightforward for any of your own favorites.

If you’re hankering for more mathy inputs, checkout the Mathboard or the MCM/70 from 1974.

Continue reading “Mechanical Switch Sci-Calc Is Also A Macropad”

A Mobius keyboard surrounded by the parts to make a Mobius keyboard.

Mobius Keyboard Wastes Little Space

What is with all the wasted space on keyboards? There’s a whole back side just sitting there doing nothing. But how can you use the back at the same time as the front?

How to properly wire the boards together.
All the board sandwiches must be wired together like this, natch.

Just when we think Google Japan can’t possibly produce another weird, amazing keyboard that actually works and comes with full documentation, they go and outdo themselves with this ortholinear Mobius thing that wastes (almost) no space. (Japanese, translated) Be sure to check out the video after the break where hilarity ensues.

This crazy thing is made up of 26 modules, each with 8 key switches, four on a side. Do the math — that’s a total of 208 keys! More than enough to stretch out around the table and do some group programming without rubbing elbows. All the switches are hot-swappable, and there’s even RGB backlighting. The controller here is the STM32F042F4P6.

So what are all the extra keys for? Well, the keyboard is half in Japanese and half QWERTY, and has a set of emoji keys as well for the full programming experience. You can also make a paper version if you want to test out the topology.

Be sure to check out the documentation, because it’s pretty interesting how this keyboard is put together. And no, we’re not sure how to set it down and use it without accidental key presses. Suppose that’s part of the charm?

Have you ever wondered what happened to all the Japanese computers of yore? We did.

Continue reading “Mobius Keyboard Wastes Little Space”

Reverse Engineering A Keyboard Driver Uncovers A Self-Destruct Code

Should you be able to brick a keyboard just by writing a driver to flash the lights on it? We don’t think so either. [TheNotary] got quite the shock when embarking on a seemingly straightforward project to learn C++ on the x86-64 architecture with Windows and sent it straight to Silicon Heaven with only a few seemingly innocent USB packets.

The project was a custom driver for the XVX S-K80 mechanical keyboard, aiming to flash LED patterns across the key LEDs and perhaps send custom images to the integrated LCD. When doing this sort of work, the first thing you need is the documentation of the communications protocols. Obviously, this was not an option with a closed-source project, so the next best thing is to spy on the existing Windows drivers and see how they worked. Using Wireshark to monitor the USB traffic whilst twiddling with the colour settings, it was clear that communications were purely over HID messages, simplifying subsequent analysis. Next, they used x32dbg (now x64dbg, but whatever) to attach to the existing driver process and trap a few interesting Windows system calls. After reading around the Windows API, a few candidate functions were identified and trapped. This gave them enough information to begin writing code to reproduce this behaviour. Then things got a bit odd.

Continue reading “Reverse Engineering A Keyboard Driver Uncovers A Self-Destruct Code”

A very tiny keyboard with RGB backlighting.

Tiny Custom Keyboard Gets RGB

Full-size keyboards are great for actually typing on and using for day-to-day interfacing duties. They’re less good for impressing the Internet. If you really want to show off, you gotta go really big — or really small. [juskim] went the latter route, and added RGB to boot!

This was [juskim]’s attempt to produce the world’s smallest keyboard. We can’t guarantee that, but it’s certainly very small. You could readily clasp it within a closed fist. It uses a cut down 60% key layout, but it’s still well-featured, including numbers, letters, function keys, and even +,-, and =. The build uses tiny tactile switches that are SMD mounted on a custom PCB. An ATmega32U4 is used as the microcontroller running the show, which speaks USB to act as a standard human interface device (HID). The keycaps and case are tiny 3D printed items, with six RGB LEDs installed inside for the proper gamer aesthetic. The total keyboard measures 66 mm x 21 mm.

Don’t expect to type fast on this thing. [juskim] only managed 14 words per minute. If you want to be productive, consider a more traditional design.

Continue reading “Tiny Custom Keyboard Gets RGB”