stm32-nrf24-wireless-node
PublicLoading 3D model… large boards can take a moment.
STM32 nRF24 Wireless Node
A fully custom-designed embedded wireless node with its own PCB, firmware, and working radio communication demo.
Custom 2-layer embedded wireless node built around STM32G431KBT6, nRF24L01+ over SPI, and SSD1306 OLED over I2C.
This repository contains both the hardware design and the starter firmware for a compact custom communication platform.
Overview
This project is a custom PCB-based wireless node designed and assembled for experimenting with:
- custom STM32 hardware design
- wireless communication using nRF24L01+
- OLED user interface using SSD1306
- USB communication through USB-C
- debugging and programming through SWD
- future expansion into more advanced embedded wireless applications
At the moment, this is a working wireless node platform.
Two identical boards can already exchange packets successfully, display information on OLED screens, and react to button input.
Hardware
The board is a custom 2-layer PCB based on:
- MCU: STM32G431KBT6
- Radio module: nRF24L01+ connected through SPI
- Display: SSD1306 connected through I2C
- USB-C connector for power and USB communication
- SWD header for programming and debugging
- Reset and Boot buttons for firmware flashing/control
- 2 user buttons for custom application logic
- 3 LEDs:
- 1 power status LED
- 2 firmware-controlled user LEDs
The schematic also includes the STM32 main sheet, the SPI-connected nRF24L01+ module, the I2C SSD1306 module, SWD with NRST, user/reset/boot buttons, and LED sheets.
Hardware Features
MCU
The board uses STM32G431KBT6 as the main controller.
The MCU is connected to the radio, OLED, USB, LEDs, buttons, and SWD debug interface.
Clock
The STM32 uses an external 24 MHz crystal oscillator for system clock generation.
Radio interface
The radio is based on nRF24L01+ and is connected through SPI:
- CE
- CSN
- SCK
- MISO
- MOSI
- IRQ
This is visible in the schematic on the nRF24L01+ module sheet and the STM32 interconnect sheet.
nRF24L01+ IRQ
The nRF24L01+ module provides an IRQ pin, which signals internal radio events such as RX data ready, TX complete, or maximum retransmits reached.
In this hardware revision, the IRQ line is not connected to the MCU (R12 is not populated, DNP).
The current firmware uses a polling-based approach, reading the STATUS register over SPI.
If interrupt-driven operation is desired, the IRQ line can be connected by populating R12 (10kΩ pull-up to 3.3V) and configuring a GPIO interrupt on the MCU.
Display interface
The OLED display is connected through I2C using:
- SDA
- SCL
The design uses a 4-pin display header and is intended for SSD1306-based modules.
USB-C
The board includes a USB-C connector used for:
- board power
- USB communication with the STM32
The USB/power sheet also includes the regulator and protection/power-path components.
USB-C Implementation
The USB-C interface includes proper 5.1kΩ CC resistors, allowing correct device-mode detection when connected to a host.
SWD programming and debugging
A dedicated SWD header is included so the board can still be programmed and debugged even if USB firmware is broken or not available.
SWD header signals:
- SWDIO
- SWCLK
- NRST
- VTREF / 3.3V
- GND
This is explicitly shown in the SWD sheet.
Buttons
The board includes:
- Reset button
- Boot button
- 2 user buttons
The two user buttons are intended for any firmware-defined purpose.
The button circuits include passive components for more stable operation and input conditioning.
Button Debouncing
User buttons include RC filtering for hardware-level debouncing and more stable input signals.
LEDs
The board includes three LEDs:
- Power/status LED
- 2 user-controlled LEDs
The user LEDs can be controlled entirely from firmware.
The LED sheet shows dedicated LED status outputs.
Power Design
The board can be powered in two ways:
- through USB-C
- through an external power input
A slide switch is included so power can be disconnected when the board is externally powered.
The power section also includes:
- AMS1117-3.3 voltage regulator
- SS54 diodes in the power path
In practical terms, the diodes are used to help isolate power sources and reduce unwanted reverse-current paths between different supply inputs.
Power Input Specifications
The board can be powered via:
- USB-C (5V input) — recommended
- External input — supported
The onboard AMS1117-3.3 linear regulator generates 3.3V for the system.
Recommended input voltage
- 5V (preferred)
- 4.5V to 12V externally
The AMS1117 is a linear regulator, so power dissipation increases with higher input voltage.
Using voltages significantly above 5V causes more heat and lower efficiency.
For reliable operation, a 5V supply is strongly recommended.
Direct LiPo input is not recommended without additional power-management circuitry, because the regulator may not maintain stable 3.3V output at lower battery voltage.
OLED Compatibility Notes
This project uses a 1.54" SSD1306 128x64 dots display, which is less common than smaller variants.
Other SSD1306 I2C displays may also be used if they are compatible electrically and use a standard 2.54 mm header.
The design also supports both:
- 3.3V SSD1306 modules
- 5V SSD1306 modules
Selection depends on placing the correct 0-ohm resistor option.
On the STM32 sheet, R15 and R16 are shown as 0Ω selectable positions related to the display supply configuration.
For exact details, see the schematic PDF in the hardware folder.
Board Dimensions
Approximate board dimensions:
- Length: 75.9 mm
- Width: 46.0 mm
Note: Actual dimensions may vary slightly due to manufacturing tolerances (typically within ±0.1 mm).
nRF24 Wireless Node Firmware
Location
firmware/nrf24_wireless_node/
Overview
This firmware implements a wireless communication demo between two identical boards using the nRF24L01+ transceiver. One node operates as a transmitter (TX), while the other operates as a receiver (RX).
Configuration
The device role is selected at compile time using the following macro:
#define NRF_ROLE_TX 1 // 1 = TX node, 0 = RX node
Modes of Operation
TX Mode (Transmitter)
- Behavior: Sends a packet periodically (~1 ms interval)
- Payload: Incrementing counter value:
msg: 1 msg: 2 msg: 3 ... msg: 18995 msg: 18996
OLED Feedback:
- TX OK - transmission successful
- TX ERR - transmission failed
Interfaces
USB (CDC)
The device exposes a USB CDC (Virtual COM Port) interface.
From the user side, it behaves similarly to a serial UART/USART terminal connection, so output messages can be monitored with tools such as RealTerm or other serial terminal software.
- On connection:
System started - Button events:
Button 1 pressed Button 2 pressed
No comments yet. Be the first to ask about this board.