Low-Cost Display Saved By RP2040

Anyone looking for components for electronics projects, especially robotics, microcontrollers, and IoT devices, has likely heard of Waveshare. They are additionally well-known suppliers of low-cost displays with a wide range of resolutions, sizes, and capabilities, but as [Dmitry Grinberg] found, they’re not all winners. He thought the price on this 2.8-inch display might outweigh its poor design and lack of documentation, and documented his process of bringing it up to a much higher standard with a custom driver for it.

The display is a 320×240 full-color LCD which also has a touchscreen function, but out-of-the-box only provides documentation for sending data to it manually. This makes it slow and, as [Dmitry] puts it, “pure insanity”. His ultimate solution after much poking and prodding was to bit-bang an SPI bus using GPIO on an RP2040 but even this wasn’t as straightforward as it should have been because there are a bunch of other peripherals, like an SD card, which share the bus. Additionally, an interrupt is needed to handle the touchscreen since its default touch system is borderline useless as well, but after everything was neatly stitched together he has a much faster and more versatile driver for this display and is able to fully take advantage of its low price.

For anyone else attracted to the low price of these displays, at least the grunt work is done now if a usable driver is needed to get them up and running. And, if you were curious as to what [Dmitry] is going to use this for, he’s been slowly building up a PalmOS port on hardware he’s assembling himself, and this screen is the perfect size and supports a touch interface. We’ll keep up with that project as it progresses, and for some of [Dmitry]’s other wizardry with esoteric displays make sure to see what he’s done with some inexpensive e-ink displays as well.

Mice Play In VR

Virtual Reality always seemed like a technology just out of reach, much like nuclear fusion, the flying car, or Linux on the desktop. It seems to be gaining steam in the last five years or so, though, with successful video games from a number of companies as well as plenty of other virtual reality adjacent technology that seems to be picking up steam as well like augmented reality. Another sign that this technology might be here to stay is this virtual reality headset made for mice. Continue reading “Mice Play In VR”

It’s Ethernet, From An SPI Interface

Over the years as microcontrollers have become fast enough to do the heavy lifting, we have become used to 10 megabit Ethernet being bit-banged from interfaces it was never meant to emerge from. We think however that we’ve never seen one driven from an SPI interface, so this one from [Ivan] may be a first. With a cleverly designed transceiver using logic chips, it even offers a chance to understand something about the timing of an Ethernet interface, too.

The differential logic signals derived from a simple Ethernet transceiver can be read by an SPI bus, but for the lack of a clock line. The challenge was then to construct a circuit the would construct the required clock pulses from the state changes on the data line. This would become a monostable with XOR gate, and a shift register to handle the clock during the preamble phase.

The resulting circuitry fits neatly on a shield for the ST Nucleo 64 board, where while it might not be the obvious choice for an Ethernet shield it certainly does the job.

If unexpected Ethernet is your thing, how about the i2s peripheral on an ESP8266?

Nixie Display Module Is Addressable Via SPI

There are plenty of SPI interface screens on the market, but few of them have the charm of the good old Nixie tube. [Tony] decided to whip up a simple three-Nixie module that could be addressed via SPI. 

The stacked construction keeps things compact.

The module relies on a PIC16F15344 microcontroller to run the show, using its built-in SPI interface. It’s built with four stacked-up PCBs for ease of assembly and testing. It uses an internal buck converter to create the 170 volts required for the Nixie tubes from a 6 to 12 volt input. The high-voltage lines are routed towards the inside of the stack to minimize any nasty shocks when handling, though caution would still be advisable.

Driving the display is as simple as sending 16-bit words over the SPI interface, with the device operating in SPI client mode 1. If you’re looking for a simple way to have projects write output to a nice Nixie display, this module could be just what you’re looking for. Alternatively, if you can’t lay your hands on the tubes, there are other pretty solutions out there, too. Video after the break.

Continue reading “Nixie Display Module Is Addressable Via SPI”

Bare-Metal STM32: Setting Up And Using SPI

The Serial Peripheral Interface (SPI) interface was initially standardized by Motorola in 1979 for short-distance communication in embedded systems. In its most common four-wire configuration, full-duplex data transfer is possible on the two data (MOSI, MISO) lines with data rates well exceeding 10 Mb/s. This makes SPI suitable for high-bandwidth, full-duplex applications like SD storage cards and large resolution, high-refresh displays.

STM32 devices come with a variable number of SPI peripherals, two in the F042 at 18 Mb/s and five in the F411. Across the STM32 families, the SPI peripheral is relatively similar, with fairly minor differences in the register layout. In this article we’ll look at configuring an SPI peripheral in master mode.

Continue reading “Bare-Metal STM32: Setting Up And Using SPI”

Slap This Big Red Button For An Instant Social Media Detox

Dangerous machines, like ones that can quickly reduce you to a fine red mist or a smoking cinder, tend to have a Big Red Button™ to immediately stop whatever the threat is. Well, if a more dangerous machine than social media has ever been invented, we’re not sure what it would be, which is why we’re glad this social media kill switch exists.

The idea behind [Gunter Froman]’s creation is to provide a physical interface to SocialsDetox, a service that blocks or throttles connectivity to certain apps and websites. SocialDetox blocks access using either DNS over HTTPS (DoH) or, for particularly pesky and addictive apps, a service-specific VPN. The service does require a subscription, the cost of which varies by the number of devices you want to protect, but the charges honestly seem pretty reasonable.

While SocialsDetox can be set up to block access on a regular schedule, say if you want to make the family dinner a social-free time, there may be occasions where killing social access needs to happen right now. This is where the Big Red Button comes into it, which is attached to a Wemos D1 Mini. Pressing the kill switch sends an API request to either enable or disable the service, giving you a likely much-needed break from the swirling vortex of hate and envy that we all can’t seem to live without. Except for Hackaday, of course — it’s totally not like that here.

The irony of using an IoT appliance to restrict access to social media is not lost on us, but you work with the tools you’ve got. And besides, we like the physical interface here, which sort of reminds us this fitting enclosure for a PiHole.

Two pairs of boards described in the article, with toggle switches and RCA jacks, shown interconnected, LEDs on all four boards lit up.

Boards For Playful Exploration Of Digital Protocols

Teaching people efficiently isn’t limited to transmitting material from one head to another — it’s also about conveying the principles that got us there. [Mara Bos] shows us a toolkit (Twitter,
nitter link
) that you can arm your students with, creating a small playground where, given a set of constraints, they can invent and figure communication protocols out on their own.

This tool is aimed to teach digital communication protocols from a different direction. We all know that UART, I2C, SPI and such have different use cases, but why? Why are baud rates important? When are clock or chip select lines useful? What’s the deal with the start bit? We kinda sorta figure out the answers to these on our own by mental reverse-engineering, but these things can be taught better, and [Mara] shows us how.

Gently guided by your observations and insights, your students will go through defining new and old communication standards from the ground up, rediscovering concepts like acknowledge bits, bus contention, or even DDR. And, as you point out that the tricks they just discovered have real-world counterparts, you will see the light bulb go on in their head — realizing that they, too, could be part of the next generation of engineers that design the technologies of tomorrow.

Continue reading “Boards For Playful Exploration Of Digital Protocols”