Reverse Engineering Apple’s Mikey Chip

On the old iPods, generally referred to here in the future as iPod Classic, there lives a tiny, undocumented chip called Mikey. It sits at the headphone output and performs only two functions: powering the Apple wired headset microphone and handling button presses from the three buttons. Despite these headphones and iPods having existed for nearly two decades, no one in the open source community has figured out the protocol Apple used for these buttons until now.

As [Hemant] discovered after finding a single archived blog post from 16 years ago about it, the chip is relatively simple by modern standards. Besides handling microphone bias, it sits on an I2C bus and monitors presses from the three buttons on the headset. Each button has its own resistive load, so a press from any of them drops the voltage on the line to a certain amount which the chip can read. The more involved part is a “chirp” that’s a sort of handshake between headset and iPod, which took a bit of work with a debugger that [Hemant] built into a custom Rockbox firmware.

With the chirp sorted out, [Hemant] built the feature into an existing version of Rockbox, and submitted the update to the Rockbox team for integration in future official builds. It’s a long overdue feature for those still using wired headphones and iPods from the turn of the century, but welcome. Some of those iPods are still working to this day, but only conditionally if they’re very cold.

Wrist Welcomes Wii Nunchuk As Gloriously Ergonomic Macropad

[John Dingley] spends a lot of time editing videos, and as many of us know, when it comes to repetitive tasks the more ergonomic the better.

Keyboard shortcuts exist for common video editing functions, but [John] found that the vast majority of his work needed only three or four of them. Feeling he could do better than a three-key macropad, he turned to what’s perhaps one of the most ergonomic devices ever designed — the Wii Nunchuk.

A Wii Nunchuk is an I2C device, so there needs to be some intermediary device involved if you want to plug it into a computer. [John] solves that with the ANAVI Handle, an open source adapter to make a Nunchuk act like a USB Human Interface Device (HID). That addresses the connectivity problem, but the default firmware on the adapter only treats the Nunchuk as a mouse or joystick, so a few more changes are required before it can be pressed into service as an ultra-comfortable macropad.

The ANAVI Handle runs CircuitPython code on an RP2040, and modifying its behavior is as simple as plugging it in via USB and editing the code right on the device. One has to define some keyboard events, configure the device to act as a keyboard, and send the right events when the buttons or joystick get pushed. [John] provides the code, and walks through the changes on video so even those without any coding experience can get it done.

The Nunchuk design is still being sold and used today, and it’s shown up in all kinds of places. We’ve seen a Bluetooth-enabled one and even seen a Raspberry Pi Zero shoehorned into one, complete with HDMI output.

Continue reading “Wrist Welcomes Wii Nunchuk As Gloriously Ergonomic Macropad” →

Addressable LEDs Make Giant 16×2 Character Display

We’ve always taken a certain childlike joy in seeing tiny things made big, and big things tiny. Evidently [Uncle Stem] is the same way, if this 7x sized 16×2 “LCD” display is any indicator.

“LCD” is in scare quotes there, because while the original display is a character LCD, [Uncle Stem]’s embigginated recreation is not. Liquid crystal displays are beyond all but the most dedicated DIYers, so [Stem] recreated the whole thing with addressable LEDs instead — over a thousand of them. Each character got its own PCB, and rather than pay for assembly [Stem] used a 3D printed stencil to help apply solder paste, an idea we’ve seen before. His choice of long lengths of nickel strip — the stuff you spot weld to Li-ion batteries — to join the LED-holding PCBs is also worth noting.

In order to get his giant display to act like the I2C-operated module he loves, [Uncle Stem] equipped it with an RP2040 pre-programmed with the LCD character set. That way he can plug it into any Arduino project that uses the LiquidCrystal_I2C library and have the authentic 1602 experience. The green “PCB” the display is mounted to is actually laser-cut plywood, while some acrylic sits in front of his PCBs with office paper to act as as a diffuser. A 3D printed frame completes the illusion. He even goes so far as to replicate the pin headers at 7:1 scaling with brass rods.

He also connects it to a over-sized Arduino, with giant jumper wires. But for the record, not the giant Arduino we featured previously. Like we said, hackers like to mess with scale, and we’ve seen everything from giant benchies to a working Mac Classic for Barbie.

Continue reading “Addressable LEDs Make Giant 16×2 Character Display” →

