2022-01-10 06:20 AM
hello everyone, i am using stm32f407 discovery board and i would receive data from a device (load cell amplifier) which communicates via RS232. So my question is : can i use a simple USART in my stm32f4 to receive data ? or i need to use ( RS232 --> UART) converter between the device and my stm32f4 ?
Solved! Go to Solution.
2022-01-10 06:33 AM
Dear @BMoha.3
You need an RS232 transceiver to add to STM32F4 if your device (load cell amplifier) has levels of RS232 :
Signal Voltage levels State
-3 to -25v --> 1
+3 to +25v --> 0
And you can use UARTx or USARTx peripheral.
2022-01-10 06:33 AM
Dear @BMoha.3
You need an RS232 transceiver to add to STM32F4 if your device (load cell amplifier) has levels of RS232 :
Signal Voltage levels State
-3 to -25v --> 1
+3 to +25v --> 0
And you can use UARTx or USARTx peripheral.
2022-01-10 06:38 AM
Thank you @Community member for your response,
so what i clearly understand that i have to use a ( RS232 --> UART) converter like MAX3232 between my device and the stm32, am i right ?
2022-01-10 06:43 AM
Yes, you need a transceiver like MAX3232 for STM32F4 if your device from the other side follow RS232 levels.
For example, if you need to connect STM32F4 to a PC via RS232, you have to add RS232 transceiver to adapt voltage levels.
2022-01-10 06:49 AM
Yes, you can also find equivalent devices on the RS-232 selector website, where you can select a suitable device for your needs (number of RX, TX, Speed, Supply).
Regards
/Peter
2022-01-10 07:23 AM
Thank you so much for the help @Community member, so i will use a RS232 transceiver (MAX3232) to read data from my device. After connection of :
RX_stm32 --> TX_MAX3232
TX_stm32 --> RX_MAX3232
now should i use a normal UASRT configuration to read the data or configure the USART of the stm32 used with the Hardware flow control RS232 option ?
this a picture of the RS232 pins of my device :
2022-01-10 07:29 AM
@BMoha.3 ,
As I already said, you can use UART or USART for RS232 communication.
USART can be used also for synchrounus communication but you don't need this feature as per the picture you shared.
You can refer to any of the examples provided in STM32CubeF4 under the path:
\Projects\STM324xG_EVAL\Examples\UART
2022-01-10 10:55 AM
Don't bother, use HC-05 uart to bluetooth serial 4 pin dongle for few dollars. For mobile phone, you can have fun with android Bluetooth Electronics which use your phone as a remote touch screen!