The Arduino board is used to communicate with the external device through RS-232. The device responses are resolved by the Arduino and outputted to the human-machine interface (HMI).
Suggested board:
- Arduino MEGA 2560 Rev3
Purpose:
- Send command to the external device through RS-232.
- Get responses from the device through RS-232.
- Send the device responses to the HMI through Serial1.
- Arduino can monitor the device responses from the serial monitor.
Suggested hardware setup:
- A "RS-232 to TTL module" is used to convert the RS-232 signal because Arduino MEGA 2560 Rev3 does not support RS-232 directly.
- A HMI with UART interface is used to show the device responses through the Serial1 channel of the Arduino.
The code is in RS-232-SerialCallResponse-And-HMI-Display.ino.
Distributed under the MIT License.
Author: Dr. Hsien-Ching Chung
ORCID: https://orcid.org/0000-0001-9364-8858
Project Link: https://github.com/HsienChing/RS-232_serial_call_response_and_HMI_display_for_Arduino
H.C. Chung thanks all the contributors to this project for their valuable discussions and recommendations, especially Jung-Feng Lin, Hsiao-Wen Yang, Yen-Kai Lo, An-De Andrew Chung.
This work was supported in part by Super Double Power Technology Co., Ltd., Taiwan under grant SDP-RD-PROJ-001-2020.