Posts | Comments

Planet Arduino

Archive for the ‘usb keyboard’ Category

A useful add-on for any computer is a plug-in macro keyboard, a little peripheral that adds those extra useful buttons to automate tasks. [Sayantan Pal] has made one, a handy board with nine programmable keys and a USB connector, but the surprise is that at its heart lies only the ubiquitous ATmega328 that you might find in an Arduino Uno. This isn’t a USB HID keyboard, instead it uses a USB-to-serial chip and appears to the host computer as a serial device. The keys themselves are simple momentary action switches, perhaps a deluxe version could use key switches from the likes of Cherry or similar.

The clever part of this build comes on the host computer, which runs some Python code using the PyAutoGui library. This allows control of the keyboard and mouse, and provides an “in” for the script to link serial and input devices. Full configurability is assured through the Python code, and while that might preclude a non-technical user from gaining its full benefit it’s fair to say that this is not intended to compete with mass-market peripherals. It’s a neat technique for getting the effect of an HID peripheral though, and one to remember for future use even if you might not need it immediately.

More conventional USB keyboards have appeared here in the past, typically using a processor with built-in USB HID support such as the ATmega32u4.

[Micah Elizabeth Scott] needed a custom USB keyboard that wrapped around a post. She couldn’t find exactly what she wanted so she designed and printed it using flexible Nijaflex filament. You can see the design process and the result in the video below.

The electronics rely on a Teensy, which can emulate a USB keyboard easily. The keys themselves use the old resistor divider trick to allow one analog input on the Teensy to read multiple buttons. This was handy, but also minimized the wiring on the flexible PCB.

The board itself used Pyralux that was milled instead of etched. Most of the PCB artwork was done in KiCAD, other than the outline which was done in a more conventional CAD program.

We always enjoy seeing practical use of hacker-grade 3D printers. After all, there are only so many keychains you can make. Of course, you probably don’t need exactly this keyboard layout. But the techniques of creating the flexible PCB, printing the keypad itself and integrating everything with the electronics would be a great road map for any similar project.

As far as we can tell, the cat made no actual contribution to the final design. Unless you count inspiring flexibility, perhaps.

We’ve seen people make the actual PCBs using Pyralux and Ninjaflex as an etch resist if you don’t want to mill the boards. This isn’t the first time we’ve seen a Teensy pressed into keyboard controller service, either.

Thanks [Kyle] for the tip.


Filed under: 3d Printer hacks, Arduino Hacks, ARM

Necessity is the mother of invention, but sometimes frustration is as good a motivator. [Maciej] does a bunch of statistics in his day job using SPSS. silaczLike most complicated pieces of software, it can get hung, and the only way to stop it is to manually kill the running processes. Apparently, that happened one time too many for [Maciej].

He took matters into his own hands, repurposing a big red emergency-stop button for the task. It’s mounted on a jar, and the microcontroller inside is configured as a USB keyboard. When he mashes the button, it opens the “Run…” menu and types out taskkill spssengine.exe for him.

We can totally see the therapeutic value of such a device. Plus, in case SPSS is gobbling up his system memory and everything’s approaching standstill, the vital seconds saved by the microcontroller’s quick-typing fingers could be a lifesaver.


Filed under: Arduino Hacks, computer hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook