Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use STM32F103 Blue Pill: Examples, Pinouts, and Specs

Image of STM32F103 Blue Pill
Cirkit Designer LogoDesign with STM32F103 Blue Pill in Cirkit Designer

Introduction

The STM32F103 Blue Pill is a compact and affordable microcontroller development board based on the STM32F103C8T6 chip, manufactured by STM32. It features a 32-bit ARM Cortex-M3 core, 64KB of flash memory, and a wide range of I/O pins, making it a versatile choice for embedded systems and IoT projects. Its small form factor and low cost make it popular among hobbyists, students, and professionals alike.

Explore Projects Built with STM32F103 Blue Pill

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32F103C8T6 Bluetooth-Controlled Arcade Joystick Interface
Image of RC카 조이스틱: A project utilizing STM32F103 Blue Pill in a practical application
This circuit features an STM32F103C8T6 microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit Arcade Joystick for user input. The microcontroller's pins B0 and B10 are connected to the TXD and RXD pins of the Bluetooth module, enabling serial communication, while pins B14 and B15 interface with the joystick's directional controls. The circuit is powered by a battery, with power distribution managed through the microcontroller's 3.3V pin and common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
STM32F103C8T6 Battery-Powered LED Indicator Circuit
Image of Assigment.2: A project utilizing STM32F103 Blue Pill in a practical application
This circuit features an STM32F103C8T6 microcontroller powered by a 3.3V battery, which controls a red LED. The LED is connected to pin A1 of the microcontroller through a 10-ohm resistor to limit the current.
Cirkit Designer LogoOpen Project in Cirkit Designer
STM32F103C8T6 Battery-Powered LED Blinker
Image of test: A project utilizing STM32F103 Blue Pill in a practical application
This circuit features an STM32F103C8T6 microcontroller powered by a 2 x AA battery mount, which controls a red LED. The microcontroller is programmed to blink the LED on and off with a 1-second interval.
Cirkit Designer LogoOpen Project in Cirkit Designer
Solar-Powered STM32-Based Automation System with Matrix Keypad and RTC
Image of soloar cleaner : A project utilizing STM32F103 Blue Pill in a practical application
This circuit features an STM32F103C8T6 microcontroller interfaced with a membrane matrix keypad for input, an RTC DS3231 for real-time clock functionality, and a 16x2 I2C LCD for display. It controls four 12V geared motors through two MD20 CYTRON motor drivers, with the motor power supplied by a 12V battery regulated by a buck converter. The battery is charged via a solar panel connected through a solar charge controller, ensuring a renewable energy source for the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with STM32F103 Blue Pill

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of RC카 조이스틱: A project utilizing STM32F103 Blue Pill in a practical application
STM32F103C8T6 Bluetooth-Controlled Arcade Joystick Interface
This circuit features an STM32F103C8T6 microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit Arcade Joystick for user input. The microcontroller's pins B0 and B10 are connected to the TXD and RXD pins of the Bluetooth module, enabling serial communication, while pins B14 and B15 interface with the joystick's directional controls. The circuit is powered by a battery, with power distribution managed through the microcontroller's 3.3V pin and common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Assigment.2: A project utilizing STM32F103 Blue Pill in a practical application
STM32F103C8T6 Battery-Powered LED Indicator Circuit
This circuit features an STM32F103C8T6 microcontroller powered by a 3.3V battery, which controls a red LED. The LED is connected to pin A1 of the microcontroller through a 10-ohm resistor to limit the current.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of test: A project utilizing STM32F103 Blue Pill in a practical application
STM32F103C8T6 Battery-Powered LED Blinker
This circuit features an STM32F103C8T6 microcontroller powered by a 2 x AA battery mount, which controls a red LED. The microcontroller is programmed to blink the LED on and off with a 1-second interval.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of soloar cleaner : A project utilizing STM32F103 Blue Pill in a practical application
Solar-Powered STM32-Based Automation System with Matrix Keypad and RTC
This circuit features an STM32F103C8T6 microcontroller interfaced with a membrane matrix keypad for input, an RTC DS3231 for real-time clock functionality, and a 16x2 I2C LCD for display. It controls four 12V geared motors through two MD20 CYTRON motor drivers, with the motor power supplied by a 12V battery regulated by a buck converter. The battery is charged via a solar panel connected through a solar charge controller, ensuring a renewable energy source for the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Prototyping embedded systems
  • IoT devices and smart home applications
  • Robotics and motor control
  • Data acquisition and sensor interfacing
  • Educational projects for learning ARM Cortex-M3 architecture

