Creating a USB-Enabled 3-Digit, 7-Segment LCD with Touch Capabilities for Under $1
0:03 Introduction: The video demonstrates creating a USB-enabled device with a 7-segment LCD and touch sensor using a cheap RISC-V microcontroller (ch32v003).
0:31 Cheap LCDs: The project utilizes incredibly affordable 7-segment LCDs sourced from AliExpress, costing around 21 cents each in bulk.
0:58 The CH32V003 Microcontroller: The core of the project is the ch32v003, a ~10 cent RISC-V microcontroller, chosen for its low cost and versatility.
1:03 Bit-Banged USB Stack: The ch32v003 lacks native USB, so a custom bit-banged USB stack was implemented to enable communication with a PC.
1:21 Custom Bootloader: A compact bootloader (1920 bytes) was developed, allowing firmware updates directly through USB without a dedicated programmer.
1:37 Connectorless USB-C Design: The project features a unique connectorless USB-C design, where the PCB itself acts as the male connector, held in place by the LCD.
2:24 PCB Fabrication: The PCBs were ordered from JLCPCB with a 0.6mm thickness and ENIG finish for reliable USB connections, costing $79.39 for 25 boards.
3:24 LCD Packaging Issues: The LCDs arrived with damaged pins due to poor packaging, though none were found to be faulty.
3:36 Initial Firmware and Bootloader: Basic firmware was written to drive the LCD, and the custom USB bootloader was successfully tested.
4:56 USB-Induced LCD Interference: Inserting the USB connector initially caused LCD segments to malfunction due to shorting. This was resolved using UV gel nail polish as an insulator.
5:44 Driving the LCD: The LCD is driven by manipulating the COM and SEG lines with specific voltage levels (1/2 VCC) to illuminate segments.
6:49 Driving at 1/2 VCC: A custom assembly loop was created to generate the required 1/2 VCC (1.6V) for driving the LCD, as the microcontroller couldn't do this natively.
7:41 Touch Sensing Implementation: The LCD is repurposed as a touch sensor by driving all segments low, applying a pull-up resistor, and measuring the voltage rise time with the ADC.
8:45 ADC Sampling and Oversampling: The ADC samples the voltage for 375ns to detect the presence of a finger, with oversampling used to improve accuracy.
9:45 Hysteresis for Touch Detection: Hysteresis is added to the touch detection
Error: unsupported operand type(s) for +: 'NoneType' and 'str' Conclusion:** The project successfully demonstrates a functional, low-cost USB device with an LCD and touch sensor, highlighting the versatility of the ch32v003 microcontroller.
11:19 Addendums: UV glue is recommended for insulation, and one LCD output pin is used as the RESET pin, requiring option byte reprogramming.