← How-Tos
electronics Sep 5, 2026 ◑ 3 views ◯ 5 min read

CH32V003 and RISC-V Microcontrollers for Makers: Sub-Dollar Alternatives to AVR and ESP32

risc-vch32v003wchmicrocontrollermounriverembeddedavr alternative

Somewhere in the last few years, a family of Chinese-made microcontrollers quietly became cheap enough to embarrass the entire 8-bit AVR market: WCH's CH32V RISC-V chips, some of which cost less than a resistor in single quantities. This guide covers what RISC-V actually means for a maker (as opposed to a licensing footnote), why the CH32V003 in particular has become the default "I need logic for basically nothing" chip, and how to get from a bare chip to blinking an LED using the free, fully open toolchain WCH provides.

RISC-V in One Paragraph

RISC-V is an open instruction set architecture — the actual vocabulary of machine instructions a CPU core executes — that anyone can implement without paying ARM or licensing fees. That's the whole story from a maker's perspective: it's not a specific chip or vendor, it's a free blueprint that companies like WCH, Espressif (the ESP32-C3/C6/P4 covered elsewhere on this site), SiFive, and others build actual silicon around. The practical consequence is that RISC-V chips tend to be cheaper than architecturally-equivalent ARM parts for the same process node, because the vendor isn't paying a per-unit royalty for the core design.

Meet the CH32V003: An 8-Bit-Priced 32-Bit Chip

SpecCH32V003ATtiny85 (for comparison) Core32-bit RISC-V (QingKe V2A), 48MHz8-bit AVR, 20MHz Flash / RAM16KB / 2KB8KB / 512B ADC10-bit, up to 8 channels10-bit, 4 channels Package optionsSOP8, SOP16, QFN20, TSSOP20DIP8, SOIC8 Typical unit cost$0.10–0.15 at moderate volume$0.80–1.50 Programming interfaceSingle-wire debug (SWD-like, WCH calls it SDI)ISP (SPI-based)

The CH32V003 is a genuine 32-bit chip with more flash, more RAM, a faster clock, and more ADC channels than the ATtiny85 it's most often compared to — for a fraction of the price. It won't replace an ESP32 for anything needing WiFi, and it's not trying to; think of it as a modern replacement for "a chip that just needs to debounce a button, run a PWM output, or read one I2C sensor" jobs that would otherwise go to an ATtiny or a 74-series logic chip. WCH also sells larger siblings — the CH32V203 (Cortex-M3-class performance, more peripherals, still RISC-V) and the CH32V303 — for projects that outgrow the '003 without needing a full ESP32 or STM32.

Getting the Toolchain Running

WCH ships two practical paths, both free:

Programming and debugging happens over WCH's single-wire SDI interface using a WCH-LinkE debug probe — a cheap USB dongle that also handles the CH32V's UART-over-USB for serial output. It looks and behaves a lot like an ST-Link, and if you've already got one for STM32 work, the same SWD wiring habits (data line, ground, 3V3) transfer directly, just to a single data pin instead of two.

Writing Your First Program

WCH provides a peripheral library (similar in spirit to ST's Standard Peripheral Library, predating HAL) with function calls like GPIO_Init() and GPIO_WriteBit() that will look immediately familiar if you've touched STM32's older SPL-style code. There's no Arduino-framework layer for CH32V003 the way there is for ESP32 and STM32 — you're working close to the peripheral library from the start, which is a slightly steeper first step than Arduino but not a difficult one for anything you've already done GPIO/timer/ADC work on another chip family.

#include "ch32v00x.h" int main(void) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); GPIO_InitTypeDef GPIO_InitStructure = {0}; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz; GPIO_Init(GPIOC, &GPIO_InitStructure); while (1) { GPIO_WriteBit(GPIOC, GPIO_Pin_0, Bit_SET); Delay_Ms(500); GPIO_WriteBit(GPIOC, GPIO_Pin_0, Bit_RESET); Delay_Ms(500); } }

That's the entire blink program for a CH32V003 — clock-enable the GPIO port, configure the pin as push-pull output, toggle it in a loop. It compiles to well under a kilobyte, leaving essentially the whole 16KB flash budget for actual application logic.

Where a Sub-Dollar RISC-V Chip Actually Makes Sense

It is not a good fit for anything that needs wireless connectivity, USB, meaningful RAM (image buffers, string parsing at scale), or a large ecosystem of existing Arduino libraries — for any of those, reach for ESP32 or a Cortex-M4-class STM32 part instead.

A Note on Sourcing

CH32V003 chips and dev boards are widely available from the usual overseas electronics marketplaces and increasingly from mainstream distributors as WCH's local stocking improves. Bare chips are typically sold in SOP8 or QFN20 packages meant for reflow or hand-soldering with fine-pitch technique — buy a breakout/dev board first if you don't yet have a hot air station, and graduate to bare chips once you're comfortable with the SMD soldering techniques covered elsewhere on this site.

RISC-V's appeal for makers isn't ideology — it's that an open instruction set removes a licensing cost that used to be baked into every chip, and WCH passed nearly all of those savings straight to the price tag. For anything that used to default to an ATtiny or a handful of logic chips, it's worth a look before reaching for the usual AVR part number out of habit.