Technical Specifications

The STM32F103 Blue Pill offers the following key technical details:

Parameter Value
Microcontroller STM32F103C8T6
Core ARM Cortex-M3
Operating Frequency 72 MHz
Flash Memory 64 KB
SRAM 20 KB
GPIO Pins 37
Communication Interfaces UART, SPI, I2C, CAN, USB
ADC Resolution 12-bit (10 channels)
Operating Voltage 3.3V
Input Voltage Range 2.0V to 3.6V
Power Supply 5V via USB or external source
Dimensions 53 mm x 22 mm

Pin Configuration and Descriptions

The STM32F103 Blue Pill has a total of 40 pins, including GPIO, power, and communication pins. Below is a summary of the pin configuration:

Pin Name Description
3.3V 3.3V power output
GND Ground
A0–A7 Analog input pins (12-bit ADC)
D0–D15 Digital I/O pins
TX, RX UART communication pins
SCL, SDA I2C communication pins
USB+ / USB- USB data pins
NRST Reset pin
BOOT0 Boot mode selection pin

Usage Instructions

How to Use the STM32F103 Blue Pill in a Circuit

  1. Powering the Board:

    • Connect the board to a 5V power source via the USB port or the 5V pin.
    • Ensure the power supply is stable and within the specified voltage range.
  2. Programming the Board:

    • Use an ST-Link programmer or a USB-to-serial adapter to upload code.
    • Install the STM32CubeIDE or the Arduino IDE with the STM32 core for development.
  3. Connecting Peripherals:

    • Use the GPIO pins for interfacing with sensors, actuators, and other devices.
    • For analog inputs, connect sensors to the A0–A7 pins.
  4. Boot Mode Selection:

    • Set the BOOT0 pin to 0 for normal operation or 1 for programming mode.

Important Considerations and Best Practices

  • Always use a 3.3V logic level for GPIO pins to avoid damaging the microcontroller.
  • Use decoupling capacitors near the power pins to ensure stable operation.
  • Avoid drawing excessive current from the 3.3V pin, as it is limited in output capacity.
  • When using USB for communication, ensure proper grounding to avoid noise issues.

Example Code for Arduino IDE

Below is an example of how to blink an LED connected to pin D13 using the Arduino IDE:

// Blink an LED on pin D13 of the STM32F103 Blue Pill
// Ensure the STM32 core is installed in the Arduino IDE

void setup() {
  pinMode(PC13, OUTPUT); // Set pin PC13 (D13) as an output
}

void loop() {
  digitalWrite(PC13, HIGH); // Turn the LED on
  delay(1000);              // Wait for 1 second
  digitalWrite(PC13, LOW);  // Turn the LED off
  delay(1000);              // Wait for 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not recognized by the computer:

    • Ensure the correct drivers for the ST-Link or USB-to-serial adapter are installed.
    • Check the USB cable for damage or try a different cable.
  2. Code upload fails:

    • Verify that the BOOT0 pin is set to the correct position for programming mode.
    • Ensure the correct COM port and board settings are selected in the IDE.
  3. The board does not power on:

    • Check the power supply voltage and connections.
    • Inspect the board for any visible damage or loose components.
  4. GPIO pins are not responding:

    • Confirm that the pins are configured correctly in the code.
    • Check for short circuits or incorrect wiring.

FAQs

Q: Can I use 5V logic devices with the STM32F103 Blue Pill?
A: No, the GPIO pins operate at 3.3V logic levels. Use a level shifter if interfacing with 5V devices.

Q: How do I reset the board?
A: Press the onboard reset button or toggle the NRST pin.

Q: Can I use the Arduino IDE for programming?
A: Yes, the STM32 Blue Pill is compatible with the Arduino IDE after installing the STM32 core.

Q: What is the maximum current output of the 3.3V pin?
A: The 3.3V pin can supply a maximum of approximately 100 mA. Avoid exceeding this limit.