0:00 Project Overview: This video details a hardware project creating a breadboard voltmeter using a CH32 microcontroller, specifically the v003 series j4 m6 model.
0:16 Code Explanation: The project combines code from previous tutorials on ADC (Analog-to-Digital Converter) and I2C display drivers, adapting it for the new chip and a smaller 72x40 pixel OLED display.
1:25 Chip Choice: The smaller j4 m6 chip was chosen for project miniaturization, fitting a 12x24 mm breadboard. This chip lacks SPI but has similar clock frequency and memory to the previously used F4 P6 model.
1:58 Addressing Viewer Demands: The creator addresses a viewer's demand for the source code, emphasizing that the necessary components have been previously explained and that they are not obligated to release their intellectual property.
3:12 Project Setup: A new project is created in the MounRiver IDE, selecting the correct microcontroller to avoid potential issues.
3:44 Code Adaptation: The code from the bitbang OLED driver tutorial is adapted, removing unnecessary USART code and retaining the I2C and OLED initialization code.
6:44 Display Customization: The display's character handling is modified to accommodate larger, two-line high characters (12x16 pixels), fitting six characters per line on the display.
8:25 Custom Bitmaps: Custom bitmaps for numbers 0-9, a minus sign, and a decimal point are created, with each character represented by 24 bytes (12 bytes for the top and 12 for the bottom).
13:23 Print Character Function: The print_character function is updated to print these larger characters by writing to two consecutive lines on the display.
15:52 Print Number Function: The print_text function is modified to print_number, specifically handling the display of ADC conversion results.
20:48 ADC Setup: The ADC is configured for single-channel, non-continuous conversion, reading one sample at a time to avoid timing issues with the I2C communication. The code to enable three different clock sources is added here.
21:32 External Oscillator Issue: A crucial configuration change is highlighted: disabling the default external oscillator setting and enabling the internal 48 MHz oscillator in the system_ch32vx.c file to ensure correct ADC operation on channel 0 (pin PA2).
25:24 Channel Reading: Functions are created to read ADC channels, configure the ADC, start conversion, wait for completion, and return the result.
26:36 Dual Channel Handling: A function read_channels is introduced to read two ADC channels (PA2 and PC4) sequentially and store the results.
27:45 Voltage Calculation and Display: The print_ADC_channel function calculates the actual voltage based on a voltage divider ratio (3.5641), converts the floating-point result into integer and decimal parts, formats it as a string, and displays it using the print_number function.
31:44 Main Loop: The main loop continuously reads both ADC channels and prints their values on the OLED display.
33:01 Programming and Testing: The code is compiled, uploaded to the microcontroller, and tested. An initial error in display positioning is corrected, and the voltmeter's functionality is demonstrated.
34:32 Multimeter Verification: The accuracy of the breadboard voltmeter is verified by comparing its readings with those of a multimeter.
35:34 Project Conclusion: The creator encourages viewers to visit their website for resources and consider becoming a YouTube channel member to support future projects.