Friday, April 26, 2024

Design Modules or Devices Using RISC-V CHIP Under 20 Rupees

EFY Tested Project

In the landscape of electronic devices, microcontrollers play a pivotal role in processing sensor data and executing programmed functions.

However, the cost of the microcontroller often constitutes a substantial portion of the device’s overall cost.

Traditionally, the integration of microcontrollers into electronic devices has been a substantial contributor to the Bill of Materials (BoM) and consequently the overall cost of the product.

Also Read: Microcontroller Vs Microprocessor

Devices ranging from game pads and electronic controllers to sophisticated robotics often demand microcontrollers with a hefty price tag, frequently ranging from 200 to 300 Rupees.

- Advertisement -

This financial barrier has limited the accessibility of advanced technology to a broader audience.

Enter the CH32V003F4U6 RISC-V microcontroller, a game-changer in cost-effective system design. Priced at a modest 12 to 20 Rupees, this microcontroller not only significantly reduces the cost associated with the heart of the system but also paves the way for innovative solutions where cost efficiency is paramount.

The project aims to reduce costs associated with the microcontroller, which typically comprises a significant portion of the Bill of Materials (BoM).

- Advertisement -

Through the integration of RISC-V architecture, this system provides an efficient and cost-effective solution for designing devices, such as induction heaters, while maintaining affordability under 100 Rupees.

CH32V003 RISC-V CHIP
Fig 1. RISC-V CHIP CH32V003

RISC-V Chip Board – BoM

RISC-V Chip Parts

Power System Design 

According to the datasheet, the chip works within the voltage range of 5 to 3.3V. So here we designed the Voltage regulation system using LM1117 with two capacitors to power the system and provide a regulated power supply of 3.3V.

The voltage regulation circuit consists of the LM1117 voltage regulator, two capacitors, and the CH32V003F4U6 microcontroller.

The LM1117 is connected with its input pin to the unregulated voltage source and its output pin to the microcontroller, providing a stable 3.3V output.

Capacitor Configuration:

Two capacitors are strategically connected across the input and output pins of the LM1117 to enhance stability and filter out noise:

  • Input Capacitor (C_IN): Connected between the input pin of LM1117 and the ground, it helps stabilize the voltage input and mitigate transient fluctuations.
  • Output Capacitor (C_OUT): Connected between the output pin of LM1117 and the ground, it provides stability by minimizing output voltage fluctuations and improving transient response.
RISC-V Chip Power System Circuit
Fig 2. Power system circuit and SMD soldering of components

Reset and Indicators 

Reset Button Implementation:

The reset button is a fundamental component in any embedded system, allowing users to initiate a controlled restart. In our design, a reset button is connected to Pin PD7 of the CH32V003F4U6 microcontroller. A capacitor is added to provide a brief delay, ensuring a stable and noise-free reset signal.

Indicator LED for Power Status:

To provide users with a visual indication of the system’s power status, an indicator LED is connected to the power pin of the CH32V003F4U6 microcontroller. This LED lights up when the system is powered, offering a quick and intuitive assessment of the operational status.

In-Built LED on Pin PC0:

For user feedback and debugging purposes, an in-built LED is integrated into the design, connected to Pin PC0 of the CH32V003F4U6 microcontroller. This LED can be programmed to convey specific system states or to assist in troubleshooting.

Circuit Configuration

The reset button is connected to Pin PD7 with a capacitor for debouncing. The indicator LED is connected to the power pin, providing a visual cue when the system is powered.

The in-built LED is connected to Pin PC0 for programmable feedback. The USB mini female connector is linked to the voltage regulator’s Vin pin, ensuring a stable power supply.

RISC-V Microcontroller Circuit
Fig.3 RISC-V Chip Circuit Configuration

Adding Clock:

A crystal oscillator is essential for providing precise timing in microcontroller-based systems. It acts as the heartbeat, ensuring that all operations occur synchronously and consistently.

The inclusion of a 24MHz crystal oscillator elevates the accuracy of the system, benefiting applications that demand precise timing and synchronization.

Connection of Crystal Oscillator:

The 24MHz crystal is connected across the PCO (Crystal Output) and PCI (Crystal Input) pins of the CH32V003F4U6 microcontroller. This connection establishes a stable clock input, allowing the microcontroller to execute instructions with precision.

Two 22pF capacitors are connected from each crystal pin to the ground (GND), providing the necessary load capacitance for the crystal oscillator.

Crystal Oscillator Circuit
Fig 4. Adding Crystal

Completing the System Design

In the final stage of our system design journey, we introduce a crucial element for ensuring stable power distribution— the decoupling capacitor.

By connecting a decoupling capacitor between the VDD and GND pins of the CH32V003F4U6 microcontroller, we enhance the system’s reliability and mitigate potential noise interference.

With this addition, our RISC-V-based system is poised for diverse applications, as sensors, actuators, headers, and connectors can now be seamlessly integrated into the GPIO pins, unleashing a world of possibilities for designs costing under 100 Rupees.

1. The Role of Decoupling Capacitor:

The decoupling capacitor acts as a buffer, providing a stable and noise-free power supply to the microcontroller. It counteracts voltage fluctuations, ensuring that the microcontroller receives a clean and consistent power signal, which is critical for reliable operation.

2. Connecting Decoupling Capacitor:

A decoupling capacitor is connected between the VDD and GND pins of the CH32V003F4U6 microcontroller. Typically, a capacitor in the range of a few microfarads is chosen to effectively filter out high-frequency noise and stabilize the power supply.

3. Expanding the System:

With the foundational elements in place — the microcontroller, voltage regulator, crystal oscillator, reset button, indicator LED, in-built LED, and now the decoupling capacitor — the system is primed for expansion. Sensors and actuators can be seamlessly integrated into the GPIO pins, and headers/connectors can be added to facilitate communication with external devices.

4. Programming and Implementation:

The CH32V003F4U6 microcontroller can be programmed according to the specific requirements of the application. The versatile GPIO pins provide the flexibility to interface with a wide array of sensors and control various actuators. With headers and connectors in place, the system can be easily integrated into larger projects or embedded into custom-designed PCBs.

RISC-V Chip – Circuit 

RISC-V Chip Circuit
Fig 5. Ch32v00 reference design
DIY RISC-V Chip
Fig 6. RISC-V Chip based board design

You can check the step-by-step video tutorial to make your own RISC-V Chip under 20Rs.

If you have any doubts or facing any issues, feel free to ask in the comments below.

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

SHARE YOUR THOUGHTS & COMMENTS

Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators

×