Displays We Love Hacking: SPI And I2C

I’ve talked about HD44780 displays before – they’ve been a mainstay of microcontroller projects for literal decades. In the modern hobbyist world, there’s an elephant in the room – the sheer variety of I2C and SPI displays you can buy. They’re all so different, some are LCD and some are OLED, some have a touchscreen layer and some don’t, some come on breakouts and some are a bare panel. No matter which one you pick, there are things you deserve to know.

These displays are exceptionally microcontroller-friendly, they require hardly any GPIOs, or none extra if you already use I2C. They’re also unbelievably cheap, and so tiny that you can comfortably add one even if you’re hurting for space. Sure, they require more RAM and a more sophisticated software library than HD44780, but with modern microcontrollers, this is no problem at all. As a result, you will see them in almost every project under the sun.

What do you need for those? What are the requirements to operate one? What kind of tricks can you use with them? Let’s go through the main aspects.

Continue reading “Displays We Love Hacking: SPI And I2C”

OLED Display Kicks Knob Up Several Accurate Notches

As far as input devices go, the potentiometer is pretty straightforward: turn it left, turn it right, and you’ve pretty much seen all there is to see. For many applications that’s all you need, but we can certainly improve on the experience with modern technology. Enter this promising project from [upir] that pairs a common potentiometer with a cheap OLED display to make for a considerably more engaging user experience.

To save time, the code is fine tuned in a simulator.

The basic idea is to mount the display over the potentiometer knob so you can show useful information such a label that shows what it does, and a readout of the currently detected value. But you’ll likely want to show where the knob is currently set within the range of possible values as well, and that’s where things get interesting.

In the video after the break, [upir] spends a considerable amount of time explaining the math behind details like the scrolling tick marks. The nearly 45 minute long video wraps up with some optimization, as getting the display to move along with the knob in real-time on an Arduino UNO took a bit of extra effort. The final result looks great, and promises to be a relatively cheap way to add an elegant and functional bit of flair to an otherwise basic knob.

With the code and this extensive demonstration of how it all works, adding a similar capability to your next knob-equipped gadget shouldn’t be too much of a challenge. Perhaps it could even be combined with the OLED VU meters we’ve covered previously. Be sure to let us know if you end up using this technique, as we’d love to see it in action.

Continue reading “OLED Display Kicks Knob Up Several Accurate Notches”

An 128x64 OLED display with a weird image on it, showing a mouse cursor, date and time in the bottom right corner, and a whole lot of presumably dithered dots

Making Your Own Technically-HDMI OLED Monitor

One day, [mitxela] got bored and decided to build his own HDMI monitor – the unconventional way. HDMI has a few high-speed differential pairs, but it also has an I2C interface used for detecting the monitor’s resolution and issuing commands like brightness control. In fact, I2C is the backbone for a lot of side channels like these – it’s also one of our preferred interfaces for connecting to cool sensors, and in this case, an OLED display!

[mitxela] describes his journey from start to end, with all the pitfalls and detours. Going through the pinout with a broken hence sacrificial HDMI cable in hand, he figured out how to probe the I2C lines with Linux command-line tools and used those to verify that the display was recognized on the HDMI-exposed I2C bus. Then, he turned to Python and wrote a short library for the display using the smbus bindings – and, after stumbling upon an FPS limitation caused by SMBus standard restrictions, rewrote his code to directly talk to the I2C device node, raising FPS from 2 to 5-10.

From there, question arose – what’s the best software route to take? He tried making a custom X modeline on the HDMI port the display was technically attached to, but that didn’t work out. In the end, he successfully employed the Linux capability called “virtual monitors”, and found out about an interesting peculiarity – there was no mouse cursor to be seen. Turns out, they’re typically hardware-accelerated and overlaid by our GPUs, but in [mitxela]’s case, the GPU was not involved, so he added cursor support to the picture forwarding code, too.

With partial refresh, the display could be redrawn even faster, but that’s where [mitxela] decided he’s reached a satisfactory conclusion to this journey. The write-up is a great read, and if videos are more your forte, he also made a video about it all – embedded below.

We first covered the ability to get I2C from display ports 14 years ago, and every now and then, this fun under-explored opportunity has been popping up in hackers’ projects. We’ve even seen ready-to-go breakouts for getting I2C out of VGA ports quickly. And if you go a bit further, with your I2C hacking skills, you can even strip HDCP!

