
0.47incholed
cnlohr/cnhardware
My dumping grounds for all my kicad projects and random hardware bringup.

ch32v003 USB Driver for 3-digit 7-segment TN LCDs with touch
Microlcd-3digit is an open-source printed circuit board by cnlohr, from the cnlohr/ch32v003_3digit_lcd_usb repository on GitHub, published under the MIT licence. It is a 2-layer board of 11.8 × 12.2 mm with 10 parts on 23 nets, routed with 224 tracks and 26 vias.
It is built around the CH32V003F4U6 and XC6206P332MR-G. Its parts include 3 resistors, 3 connectors, 2 capacitors and 2 ICs. It belongs with the lEDs and displays boards and the RISC-V boards of this library.
USB, Touch and Driver for 3-digit 7-segment TN LCDs on CH32V003
![]()
Using a ch32v003, a 10 cent microcontroller, without USB, Touch or LCD Driving capaibilities to do all three at the same time.

The design uses the reference rv003usb pinout, simply run the ch32v003 at 3.3v with an LDO and connect it up to the USB paddle card.
Conveniently the paddle card uses the same pinout as a normal USB Connector.

The overall board uses the inside part of a USB Type C connector, but as part of the PCB, so there are the following two recommendations:
The ch32v003 needs no preprogramming, only access to the GND/SWIO/5V pins to flash the bootloader on.
To use this design, your LCD must be a 3V LCD and should match the following specification:

To flash on the software, you should:
Then, from either external programmer or bootloader,
make option_writemake flashAppropriate firmware can be found in the firmware/ folders. When cloning this repo, be sure to clone recursively, i.e.
git clone https://github.com/cnlohr/ch32v003_3digit_lcd_usb --recursiveor if you, forgot, cd into the folder and run:
git submodule update --init --recursiveTo perform touch sensing, we drive the line low, then, in concert with starting the ADC sample (and making sure the ADC setup/sample is aligned in time to Fcpu/2) we apply a pull-up resistor to all the ports on the LCD.
This causes a measurement to be made as the voltage on the pins common to the whole LCD is rising and this gives us our measurement.
For basic LCD output, you can use a fairly simple waveform that has 10 stages.

You can see how enabling USB wrecks things up, because with USB going, it can't regulate the SEG pins to 1/2 VCC.

For touch, the output is repeatedly released from a low voltage with an internal pullup while simultaneously measuring the voltage with an ADC to obtain the touch amount.

Which looks great until USB sails its boat into it.

Search Aliexpress for "TN LCD Segment" to find these little bad boys.
All code and designs may by licensed freely under the MIT/x11 License.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 5.1k | Resistor_SMD:R_0402_1005Metric | R1, R2 |
| 1 | 1.5k | Resistor_SMD:R_0402_1005Metric | R3 |
| 1 | 1u | Resistor_SMD:R_0402_1005Metric | C2 |
| 1 | 4.7u | Resistor_SMD:R_0402_1005Metric | C3 |
| 1 | CH32V003F4U6 | Package_DFN_QFN:QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm | U1 |
| 1 | LCD | cnhardware:TINY_LCD_3_DIGIT | J4 |
| 1 | PGM | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
| 1 | USB_C_Receptacle_USB2.0 | cnhardware:USB_C_PADDLE | J1 |
| 1 | XC6206P332MR-G | Package_TO_SOT_SMD:SOT-23 | U2 |

cnlohr/cnhardware
My dumping grounds for all my kicad projects and random hardware bringup.

openwch/ch32v003
CH32V003 is an ultra-cheap RISC-V MCU with 2KB SRAM, 16KB flash, and up to 18 GPIOs that sells for under $0.10

johanwheeler/ch32-fireplace
Ch32 based christmas card with 8x8 screen, sound and capacitive buttons



Vonger/V7B_WS2812B
allow V7B or MPRO screen driver board control WS2812B by I2C interface + CH32V003


RainbowLabsDE/LightInstallationController
PCB and Firmware of our first universal RGB light installation controller.
It measures 11.8 × 12.2 mm and has 2 copper layers, 0.7 mm thick.
10 parts, built around the CH32V003F4U6 and XC6206P332MR-G. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the cnlohr/ch32v003_3digit_lcd_usb repository on GitHub, at the commit this page was made from: the board is hardware/microlcd-3digit.kicad_pcb and its schematic hardware/microlcd-3digit.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).