Skip to the content
2 layers11.8 × 12.2 mmMicrolcd-3digit, the printed circuit board in 3D

ch32v003 USB Driver for 3-digit 7-segment TN LCDs with touch

Size
11.8 × 12.2 mm
Copper layers
2
Thickness
0.7 mm
Parts
10
Nets
23
Pads
75
Tracks, vias
224, 26
Pours
40
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
22 Nov 2024
Updated
17 Dec 2024

Overview

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.

Main components

2

README

README.md

ch32v003_3digit_lcd_usb

USB, Touch and Driver for 3-digit 7-segment TN LCDs on CH32V003

Youtube Video

glamour

Using a ch32v003, a 10 cent microcontroller, without USB, Touch or LCD Driving capaibilities to do all three at the same time.

Design

schematic

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.

outline

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:

  1. Your PCB should be 0.6mm thick.
  2. Your PCB sohuld use ENIG finish instead of HASL, as it is possible a HASL finish could damage USB-C cables.

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:

p1 p2

Software

To flash on the software, you should:

  • Optionally, install the rv003usb bootloader.

Then, from either external programmer or bootloader,

  • In your desired firmware folder type make option_write
  • Flash with make flash

Appropriate firmware can be found in the firmware/ folders. When cloning this repo, be sure to clone recursively, i.e.

text
git clone https://github.com/cnlohr/ch32v003_3digit_lcd_usb --recursive

or if you, forgot, cd into the folder and run:

text
git submodule update --init --recursive

Touch Sensing

To 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.

Waveforms

For basic LCD output, you can use a fairly simple waveform that has 10 stages.

  • Stages 0..3 = Specific COM pins are driven LOW in succession, while any segments to light are turned HIGH.
  • Stage 4 = Free time, make sure there is no voltage differential. This also helps control contrast.
  • Stage 5..8 = Specific COM pins are driven HIGH in succession, while any segments to light are turned LOW.
  • Stage 9 = The other half of the free time for contrast.

waveform1

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

waveform2

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.

waveform3

Which looks great until USB sails its boat into it.

waveform4

Resources

Search Aliexpress for "TN LCD Segment" to find these little bad boys.

License

All code and designs may by licensed freely under the MIT/x11 License.

Parts

10
QtyValueFootprintReferences
25.1kResistor_SMD:R_0402_1005MetricR1, R2
11.5kResistor_SMD:R_0402_1005MetricR3
11uResistor_SMD:R_0402_1005MetricC2
14.7uResistor_SMD:R_0402_1005MetricC3
1CH32V003F4U6Package_DFN_QFN:QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mmU1
1LCDcnhardware:TINY_LCD_3_DIGITJ4
1PGMConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1USB_C_Receptacle_USB2.0cnhardware:USB_C_PADDLEJ1
1XC6206P332MR-GPackage_TO_SOT_SMD:SOT-23U2

Similar boards

  • 2 layers10.7 × 19.5 mm0.47incholed, the printed circuit board in 3D

    0.47incholed

    cnlohr/cnhardware

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

    15 parts114
  • 2 layers45 × 25 mmEasy PD Sink, the printed circuit board in 3D

    Easy PD Sink

    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

    41 parts599
  • 2 layers82 × 82 mmBack, the printed circuit board in 3D

    Back

    johanwheeler/ch32-fireplace

    Ch32 based christmas card with 8x8 screen, sound and capacitive buttons

    150 parts33MIT
  • 4 layers27.9 × 108 mmCheep3a, the printed circuit board in 3D

    Cheep3a

    emeb/cheep3a

    An inexpensive Eurorack audio generator

    85 parts9MIT
  • 2 layers29.3 × 73 mmGamepad pmod, the printed circuit board in 3D

    Gamepad pmod

    psychogenic/gamepad-pmod

    CH32V003-based 2xSNES controller interface PMOD

    93 parts7GPL-3.0
  • 2 layers38 × 8 mmMws2812, the printed circuit board in 3D

    Mws2812

    Vonger/V7B_WS2812B

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

    15 parts5
  • 4 layers144 × 150 mmKepler x, the printed circuit board in 3D

    Kepler x

    kunichiko/X68k-KeplerX-PCB

    186 parts4MIT
  • 2 layers180 × 131.1 mmCCController, the printed circuit board in 3D

    CCController

    RainbowLabsDE/LightInstallationController

    PCB and Firmware of our first universal RGB light installation controller.

    92 parts4MIT

Questions

How big is the Microlcd-3digit PCB?

It measures 11.8 × 12.2 mm and has 2 copper layers, 0.7 mm thick.

What parts does the Microlcd-3digit use?

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.

Where can I download the Microlcd-3digit KiCad files?

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.

Can I use the Microlcd-3digit design in my own project?

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).