2026-04-19 10:55 PM - last edited on 2026-04-20 1:28 AM by mƎALLEm
Hello everyone,
I am working on a design using STM32F401RE and need to interface a barcode scanner that works over a standard 5 V USB interface.
The barcode scanner behaves like a typical USB device (likely HID/CDC) and expects:
it also has RS232 interfacing option aswell.
However, as per STM32F401RE documentation, it supports only VBUS voltage max 3.6V.
I would like guidance on:
The goal is to reliably read barcode data into the MCU in an embedded system (no PC involved).
Thanks in advance for your support.
2026-04-20 2:50 AM
Hi @karan_t
When STM32 is configured as host you need to configure a pin as output to power the device. You can use one of our reference boards schematics as reference.
Caution: Voltage on all STM32 pins must not exceed 4V against VDD, even when the MCU is not powered.
For the barcode scanner used, check whether it is bus or self powered, and provide the appropriate power supply/sensing accordingly.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-04-20 3:24 AM
USB is always 5V !
Take a look at Application Note AN4879, Introduction to USB hardware and PCB guidelines using STM32 MCUs:
@karan_t wrote:it also has RS232 interfacing option as well
Sounds like that would be the easiest option for you!
Are you sure it's actual RS232 - not just TTL ?