Pi Pico Puts Bluetooth Keyboards On The I2C Bus

If you’ve ever worked with I2C, you know its one of those things that makes working with modern microcontrollers such a pleasure. With a few wires and not many more lines of code, you can communicate with all sorts of hardware such as sensors, displays, and input devices. There are even I2C keyboards out there, although they tend to be a bit pokey — and not in the good way as it pertains to keyboards.

But the bt2i2c project from [Roberto Alsina] promises to improve things. With his firmware flashed to a Pi Pico W, you can establish a connection with any standard Bluetooth keyboard and have the keystrokes sent over the wire via I2C. As far as your project is concerned, the input will appear to be coming from a BlackBerry BBQ20/BBQ10 keyboard using the address 0x1F, which means that there’s already plenty of code out there to work with. While [Roberto] explains its not strictly necessary, connecting a ST7789 display to the Pi Pico over SPI will give you some visual feedback on connection status.

As microcontrollers become increasingly powerful and capable of the sort of thing we would once have done on a “real” computer, a project like this has some fascinating potential. We’ve seen a number of “writerdeck” projects running on chips like the ESP32, and it’s not hard to see the appeal of being able to easily pair your favorite Bluetooth keyboard up to one of them.

Electronic Wizard in his lab wearing his wizards hat

How To Use The AT24C32 EEPROM For 4KB External Memory For Microcontrollers

Over on YouTube [Electronic Wizard] explains how to use the AT24C32 EEPROM for external memory for microcontrollers.

He begins by explaining that you don’t want to try modifying your microcontroller flash memory for storing settings, you want to use a separate EEPROM for that. Sometimes your microcontroller will have EEPROM memory attached, but you might still find yourself needing to attach more. The AT24C32 EEPROM is a 4KB non-volatile memory chip. It’s available in various 8-pin packages and two voltage levels, either 2.7 to 5.5 volts or 1.8 to 5.5 volts, and it’s programmed using the I2C protocol.

Continue reading “How To Use The AT24C32 EEPROM For 4KB External Memory For Microcontrollers” →

Pi Port Protection PCB

We’re used to interfaces such as I2C and one-wire as easy ways to hook up sensors and other peripherals to microcontrollers. While they’re fine within the confines of a small project, they do have a few limitations. [Vinnie] ran straight into those limitations while using a Raspberry Pi with agricultural sensors. The interfaces needed to work over long cable runs, and to be protected from ESD due to lightning strikes. The solution? A custom Pi interface board packing differential drivers and protection circuits aplenty.

The I2C connection is isolated using an ISO1541 bus isolator from TI, feeding a PCA9615DP differential I2C bus driver from NXP. 1-wire is handled by a Dallas DS2482S 1-wire bus master and an ESD protection diode network. Even the 5-volt power supply is delivered through an isolated module.

Whether or not you need this Raspberry Pi board, this is still an interesting project for anyone working with these interfaces. If you’re interested, we’ve looked at differential I2C in the past.

Moving Software Down To Hardware

In theory, any piece of software could be built out of discrete pieces of hardware, provided there are enough transistors, passive components, and time available. In general, though, we’re much more likely to reach for a programmable computer or microcontroller for all but the simplest tasks for several reasons: cost, effort, complexity, economics, and sanity. [Igor Brichkov] was working with I2C and decided that he wanted to see just where this line between hardware and software should be by implementing this protocol itself directly with hardware.

One of the keys to “programming” a communications protocol in hardware is getting the timing right, the first part of which is initializing communications between this device and another on the bus. [Igor] is going to be building up the signal in parts and then ORing them together. The first part is a start condition, generated by one oscillator and a counter. This also creates a pause, at which point a second oscillator takes over and sends data out. The first data needed for I2C is an address, which is done with a shift register and a counter pre-set to send the correct bits out on the communications lines.

To build up the rest of the signal, including data from the rotary encoder [Igor] is using for his project, essentially sets of shift registers and counters are paired together to pass data out through the I2C communications lines in sequence. It could be thought of that the main loop of the hardware program is a counter, which steps through all the functions sequentially, sending out data from the shift registers one by one. We saw a similar project over a decade ago, but rather than automating the task of sending data on I2C it allowed the user to key in data manually instead.

Continue reading “Moving Software Down To Hardware” →