We thank [sellicott] and [leo60228] for sharing this with us!

Continue reading “Making Your Own Technically-HDMI OLED Monitor”

Custom Soldering Fume Fan Doesn’t Skimp On Features

Prolific maker [sjm4306] tells us the first iteration of his soldering fan was little more than some cardboard, electrical tape, and a hacked up USB cable. But as we all know, these little projects have a way of evolving over time. Fast forward to today, and his custom fan is a well-polished piece of kit that anyone with a soldering iron would be proud to have on their workbench.

Cardboard has given way to a 3D printed enclosure that holds the fan, electronics, a pair of 18650 cells, and a easily replaceable filter. Between the marbled filament, debossed logo, properly countersunk screw holes, and rounded corners, it’s really hard to overstate how good this case looks. We’ve shamefully produced enough boxy 3D printed enclosures to know that adding all those little details takes time, but the end result really speaks for itself.

Fan internals, with a look at the custom PCB.

The user interface running on the OLED is also an exceptionally nice touch. Sure the fan doesn’t need a graphical display, and [sjm4306] could have saved a lot of time and effort by using a turn-key speed controller, but the push-button configuration complete with graphical indications of fan speed and battery life really give the final product a highly professional feel.

In the video below, [sjm4306] reveals that while the finished product might look great, there were a few bumps in the road. Issues with clearance inside the case made him rethink how things would be wired and mounted, leading to a far more cramped arrangement than he’d anticipated. Part of the problem was that he designed the case first and tried to integrate the electronics later, rather than the other way around; a common pitfall you’d be wise to watch out for.

It’s been proven that, without some external input, solder smoke is going to go right in your face. Whether or not you need to do something this complex is naturally up for debate, but if you want to keep all that nasty stuff out of your lungs, you’d do well to outfit your workbench with some kind of fan.

Continue reading “Custom Soldering Fume Fan Doesn’t Skimp On Features”

Making A Halloween Costume Fit For 2020

All across the country, parents are wondering what to do about the upcoming Trick Or Treat season. Measures such as social distancing, contact free treats, or simply doing it at home are all being weighed as a balance of fun and safety. [BuildXYZ] has decided to lean into the challenges this year and incorporate a mask as part of the costume for his boys.

It started with a 3d printed mask, printed in two halves, and sealed with silicon caulk and N95 filter material in the inlet and outlet holes on the sides. The real magic of the mask is the small OLED screen mounted to the front that works along with a small electret microphone inside the mask. By sampling the microphone and applying a rolling average, the Arduino Nano determines if the mouth drawn on the display should be open or closed. A small battery pack on a belt clip (with a button to flash “Trick or Treat” on the screen) powers the whole setup and can be easily hidden under a cape or costume.

This isn’t the first hack we’ve seen for Halloween this year, such as this socially distant candy slide. We have a feeling that there will be many more as the month rolls on and people start to apply their ingenuity to the season.

Continue reading “Making A Halloween Costume Fit For 2020”

Open Source Stream Deck Does It Without Touch Screens

[Adam Welch] has built macro pads in the past out of pre-fab key matrices and handfuls of Cherry MX clones. But all the stickers and custom keycaps in the world wouldn’t make those macro pads as versatile as a stream deck — those visual shortcut panels with tiny touchscreens for each button that some streamers use to change A/V settings or switch between applications.

Let’s face it, stream decks are expensive. But 0.96″ OLED displays are not, and neither are SMD tactile buttons. Why not imitate a screen deck on the cheap by making it so the screens actuate buttons behind them? [Adam] based this baby on the clever design of [Kilian Gosewisch]’s FreeDeck, and they ended up working together to improve it with a dedicated PCB.

The brains of the operation is an Arduino Pro Micro, which addresses each screen individually via two 74HC4051 mux ICs. Thanks to an SD card module, there’s no need to flash the ‘duino every time you want to change a shortcut or its picture. Even if this deck doesn’t hold up forever, it won’t break the bank to build another one. Poke past the break for the build video, which has all the links you’d need to make your own, including a handy configurator.

There’s more than one way to do a visual macro pad. Here’s one that uses a single screen and splits it Brady Bunch style to match the matrix.

Continue reading “Open Source Stream Deck Does It Without Touch Screens”