We often talk about the advantages of modular hardware here at Hackaday; the ability to just order a few parts online, hook them up with some jumper wires, and move onto the software side of things is a monumental time saver when it comes to prototyping. So anytime we see a new module that’s going to save us time and aggravation down the road, we get a bit excited.
Today we present the very slick I2CNavKey developed by [Saimon], a turn-key interface solution for your builds that can’t quite get away with a couple toggle switches. It not only gives you a four-way directional pad with center button, but a rotary “wheel” like on the old iPods. All of which you can access easily and with a minimum of wiring thanks to the wonders of I2C.
But even that might be selling the module short. This isn’t just a couple of buttons on a breakout board, the I2CNavKey is powered by its own PIC16F18345 microcontroller and features three configurable GPIOs with PWM support (perfect for an RGB LED) plus 256 bytes of onboard EEPROM storage.
[Saimon] has released the entire project as open source hardware for your hacking pleasure, but you can also get them as ready-to-use modules on Tindie for $18 USD [Editor’s Note: Because of a typo we originally we left the 1 out of the price]. Whether you’re a paying customer or not, you get access to the project’s absolutely phenomenal documentation, including a nearly 30 page manual that contains everything you’d ever want to know about the I2CNavKey and how to integrate it into your project. If all hardware was documented with this level of dedication, the world would be a much nicer place for folks like us.
Listen, it hurts to hear, but somebody needs to say it. It’s over, OK? You’ve got to admit it and move on. Sure, you could get away with it for a week or two in January, but now it’s just getting weird. No matter how hard you fight it, the facts are the facts: the holidays are over. It’s time to pack up all those lights and decorations before the neighbors really start talking.
But don’t worry, because there’s an upside. Retailers are now gearing up for their next big selling season, which means right now clearance racks the world over are likely to be playing home to holiday lights and decor. That wouldn’t have been very interesting to the average hacker or maker a few years ago, after all, there’s only so much you can do with a string of twinkle lights. But today, holiday decorations are dripping with the sort of high-tech features you’d expect from gadgets that are actively aiming to be obsolete within the next ten months or so.
Case in point, the “AppLights Personalized Projection” which I found sulking around the clearance section of the Home Depot a couple weeks back. This device advertises the ability to project multi-color custom messages and animations on your wall, and is configured over Bluetooth with a companion application on your Android or iOS device. At a minimum we can assume the device must contain a fairly powerful RGB LED, an LCD to shine the light through, and some sort of Bluetooth-compatible microcontroller. For $20 USD, I thought it was worth taking a shot on.
Around this time last year, the regular Hackaday reader may recall I did a teardown for a Christmas laser projector. Inside we found red, green, and blue lasers of considerable power, as well as all the optics and support hardware to get them running. It was a veritable laser playground for $14. Let’s see if the AppLights projector turns out to be a similar electronic cornucopia, and whether or not we’ve got a new Hackaday Holiday tradition on our hands.
Inexpensive OLED displays with I2C interfaces abound, but there is a catch: they tend to be stuck on I2C address 0x3C. Some have a jumper or solder pads to select an alternate (usually 0x3D), but they lack any other method. Since an I2C bus expects every device to have a unique address, this limits the number of displays per bus to one (or two, at best.) That is all still true, but what [Larry Bank] discovered is a way to get multiple OLED displays working with considerably fewer microcontroller pins than usually needed.
While bit-banging I2C to host one display per bus on the same microcontroller, an idea occurred to him. The I2C start signal requires both clock (SCL) and data (SDA) to be brought low together, but what would happen if the displays shared a single clock line? To be clear, each OLED would — logically speaking — still be on its own I2C bus with its own data line, but they would share a clock signal. Would a shared clock cause attached devices to activate unintentionally?
A quick test consisting of four OLED displays (all with address 0x3C) showed that it was indeed possible to address each display with no interference if they shared a clock. Those four individually controlled displays needed only five I/O lines (four SDA, one shared SCL) instead of eight. The Multi_OLED library is available on GitHub, and in case it is useful for devices other than OLED displays, bit-banged I2C with support for shared clock lines is available separately.
There’s more to do with OLEDs than get clever with signals: check out these slick number-change animations, and that even looks to be a project that could benefit from a few saved GPIO pins, since it uses one small display per digit.
We really love when hacks of previous hacks show up in the tip line. It shows how the hardware hacking community can be a feedback loop, where one hack begets the next, and so on until great things are everywhere. This hacked joystick port for an FPGA Pac Man game is a perfect example of that creative churn.
The story starts with Pano Man, a version of the venerable arcade game ported to a Pano Logic FPGA thin client by [Skip]. We covered that story when it first came out, and it caught the attention of [Tom Verbeure], particularly the bit in the GitHub readme file which suggested there might be a better way to handle the joystick connections. So [Tom] took up the challenge of using the Extended Display Identification Data (EDID) circuit in the VGA connector to support an Atari 2600 joystick. The EDID system is an I²C bus, so the job needed the right port expander. [Tom] chose the MCP23017, a 16-bit device that would have enough GPIO for dual joysticks and a few extra buttons. Having never designed a PCB before, [Tom] fell down that rabbit hole for a bit, but quickly came up with a working design, and then a better one, and then the final version. The video below shows it in action with Pano Man.
We think the creative loop between [Skip] and [Tom] was great here, and we can’t wait to see who escalates next. And it’s pretty amazing how much IO can be stuffed over two wires if you have the right tools. Check out this VGA sniffing effort to learn more about EDID and I²C.
He’s developed a small board that sits behind the 3LS363A and allows you to control it over I2C for a much more modern experience when working with these vintage displays. Powered by the ATtiny406, his adapter board makes it easy to chain the modules together and even handles niceties like flipping the displayed image to account for different mounting positions. While most of us probably won’t have the chance to play around with these relatively rare displays, there’s still plenty of useful information here if you’re thinking of creating your own I2C gadgets.
In his write-up, [Dmitry] explains his rationale behind the design and some of the quirks of working with the display. For example he explains how he gave each column of the display its own FET, but to save space on the board ended up running the single decimal point (technically its own column) directly off of a spare GPIO pin. Relying on the low duty cycle, he even left current limiting resistors off the design. The end result is a tiny board that keeps the same footprint of the 3LS363A itself.
[Dmitry] went all out with developing the firmware for his new “smart” 3LS363A displays, and has written up documentation for the different commands he has implemented. From re-configuring the I2C address to updating the firmware, he’s made sure no stone was left unturned for this project. We’re not ones to shy away from a quick and dirty code, but it’s always nice to see when somebody has really put some thought into the software side of a project.
A Raspberry Pi Zero (W) and Arduino are very different animals, the prior has processing power and connectivity while the latter has some analog to digital converters (ADCs) and nearly real-time reactions. You can connect them to one another with a USB cable and for many projects that will happily wed the two. Beyond that, we can interface this odd couple entirely through serial, SPI, I2C, and logic-level signaling. How? Through a device by [cburgess] that is being called an Arduino shield that supports a Pi0 (W). Maybe it is a cape which interfaces with Arduino. The distinction may be moot since each board has a familiar footprint and both of them are found here.
Depending on how they are set up and programmed, one can take control over the other, or they could happily do their own thing and just exchange a little information. This board is like a marriage counselor between a Raspberry Pi and an Arduino. It provides the level-shifting so they don’t blow each other up and libraries so they can speak nicely to one another. If you want to dig a bit deeper into this one, design files and code examples are on available.
In the era of touch screens and capacitive buttons, we’d be lying if we said we didn’t have the occasional pang of nostalgia for the good old days when interfacing with devices had a bit more heft to it. The physical clunk and snap of switches never seems to get old, and while you can always pick up a mechanical keyboard for your computer if you want to hear that beautiful staccato sound while firing off your angry Tweets, there’s a definite dearth of mechanical interface devices otherwise.
[Jeremy Cook] decided to take matters into his own hands (literally and figuratively) by designing his own multipurpose USB rotary input device. It’s not a replacement for the mouse or keyboard, but a third pillar of the desktop which offers a unique way of controlling software. It’s naturally suited to controlling things like volume or any other variable which would benefit from some fine tuning, but as demonstrated in the video after the break even has some gaming applications. No doubt the good readers of Hackaday could think of even more potential applications for a gadget like this.
The device is built around the diminutive Arduino-compatible PICO board by MellBell, which features a ATmega32u4 and native USB. This allowed him to very rapidly spin up a USB Human Interface Device (HID) with minimal headaches, all he had to do was hang his buttons and rotary encoder on the PICO’s digital pins. To that end, he [Jeremy] used the fantastic I2C rotary encoder designed by [fattore.saimon], which readers may remember as a finalist in the Open Hardware Design Challenge phase of the 2018 Hackaday Prize. He also added a NeoPixel ring around the encoder to use for some visual feedback and because, well, it just looks cool.
Since all of the core components are digital, there’s not a whole lot required in the way of wiring or passive components. This let [Jeremy] put the whole thing together on a piece of perfboard, freeing him up to spend time designing the 3D printed enclosure complete with translucent lid so he can see the NeoPixel blinkenlights. He got the tolerances tight enough that the whole device can be neatly press-fit together, and even thought to add holes in the bottom of the case so he could push the perfboard back out if he needed to down the line.
[Jeremy] spends a good chunk of the video going over the software setup and development of the firmware, and details some of the nuances he had to wrap his head around when working with the I2C encoder. He also explains the math involved in getting his encoder to emulate a mouse cursor moving in a circle, which he thinks could be useful when emulating games that originally used an encoder such as Tempest or Pong.