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

How to Use STM-32 NUCLEO-F401RE: Examples, Pinouts, and Specs

Image of STM-32 NUCLEO-F401RE
Cirkit Designer LogoDesign with STM-32 NUCLEO-F401RE in Cirkit Designer

Introduction

The STM-32 NUCLEO-F401RE is a development board manufactured by STMicroelectronics, featuring the STM32F401RE microcontroller. This microcontroller is based on the ARM Cortex-M4 core, offering high performance and low power consumption. The board is designed to provide a flexible platform for prototyping and developing embedded applications. It supports a wide range of connectivity options, including USB, UART, I2C, and SPI, and is compatible with both Arduino Uno R3 and ST morpho headers, enabling easy expansion with additional shields and modules.

Explore Projects Built with STM-32 NUCLEO-F401RE

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
WiFi-Enabled Environmental Monitoring System with Alert Notifications
Image of GAS LEAKAGE DETECTION: A project utilizing STM-32 NUCLEO-F401RE in a practical application
This circuit features a NUCLEO-F303RE microcontroller board interfaced with several modules for sensing, actuation, and communication. It uses I2C communication to display data on an LCD screen, UART communication to interface with an ESP8266 WiFi module, and reads an MQ-2 gas sensor via an ADC pin. The microcontroller also controls a buzzer for audible alerts and a relay module for switching higher power loads, possibly in response to sensor readings or remote commands received over WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
IoT-Enabled Environmental Monitoring System with NUCLEO-F303RE and ESP8266
Image of GAS LEAKAGE DETECTION: A project utilizing STM-32 NUCLEO-F401RE in a practical application
This circuit features a NUCLEO-F303RE microcontroller board interfaced with various modules for sensing, actuation, and communication. It includes an MQ-2 gas sensor for detecting combustible gases, a buzzer for audible alerts, and a relay for controlling high-power devices. Additionally, the circuit uses an ESP8266 WiFi module for wireless connectivity and an I2C LCD display for user interface and data display.
Cirkit Designer LogoOpen Project in Cirkit Designer
STM32 Nucleo F303RE Controlled Ultrasonic Sensing with RGB Feedback and I2C LCD Display
Image of CS435-final: A project utilizing STM-32 NUCLEO-F401RE in a practical application
This circuit features a STM32 Nucleo F303RE microcontroller interfaced with three HC-SR04 ultrasonic sensors for distance measurement and a 20x4 LCD display over I2C for data output. Additionally, there is a WS2812 RGB LED strip controlled by the microcontroller for visual feedback. The power supply provides a common 5V to the LCD, ultrasonic sensors, LED strip, and the microcontroller's +5V input, with all components sharing a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Nucleo 401RE Controlled LED with Button Input
Image of CSE360 Lab1: A project utilizing STM-32 NUCLEO-F401RE in a practical application
This circuit features an STM32 Nucleo 401RE microcontroller that controls a red LED through a 220-ohm resistor. The LED's cathode is connected to ground, and its anode is connected to the microcontroller via the resistor, allowing the microcontroller to manage the LED's state.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with STM-32 NUCLEO-F401RE

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 GAS LEAKAGE DETECTION: A project utilizing STM-32 NUCLEO-F401RE in a practical application
WiFi-Enabled Environmental Monitoring System with Alert Notifications
This circuit features a NUCLEO-F303RE microcontroller board interfaced with several modules for sensing, actuation, and communication. It uses I2C communication to display data on an LCD screen, UART communication to interface with an ESP8266 WiFi module, and reads an MQ-2 gas sensor via an ADC pin. The microcontroller also controls a buzzer for audible alerts and a relay module for switching higher power loads, possibly in response to sensor readings or remote commands received over WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GAS LEAKAGE DETECTION: A project utilizing STM-32 NUCLEO-F401RE in a practical application
IoT-Enabled Environmental Monitoring System with NUCLEO-F303RE and ESP8266
This circuit features a NUCLEO-F303RE microcontroller board interfaced with various modules for sensing, actuation, and communication. It includes an MQ-2 gas sensor for detecting combustible gases, a buzzer for audible alerts, and a relay for controlling high-power devices. Additionally, the circuit uses an ESP8266 WiFi module for wireless connectivity and an I2C LCD display for user interface and data display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CS435-final: A project utilizing STM-32 NUCLEO-F401RE in a practical application
STM32 Nucleo F303RE Controlled Ultrasonic Sensing with RGB Feedback and I2C LCD Display
This circuit features a STM32 Nucleo F303RE microcontroller interfaced with three HC-SR04 ultrasonic sensors for distance measurement and a 20x4 LCD display over I2C for data output. Additionally, there is a WS2812 RGB LED strip controlled by the microcontroller for visual feedback. The power supply provides a common 5V to the LCD, ultrasonic sensors, LED strip, and the microcontroller's +5V input, with all components sharing a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CSE360 Lab1: A project utilizing STM-32 NUCLEO-F401RE in a practical application
Nucleo 401RE Controlled LED with Button Input
This circuit features an STM32 Nucleo 401RE microcontroller that controls a red LED through a 220-ohm resistor. The LED's cathode is connected to ground, and its anode is connected to the microcontroller via the resistor, allowing the microcontroller to manage the LED's state.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT (Internet of Things) devices and prototypes
  • Industrial automation and control systems
  • Robotics and motor control
  • Sensor data acquisition and processing
  • Educational and research projects
  • General-purpose embedded systems development

