ButtonGizmo

Hey all,

As promised, here’s the second update. I would’ve posted this back then, but I needed to sort through some issues beforehand. So without further ado…

A couple of weeks ago, I posted about designing a USB-based input device, which would have four buttons, and whenever any of those buttons were pressed, would emit a USB report to the host (PC) specifying which of the buttons was pressed. That was followed up with another post detailing how to configure a V-USB device as a HID. Well, I sorta mashed everything together into a single project I call…*drum rolls* …ButtonGizmo.

Let it be known that I’m not known for my astounding naming abilities.

Essentially, ButtonGizmo is a HID with eight buttons, which operates as described earlier. While it doesn’t exactly solve a groundbreaking problem, its designed to be a simple starting point with V-USB and HID devices using the same. To this end, I’ve decided to put the hardware design (which is just a schematic – I built it on a stripboard so I never actually needed a PCB for it), example PC-side software (written in C#.NET) and the device firmware (written with Atmel Studio 7) up on GitHub for anyone who would possibly interested in poking about a bit. Permission is granted to modify the schematic and PC software and grow those to your heart’s content. It is open-source hardware, although (sadly) I have to release the firmware code under the GPL. This is because V-USB (when being used for personal/non-commercial purposes) is licensed under the GPL itself, and thus does not permit static linking (think in-source-tree compilation) with code under incompatible licenses, which necessitated the licensing of my own code under the GPL so that it would be compatible with the GPL and thus permit me to use V-USB. That said, the hardware, firmware and example software now available on my Github repo.

ButtonGizmo in truth was a very large learning experience for me. This would be the first design I’ve ever carried out with KiCAD (being an EAGLE fan myself) but I wanted to get a feel of using it so I gave it a shot and this is what came of that. Also, you’d find that the buttons are read not using digital inputs but with analog inputs instead. Yes, its a simple and old concept but I’d never actually used it before. About that – it works well enough, but in my personal experience I’ve found that even with a significantly large polling interval and value averaging, pressing the buttons rapidly definitely produces some incorrect results. I’m not entirely sure why that happens, but if I had to guess I’d say switch bounce and its interactions with the ADC sampling circuits. That said, I’d love to hear your thoughts about that and user feedback is of course always welcome. So, if you ever need a simple HID input device (maybe for custom games or applications or general goofing purposes) please feel free to turn to your trusty ButtonGizmo. Hopefully, the next few posts will talk about ButtonGizmo in some more depth.

*plays Bamboo Flute music in background*

Ps: Ramadan Kareem to the Muslims dropping by.

Comments

Popular posts from this blog

Enabling SPI1 on the Raspberry Pi B+/Zero/2/3

Bitbanging SPI on the Raspberry Pi (via spi-gpio)

Getting Started with Logic Analyzers and Pulseview