Chips

Bitluni's Microcontroller Trick: A 20-Cent USB Graphics Card

A hardware tinkerer demonstrates how to build a functional monochrome USB GPU using nothing but a single microcontroller and pocket change in components.

3 min read
Bitluni builds a 20-cent USB GPU from a single microcontroller

YouTuber Bitluni has earned recognition for his ventures into low-level hardware experimentation, and his latest project exemplifies his approach: constructing a VGA-compatible graphics card using primarily a single microcontroller. Building on earlier work in this space, he refined the design to achieve monochrome output while keeping the bill of materials to just 20 cents.

His prior iteration relied on the CH32V003 RISC-V microcontroller, which he found constraining. Upon examining the datasheet for the CH570, he identified features that appealed to him: doubled RAM capacity, built-in USB support, and Bluetooth capability. The project began with a creative workaround: using a PWM signal to simulate a DAC function.

A digital-to-analog converter, or DAC, transforms binary signals into voltage levels. The CH570 lacks one natively, but a pulse-width modulator—which cycles on and off rapidly—can approximate voltage variation over time. This principle underpins modern Class D amplifiers in audio equipment. Bitluni settled on rendering 16 shades of gray rather than pursuing the 50 that others might target.

The CH570's constrained RAM made storing a complete frame initially impractical, so Bitluni opted to render text at half the maximum vertical resolution. Performance lagged until he discovered that loading code into the chip's SRAM cache dramatically accelerated execution—a 24-fold speedup that enabled him to display 34 by 37 characters on screen.

With text working, he moved to graphics rendering. After additional optimization, he achieved his goal: Rick Astley dancing across the display, a nod to internet tradition. The animation consisted of only a handful of frames at low resolution, yet remained unmistakably recognizable. Throughout development, he connected his kit to a small CRT television via composite input, but the time had come to build actual hardware.

Bitluni designed a minimal PCB accommodating the CH570, a USB-C connector, and supporting components. A batch of 10 boards cost $15, with individual component costs totaling $0.20 per unit. The CH570 itself was the most expensive part at $0.13. The diminutive board functioned reliably, even with an improvised RCA connector consisting of simple grooves.

The final phase involved establishing USB connectivity through a serial interface via USB CDC. This presented challenges: the CH570's CPU had to manage USB communication, and the processing overhead competed with video signal generation. After several optimization iterations, Bitluni succeeded in displaying typed characters on the television. He also discovered that a jumper wire on his development kit acted as an unintended VHF antenna, nearly synchronizing the TV signal to it.

Source: Tom's Hardware · Reporting supplemented by The Silicon Ledger staff.