Technical Specifications

Key Technical Details

  • Microcontroller: STM32F401RE (ARM Cortex-M4, 84 MHz)
  • Flash Memory: 512 KB
  • SRAM: 96 KB
  • Operating Voltage: 3.3V (core), 5V (I/O via USB or external power)
  • Connectivity:
    • USB (Micro-USB connector for power and communication)
    • UART, I2C, SPI, and CAN interfaces
  • Clock Source: 8 MHz external crystal oscillator
  • Debugging: Integrated ST-LINK/V2-1 debugger/programmer
  • Expansion Headers:
    • Arduino Uno R3 compatibility
    • ST morpho headers for additional GPIO and peripherals
  • Power Supply Options:
    • USB-powered (5V via Micro-USB)
    • External power supply (VIN pin or E5V pin)
  • Dimensions: 68.6 mm x 53.4 mm

Pin Configuration and Descriptions

The STM-32 NUCLEO-F401RE features multiple pin headers for connectivity. Below is a summary of the key pin configurations:

Arduino Uno R3-Compatible Header

Pin Name Functionality Description
A0-A5 Analog Input 6 analog input pins (12-bit ADC)
D0-D13 Digital I/O 14 digital I/O pins (6 PWM-capable)
VIN Power Input External power input (7-12V)
5V Power Output 5V output (USB or external power)
3.3V Power Output 3.3V regulated output
GND Ground Common ground
RESET Reset Resets the microcontroller

ST Morpho Header

Pin Name Functionality Description
PAx, PBx GPIO Pins General-purpose I/O pins
VDD Power Supply 3.3V power supply
GND Ground Common ground
NRST Reset Microcontroller reset pin
OSC_IN External Clock Input Input for external clock source
OSC_OUT External Clock Output Output for external clock source

Usage Instructions

How to Use the STM-32 NUCLEO-F401RE in a Circuit

  1. Powering the Board:

    • Connect the board to your computer using a Micro-USB cable for power and communication.
    • Alternatively, supply power via the VIN pin (7-12V) or the E5V pin (5V regulated).
  2. Programming the Board:

    • Use the integrated ST-LINK/V2-1 debugger/programmer to upload code.
    • Compatible IDEs include STM32CubeIDE, Keil MDK, and IAR Embedded Workbench.
    • For Arduino users, install the STM32 core in the Arduino IDE.
  3. Connecting Peripherals:

    • Use the Arduino Uno R3 headers for shields and modules.
    • Use the ST morpho headers for additional GPIO and peripherals.
  4. Running the Code:

    • After uploading the code, the board will automatically reset and execute the program.

Important Considerations and Best Practices

  • Ensure the board is powered correctly to avoid damage. Do not exceed the voltage limits.
  • Use decoupling capacitors when connecting external components to reduce noise.
  • Avoid connecting high-current loads directly to the GPIO pins.
  • When using the Arduino IDE, ensure the correct board and port are selected in the settings.
  • For advanced debugging, use the ST-LINK/V2-1 interface with STM32CubeIDE.

Example Code for Arduino IDE

The following example demonstrates how to blink an LED connected to pin D13:

// Blink an LED on pin D13 (built-in LED on the NUCLEO-F401RE)

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

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the computer:

    • Ensure the Micro-USB cable is functional and supports data transfer.
    • Check that the ST-LINK driver is installed on your computer.
    • Try a different USB port or restart your computer.
  2. Code upload fails:

    • Verify that the correct board and port are selected in the IDE.
    • Ensure no other application is using the ST-LINK interface.
    • Press the reset button on the board and try uploading again.
  3. The board does not power on:

    • Check the power source and ensure the voltage is within the acceptable range.
    • Inspect the USB cable or external power supply for faults.
  4. Peripherals are not working as expected:

    • Double-check the wiring and connections.
    • Verify that the correct pins are configured in the code.
    • Use a multimeter to test for continuity and voltage levels.

FAQs

Q: Can I use the STM-32 NUCLEO-F401RE with the Arduino IDE?
A: Yes, the board is compatible with the Arduino IDE. Install the STM32 core to program it using Arduino libraries.

Q: What is the maximum current output of the GPIO pins?
A: Each GPIO pin can source or sink up to 25 mA. However, it is recommended to limit the current to 8 mA for safe operation.

Q: Can I use the board without an external programmer?
A: Yes, the board includes an integrated ST-LINK/V2-1 debugger/programmer for programming and debugging.

Q: How do I reset the board?
A: Press the RESET button on the board to perform a hardware reset.

Q: Is the board compatible with 5V logic?
A: The STM32F401RE operates at 3.3V logic levels. Use level shifters if interfacing with 5V devices.